/* Design tokens live in tokens.css so the SPA can consume the same file. */
@import url("./tokens.css");

:root { color-scheme: dark; }
:root[data-theme="light"] { color-scheme: light; }

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
    background-color: var(--bg-main);
    color: var(--text-main);
}

body {
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
    background-color: var(--bg-main);
    color: var(--text-main);
}

/* Global focus ring — keyboard-only */
:focus { outline: none; }
:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px var(--primary-ring);
}

/* Skip link for keyboard users */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    padding: 0.75rem 1rem;
    background: var(--primary);
    color: #fff;
    border-radius: 0 0 var(--radius-md) 0;
    z-index: 9999;
    font-weight: 600;
}
.skip-link:focus {
    left: 0;
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Visually hidden but accessible to screen readers */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

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

ul {
    list-style: none;
}

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ======== TYPOGRAPHY ======== */
h1, h2, h3, h4, h5, h6 {
    line-height: 1.2;
    font-weight: 700;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

.section-tag {
    display: inline-block;
    padding: 0.3rem 0.85rem;
    background: var(--primary-soft);
    color: var(--primary);
    border: 1px solid rgba(99, 102, 241, 0.28);
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 1rem;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

/* ======== BUTTONS ======== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
    font-family: var(--font-sans);
}

.btn-sm { padding: 0.5rem 1rem; font-size: 0.875rem; }
.btn-lg { padding: 1rem 2rem; font-size: 1.125rem; }
.btn-block { width: 100%; }

.btn-primary {
    background-color: var(--primary);
    color: white;
    box-shadow: 0 4px 14px 0 rgba(99, 102, 241, 0.39);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.23);
}

.btn-outline {
    background-color: transparent;
    color: var(--text-main);
    border: 1px solid var(--border-light);
}

.btn-outline:hover {
    background-color: var(--bg-card);
    border-color: var(--text-muted);
}

.btn-ghost {
    background-color: transparent;
    color: var(--text-muted);
}

.btn-ghost:hover {
    color: var(--text-main);
}

/* ======== NAVBAR ======== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 1rem 0;
    background-color: rgba(11, 15, 25, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    transition: all 0.3s ease;
}

.navbar.scrolled {
    padding: 0.75rem 0;
    background-color: rgba(11, 15, 25, 0.95);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 800;
}

.logo-text { color: var(--text-main); letter-spacing: -0.02em; }
.logo-ai { color: var(--primary); }

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s ease;
}

.nav-link:hover { color: var(--text-main); }
/* "Live Demo" call-out: use --primary so it pops without failing AA on
   the light-theme nav (emerald #10B981 on near-white was ~2.35:1). */
.nav-link-demo { color: var(--primary); font-weight: 600; }
.nav-link-demo:hover { color: var(--primary-hover); }

/* Action links that live inside the drawer markup but only show on mobile,
   since .nav-actions is hidden below the mobile breakpoint. */
.nav-cta-mobile, .nav-cta-mobile-primary { display: none; }

.nav-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    width: 24px;
    height: 24px;
    position: relative;
    z-index: 101;
}

.nav-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--text-main);
    position: absolute;
    transition: all 0.3s ease;
}

.nav-toggle span:nth-child(1) { top: 4px; }
.nav-toggle span:nth-child(2) { top: 11px; }
.nav-toggle span:nth-child(3) { top: 18px; }

/* ======== HERO ======== */
.hero {
    position: relative;
    padding: 10rem 0 6rem;
    overflow: hidden;
}

.hero-bg-effects {
    position: absolute;
    inset: 0;
    z-index: -1;
}

.hero-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.4;
}

.hero-orb-1 {
    top: -10%;
    left: 20%;
    width: 40vw;
    height: 40vw;
    background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
}

.hero-orb-2 {
    bottom: 0;
    right: 10%;
    width: 30vw;
    height: 30vw;
    background: radial-gradient(circle, var(--secondary) 0%, transparent 70%);
}

.hero-grid-overlay {
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(to right, rgba(255,255,255,0.05) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255,255,255,0.05) 1px, transparent 1px);
    background-size: 40px 40px;
    mask-image: radial-gradient(circle at center, black 0%, transparent 80%);
    -webkit-mask-image: radial-gradient(circle at center, black 0%, transparent 80%);
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    background-color: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-main);
    margin-bottom: 1.5rem;
}

.badge-dot {
    width: 8px;
    height: 8px;
    background-color: var(--accent-emerald);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent-emerald);
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 1.5rem;
}

