/* ============================================================
   THYNK CHAT — Marketing Website Styles
   Modern CSS (2025-2026): @layer, nesting, :is(), :where(), :has(),
   container queries, oklch(), dvh, logical properties,
   scroll-driven animations
   ============================================================ */

@layer reset, base, components, pages, utilities;

/* ---- CSS Variables ---- */
:root {
    color-scheme: light dark;

    --primary: oklch(0.546 0.245 262.88);        /* #2563eb */
    --primary-dark: oklch(0.488 0.243 264.05);    /* #1d4ed8 */
    --primary-light: oklch(0.606 0.227 261.35);   /* #3b82f6 */
    --primary-50: oklch(0.97 0.014 254.6);        /* #eff6ff */
    --primary-100: oklch(0.942 0.028 253.43);     /* #dbeafe */
    --primary-900: oklch(0.379 0.146 265.52);     /* #1e3a8a */
    --dark: oklch(0.208 0.042 264.7);             /* #0f172a */
    --dark-700: oklch(0.279 0.041 264.44);        /* #1e293b */
    --dark-600: oklch(0.372 0.044 264.44);        /* #334155 */
    --dark-500: oklch(0.454 0.044 257.28);        /* #475569 */
    --gray-400: oklch(0.685 0.042 264.53);        /* #94a3b8 */
    --gray-300: oklch(0.831 0.02 264.53);         /* #cbd5e1 */
    --gray-200: oklch(0.917 0.013 264.53);        /* #e2e8f0 */
    --gray-100: oklch(0.962 0.007 264.53);        /* #f1f5f9 */
    --gray-50: oklch(0.981 0.005 264.53);         /* #f8fafc */
    --white: oklch(1 0 0);                        /* #ffffff */
    --green: oklch(0.696 0.17 162.48);            /* #10b981 */
    --green-50: oklch(0.982 0.018 166.31);        /* #ecfdf5 */
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.05);
    --shadow: 0 4px 6px -1px oklch(0 0 0 / 0.07), 0 2px 4px -2px oklch(0 0 0 / 0.05);
    --shadow-md: 0 10px 15px -3px oklch(0 0 0 / 0.08), 0 4px 6px -4px oklch(0 0 0 / 0.05);
    --shadow-lg: 0 20px 40px -8px oklch(0 0 0 / 0.1);
    --shadow-xl: 0 32px 64px -16px oklch(0 0 0 / 0.14);
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-heading: 'Plus Jakarta Sans', 'Inter', sans-serif;
    --transition: 0.2s ease;
    --transition-slow: 0.4s cubic-bezier(.16,1,.3,1);
}

/* ---- Reset & Base ---- */
@layer reset {
    *, *::before, *::after {
        box-sizing: border-box;
        margin: 0;
        padding: 0;
    }

    html {
        scroll-behavior: smooth;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }

    body {
        font-family: var(--font-body);
        color: var(--dark);
        background: var(--white);
        line-height: 1.6;
        overflow-x: hidden;
    }

    :is(img, svg) {
        display: block;
        max-width: 100%;
    }

    a {
        color: inherit;
        text-decoration: none;
    }

    button {
        cursor: pointer;
        border: none;
        background: none;
        font: inherit;
        color: inherit;
    }

    :is(ul, ol) {
        list-style: none;
    }
}

