/* DeepDebate Shared Styles */
/* Matching iOS App Design System */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Primary Brand Colors - from iOS App Icon gradient */
    --blue: #007AFF;           /* iOS System Blue */
    --purple: #9433EB;         /* RGB(148, 51, 235) */
    --magenta: #D946EF;        /* Bright magenta */
    --pink: #EC4899;           /* Pink */
    --red: #FF3B30;            /* iOS System Red */

    /* Gradient stops from logo */
    --gradient-start: #007AFF;
    --gradient-mid1: #6366F1;
    --gradient-mid2: #9433EB;
    --gradient-mid3: #D946EF;
    --gradient-end: #FF3B30;

    /* Text Colors */
    --text: #1C1C1F;           /* RGB(28, 28, 31) - iOS dark */
    --text-light: #6B7280;
    --text-muted: #9CA3AF;

    /* Background Colors */
    --white: #FFFFFF;
    --gray-50: #F9FAFB;
    --gray-100: #F7F3FA;       /* Light lavender from launch screen */
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;

    /* Semantic Colors */
    --success: #34C759;        /* iOS Green */
    --warning: #FF9500;        /* iOS Orange */
    --error: #FF3B30;          /* iOS Red */

    /* Position Colors (for debates) */
    --position-a: #007AFF;     /* Blue - Pro/For */
    --position-b: #FF3B30;     /* Red - Against/Con */

    /* Spacing Scale (matching iOS) */
    --space-xxs: 4px;
    --space-xs: 6px;
    --space-sm: 8px;
    --space-md: 12px;
    --space-lg: 16px;
    --space-xl: 20px;
    --space-xxl: 24px;
    --space-xxxl: 32px;

    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-xxl: 20px;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 4px 8px rgba(0, 0, 0, 0.15);
    --shadow-xl: 0 6px 12px rgba(0, 0, 0, 0.2);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Segoe UI', 'Roboto', 'Helvetica', 'Arial', sans-serif;
    background: var(--white);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== Typography (matching iOS) ===== */
h1 {
    font-size: 2.5rem;  /* ~40px */
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.5px;
}

h2 {
    font-size: 1.75rem;  /* ~28px - Large Title */
    font-weight: 700;
    line-height: 1.2;
}

h3 {
    font-size: 1.375rem; /* ~22px - Title */
    font-weight: 600;
    line-height: 1.3;
}

h4 {
    font-size: 1.0625rem; /* ~17px - Section Title */
    font-weight: 600;
    line-height: 1.4;
}

p {
    font-size: 0.9375rem; /* ~15px - Body */
    color: var(--text-light);
}

.text-caption {
    font-size: 0.75rem;  /* 12px */
    color: var(--text-muted);
}

/* ===== Brand Logo ===== */
.logo-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-waveform {
    height: 28px;
    width: auto;
}

.logo-text {
    font-size: 1.125rem; /* 18px */
    font-weight: 700;
    letter-spacing: -0.5px;
    background: linear-gradient(90deg, var(--blue), var(--purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== Navigation ===== */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--gray-200);
    padding: var(--space-md) var(--space-xl);
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    text-decoration: none;
}

.nav-badge {
    font-size: 0.625rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--purple);
    color: var(--white);
}

.nav-links {
    display: flex;
    gap: var(--space-xxl);
    align-items: center;
}

.nav-links a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.9375rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

.nav-links a:hover {
    color: var(--blue);
}

.nav-cta {
    background: linear-gradient(135deg, var(--blue), var(--purple));
    color: var(--white) !important;
    padding: var(--space-sm) var(--space-lg);
    border-radius: var(--radius-md);
    font-weight: 600;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.nav-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.4);
}

/* Mobile menu */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-sm);
}

.mobile-menu-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text);
    margin: 6px 0;
    transition: all 0.3s ease;
    border-radius: 2px;
}