.hero-gradient-text {
    display: block;
    background: linear-gradient(to right, #818CF8, #C084FC);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 90%;
}

.hero-ctas {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
}

.hero-stats {
    display: flex;
    gap: 2rem;
    align-items: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.hero-stat-divider {
    width: 1px;
    height: 40px;
    background-color: var(--border);
}

.stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-main);
}

.stat-suffix {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    display: block;
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Dashboard Preview (Hero Visual) */
.hero-visual {
    position: relative;
    z-index: 10;
    perspective: 1000px;
}

.hero-dashboard-preview {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transform: rotateY(-5deg) rotateX(5deg) scale(1.05);
    transition: transform 0.3s ease;
}

.hero-dashboard-preview:hover {
    transform: rotateY(0) rotateX(0) scale(1.05);
}

.preview-header {
    background-color: rgba(0,0,0,0.2);
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border-bottom: 1px solid var(--border);
}

.preview-dots span {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #4B5563;
    margin-right: 4px;
}

.preview-dots span:nth-child(1) { background-color: var(--accent-rose); }
.preview-dots span:nth-child(2) { background-color: var(--accent-amber); }
.preview-dots span:nth-child(3) { background-color: var(--accent-emerald); }

.preview-title {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

.preview-content { display: flex; height: 350px; }

.preview-sidebar {
    width: 120px;
    background-color: rgba(0,0,0,0.1);
    border-right: 1px solid var(--border);
    padding: 1rem 0;
}

.preview-nav-item {
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.preview-nav-item.active {
    color: var(--text-main);
    background-color: rgba(255,255,255,0.05);
    border-left: 2px solid var(--primary);
}

.preview-main { padding: 1.5rem; flex: 1; display: flex; flex-direction: column; gap: 1.5rem; }

.preview-kpi-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }

.preview-kpi {
    background-color: rgba(255,255,255,0.03);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 1rem;
}

.kpi-value { display: block; font-size: 1.5rem; font-weight: 700; margin-bottom: 0.25rem; }
.kpi-label { font-size: 0.7rem; color: var(--text-muted); display: block; text-transform: uppercase; }
.kpi-change { font-size: 0.7rem; font-weight: 600; float: right; margin-top: -1rem; }
.kpi-change.positive { color: var(--accent-emerald); }
.kpi-change.neutral { color: var(--text-muted); }

.preview-chart {
    background-color: rgba(255,255,255,0.03);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 1rem;
    flex: 1;
}

.chart-title { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 1rem; }

.chart-bars { display: flex; align-items: flex-end; justify-content: space-between; height: 80px; padding: 0 1rem; }

.chart-bar {
    width: 24px;
    height: var(--h);
    background: linear-gradient(to top, var(--primary), var(--secondary));
    border-radius: 4px 4px 0 0;
    position: relative;
    opacity: 0.8;
}

.bar-label {
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.6rem;
    color: var(--text-muted);
}

.preview-transcript-snippet {
    background-color: rgba(0,0,0,0.2);
    border-radius: 8px;
    padding: 1rem;
    border: 1px solid var(--border-light);
}

.snippet-header { display: flex; gap: 0.5rem; align-items: center; font-size: 0.7rem; color: var(--text-muted); margin-bottom: 0.5rem; }
.snippet-badge.live { color: var(--accent-rose); font-weight: 600; animation: pulse 2s infinite; }
.snippet-line { font-family: var(--font-mono); font-size: 0.75rem; }
.speaker { color: var(--accent-cyan); font-weight: 600; margin-right: 0.5rem; }

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.typing-animation {
    overflow: hidden;
    white-space: nowrap;
    border-right: 2px solid var(--text-main);
    animation: typing 3s steps(40, end) infinite, blink .75s step-end infinite;
    display: inline-block;
    vertical-align: bottom;
}

@keyframes typing { 0% { width: 0 } 50%, 100% { width: 100% } }
@keyframes blink { 0%, 100% { border-color: transparent } 50% { border-color: var(--text-main) } }

/* ======== TRUST BAR ======== */
.trust-bar {
    padding: 3rem 0;
    border-bottom: 1px solid var(--border);
    background-color: rgba(255,255,255,0.02);
}

.trust-label { text-align: center; font-size: 0.875rem; color: var(--text-muted); margin-bottom: 1.5rem; }

.trust-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 3.25rem;
    flex-wrap: wrap;
}

.trust-logo {
    color: var(--text-muted);
    transition: color var(--dur-med) var(--ease-out), transform var(--dur-med) var(--ease-out);
    display: inline-flex;
    align-items: center;
    height: 28px;
}
.trust-logo svg { height: 28px; width: auto; }
.trust-logo img { height: 30px; width: auto; max-width: 128px; object-fit: contain; opacity: 0.9; transition: opacity var(--dur-med) var(--ease-out), transform var(--dur-med) var(--ease-out); }
.trust-logo:hover img { opacity: 1; transform: translateY(-1px); }

/* ======== COMPLIANCE ROW (below hero) ======== */
.compliance-row {
    border-bottom: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.02);
    padding: 1.5rem 0;
}
:root[data-theme="light"] .compliance-row { background: rgba(15, 23, 42, 0.02); }
.compliance-row-inner {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2.5rem;
    flex-wrap: wrap;
}
.compliance-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.45rem 0.85rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-main);
}
.compliance-chip svg { color: var(--accent-emerald); flex-shrink: 0; }
.compliance-chip-label { color: var(--text-muted); font-weight: 500; }