/* ---- Base ---- */
@layer base {
    .container {
        width: 100%;
        max-width: 1200px;
        margin-inline: auto;
        padding-inline: 24px;
    }

    /* ---- Typography ---- */
    :is(h1, h2, h3, h4, h5) {
        font-family: var(--font-heading);
        font-weight: 700;
        line-height: 1.2;
    }

    .gradient-text {
        background: linear-gradient(135deg, var(--primary) 0%, oklch(0.541 0.281 293.01) 50%, var(--primary-light) 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }

    .section-header {
        text-align: center;
        max-width: 680px;
        margin-inline: auto;
        margin-block-end: 64px;
    }

    .section-tag {
        display: inline-block;
        font-size: 13px;
        font-weight: 600;
        color: var(--primary);
        background: var(--primary-50);
        border: 1px solid var(--primary-100);
        padding: 6px 16px;
        border-radius: var(--radius-full);
        margin-block-end: 16px;
        letter-spacing: 0.02em;
        text-transform: uppercase;
    }

    .section-title {
        font-size: clamp(28px, 4vw, 42px);
        margin-block-end: 16px;
        color: var(--dark);
    }

    .section-subtitle {
        font-size: 17px;
        color: var(--dark-500);
        line-height: 1.7;
    }
}

/* ---- Components ---- */
@layer components {
    /* ---- Buttons ---- */
    .btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        font-family: var(--font-body);
        font-weight: 600;
        font-size: 15px;
        border-radius: var(--radius);
        padding: 12px 24px;
        transition: all var(--transition);
        white-space: nowrap;
        border: none;
        cursor: pointer;

        &-sm {
            padding: 8px 18px;
            font-size: 14px;
            border-radius: var(--radius-sm);
        }

        &-lg {
            padding: 16px 32px;
            font-size: 16px;
            border-radius: var(--radius);
        }

        &-block {
            width: 100%;
        }
    }

    .btn-primary {
        background: var(--primary);
        color: var(--white);
        box-shadow: 0 1px 2px oklch(0.546 0.245 262.88 / 0.3), 0 4px 12px oklch(0.546 0.245 262.88 / 0.15);

        &:hover {
            background: var(--primary-dark);
            box-shadow: 0 1px 2px oklch(0.546 0.245 262.88 / 0.3), 0 8px 24px oklch(0.546 0.245 262.88 / 0.25);
            transform: translateY(-1px);
        }
    }

    .btn-ghost {
        background: transparent;
        color: var(--dark-600);
        border: 1.5px solid var(--gray-200);

        &:hover {
            background: var(--gray-50);
            border-color: var(--gray-300);
        }
    }

    .btn-outline {
        background: transparent;
        color: var(--dark);
        border: 1.5px solid var(--gray-200);

        &:hover {
            border-color: var(--primary);
            color: var(--primary);
            background: var(--primary-50);
        }
    }

    .btn-white {
        background: var(--white);
        color: var(--primary);
        box-shadow: 0 4px 12px oklch(0 0 0 / 0.1);

        &:hover {
            transform: translateY(-2px);
            box-shadow: 0 8px 24px oklch(0 0 0 / 0.15);
        }
    }

    .btn-glow {
        position: relative;

        &::before {
            content: '';
            position: absolute;
            inset: -2px;
            border-radius: inherit;
            background: linear-gradient(135deg, var(--primary), oklch(0.541 0.281 293.01), var(--primary-light));
            z-index: -1;
            opacity: 0;
            transition: opacity 0.3s;
            filter: blur(8px);
        }

        &:hover::before {
            opacity: 0.6;
        }
    }

    /* ---- Header ---- */
    .site-header {
        position: fixed;
        inset-block-start: 0;
        inset-inline-start: 0;
        width: 100%;
        z-index: 1000;
        padding-block: 16px;
        transition: all 0.3s ease;

        &.scrolled {
            background: oklch(1 0 0 / 0.85);
            backdrop-filter: blur(20px);
            -webkit-backdrop-filter: blur(20px);
            border-block-end: 1px solid oklch(0.917 0.013 264.53 / 0.5);
            padding-block: 12px;
        }
    }

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

    .logo {
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .logo-text {
        font-family: var(--font-heading);
        font-weight: 800;
        font-size: 20px;
        color: var(--dark);
    }

    .main-nav {
        display: flex;
        gap: 32px;
    }

    .nav-link {
        font-size: 14px;
        font-weight: 500;
        color: var(--dark-500);
        transition: color var(--transition);
        position: relative;

        &:hover {
            color: var(--dark);
        }

        &::after {
            content: '';
            position: absolute;
            inset-block-end: -4px;
            inset-inline-start: 0;
            width: 0;
            height: 2px;
            background: var(--primary);
            border-radius: 1px;
            transition: width 0.3s ease;
        }

        &:hover::after {
            width: 100%;
        }
    }

    .header-cta { }

    .mobile-toggle {
        display: none;
        flex-direction: column;
        gap: 5px;
        width: 28px;
        padding-block: 4px;

        span {
            display: block;
            width: 100%;
            height: 2px;
            background: var(--dark);
            border-radius: 1px;
            transition: all 0.3s ease;
        }

        &.active {
            span:nth-child(1) {
                transform: rotate(45deg) translate(5px, 5px);
            }

            span:nth-child(2) {
                opacity: 0;
            }

            span:nth-child(3) {
                transform: rotate(-45deg) translate(5px, -5px);
            }
        }
    }
}

/* ---- Pages ---- */
@layer pages {
    /* ---- Hero ---- */
    .hero {
        position: relative;
        padding-block: 160px 100px;
        overflow: hidden;
        min-height: 100dvh;
        display: flex;
        align-items: center;
    }

    .hero-bg-glow {
        position: absolute;
        inset-block-start: -200px;
        inset-inline-start: 50%;
        transform: translateX(-50%);
        width: 900px;
        height: 600px;
        background: radial-gradient(ellipse, oklch(0.546 0.245 262.88 / 0.12) 0%, oklch(0.541 0.281 293.01 / 0.06) 40%, transparent 70%);
        pointer-events: none;
        z-index: 0;
    }

    .hero-inner {
        position: relative;
        z-index: 1;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 64px;
        align-items: center;
    }

    .hero-badge {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        font-size: 13px;
        font-weight: 500;
        color: var(--primary);
        background: var(--primary-50);
        border: 1px solid var(--primary-100);
        padding: 8px 16px;
        border-radius: var(--radius-full);
        margin-block-end: 24px;
    }

    .badge-dot {
        width: 8px;
        height: 8px;
        background: var(--green);
        border-radius: 50%;
        animation: pulse-dot 2s infinite;
    }

    @keyframes pulse-dot {
        0%, 100% { opacity: 1; transform: scale(1); }
        50% { opacity: 0.6; transform: scale(1.3); }
    }

    .hero-title {
        font-size: clamp(36px, 5vw, 56px);
        font-weight: 800;
        line-height: 1.1;
        margin-block-end: 20px;
        color: var(--dark);
    }

    .hero-subtitle {
        font-size: 18px;
        color: var(--dark-500);
        line-height: 1.7;
        margin-block-end: 32px;
        max-width: 520px;
    }

    .hero-actions {
        display: flex;
        gap: 12px;
        flex-wrap: wrap;
        margin-block-end: 20px;
    }

    .hero-note {
        font-size: 13px;
        color: var(--gray-400);
    }

    /* Chat Mockup */
    .chat-mockup {
        container-type: inline-size;
        position: relative;
        width: 380px;
        max-width: 100%;
        background: var(--white);
        border-radius: var(--radius-lg);
        box-shadow: var(--shadow-xl);
        border: 1px solid var(--gray-200);
        overflow: hidden;
        margin-inline-start: auto;
        animation: float 6s ease-in-out infinite;
    }

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

    .chat-mockup-header {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 16px;
        border-block-end: 1px solid var(--gray-100);
        background: var(--gray-50);
    }

    .chat-mockup-title {
        display: flex;
        flex-direction: column;
        gap: 2px;

        strong {
            font-size: 14px;
            font-weight: 600;
        }
    }

    .chat-status {
        display: flex;
        align-items: center;
        gap: 4px;
        font-size: 11px;
        color: var(--green);
    }

    .status-dot {
        width: 6px;
        height: 6px;
        background: var(--green);
        border-radius: 50%;
    }

    .chat-mockup-body {
        padding: 16px;
        min-height: 280px;
        display: flex;
        flex-direction: column;
        gap: 12px;
        background: var(--white);
    }

    .chat-msg {
        max-width: 85%;
        padding: 10px 14px;
        border-radius: 14px;
        font-size: 13px;
        line-height: 1.5;
        opacity: 0;
        transform: translateY(8px);
        animation: msg-in 0.4s ease forwards;

        &.bot {
            background: var(--gray-100);
            color: var(--dark);
            align-self: flex-start;
            border-end-start-radius: 4px;
        }

        &.user {
            background: var(--primary);
            color: var(--white);
            align-self: flex-end;
            border-end-end-radius: 4px;
        }
    }

    .chat-typing {
        display: flex;
        gap: 4px;
        align-items: center;
        padding: 10px 14px;
        background: var(--gray-100);
        border-radius: 14px;
        border-end-start-radius: 4px;
        align-self: flex-start;
        max-width: 60px;

        span {
            width: 6px;
            height: 6px;
            border-radius: 50%;
            background: var(--gray-400);
            animation: typing-bounce 1.4s ease-in-out infinite;

            &:nth-child(2) { animation-delay: 0.2s; }
            &:nth-child(3) { animation-delay: 0.4s; }
        }
    }

    @keyframes typing-bounce {
        0%, 60%, 100% { transform: translateY(0); }
        30% { transform: translateY(-4px); }
    }

    @keyframes msg-in {
        to { opacity: 1; transform: translateY(0); }
    }

    .chat-mockup-input {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 12px 16px;
        border-block-start: 1px solid var(--gray-100);
        background: var(--gray-50);

        span {
            font-size: 13px;
            color: var(--gray-400);
        }
    }

    .chat-send-btn {
        width: 32px;
        height: 32px;
        background: var(--primary);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .chat-mockup-glow {
        position: absolute;
        inset-block-end: -40px;
        inset-inline-start: 50%;
        transform: translateX(-50%);
        width: 300px;
        height: 80px;
        background: radial-gradient(ellipse, oklch(0.546 0.245 262.88 / 0.15), transparent);
        pointer-events: none;
    }

    /* ---- Social Proof ---- */
    .social-proof {
        padding-block: 48px;
        border-block-start: 1px solid var(--gray-100);
        border-block-end: 1px solid var(--gray-100);
        background: var(--gray-50);
    }

    .social-proof-label {
        text-align: center;
        font-size: 14px;
        color: var(--dark-500);
        margin-block-end: 32px;
    }

    .stats-row {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 48px;
        flex-wrap: wrap;
        container-type: inline-size;
    }

    .stat-item {
        text-align: center;
    }

    .stat-number {
        font-family: var(--font-heading);
        font-size: 36px;
        font-weight: 800;
        color: var(--dark);
        display: inline;
    }

    .stat-suffix {
        font-family: var(--font-heading);
        font-size: 36px;
        font-weight: 800;
        color: var(--primary);
    }

    .stat-label {
        display: block;
        font-size: 14px;
        color: var(--dark-500);
        margin-block-start: 4px;
    }

    .stat-divider {
        width: 1px;
        height: 48px;
        background: var(--gray-200);
    }

    /* ---- Features ---- */
    .features {
        padding-block: 120px;
    }

    .features-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 24px;
        container-type: inline-size;
    }

    .feature-card {
        container-type: inline-size;
        position: relative;
        padding: 40px 32px;
        background: var(--white);
        border: 1px solid var(--gray-200);
        border-radius: var(--radius-lg);
        transition: all 0.3s ease;

        &:hover {
            transform: translateY(-4px);
            box-shadow: var(--shadow-lg);
            border-color: var(--primary-100);
        }

        h3 {
            font-size: 20px;
            margin-block-end: 10px;
        }

        p {
            font-size: 15px;
            color: var(--dark-500);
            line-height: 1.7;
        }
    }

    .feature-icon {
        width: 56px;
        height: 56px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: var(--primary-50);
        border-radius: var(--radius);
        margin-block-end: 20px;
        font-size: 28px;
    }

    /* ---- How it works ---- */
    .how-it-works {
        padding-block: 120px;
        background: var(--gray-50);
    }

    .steps-grid {
        display: flex;
        flex-direction: column;
        gap: 24px;
    }

    .step-card {
        display: grid;
        grid-template-columns: auto 1fr 300px;
        gap: 32px;
        align-items: center;
        padding: 40px;
        background: var(--white);
        border: 1px solid var(--gray-200);
        border-radius: var(--radius-lg);
        transition: all 0.3s ease;

        &:hover {
            box-shadow: var(--shadow-md);
            border-color: var(--primary-100);
        }
    }

    .step-number {
        font-family: var(--font-heading);
        font-size: 48px;
        font-weight: 800;
        color: var(--primary-100);
        line-height: 1;
        min-width: 72px;
    }

    .step-content {
        h3 {
            font-size: 20px;
            margin-block-end: 8px;
        }

        p {
            font-size: 15px;
            color: var(--dark-500);
            line-height: 1.7;
        }
    }

    .step-mockup {
        background: var(--dark);
        border-radius: var(--radius-sm);
        padding: 16px;
        font-family: 'SF Mono', 'Fira Code', monospace;
        font-size: 13px;
        color: var(--gray-300);
    }

    .url-bar {
        display: flex;
        align-items: center;
        gap: 8px;
        background: var(--dark-700);
        padding: 10px 14px;
        border-radius: 6px;
    }

    .url-dot {
        width: 8px;
        height: 8px;
        border-radius: 50%;

        &:nth-child(1) { background: oklch(0.628 0.258 29.23); }  /* #ef4444 */
        &:nth-child(2) { background: oklch(0.769 0.188 84.43); }  /* #f59e0b */
        &:nth-child(3) { background: oklch(0.696 0.17 162.48); }  /* #10b981 */
    }

    .url-text {
        margin-inline-start: 8px;
        color: var(--gray-400);
        font-size: 12px;
    }

    .customize-mockup {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    .color-row {
        display: flex;
        gap: 8px;
    }

    .color-dot {
        width: 24px;
        height: 24px;
        border-radius: 50%;
        border: 2px solid oklch(1 0 0 / 0.1);
    }

    .mock-toggle-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        background: var(--dark-700);
        padding: 10px 14px;
        border-radius: 6px;
    }

    .mock-label { font-size: 12px; }
    .mock-check { color: var(--green); font-weight: 700; }

    .code-mockup code {
        font-size: 12px;
        color: var(--green);
        word-break: break-all;
    }

    /* ---- Benefits ---- */
    .benefits {
        padding-block: 120px;
    }

    .benefits-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 24px;
        container-type: inline-size;
    }

    .benefit-card {
        padding: 32px;
        background: var(--white);
        border: 1px solid var(--gray-200);
        border-radius: var(--radius-lg);
        transition: all 0.3s ease;

        &:hover {
            transform: translateY(-4px);
            box-shadow: var(--shadow-md);
            border-color: var(--primary-100);
        }

        h4 {
            font-size: 17px;
            margin-block-end: 8px;
        }

        p {
            font-size: 14px;
            color: var(--dark-500);
            line-height: 1.7;
        }
    }

    .benefit-icon {
        width: 48px;
        height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: var(--primary-50);
        border-radius: var(--radius);
        margin-block-end: 16px;
    }

    /* ---- Pricing ---- */
    .pricing {
        padding-block: 120px;
        background: var(--gray-50);
    }

    .pricing-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 12px;
        margin-block-end: 48px;
    }

    .toggle-label {
        font-size: 14px;
        font-weight: 500;
        color: var(--dark-500);
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .toggle-badge {
        font-size: 11px;
        font-weight: 700;
        color: var(--green);
        background: var(--green-50);
        padding: 3px 8px;
        border-radius: var(--radius-full);
    }

    .toggle-switch {
        position: relative;
        width: 48px;
        height: 28px;
        background: var(--gray-200);
        border-radius: var(--radius-full);
        transition: background var(--transition);

        &.active {
            background: var(--primary);

            .toggle-knob {
                transform: translateX(20px);
            }
        }
    }

    .toggle-knob {
        position: absolute;
        inset-block-start: 3px;
        inset-inline-start: 3px;
        width: 22px;
        height: 22px;
        background: var(--white);
        border-radius: 50%;
        box-shadow: var(--shadow-sm);
        transition: transform 0.3s ease;
    }

    .pricing-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 24px;
        align-items: start;
        container-type: inline-size;
    }

    .pricing-card {
        container-type: inline-size;
        position: relative;
        padding: 40px 32px;
        background: var(--white);
        border: 1px solid var(--gray-200);
        border-radius: var(--radius-lg);
        transition: all 0.3s ease;

        &:hover {
            box-shadow: var(--shadow-lg);
        }

        &.popular {
            border-color: var(--primary);
            box-shadow: 0 0 0 1px var(--primary), var(--shadow-lg);
            transform: scale(1.04);
            z-index: 1;
        }
    }

    .popular-badge {
        position: absolute;
        inset-block-start: -14px;
        inset-inline-start: 50%;
        transform: translateX(-50%);
        font-size: 12px;
        font-weight: 700;
        color: var(--white);
        background: linear-gradient(135deg, var(--primary), oklch(0.541 0.281 293.01));
        padding: 6px 20px;
        border-radius: var(--radius-full);
        white-space: nowrap;
    }

    .pricing-card-header h3 {
        font-size: 22px;
        margin-block-end: 4px;
    }

    .pricing-desc {
        font-size: 14px;
        color: var(--dark-500);
        margin-block-end: 24px;
    }

    .pricing-amount {
        display: flex;
        align-items: baseline;
        gap: 2px;
        margin-block-end: 32px;
        padding-block-end: 32px;
        border-block-end: 1px solid var(--gray-100);
    }

    .currency {
        font-size: 24px;
        font-weight: 600;
        color: var(--dark-500);
    }

    .price {
        font-family: var(--font-heading);
        font-size: 56px;
        font-weight: 800;
        line-height: 1;
        color: var(--dark);
    }

    .period {
        font-size: 15px;
        color: var(--dark-500);
        margin-inline-start: 4px;
    }

    .pricing-features {
        display: flex;
        flex-direction: column;
        gap: 14px;
        margin-block-end: 32px;

        li {
            display: flex;
            align-items: center;
            gap: 10px;
            font-size: 14px;
            color: var(--dark-600);
        }

        svg {
            flex-shrink: 0;
        }
    }

    /* ---- FAQ ---- */
    .faq {
        padding-block: 120px;
    }

    .faq-list {
        max-width: 720px;
        margin-inline: auto;
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .faq-item {
        border: 1px solid var(--gray-200);
        border-radius: var(--radius);
        overflow: hidden;
        transition: border-color 0.2s;

        &.open {
            border-color: var(--primary-100);

            .faq-chevron {
                transform: rotate(180deg);
                color: var(--primary);
            }

            .faq-answer {
                max-height: 300px;
            }
        }
    }

    .faq-question {
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 20px 24px;
        font-size: 16px;
        font-weight: 600;
        text-align: start;
        background: var(--white);
        transition: background var(--transition);

        &:hover {
            background: var(--gray-50);
        }
    }

    .faq-chevron {
        flex-shrink: 0;
        transition: transform 0.3s ease;
        color: var(--gray-400);
    }

    .faq-answer {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.35s ease, padding 0.35s ease;

        p {
            padding: 0 24px 20px;
            font-size: 15px;
            color: var(--dark-500);
            line-height: 1.7;
        }
    }

    /* ---- Final CTA ---- */
    .final-cta {
        padding-block: 120px;
        background: var(--gray-50);
    }

    .cta-card {
        position: relative;
        text-align: center;
        padding: 80px 40px;
        background: linear-gradient(135deg, var(--dark) 0%, var(--dark-700) 100%);
        border-radius: var(--radius-xl);
        overflow: hidden;

        h2 {
            position: relative;
            font-size: clamp(28px, 4vw, 40px);
            color: var(--white);
            margin-block-end: 16px;
        }

        > p {
            position: relative;
            font-size: 17px;
            color: var(--gray-400);
            margin-block-end: 32px;
            max-width: 480px;
            margin-inline: auto;
        }

        .btn {
            position: relative;
        }
    }

    .cta-glow {
        position: absolute;
        inset-block-start: -100px;
        inset-inline-start: 50%;
        transform: translateX(-50%);
        width: 600px;
        height: 400px;
        background: radial-gradient(ellipse, oklch(0.546 0.245 262.88 / 0.3), transparent 70%);
        pointer-events: none;
    }

    .cta-note {
        position: relative;
        font-size: 13px;
        color: var(--gray-400);
        margin-block-start: 16px;
    }

    /* ---- Footer ---- */
    .site-footer {
        padding-block: 64px 32px;
        border-block-start: 1px solid var(--gray-100);
    }

    .footer-top {
        display: flex;
        justify-content: space-between;
        gap: 48px;
        margin-block-end: 48px;
    }

    .footer-tagline {
        margin-block-start: 12px;
        font-size: 14px;
        color: var(--dark-500);
        max-width: 280px;
    }

    .footer-links {
        display: flex;
        gap: 64px;
    }

    .footer-col {
        display: flex;
        flex-direction: column;
        gap: 10px;

        h5 {
            font-size: 13px;
            font-weight: 600;
            color: var(--dark);
            text-transform: uppercase;
            letter-spacing: 0.04em;
            margin-block-end: 4px;
        }

        a {
            font-size: 14px;
            color: var(--dark-500);
            transition: color var(--transition);

            &:hover {
                color: var(--primary);
            }
        }
    }

    .footer-bottom {
        padding-block-start: 32px;
        border-block-start: 1px solid var(--gray-100);
        text-align: center;

        p {
            font-size: 13px;
            color: var(--gray-400);
        }
    }
}