/* ===== Hero Section ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--blue) 0%, var(--purple) 35%, var(--magenta) 65%, var(--pink) 85%, var(--red) 100%);
    padding: 6rem 2rem 4rem;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

.hero-content {
    text-align: center;
    color: var(--white);
    max-width: 800px;
    position: relative;
    z-index: 1;
}

.hero-logo {
    margin-bottom: var(--space-xxl);
    animation: fadeInUp 0.8s ease-out;
}

.hero-logo svg {
    height: 80px;
    width: auto;
}

.hero h1 {
    color: var(--white);
    font-size: 3rem;
    margin-bottom: var(--space-lg);
    animation: fadeInUp 0.8s ease-out 0.1s backwards;
}

.hero .tagline {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: var(--space-xxxl);
    animation: fadeInUp 0.8s ease-out 0.2s backwards;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    gap: var(--space-lg);
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease-out 0.3s backwards;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-xl);
    border-radius: var(--radius-lg);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.25s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--white);
    color: var(--blue);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl);
    color: var(--blue);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.15);
    color: var(--white);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-3px);
    color: var(--white);
}

.btn-dark {
    background: var(--text);
    color: var(--white);
}

.btn-dark:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl);
    color: var(--white);
}

.btn-gradient {
    background: linear-gradient(135deg, var(--blue), var(--purple));
    color: var(--white);
}

.btn-gradient:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 122, 255, 0.3);
    color: var(--white);
}

/* ===== Sections ===== */
.section {
    padding: 5rem 2rem;
}

.section-alt {
    background: var(--gray-100);
}

.section-container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: var(--space-xxxl);
}

.section-header h2 {
    margin-bottom: var(--space-md);
    background: linear-gradient(135deg, var(--blue), var(--purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-header p {
    font-size: 1.125rem;
    max-width: 600px;
    margin: 0 auto;
}

/* ===== Cards ===== */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-xl);
}

.card {
    background: var(--white);
    padding: var(--space-xxl);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.card-icon {
    font-size: 2.5rem;
    margin-bottom: var(--space-md);
}

.card h3 {
    margin-bottom: var(--space-sm);
    color: var(--text);
}

.card p {
    font-size: 0.9375rem;
}

/* ===== Footer ===== */
footer {
    background: var(--text);
    color: var(--white);
    padding: var(--space-xxxl) 2rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-xl);
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.footer-logo svg {
    height: 24px;
    width: auto;
}

.footer-logo span {
    font-size: 1.125rem;
    font-weight: 700;
}

.footer-links {
    display: flex;
    gap: var(--space-xxl);
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.9375rem;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--white);
}

.footer-copy {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8125rem;
}

/* ===== Placeholder Content ===== */
.placeholder-section {
    padding: 3rem 2rem;
    text-align: center;
}

.placeholder-box {
    background: var(--gray-100);
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius-lg);
    padding: var(--space-xxxl) var(--space-xl);
    margin: var(--space-lg) 0;
}

.placeholder-box p {
    color: var(--text-muted);
    font-style: italic;
}

/* ===== Forms ===== */
.form-group {
    margin-bottom: var(--space-xl);
}

.form-label {
    display: block;
    margin-bottom: var(--space-sm);
    font-weight: 500;
    font-size: 0.8125rem;
    color: var(--text);
}

.form-input {
    width: 100%;
    padding: var(--space-md) var(--space-lg);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

/* ===== Animations ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* ===== Mobile Responsive ===== */
@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }

    nav {
        padding: var(--space-md);
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: var(--space-xl);
        gap: var(--space-lg);
        border-bottom: 1px solid var(--gray-200);
        box-shadow: var(--shadow-lg);
    }

    .nav-links.active {
        display: flex;
    }

    .mobile-menu-btn {
        display: block;
    }

    .mobile-menu-btn.active span:nth-child(1) {
        transform: rotate(45deg) translate(6px, 6px);
    }

    .mobile-menu-btn.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-btn.active span:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -6px);
    }

    .hero {
        padding: 5rem 1.5rem 3rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero .tagline {
        font-size: 1rem;
    }

    .hero-logo svg {
        height: 60px;
    }

    .btn {
        padding: var(--space-md) var(--space-lg);
        font-size: 0.9375rem;
    }

    .section {
        padding: 3rem 1.5rem;
    }

    .footer-container {
        flex-direction: column;
        text-align: center;
    }

    .footer-links {
        flex-direction: column;
        gap: var(--space-md);
    }
}

@media (max-width: 480px) {
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }
}