/* ======== FEATURES ======== */
.features { padding: var(--spacing-section) 0; }

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.feature-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 2rem;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: var(--border-light);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    background-color: var(--bg-card-hover);
}

.feature-card-large {
    grid-column: span 2;
}

.feature-icon-wrap {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    background-color: rgba(255,255,255,0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.feature-icon { color: var(--primary); }
.icon-purple { color: #A855F7; }
.icon-emerald { color: var(--accent-emerald); }
.icon-amber { color: var(--accent-amber); }
.icon-rose { color: var(--accent-rose); }
.icon-cyan { color: var(--accent-cyan); }

.feature-title { font-size: 1.25rem; margin-bottom: 1rem; }
.feature-desc { color: var(--text-muted); font-size: 0.95rem; }

/* Feature Visuals */
.feature-visual {
    margin-top: 2rem;
    background-color: rgba(0,0,0,0.3);
    border-radius: 8px;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 120px;
    border: 1px solid var(--border-light);
    overflow: hidden;
    position: relative;
}

.waveform-animation { display: flex; align-items: center; gap: 4px; height: 60px; }
.wave-bar {
    width: 6px;
    background-color: var(--primary);
    border-radius: 3px;
    animation: wave 1s ease-in-out infinite alternate;
    animation-delay: var(--delay);
}
@keyframes wave { 0% { height: 10px; } 100% { height: 60px; } }

.whitelabel-preview { padding: 1.5rem; display: flex; flex-direction: column; gap: 1rem; }
.wl-brand { display: flex; align-items: center; gap: 1rem; font-weight: 500; font-size: 1.1rem; }
.wl-dot { width: 24px; height: 24px; border-radius: 6px; }

/* ======== HOW IT WORKS ======== */
.how-it-works { padding: var(--spacing-section) 0; background-color: var(--bg-secondary); }

.steps-timeline { display: flex; align-items: flex-start; justify-content: space-between; position: relative; margin-top: 4rem;}

.step { flex: 1; text-align: center; position: relative; padding: 0 1rem; z-index: 2; }
.step-number { font-size: 3rem; font-weight: 900; color: rgba(255,255,255,0.05); margin-bottom: -1.5rem; letter-spacing: -2px; }
.step-icon-large { margin: 1.5rem auto; width: 80px; height: 80px; background: var(--bg-card); border-radius: 50%; display: flex; align-items: center; justify-content: center; border: 2px solid var(--border-light); color: var(--primary); }
.step-content h3 { font-size: 1.25rem; margin-bottom: 0.75rem; }
.step-content p { color: var(--text-muted); font-size: 0.9rem; }

.step-connector { flex: 0 0 100px; display: flex; align-items: center; padding-top: 5rem; }
.connector-line { width: 100%; height: 2px; background: linear-gradient(to right, transparent, var(--border-light), transparent); }

/* ======== INTEGRATIONS ======== */
.integrations { padding: var(--spacing-section) 0; }
.integrations-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; margin-top: 2rem; }
.integration-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem 1rem;
    text-align: center;
    transition: border-color var(--dur-med), transform var(--dur-med), box-shadow var(--dur-med);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.65rem;
}
.integration-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}
.integration-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    background: var(--primary-soft);
    border-radius: var(--radius-md);
    margin-bottom: 0.4rem;
}
.integration-icon svg { width: 24px; height: 24px; }
/* Real brand logos sit on a light chip so their true colors read on either theme */
.integration-icon:has(img) { background: #ffffff; box-shadow: inset 0 0 0 1px var(--border); }
.integration-icon img { width: 28px; height: 28px; object-fit: contain; }
.integration-icon-text { background: #ffffff; box-shadow: inset 0 0 0 1px var(--border); }
.integration-icon-text span { font-weight: 800; font-size: 0.95rem; color: #ff6a00; letter-spacing: -0.02em; }
.integration-card span { font-weight: 600; color: var(--text-main); font-size: 0.92rem; }

/* Integration Groups */
.integrations-grouped { margin-top: 3rem; display: flex; flex-direction: column; gap: 2.5rem; }
.integration-group-label {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 1rem;
    padding-left: 0.25rem;
}
.integration-note {
    display: block;
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 400;
    margin-top: 0.25rem;
}

/* ======== PRICING ======== */
.pricing { padding: var(--spacing-section) 0; background-color: var(--bg-secondary); }
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; margin-top: 3rem; }
.pricing-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px; padding: 2.5rem 2rem; display: flex; flex-direction: column; position: relative; }
.pricing-card-featured { border-color: var(--primary); transform: scale(1.05); z-index: 2; box-shadow: 0 20px 40px rgba(0,0,0,0.4); }
.pricing-popular { position: absolute; top: -14px; left: 50%; transform: translateX(-50%); background: var(--primary); color: white; padding: 4px 12px; border-radius: 20px; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; }
.pricing-tier { font-size: 1.25rem; font-weight: 600; margin-bottom: 1rem; }
.pricing-price { margin-bottom: 1rem; }
.price-amount { font-size: 3rem; font-weight: 800; letter-spacing: -1px; }
.price-period { color: var(--text-muted); }
.pricing-desc { color: var(--text-muted); margin-bottom: 2rem; min-height: 48px; }
.pricing-features { margin-bottom: 2.5rem; flex: 1; }
.pricing-features li { display: flex; align-items: flex-start; gap: 0.75rem; margin-bottom: 1rem; color: var(--text-main); font-size: 0.95rem; }
.pricing-features .check { color: var(--accent-emerald); font-weight: bold; }

/* ======== SECURITY ======== */
.security { padding: var(--spacing-section) 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.security-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; margin-top: 3rem; text-align: center; }
.security-item {
    padding: 1.5rem 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: border-color var(--dur-med), transform var(--dur-med);
}
.security-item:hover { border-color: var(--border-light); transform: translateY(-2px); }
.security-icon {
    width: 52px;
    height: 52px;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-emerald);
    background: rgba(16, 185, 129, 0.12);
    border-radius: var(--radius-md);
}
.security-icon svg { width: 28px; height: 28px; }
.security-item h4 { margin-bottom: 0.5rem; }
.security-item p { color: var(--text-muted); font-size: 0.9rem; }

