
:root {
    --bg-canvas: #090d16;
    --bg-surface: #111827;
    --bg-surface-elevated: #1a2234;
    --bg-surface-subtle: #0d131f;
    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.16);
    --border-accent: rgba(99, 102, 241, 0.4);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --accent-primary: #4f46e5;
    --accent-primary-hover: #4338ca;
    --accent-glow: rgba(79, 70, 229, 0.25);
    --color-fb: #1877f2;
    --color-media: #a855f7;
    --color-success: #10b981;
    --color-warning: #f59e0b;
    --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', 'IBM Plex Mono', SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --container-max: 1200px;
    --transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-family: var(--font-sans);
    background-color: var(--bg-canvas);
    color: var(--text-primary);
    scroll-behavior: smooth;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

body {
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: inherit;
    text-decoration: none;
}

button, input, select, textarea {
    font-family: inherit;
    font-size: inherit;
}

.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Typography Scale */
h1, h2, h3, h4 {
    color: var(--text-primary);
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.2;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    text-wrap: balance;
}

h2 {
    font-size: clamp(1.85rem, 3.5vw, 2.75rem);
    text-wrap: balance;
}

h3 {
    font-size: 1.35rem;
}

p.lead {
    font-size: 1.15rem;
    color: var(--text-secondary);
    line-height: 1.7;
    max-width: 68ch;
}

.mono {
    font-family: var(--font-mono);
    font-feature-settings: "tnum";
}

/* Top Bar Contract (1 row, 3 zones: Brand, 4-5 links, 1 action) */
.header-nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: rgba(9, 13, 22, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-subtle);
    height: 72px;
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    height: 100%;
}

.brand-wordmark {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text-primary);
    white-space: nowrap;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.brand-badge {
    color: #818cf8;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
    list-style: none;
}

    .nav-links a {
        font-size: 0.925rem;
        font-weight: 500;
        color: var(--text-secondary);
        white-space: nowrap;
        flex-shrink: 0;
        transition: var(--transition);
    }

        .nav-links a:hover {
            color: var(--text-primary);
        }

.nav-cta {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: 0.5rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.65rem 1.35rem;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    cursor: pointer;
    white-space: nowrap;
    transition: var(--transition);
    border: 1px solid transparent;
}

.btn-primary {
    background-color: var(--accent-primary);
    color: #ffffff;
    box-shadow: 0 4px 14px var(--accent-glow);
}

    .btn-primary:hover {
        background-color: var(--accent-primary-hover);
        transform: translateY(-1px);
    }

.btn-secondary {
    background-color: var(--bg-surface-elevated);
    color: var(--text-primary);
    border-color: var(--border-subtle);
}

    .btn-secondary:hover {
        background-color: rgba(255, 255, 255, 0.08);
        border-color: var(--border-strong);
    }

.btn-fb {
    background-color: var(--color-fb);
    color: #ffffff;
}

    .btn-fb:hover {
        filter: brightness(1.1);
    }

/* Hero Section */
.hero-section {
    padding: 5rem 0 4rem;
    position: relative;
    overflow: hidden;
}

.hero-glow {
    position: absolute;
    top: -150px;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 400px;
    background: radial-gradient(circle, rgba(79, 70, 229, 0.18) 0%, rgba(9, 13, 22, 0) 70%);
    pointer-events: none;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-kicker {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #818cf8;
    margin-bottom: 1.25rem;
}

.hero-title {
    margin-bottom: 1.5rem;
    max-width: 900px;
}

    .hero-title .gradient-text {
        background: linear-gradient(135deg, #ffffff 30%, #818cf8 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
    }

.hero-desc {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 720px;
    margin-bottom: 2.25rem;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    justify-content: center;
}

/* Hero Visual Banner */
.hero-visual-card {
    width: 100%;
    max-width: 1100px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-subtle);
    background-color: var(--bg-surface);
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    position: relative;
}

.hero-image-wrapper {
    position: relative;
    width: 100%;
    height: 380px;
    overflow: hidden;
}

    .hero-image-wrapper img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.hero-visual-scrim {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, var(--bg-surface) 0%, rgba(9, 13, 22, 0.4) 60%, transparent 100%);
}

