/* ===================================================
   Structural variables (theme-independent)
   =================================================== */
:root {
    --font:        'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --container:   1160px;
    --radius:      10px;
    --radius-lg:   14px;
    --radius-full: 999px;
}

/* ===================================================
   Dark theme (default)
   — Ink #222033 base, Paper #FAFAF8 text
   =================================================== */
[data-theme="dark"] {
    --bg:           #222033;
    --bg-surface:   #1C1A2C;
    --bg-card:      #2C2948;
    --primary:      #7E5CD9;
    --primary-hover:#8B68E6;
    --accent:       #A78BE0;
    --accent-subtle:#2D2848;
    --text:         #FAFAF8;
    --text-muted:   #A78BE0;
    --border:       #3A3650;
    --border-subtle:#2E2A44;
    --nav-bg:       rgba(34, 32, 51, 0.92);
}

/* ===================================================
   Light theme
   — Paper #FAFAF8 base, Ink #222033 text
   =================================================== */
[data-theme="light"] {
    --bg:           #FAFAF8;
    --bg-surface:   #F2EDF8;
    --bg-card:      #FFFFFF;
    --primary:      #7E5CD9;
    --primary-hover:#5A3FA8;
    --accent:       #5A3FA8;
    --accent-subtle:#EDE8F8;
    --text:         #222033;
    --text-muted:   #6B6080;
    --border:       #D6CDE8;
    --border-subtle:#EAE5F2;
    --nav-bg:       rgba(250, 250, 248, 0.92);
}

/* ===================================================
   Theme transition
   =================================================== */
body,
.nav,
.card,
.card__icon,
.audience-card,
.audience-card__tag,
.cta-box,
.how-it-works,
.footer,
.badge,
.theme-toggle {
    transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

/* ===================================================
   Reset
   =================================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    background-color: var(--bg);
    color: var(--text);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===================================================
   Container
   =================================================== */
.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}

/* ===================================================
   Navigation
   =================================================== */
.nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: var(--nav-bg);
    border-bottom: 1px solid var(--border-subtle);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.nav__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    gap: 32px;
}

.nav__logo {
    font-size: 17px;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
    letter-spacing: -0.02em;
    flex-shrink: 0;
}

.nav__links {
    display: flex;
    gap: 28px;
    flex: 1;
}

.nav__link {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.15s ease;
}

.nav__link:hover {
    color: var(--text);
}

.nav__actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

/* ===================================================
   Theme toggle
   =================================================== */
.theme-toggle {
    width: 34px;
    height: 34px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background-color: transparent;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    flex-shrink: 0;
}

.theme-toggle:hover {
    background-color: var(--accent-subtle);
    color: var(--accent);
}

/* ===================================================
   Buttons
   =================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font);
    font-weight: 600;
    border-radius: var(--radius);
    cursor: pointer;
    text-decoration: none;
    border: none;
    white-space: nowrap;
    transition: background-color 0.15s ease, transform 0.1s ease;
}

.btn--primary {
    background-color: var(--primary);
    color: #fff;
}

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

.btn--primary:active {
    transform: translateY(1px);
}

.btn--sm {
    font-size: 13px;
    padding: 8px 16px;
}

.btn--lg {
    font-size: 15px;
    padding: 14px 28px;
    border-radius: var(--radius-lg);
}

.btn__arrow {
    font-style: normal;
    transition: transform 0.15s ease;
}

.btn--primary:hover .btn__arrow {
    transform: translateX(3px);
}

/* ===================================================
   Badge
   =================================================== */
.badge {
    display: inline-block;
    background-color: var(--accent-subtle);
    color: var(--accent);
    font-size: 12px;
    font-weight: 600;
    padding: 5px 14px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border);
    letter-spacing: 0.04em;
    margin-bottom: 28px;
}

/* ===================================================
   Text accent
   =================================================== */
.text-accent {
    color: var(--accent);
}

/* ===================================================
   Hero
   =================================================== */
.hero {
    padding: 104px 0 88px;
    text-align: center;
}

.hero__inner {
    max-width: 680px;
    margin: 0 auto;
}

.hero__title {
    font-size: clamp(38px, 5.5vw, 60px);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.035em;
    margin-bottom: 24px;
    color: var(--text);
}

.hero__subtitle {
    font-size: 17px;
    color: var(--text-muted);
    line-height: 1.75;
    margin-bottom: 40px;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
}