/* ======== CTA ======== */
.cta-section { padding: var(--spacing-section) 0; }
.cta-card { background: linear-gradient(135deg, rgba(99,102,241,0.1), rgba(139,92,246,0.1)); border: 1px solid var(--primary); border-radius: 24px; padding: 4rem 2rem; text-align: center; position: relative; overflow: hidden; }
.cta-content { max-width: 600px; margin: 0 auto; position: relative; z-index: 2; }
.cta-content h2 { font-size: 2.5rem; margin-bottom: 1rem; }
.cta-content p { color: var(--text-muted); margin-bottom: 2.5rem; font-size: 1.1rem; }
.cta-inline-link { color: var(--primary); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.cta-inline-link:hover { color: var(--primary-hover); }

.cta-form { display: flex; flex-direction: column; gap: 1.25rem; margin-bottom: 1rem; text-align: left; }
.form-row { display: flex; gap: 1rem; }
.form-field { flex: 1; display: flex; flex-direction: column; gap: 0.35rem; }
.form-field label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-main);
    letter-spacing: 0.02em;
}
.form-field .required { color: var(--accent-rose); }
.form-input {
    width: 100%;
    padding: 0.85rem 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
    background: rgba(0, 0, 0, 0.22);
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.95rem;
    transition: border-color var(--dur-med), box-shadow var(--dur-med);
}
:root[data-theme="light"] .form-input { background: #fff; }
.form-input::placeholder { color: var(--text-subtle); }
.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-ring);
}
.form-input[aria-invalid="true"] {
    border-color: var(--accent-rose);
    box-shadow: 0 0 0 4px rgba(244, 63, 94, 0.25);
}
select.form-input {
    appearance: none;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23A8B3C7' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.9rem center;
    padding-right: 2.25rem;
}
.form-error {
    font-size: 0.78rem;
    color: var(--accent-rose);
    min-height: 1em;
}
.form-status {
    font-size: 0.9rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    margin-top: 0.25rem;
}
.form-status.success {
    color: var(--accent-emerald);
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.28);
}
.form-status.error {
    color: var(--accent-rose);
    background: rgba(244, 63, 94, 0.12);
    border: 1px solid rgba(244, 63, 94, 0.28);
}
.cta-fine-print { font-size: 0.8rem; color: var(--text-muted); text-align: center; }