/* ---- Scroll Animations ---- */
@layer utilities {
    .animate-in {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.6s ease, transform 0.6s ease;

        /* Scroll-driven animation enhancement */
        animation: scroll-fade-in linear both;
        animation-timeline: view();
        animation-range: entry 0% entry 30%;

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

    @keyframes scroll-fade-in {
        from {
            opacity: 0;
            transform: translateY(24px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    /* Stagger delays for grids */
    :where(.features-grid, .benefits-grid, .pricing-grid, .steps-grid) {
        .animate-in:nth-child(2) { transition-delay: 0.1s; }
        .animate-in:nth-child(3) { transition-delay: 0.2s; }
    }

    .benefits-grid {
        .animate-in:nth-child(4) { transition-delay: 0.15s; }
        .animate-in:nth-child(5) { transition-delay: 0.2s; }
        .animate-in:nth-child(6) { transition-delay: 0.25s; }
    }
}

/* ---- Responsive ---- */
@media (max-width: 1024px) {
    .hero-inner {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 48px;
    }

    .hero-subtitle {
        margin-inline: auto;
    }

    .hero-actions {
        justify-content: center;
    }

    .chat-mockup {
        margin: 0 auto;
    }

    .step-card {
        grid-template-columns: auto 1fr;
    }

    .step-visual {
        display: none;
    }
}

@media (max-width: 768px) {
    .main-nav {
        position: fixed;
        inset: 0;
        background: oklch(1 0 0 / 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 24px;
        z-index: 999;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease;

        &.open {
            opacity: 1;
            pointer-events: all;
        }

        .nav-link {
            font-size: 24px;
            font-weight: 600;
        }
    }

    .header-cta {
        display: none;
    }

    .mobile-toggle {
        display: flex;
        z-index: 1001;
    }

    .hero {
        padding-block: 120px 60px;
        min-height: auto;
    }

    .hero-title {
        font-size: 32px;
    }

    :is(.features-grid, .benefits-grid, .pricing-grid) {
        grid-template-columns: 1fr;
    }

    .pricing-card.popular {
        transform: none;
    }

    .stats-row {
        gap: 24px;
    }

    .stat-divider {
        display: none;
    }

    :is(.stat-number, .stat-suffix) {
        font-size: 28px;
    }

    .step-card {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .step-number {
        font-size: 32px;
    }

    .footer-top {
        flex-direction: column;
        gap: 32px;
    }

    .footer-links {
        gap: 40px;
    }

    .cta-card {
        padding: 48px 24px;
    }

    .section-header {
        margin-block-end: 40px;
    }

    :is(.features, .how-it-works, .benefits, .pricing, .faq, .final-cta) {
        padding-block: 80px;
    }
}

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

    .hero-title {
        font-size: 28px;
    }

    .chat-mockup {
        width: 100%;
    }

    .hero-actions {
        flex-direction: column;
        width: 100%;

        .btn {
            width: 100%;
        }
    }
}