.hero__actions {
    display: flex;
    justify-content: center;
}

.hero__note {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 16px;
    opacity: 0.7;
}

/* ===================================================
   Sections
   =================================================== */
.section {
    padding: 96px 0;
}

.section__header {
    text-align: center;
    margin-bottom: 60px;
}

.section__title {
    font-size: clamp(26px, 3.5vw, 36px);
    font-weight: 700;
    letter-spacing: -0.025em;
    margin-bottom: 14px;
}

.section__subtitle {
    font-size: 16px;
    color: var(--text-muted);
    max-width: 440px;
    margin: 0 auto;
    line-height: 1.7;
}

/* ===================================================
   Grid
   =================================================== */
.grid {
    display: grid;
    gap: 20px;
}

.grid--3 {
    grid-template-columns: repeat(3, 1fr);
}

/* ===================================================
   Feature Cards
   =================================================== */
.card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 32px;
}

.card__icon {
    width: 44px;
    height: 44px;
    background-color: var(--accent-subtle);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    margin-bottom: 22px;
}

.card__title {
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin-bottom: 10px;
}

.card__text {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.75;
}

/* ===================================================
   How it works
   =================================================== */
.how-it-works {
    background-color: var(--bg-surface);
    border-top: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
}

.steps {
    max-width: 640px;
    margin: 0 auto;
}

.step {
    display: flex;
    gap: 28px;
    align-items: flex-start;
    padding: 36px 0;
    border-bottom: 1px solid var(--border-subtle);
}

.step:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.step:first-child {
    padding-top: 0;
}

.step__number {
    font-size: 32px;
    font-weight: 800;
    color: var(--primary);
    opacity: 0.5;
    line-height: 1;
    min-width: 52px;
    letter-spacing: -0.04em;
    font-variant-numeric: tabular-nums;
    padding-top: 2px;
}

.step__title {
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin-bottom: 8px;
}

.step__text {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.75;
}

/* ===================================================
   Audience Cards
   =================================================== */
.audience-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 32px;
}

.audience-card__tag {
    display: inline-block;
    background-color: var(--accent-subtle);
    color: var(--accent);
    font-size: 11px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 18px;
}

.audience-card__title {
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin-bottom: 10px;
}

.audience-card__text {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.75;
}

/* ===================================================
   CTA Section
   =================================================== */
.cta-section {
    padding: 64px 0 96px;
}

.cta-box {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 64px 48px;
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.cta-box__title {
    font-size: clamp(24px, 3.5vw, 32px);
    font-weight: 700;
    letter-spacing: -0.025em;
    margin-bottom: 16px;
}

.cta-box__subtitle {
    font-size: 15px;
    color: var(--text-muted);
    line-height: 1.75;
    margin-bottom: 36px;
    max-width: 380px;
    margin-left: auto;
    margin-right: auto;
}

/* ===================================================
   Footer
   =================================================== */
.footer {
    border-top: 1px solid var(--border-subtle);
    padding: 28px 0;
}

.footer__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.footer__logo {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.footer__copy {
    font-size: 13px;
    color: var(--text-muted);
}

/* ===================================================
   Reveal animation
   =================================================== */
.reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===================================================
   Responsive — Tablet
   =================================================== */
@media (max-width: 900px) {
    .grid--3 {
        grid-template-columns: 1fr 1fr;
    }

    .grid--3 .card:last-child,
    .grid--3 .audience-card:last-child {
        grid-column: 1 / -1;
    }
}

/* ===================================================
   Responsive — Mobile
   =================================================== */
@media (max-width: 640px) {
    .nav__links {
        display: none;
    }

    .hero {
        padding: 72px 0 64px;
    }

    .hero__subtitle {
        font-size: 16px;
    }

    .section {
        padding: 64px 0;
    }

    .grid--3 {
        grid-template-columns: 1fr;
    }

    .grid--3 .card:last-child,
    .grid--3 .audience-card:last-child {
        grid-column: auto;
    }

    .step {
        gap: 20px;
    }

    .step__number {
        font-size: 26px;
        min-width: 42px;
    }

    .cta-box {
        padding: 40px 24px;
    }

    .footer__inner {
        flex-direction: column;
        gap: 6px;
        text-align: center;
    }
}

@media (max-width: 400px) {
    .container {
        padding: 0 16px;
    }

    .btn--lg {
        width: 100%;
        justify-content: center;
    }
}