/* ======== PREVIEW PROGRAM ======== */
.preview-program { padding: var(--spacing-section) 0; background: linear-gradient(180deg, var(--bg-main) 0%, var(--bg-secondary) 50%, var(--bg-main) 100%); }

.preview-timeline { display: flex; flex-direction: column; gap: 0; margin-top: 4rem; max-width: 860px; margin-left: auto; margin-right: auto; }

.preview-phase { display: grid; grid-template-columns: 80px 1fr; gap: 0 2rem; }

.phase-marker { display: flex; flex-direction: column; align-items: center; }

.phase-number {
    width: 52px; height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex; align-items: center; justify-content: center;
    font-size: 0.8rem; font-weight: 700; color: white;
    letter-spacing: 0.05em; flex-shrink: 0;
    box-shadow: 0 0 0 6px rgba(99,102,241,0.1);
}

.phase-line { width: 2px; flex: 1; background: linear-gradient(to bottom, rgba(99,102,241,0.4), rgba(99,102,241,0.1)); margin: 0.5rem 0; min-height: 2.5rem; }

.phase-content { padding-bottom: 3rem; }

.preview-phase-final .phase-content { padding-bottom: 0; }

.phase-title { font-size: 1.4rem; font-weight: 700; color: var(--text-main); margin-top: 0.75rem; margin-bottom: 0.75rem; }

.phase-desc { color: var(--text-muted); line-height: 1.7; margin-bottom: 1rem; }

.phase-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.phase-tag {
    font-size: 0.75rem; font-weight: 500;
    background: rgba(99,102,241,0.1);
    border: 1px solid rgba(99,102,241,0.2);
    color: var(--text-muted);
    border-radius: 20px;
    padding: 0.25rem 0.75rem;
}

.preview-cta-bar {
    display: flex; align-items: center; justify-content: space-between;
    gap: 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 2rem 2.5rem;
    margin-top: 4rem;
}

.preview-cta-text { display: flex; flex-direction: column; gap: 0.4rem; }
.preview-cta-text strong { font-size: 1.05rem; color: var(--text-main); }
.preview-cta-text span { font-size: 0.875rem; color: var(--text-muted); }

/* ======== FOOTER ======== */
.footer { padding: 4rem 0 2rem; background: var(--bg-secondary); border-top: 1px solid var(--border); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 4rem; margin-bottom: 4rem; }
.footer-desc { color: var(--text-muted); margin-top: 1rem; max-width: 300px; }
.footer-links h4 { font-size: 1rem; margin-bottom: 1.5rem; }
.footer-links a { display: block; color: var(--text-muted); margin-bottom: 0.75rem; transition: color 0.2s; }
.footer-links a:hover { color: var(--primary); }
.footer-bottom { text-align: center; color: var(--text-muted); font-size: 0.875rem; padding-top: 2rem; border-top: 1px solid var(--border-light); }