.hero-live-pill {
    position: absolute;
    bottom: 1.5rem;
    left: 1.5rem;
    right: 1.5rem;
    background-color: rgba(17, 24, 39, 0.85);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-md);
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.live-agent-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.live-agent-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.live-agent-val {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* KPI Proof Strip */
.kpi-strip {
    border-top: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
    background-color: var(--bg-surface-subtle);
    padding: 2.5rem 0;
    margin: 3rem 0;
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.kpi-item {
    display: flex;
    flex-direction: column;
}

.kpi-value {
    font-size: 2.25rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text-primary);
    line-height: 1.1;
    margin-bottom: 0.35rem;
}

.kpi-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Sections General */
.section {
    padding: 5rem 0;
}

.section-header {
    margin-bottom: 3rem;
}

.section-kicker {
    font-size: 0.825rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #818cf8;
    margin-bottom: 0.75rem;
}

.section-title {
    margin-bottom: 1rem;
}

.section-desc {
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 65ch;
}

/* Mechanism Section (3 Steps) */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.step-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 2rem;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

    .step-card:hover {
        border-color: var(--border-strong);
        transform: translateY(-2px);
    }

.step-number {
    font-size: 1.1rem;
    font-weight: 700;
    color: #818cf8;
    margin-bottom: 1rem;
}

.step-title {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.step-desc {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.step-code-preview {
    background-color: var(--bg-canvas);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    font-size: 0.8rem;
    color: #e2e8f0;
    overflow-x: auto;
}

/* Interactive Simulator Section */
.simulator-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.4);
}

.simulator-grid {
    display: grid;
    grid-template-columns: 1fr 1.15fr;
    gap: 2.5rem;
    align-items: start;
}

.form-group {
    margin-bottom: 1.35rem;
}

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.form-input {
    width: 100%;
    background-color: var(--bg-canvas);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: var(--transition);
}

    .form-input:focus {
        outline: none;
        border-color: var(--accent-primary);
        box-shadow: 0 0 0 3px var(--accent-glow);
    }

/* User Agent Selector Tabs */
.ua-selector-group {
    margin-bottom: 1.5rem;
}

.ua-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.ua-btn {
    background-color: var(--bg-canvas);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    padding: 0.5rem 0.85rem;
    border-radius: var(--radius-sm);
    font-size: 0.825rem;
    cursor: pointer;
    transition: var(--transition);
}

    .ua-btn:hover {
        color: var(--text-primary);
        border-color: var(--border-strong);
    }

    .ua-btn.active {
        background-color: var(--accent-primary);
        color: #ffffff;
        border-color: var(--accent-primary);
    }

/* Output Console Screen */
.sim-console {
    background-color: var(--bg-canvas);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.console-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: 0.85rem;
}

.console-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.console-badge {
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
}

.badge-fb-route {
    background-color: rgba(24, 119, 242, 0.15);
    color: #60a5fa;
    border: 1px solid rgba(24, 119, 242, 0.3);
}

.badge-media-route {
    background-color: rgba(168, 85, 247, 0.15);
    color: #c084fc;
    border: 1px solid rgba(168, 85, 247, 0.3);
}

.route-outcome-box {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1.25rem;
}

.route-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.6rem;
    font-size: 0.875rem;
}

    .route-row:last-child {
        margin-bottom: 0;
    }

.route-key {
    color: var(--text-muted);
}

.route-val {
    font-weight: 600;
    color: var(--text-primary);
    text-align: right;
    word-break: break-all;
}

.target-url-highlight {
    color: #38bdf8;
    font-size: 0.95rem;
}

/* Bento Grid */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.75rem;
}

.bento-item {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 2.25rem;
    transition: var(--transition);
}

    .bento-item:hover {
        border-color: var(--border-strong);
    }

.bento-span-2 {
    grid-column: span 2;
}

.bento-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    background-color: rgba(99, 102, 241, 0.12);
    color: #818cf8;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
    font-size: 1.25rem;
}

.bento-title {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.bento-desc {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Analytics Demo Card */
.analytics-demo-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
}

.analytics-filter-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.timeframe-tabs {
    display: flex;
    background-color: var(--bg-canvas);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 0.25rem;
}

.tab-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    padding: 0.4rem 0.9rem;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
}

    .tab-btn.active {
        background-color: var(--bg-surface-elevated);
        color: var(--text-primary);
    }

.chart-visual-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.chart-bar-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.chart-bar-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
}

.chart-track {
    height: 24px;
    background-color: var(--bg-canvas);
    border-radius: 6px;
    overflow: hidden;
    display: flex;
}

.chart-fill-fb {
    background: linear-gradient(90deg, #1877f2, #3b82f6);
    height: 100%;
    transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.chart-fill-media {
    background: linear-gradient(90deg, #a855f7, #c084fc);
    height: 100%;
    transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Architecture Specs */
.arch-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.arch-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 2rem;
}

.arch-item {
    border-bottom: 1px solid var(--border-subtle);
    padding: 1rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

    .arch-item:last-child {
        border-bottom: none;
    }

.arch-key {
    font-weight: 600;
    font-size: 0.9rem;
}

.arch-val {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* Contact / Lead Capture */
.contact-section {
    background-color: var(--bg-surface-subtle);
    border-top: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
    padding: 5rem 0;
}

.contact-card {
    max-width: 600px;
    margin: 0 auto;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
}

/* Footer */
.site-footer {
    padding: 4rem 0 3rem;
    background-color: var(--bg-canvas);
}

.footer-grid {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: 2.5rem;
    margin-bottom: 2rem;
}

.footer-nav {
    display: flex;
    gap: 2rem;
    list-style: none;
}

    .footer-nav a {
        font-size: 0.9rem;
        color: var(--text-secondary);
        transition: var(--transition);
    }

        .footer-nav a:hover {
            color: var(--text-primary);
        }

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    flex-wrap: wrap;
    gap: 1rem;
}

/* Toast Message */
.toast-notice {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background-color: var(--bg-surface-elevated);
    color: var(--text-primary);
    border: 1px solid var(--border-strong);
    padding: 0.85rem 1.35rem;
    border-radius: var(--radius-md);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
    font-size: 0.9rem;
    transform: translateY(100px);
    opacity: 0;
    transition: var(--transition);
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

    .toast-notice.show {
        transform: translateY(0);
        opacity: 1;
    }

/* Responsive Breakpoints */
@media (max-width: 1024px) {
    .simulator-grid {
        grid-template-columns: 1fr;
    }

    .bento-grid {
        grid-template-columns: 1fr;
    }

    .bento-span-2 {
        grid-column: span 1;
    }

    .steps-grid {
        grid-template-columns: 1fr;
    }

    .kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .arch-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nav-links, .nav-cta {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }

    .mobile-nav-drawer {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 72px;
        left: 0;
        right: 0;
        background-color: var(--bg-surface);
        border-bottom: 1px solid var(--border-subtle);
        padding: 1.5rem;
        gap: 1rem;
        box-shadow: 0 20px 25px -5px rgba(0,0,0,0.5);
    }

    .hero-image-wrapper {
        height: 240px;
    }

    .hero-live-pill {
        position: relative;
        bottom: auto;
        left: auto;
        right: auto;
        margin: 1rem;
    }
}