/* ======== RESPONSIVE ======== */
@media (max-width: 1024px) {
    .hero-container { grid-template-columns: 1fr; text-align: center; }
    .hero-container > * { min-width: 0; }
    .hero-subtitle { margin: 0 auto 2.5rem; }
    .hero-ctas { justify-content: center; flex-wrap: wrap; }
    .hero-stats { justify-content: center; flex-wrap: wrap; }
    /* Contain the tilted dashboard mockup so its fixed-width inner content
       can't stretch the column and force horizontal page scroll. */
    .hero-visual { width: 100%; min-width: 0; max-width: 100%; overflow: hidden; }
    .hero-dashboard-preview { transform: none; width: 100%; min-width: 0; }
    .preview-content, .preview-main, .preview-sidebar { min-width: 0; }
    .features-grid { grid-template-columns: repeat(2, 1fr); }
    .feature-card-large { grid-column: span 1; }
    .steps-timeline { flex-wrap: wrap; gap: 2rem; }
    .step-connector { display: none; }
    .integrations-grid { grid-template-columns: repeat(3, 1fr); }
    .security-grid { grid-template-columns: repeat(2, 1fr); }
    .preview-cta-bar { flex-direction: column; text-align: center; align-items: center; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
}

@media (max-width: 768px) {
    .nav-toggle { display: block; }

    /* Off-canvas mobile nav */
    .nav-links {
        position: fixed;
        top: 0;
        right: 0;
        height: 100vh;
        width: min(80vw, 320px);
        background: var(--bg-secondary);
        border-left: 1px solid var(--border);
        flex-direction: column;
        justify-content: flex-start;
        align-items: stretch;
        padding: 5rem 1.5rem 2rem;
        gap: 0.5rem;
        transform: translateX(100%);
        transition: transform var(--dur-med) var(--ease-out);
        box-shadow: var(--shadow-xl);
        z-index: 99;
    }
    .nav-links.active { transform: translateX(0); }
    .nav-links .nav-link {
        padding: 0.75rem 0.5rem;
        font-size: 1rem;
        color: var(--text-main);
        border-bottom: 1px solid var(--border);
    }

    /* Reveal the sign-in / trial actions inside the mobile drawer */
    .nav-cta-mobile { display: block; }
    .nav-cta-mobile-primary {
        display: block;
        margin-top: 1rem;
        text-align: center;
    }

    /* Mobile nav scrim */
    .nav-scrim {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        backdrop-filter: blur(2px);
        z-index: 98;
    }
    .nav-scrim.active { display: block; }

    .nav-actions { display: none; }

    .hero-title { font-size: 2.5rem; }
    .features-grid { grid-template-columns: 1fr; }
    .integrations-grid { grid-template-columns: repeat(2, 1fr); }
    .form-row { flex-direction: column; }
    .footer-grid { grid-template-columns: 1fr; }
    .compliance-row-inner { gap: 1rem; }
}

/* Hamburger → X animation */
.nav-toggle.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}
.nav-toggle.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Theme toggle button (shared between marketing + platform) */
.theme-toggle {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: color var(--dur-fast), border-color var(--dur-fast), background var(--dur-fast);
}
.theme-toggle:hover {
    color: var(--text-main);
    border-color: var(--border-light);
    background: var(--bg-card);
}
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
:root[data-theme="light"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="light"] .theme-toggle .icon-moon { display: none; }

/* ======== LIGHT MODE OVERRIDES (marketing) ======== */
:root[data-theme="light"] body { background-color: var(--bg-main); }
:root[data-theme="light"] .navbar { background-color: rgba(247, 248, 251, 0.82); }
:root[data-theme="light"] .navbar.scrolled { background-color: rgba(247, 248, 251, 0.96); }
:root[data-theme="light"] .hero-orb { opacity: 0.22; }
:root[data-theme="light"] .hero-grid-overlay {
    background-image:
        linear-gradient(to right, rgba(15, 23, 42, 0.06) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(15, 23, 42, 0.06) 1px, transparent 1px);
}
:root[data-theme="light"] .hero-gradient-text {
    background: linear-gradient(to right, #4F46E5, #A855F7);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
:root[data-theme="light"] .feature-card:hover { box-shadow: var(--shadow-lg); }
:root[data-theme="light"] .footer { background: var(--bg-secondary); }
:root[data-theme="light"] .step-number { color: rgba(15, 23, 42, 0.08); }
:root[data-theme="light"] .feature-icon-wrap { background-color: rgba(15, 23, 42, 0.04); }
:root[data-theme="light"] .preview-header { background-color: rgba(15, 23, 42, 0.04); }
:root[data-theme="light"] .preview-sidebar { background-color: rgba(15, 23, 42, 0.03); }
:root[data-theme="light"] .feature-visual { background: rgba(15, 23, 42, 0.03); }
:root[data-theme="light"] .preview-transcript-snippet { background: rgba(15, 23, 42, 0.04); }
:root[data-theme="light"] .compliance-row { background: rgba(15, 23, 42, 0.02); }
:root[data-theme="light"] .wl-brand,
:root[data-theme="light"] .chart-bar { filter: none; }

/* Pulse animation: softer in light mode */
:root[data-theme="light"] .badge-dot { box-shadow: 0 0 8px rgba(16,185,129,0.45); }
