/* ================================================================
   STREAMSNATCHER — "SIGNAL" DESIGN SYSTEM
   Palette:  warm graphite panel × copper conductor × teal trace
   Type:     Archivo Expanded · IBM Plex Sans · IBM Plex Mono
   Concept:  a direct patch — two jacks, one cable, no operator in between.
             StreamSnatcher removes the switchboard; the connection is yours.
   Layout:   Left-aligned split hero · Sticky spec-card stack · Precise grid
   ================================================================ */

/* ── 1. DESIGN TOKENS ────────────────────────────────────────────── */
:root {
    /* Surface — warm graphite equipment panel, not void black */
    --bg:          oklch(0.16 0.014 55);
    --bg-raised:   oklch(0.205 0.016 55);
    --bg-deep:     oklch(0.12 0.012 55);

    /* Text */
    --ink:         oklch(0.95 0.008 70);
    --ink-dim:     oklch(0.68 0.02 60);
    --ink-faint:   oklch(0.46 0.02 60);

    /* Brand — conductor (primary signal, copper) + trace (secondary, teal) */
    --primary:      oklch(0.74 0.15 55);
    --primary-hi:   oklch(0.82 0.14 60);
    --primary-lo:   oklch(0.56 0.16 55);
    --primary-glow: oklch(0.74 0.15 55 / 0.35);
    --trace:        oklch(0.76 0.12 195);
    --trace-lo:     oklch(0.52 0.13 195);

    /* Structure */
    --border:    oklch(0.74 0.15 55 / 0.14);
    --border-hi: oklch(0.74 0.15 55 / 0.40);

    /* Semantic (compatibility with style.css) */
    --bg-primary:     var(--bg);
    --bg-secondary:   var(--bg-raised);
    --bg-card:        oklch(0.205 0.016 55 / 0.85);
    --text-primary:   var(--ink);
    --text-secondary: var(--ink-dim);
    --accent-primary:   var(--primary);
    --accent-secondary: var(--trace);
    --btn-fill-1: var(--primary-lo);
    --btn-fill-2: var(--trace-lo);
    --success:  oklch(0.72 0.15 145);
    --warning:  oklch(0.78 0.15  80);
    --danger:   oklch(0.62 0.21  25);
    --shadow-sm:   0 2px 8px oklch(0 0 0 / 0.25);
    --shadow-md:   0 4px 16px oklch(0 0 0 / 0.35);
    --shadow-lg:   0 8px 32px oklch(0 0 0 / 0.45);
    --shadow-glow: 0 0 20px var(--primary-glow);
    --transition:      all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-fast: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);

    /* Type stacks — Archivo's width axis is pulled to 125 (expanded) below;
       there is no separate "Archivo Expanded" family, it's one variable font. */
    --font-display: 'Archivo', system-ui, sans-serif;
    --font-body:    'IBM Plex Sans', system-ui, sans-serif;
    --font-mono:    'IBM Plex Mono', 'Courier New', monospace;

    /* Panel radius — a deliberate chamfer, not a bubble, not a raw square */
    --panel-radius: 6px;

    /* Motion */
    --ease-out:  cubic-bezier(0.16, 1, 0.3, 1);
    --ease-expo: cubic-bezier(0.19, 1, 0.22, 1);
}

/* ── 2. GLOBAL RESETS ────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--ink);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Grain noise overlay — subtle texture on the equipment-panel surface */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 9998;
    pointer-events: none;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.80' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-size: 200px 200px;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-stretch: 125%;
    letter-spacing: -0.01em;
    text-wrap: balance;
}

a { color: inherit; text-decoration: none; transition: color 0.2s ease; }
button { font-family: inherit; cursor: pointer; border: none; outline: none; }
input, select { font-family: inherit; outline: none; }

.hidden { display: none !important; }

.container {
    max-width: 1400px;
    margin: 8rem auto;
    padding: 0 2rem;
}

.container:not(:has(*:not(.hidden))) {
    margin-block: 0;
    padding-block: 0;
}

/* ── 3. NAVIGATION ───────────────────────────────────────────────── */
header {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 1000;
    background: oklch(0.16 0.014 55 / 0.88);
    backdrop-filter: blur(24px) saturate(1.3);
    border-bottom: 1px solid var(--border);
}

nav {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
}

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

/* Text logotype — a mini direct-patch mark (echoing the hero signature) plus
   a two-tone wordmark: "Stream" in ink, "Snatcher" in the copper conductor. */
.logo-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}
.logo-mark {
    color: var(--primary);
    filter: drop-shadow(0 0 6px var(--primary-glow));
    transition: filter 0.25s ease;
    flex-shrink: 0;
}
.logo-link:hover .logo-mark,
.footer-logo .logo-mark { filter: drop-shadow(0 0 12px oklch(0.74 0.15 55 / 0.4)); }

.logo-text {
    font-family: var(--font-display);
    font-stretch: 125%;
    font-weight: 800;
    font-size: 1.3rem;
    letter-spacing: -0.01em;
    color: var(--ink);
}
.logo-accent { color: var(--primary); }

.footer-logo {
    margin-bottom: 1rem;
}
.footer-logo .logo-text { font-size: 1.15rem; }

.nav-links { display: flex; list-style: none; gap: 0; }
.nav-links a {
    font-family: var(--font-mono);
    font-weight: 500;
    font-size: 0.82rem;
    letter-spacing: 0.02em;
    color: var(--ink-dim);
    padding: 0.5rem 1rem;
    position: relative;
    white-space: nowrap;
    transition: color 0.2s ease;
}
.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 1rem;
    right: 1rem;
    height: 1px;
    background: var(--primary);
    transform: scaleX(0);
    transition: transform 0.2s var(--ease-out);
}
.nav-links a:hover { color: var(--ink); background: transparent; }
.nav-links a:hover::after { transform: scaleX(1); }

.btn-theme-toggle {
    background: var(--bg-raised);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 6px 12px;
    color: var(--ink-dim);
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition-fast);
}
.btn-theme-toggle:hover { border-color: var(--primary); color: var(--primary); }

[data-theme="dark"] .icon-moon { display: none; }
[data-theme="dark"] .icon-sun  { display: block; }
[data-theme="light"] .icon-sun  { display: none; }
[data-theme="light"] .icon-moon { display: block; }

/* ── 4. HERO — CENTERED, WITH THE PATCH CABLE AS AMBIENT BACKDROP ──── */
/* The cable no longer lives in its own side column (that read as empty next
   to the dense text). It's now a full-width layer behind the centered
   content, spanning from one edge of the hero to the other — the jacks sit
   in the margins either side of the text column, so it reads as atmosphere
   framing the headline rather than a separate, sparser panel. */
.ss-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 100vh;
    padding-top: 80px;
    position: relative;
    max-width: 1400px;
    margin: 0 auto;
    overflow: hidden;
}

.ss-hero::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    height: 70%;
    background:
        radial-gradient(ellipse at 50% 45%, var(--primary-glow) 0%, oklch(0.74 0.15 55 / 0.07) 45%, transparent 72%),
        radial-gradient(ellipse at 25% 65%, oklch(0.76 0.12 195 / 0.10) 0%, transparent 55%),
        radial-gradient(ellipse at 75% 65%, oklch(0.76 0.12 195 / 0.10) 0%, transparent 55%);
    pointer-events: none;
    z-index: 0;
    filter: blur(40px);
}

#network-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.ss-hero-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 720px;
    padding: 2.5rem 1.5rem;
}

/* Link status label — reads the live state of the hero's patch animation */
.network-hud {
    position: absolute;
    bottom: 1.75rem;
    left: 50%;
    transform: translateX(-50%);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.62rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: oklch(0.74 0.15 55 / 0.6);
    pointer-events: none;
    z-index: 2;
}

.hud-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 8px var(--primary-glow);
    animation: hud-pulse 2.5s ease-in-out infinite;
}

/* ── 5. HERO CONTENT ─────────────────────────────────────────────── */
.ss-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--primary);
    background: oklch(0.74 0.15 55 / 0.08);
    border: 1px solid oklch(0.74 0.15 55 / 0.28);
    border-radius: 99px;
    padding: 0.38rem 1rem 0.38rem 0.75rem;
    margin-bottom: 2.25rem;
    opacity: 0;
    animation: fade-slide-up 0.7s var(--ease-out) 0.05s both;
}

.ss-label-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 8px var(--primary-glow);
    animation: hud-pulse 2.5s ease-in-out infinite;
    flex-shrink: 0;
}

.ss-h1 {
    font-family: var(--font-display);
    font-size: clamp(3.6rem, 7vw, 7.5rem);
    font-weight: 800;
    line-height: 0.94;
    letter-spacing: -0.02em;
    margin: 0 0 2.5rem;
    color: var(--ink);
}

.word {
    display: block;
    overflow: hidden;
    padding-bottom: 0.06em;
}

.word-inner {
    display: block;
    animation: word-up 0.9s var(--ease-expo) both;
}

.word:nth-child(1) .word-inner { animation-delay: 0.08s; }
.word:nth-child(2) .word-inner { animation-delay: 0.22s; }
.word:nth-child(3) .word-inner { animation-delay: 0.36s; }

.dot { color: var(--primary); }

@keyframes word-up {
    from { transform: translateY(110%); }
    to   { transform: translateY(0); }
}

.ss-sub {
    font-size: clamp(1rem, 1.4vw, 1.15rem);
    color: var(--ink-dim);
    line-height: 1.70;
    max-width: 46ch;
    margin: 0 0 2.75rem;
    opacity: 0;
    animation: fade-slide-up 0.8s var(--ease-out) 0.50s both;
}

.ss-stats {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 3rem;
    opacity: 0;
    animation: fade-slide-up 0.7s var(--ease-out) 0.65s both;
}

.ss-stat-div {
    width: 1px;
    height: 2.5rem;
    background: var(--border);
    flex-shrink: 0;
}

.ss-stat {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.ss-stat-val {
    font-family: var(--font-mono);
    font-size: 1.6rem;
    font-weight: 500;
    color: var(--primary);
    line-height: 1;
}

.ss-stat-key {
    font-family: var(--font-mono);
    font-size: 0.62rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ink-dim);
}

.ss-cta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    opacity: 0;
    animation: fade-slide-up 0.7s var(--ease-out) 0.78s both;
}

/* ── 6. BUTTONS ──────────────────────────────────────────────────── */
.btn.btn-hero,
.btn-cta-action {
    background: var(--primary);
    color: oklch(0.16 0.014 55);
    border: none;
    border-radius: var(--panel-radius);
    padding: 1rem 2.5rem;
    font-family: var(--font-display);
    font-stretch: 125%;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s var(--ease-out), box-shadow 0.2s ease;
}

.btn.btn-hero::before,
.btn-cta-action::before {
    content: '';
    position: absolute;
    inset: 0;
    background: oklch(0 0 0 / 0.14);
    transform: translateX(-101%);
    transition: transform 0.3s var(--ease-out);
}

.btn.btn-hero:hover::before,
.btn-cta-action:hover::before { transform: translateX(0); }

.btn.btn-hero:hover,
.btn-cta-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 44px var(--primary-glow);
}

.btn.btn-hero:active,
.btn-cta-action:active { transform: translateY(0); box-shadow: none; }

.btn.btn-hero::after,
.btn-cta-action::after {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 45%; height: 100%;
    background: linear-gradient(90deg, transparent, oklch(1 0 0 / 0.18), transparent);
    transform: skewX(-15deg) translateX(-200%);
    animation: btn-sheen 4s ease-in-out infinite 1.5s;
    pointer-events: none;
}

@keyframes btn-sheen {
    0%   { transform: skewX(-15deg) translateX(-200%); }
    35%  { transform: skewX(-15deg) translateX(350%); }
    100% { transform: skewX(-15deg) translateX(350%); }
}

.btn.btn-secondary {
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--border-hi);
    border-radius: var(--panel-radius);
    transition: var(--transition);
}
.btn.btn-secondary:hover {
    background: oklch(0.74 0.15 55 / 0.08);
    border-color: var(--primary);
}

.btn.btn-primary {
    background: var(--primary-lo);
    color: white;
    border-radius: var(--panel-radius);
}
.btn.btn-primary:hover { background: var(--primary-hi); transform: translateY(-1px); }

.btn.btn-danger {
    background: transparent;
    color: var(--danger);
    border: 1px solid oklch(0.62 0.21 25 / 0.4);
    border-radius: var(--panel-radius);
}
.btn.btn-danger:hover { background: var(--danger); color: white; }

.btn.btn-copy {
    background: var(--primary-lo);
    color: white;
    border-radius: var(--panel-radius);
    padding: 0.875rem 1.5rem;
    white-space: nowrap;
}

.pro-hint a,
.pro-session-hint a {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    letter-spacing: 0.02em;
    color: var(--ink-dim);
    border-bottom: 1px solid var(--border);
    padding-bottom: 1px;
    transition: color 0.2s ease, border-color 0.2s ease;
}
.pro-hint a:hover,
.pro-session-hint a:hover { color: var(--primary); border-color: var(--primary); }

/* ── 7. TICKER MARQUEE ──────────────────────────────────────────── */
.ticker {
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 1.1rem 0;
    overflow: hidden;
    background: var(--bg-deep);
}

.ticker-track {
    display: flex;
    gap: 0;
    white-space: nowrap;
    animation: ticker-scroll 28s linear infinite;
    width: max-content;
}

.ticker-item {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ink-dim);
    padding: 0 2.5rem;
    transition: color 0.2s ease;
}
.ticker-item:hover { color: var(--primary); }

.ticker-sep {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: oklch(0.74 0.15 55 / 0.55);
    user-select: none;
    align-self: center;
}

@keyframes ticker-scroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

/* ── 8. FEATURES — SPEC CARD STACK ───────────────────────────────── */
.features-section {
    padding: 8rem 0;
    border-top: 1px solid var(--border);
}

.section-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 max(2rem, 8%);
}

.section-intro { margin-bottom: 4rem; }

.section-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 0.98;
    margin: 0 0 0.75rem;
    color: var(--ink);
}

.section-sub {
    font-size: 1.05rem;
    color: var(--ink-dim);
    max-width: 55ch;
    line-height: 1.65;
}

.feat-bento {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
    margin-top: 4rem;
}

.feat-card {
    background: var(--bg-raised);
    border: 1px solid var(--border);
    border-radius: var(--panel-radius);
    padding: 2rem 2rem 2.25rem;
    position: relative;
    overflow: hidden;
    transition: opacity 0.55s var(--ease-out), transform 0.3s var(--ease-out), border-color 0.25s ease;
}

.feat-card:nth-child(1),
.feat-card:nth-child(2) { grid-column: span 2; padding: 2.5rem 2.5rem 2.75rem; }

.feat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 60%; height: 60%;
    background: radial-gradient(ellipse at 0% 0%, oklch(0.74 0.15 55 / 0.10) 0%, transparent 65%);
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
}

.feat-card:hover { border-color: var(--border-hi); transform: translateY(-2px); }
.feat-card:hover::before { opacity: 1; }

.feat-card-icon {
    width: 42px; height: 42px;
    background: oklch(0.74 0.15 55 / 0.10);
    border: 1px solid oklch(0.74 0.15 55 / 0.22);
    border-radius: var(--panel-radius);
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 1.5rem;
    color: var(--primary);
    flex-shrink: 0;
}

.feat-card:nth-child(1) .feat-card-icon,
.feat-card:nth-child(2) .feat-card-icon { width: 48px; height: 48px; }

.feat-card-tag {
    font-family: var(--font-mono);
    font-size: 0.62rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--trace);
    margin-bottom: 0.65rem;
    opacity: 0.9;
}

.feat-card-name {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.20rem;
    letter-spacing: -0.01em;
    color: var(--ink);
    margin-bottom: 0.65rem;
    line-height: 1.15;
}

.feat-card:nth-child(1) .feat-card-name,
.feat-card:nth-child(2) .feat-card-name { font-size: 1.45rem; }

.feat-card-desc {
    font-size: 0.90rem;
    line-height: 1.72;
    color: var(--ink-dim);
}

/* Sticky card-stack scroll: each card pins under the nav and the next stacks
   above it, so the "spec sheet" reveals itself one plate at a time. */
.feat-stack {
    margin-top: 4rem;
    padding-bottom: 10vh;
}

.feat-stack .feat-card {
    position: sticky;
    top: 96px;
    max-width: 820px;
    margin-left: auto;
    margin-right: auto;
    margin-top: 55vh;
    transform-origin: 50% 0%;
    will-change: transform, filter;
}

.feat-stack .feat-card:first-child { margin-top: 0; }

.feat-stack .feat-card:nth-child(1),
.feat-stack .feat-card:nth-child(2) { padding: 2rem 2rem 2.25rem; grid-column: unset; }

.feat-stack .feat-card:nth-child(1) .feat-card-name,
.feat-stack .feat-card:nth-child(2) .feat-card-name { font-size: 1.20rem; }

.feat-stack .feat-card:nth-child(1) .feat-card-icon,
.feat-stack .feat-card:nth-child(2) .feat-card-icon { width: 42px; height: 42px; }

.feat-stack .feat-card:nth-child(1) { z-index: 1; }
.feat-stack .feat-card:nth-child(2) { z-index: 2; }
.feat-stack .feat-card:nth-child(3) { z-index: 3; }
.feat-stack .feat-card:nth-child(4) { z-index: 4; }
.feat-stack .feat-card:nth-child(5) { z-index: 5; }
.feat-stack .feat-card:nth-child(6) { z-index: 6; }

/* ── 9. HOW IT WORKS ─────────────────────────────────────────────── */
.how-section {
    background: var(--bg-raised);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 8rem 0;
    position: relative;
    overflow: hidden;
}

.how-section::before {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 70%; height: 80%;
    background: radial-gradient(ellipse at center, oklch(0.74 0.15 55 / 0.07) 0%, oklch(0.74 0.15 55 / 0.02) 50%, transparent 75%);
    pointer-events: none;
    filter: blur(60px);
}

.how-steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    margin-top: 4rem;
    border: 1px solid var(--border);
}

.how-step {
    padding: 2.5rem 2rem;
    border-right: 1px solid var(--border);
    position: relative;
    overflow: hidden;
    transition: opacity 0.55s var(--ease-out), transform 0.55s var(--ease-out), background 0.2s ease;
}

.how-step:last-child { border-right: none; }
.how-step:hover { background: oklch(0.74 0.15 55 / 0.04); }

.how-step::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: var(--primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.35s var(--ease-out);
}
.how-step:hover::before { transform: scaleX(1); }

/* Real sequence (create -> share -> connect -> transfer), so a numbered
   panel-label is earned here — unlike the feature spec cards above. */
.how-step-n {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    color: var(--primary);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.how-step-n::before { content: 'CH.'; opacity: 0.55; }

.how-step-n::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}
.how-step:last-child .how-step-n::after { flex: 0; }

.how-step-title {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin-bottom: 0.75rem;
    color: var(--ink);
}

.how-step-desc {
    font-size: 0.9rem;
    line-height: 1.65;
    color: var(--ink-dim);
}

/* ── 10. FAQ SECTION — accordion ─────────────────────────────────────
   Single column, questions collapsed by default (first one open as an
   affordance hint). Was a dense always-open 2-col wall of text; scanning
   eight questions at once at that density was the actual problem, not
   just the visuals. Every selector below is scoped under .faq-accordion so it
   can never collide with marketing.css's own unrelated bare `.faq-item`
   rule (written for the static /faq page) the way `.cta-title` once did —
   `.faq-accordion .faq-item` outranks a bare `.faq-item` regardless of which
   properties either side happens to declare. */
.faq-section {
    padding: 8rem 0;
    border-top: 1px solid var(--border);
}

.faq-accordion {
    max-width: 820px;
    margin: 4rem auto 0;
    border-top: 1px solid var(--border);
}

.faq-accordion .faq-item {
    border-bottom: 1px solid var(--border);
    background: none;
    border-radius: 0;
    margin: 0;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.55s var(--ease-out), transform 0.55s var(--ease-out);
}
.faq-accordion .faq-item.revealed { opacity: 1; transform: translateY(0); }

.faq-accordion .faq-q { margin: 0; }

.faq-accordion .faq-q-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    width: 100%;
    padding: 1.5rem 0;
    background: none;
    border: none;
    text-align: left;
    font-family: var(--font-display);
    font-stretch: 125%;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.3;
    color: var(--ink);
    cursor: pointer;
    transition: color 0.2s ease;
}
.faq-accordion .faq-q-btn:hover { color: var(--primary); }

.faq-accordion .faq-chevron {
    flex-shrink: 0;
    color: var(--primary);
    transition: transform 0.3s var(--ease-out);
}
.faq-accordion .faq-q-btn[aria-expanded="true"] .faq-chevron { transform: rotate(180deg); }

/* Grid-rows 0fr→1fr trick animates height without needing JS to measure it.
   `visibility` is delayed so a collapsed answer's link can't be tabbed into,
   and un-delayed on the way in so it's focusable as soon as it's open. */
.faq-accordion .faq-a {
    display: grid;
    grid-template-rows: 0fr;
    visibility: hidden;
    transition: grid-template-rows 0.35s var(--ease-out), visibility 0s linear 0.35s;
}
.faq-accordion .faq-item.open .faq-a {
    grid-template-rows: 1fr;
    visibility: visible;
    transition: grid-template-rows 0.35s var(--ease-out), visibility 0s linear 0s;
}

.faq-accordion .faq-a-inner { overflow: hidden; }

.faq-accordion .faq-a p {
    font-size: 0.9rem;
    line-height: 1.70;
    color: var(--ink-dim);
    max-width: 60ch;
    padding-bottom: 1.5rem;
}

.faq-accordion .faq-a a {
    color: var(--primary);
    text-decoration: underline;
    text-decoration-color: oklch(0.74 0.15 55 / 0.35);
    text-underline-offset: 3px;
    transition: text-decoration-color 0.2s ease;
}
.faq-accordion .faq-a a:hover { text-decoration-color: var(--primary); }

.faq-accordion .faq-item:nth-child(1) { transition-delay: 0.00s; }
.faq-accordion .faq-item:nth-child(2) { transition-delay: 0.05s; }
.faq-accordion .faq-item:nth-child(3) { transition-delay: 0.10s; }
.faq-accordion .faq-item:nth-child(4) { transition-delay: 0.15s; }
.faq-accordion .faq-item:nth-child(5) { transition-delay: 0.20s; }
.faq-accordion .faq-item:nth-child(6) { transition-delay: 0.25s; }
.faq-accordion .faq-item:nth-child(7) { transition-delay: 0.30s; }
.faq-accordion .faq-item:nth-child(8) { transition-delay: 0.35s; }

/* ── 11. CTA SECTION ─────────────────────────────────────────────── */
.cta-section {
    padding: 8rem 0;
    border-top: 1px solid var(--border);
}

.cta-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 max(2rem, 8%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
}

/* One deliberate gradient moment — conductor fading to trace — reserved for
   this closing headline alone, echoing both accent colors without spending
   the effect anywhere else. (style.css's older bare `.cta-title` rule also
   applies this same gradient via background-clip; kept in sync here so it
   reads as one intentional design choice, not a leak.) */
.cta-text .cta-title {
    font-family: var(--font-display);
    font-stretch: 125%;
    font-size: clamp(2rem, 3.5vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.02;
    margin: 0 0 0.75rem;
    max-width: 22ch;
    text-wrap: balance;
    background: linear-gradient(135deg, var(--primary), var(--trace));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.cta-text .cta-description {
    font-size: 1rem;
    color: var(--ink-dim);
    max-width: 42ch;
    line-height: 1.65;
}

.cta-actions {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1rem;
}

.cta-note {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ink-dim);
    opacity: 0.7;
}

/* ── 12. FOOTER ──────────────────────────────────────────────────── */
footer {
    background: var(--bg-deep);
    border-top: 1px solid var(--border);
    padding: 4rem max(2rem, 8%) 2rem;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto 3rem;
    display: grid;
    grid-template-columns: 1.8fr repeat(3, 1fr);
    gap: 3rem;
}

.footer-section h4 {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 1.25rem;
}

.footer-section p { font-size: 0.88rem; line-height: 1.7; color: var(--ink-dim); }
.footer-section ul { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 0.55rem; }
.footer-section ul li a { font-size: 0.88rem; color: var(--ink-dim); transition: color 0.15s ease; }
.footer-section ul li a:hover { color: var(--primary); }

.footer-bottom {
    max-width: 1400px;
    margin: 0 auto;
    border-top: 1px solid var(--border);
    padding-top: 1.5rem;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ink-dim);
}

/* ── 13. SESSION UI (PRESERVED) — minimal overrides onto new tokens ── */
.session-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--panel-radius);
}

.session-url-input,
.session-link-mini,
.modal-url-input {
    background: var(--bg-deep);
    border: 1px solid var(--border);
    border-radius: var(--panel-radius);
    color: var(--ink);
    font-family: var(--font-mono);
    font-size: 0.82rem;
}

.upload-zone-large {
    border: 1px dashed var(--border-hi);
    border-radius: var(--panel-radius);
    background: var(--bg-deep);
    transition: var(--transition);
}
.upload-zone-large:hover,
.upload-zone-large.drag-over {
    border-color: var(--primary);
    background: oklch(0.74 0.15 55 / 0.05);
}

/* ── 14. SCROLL REVEAL ───────────────────────────────────────────── */
.how-step.will-animate,
.section-intro.will-animate,
.scroll-reveal.will-animate { opacity: 0; transform: translateY(14px); }

.how-step.revealed,
.section-intro.revealed,
.scroll-reveal.revealed { opacity: 1; transform: translateY(0); }

.feat-row:nth-child(1) { transition-delay: 0.00s; }
.feat-row:nth-child(2) { transition-delay: 0.06s; }
.feat-row:nth-child(3) { transition-delay: 0.12s; }
.feat-row:nth-child(4) { transition-delay: 0.18s; }
.feat-row:nth-child(5) { transition-delay: 0.24s; }
.feat-row:nth-child(6) { transition-delay: 0.30s; }

.how-step:nth-child(1) { transition-delay: 0.00s; }
.how-step:nth-child(2) { transition-delay: 0.08s; }
.how-step:nth-child(3) { transition-delay: 0.16s; }
.how-step:nth-child(4) { transition-delay: 0.24s; }

/* ── 15. GLOBAL KEYFRAMES ────────────────────────────────────────── */
@keyframes fade-slide-up {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes hud-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.45; transform: scale(0.8); }
}

/* ── 16. BREADCRUMBS ─────────────────────────────────────────────── */
.breadcrumbs {
    background: transparent;
    border-bottom: 1px solid var(--border);
    padding: 0.6rem max(2rem, 8%);
    font-family: var(--font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.06em;
}

/* ── 17. RESPONSIVE ──────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .ss-h1 { font-size: clamp(3rem, 6.5vw, 4.5rem); }
    .feat-bento { grid-template-columns: repeat(2, 1fr); }
    .feat-card:nth-child(1),
    .feat-card:nth-child(2) { grid-column: span 1; }
    .how-steps { grid-template-columns: repeat(2, 1fr); }
    .how-step:nth-child(2) { border-right: none; }
    .how-step:nth-child(3) { border-top: 1px solid var(--border); }
    .cta-inner { flex-direction: column; gap: 2.5rem; }
    .cta-actions { align-items: flex-start; }
    .footer-content { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
    .ss-hero-content { padding-top: 1.5rem; }
    .feat-bento { grid-template-columns: 1fr 1fr; gap: 0.75rem; }
}

@media (max-width: 560px) {
    .ss-h1 { font-size: clamp(2.6rem, 11vw, 3.6rem); }
    .ss-stats { gap: 1.25rem; }
    /* Cable animation competes with the text for space on narrow screens
       instead of framing it — simpler to just show the centered text here. */
    #network-canvas, .network-hud { display: none; }
    .feat-bento { grid-template-columns: 1fr; }
    .feat-card:nth-child(1),
    .feat-card:nth-child(2) { grid-column: span 1; padding: 1.75rem; }
    .how-steps { grid-template-columns: 1fr; }
    .how-step { border-right: none; border-bottom: 1px solid var(--border); }
    .how-step:last-child { border-bottom: none; }
    .footer-content { grid-template-columns: 1fr; }
    /* Nav wraps to its own centered row rather than breaking words mid-link */
    nav { padding: 0.6rem 1.25rem; flex-wrap: wrap; justify-content: center; row-gap: 0.4rem; }
    .nav-links { flex-wrap: wrap; justify-content: center; order: 3; width: 100%; }
    .nav-links a { font-size: 0.72rem; padding: 0.4rem 0.55rem; }
}

/* ── 18. LIGHT THEME ─────────────────────────────────────────────── */
:root[data-theme="light"] {
    --bg:          oklch(0.975 0.006 70);
    --bg-raised:   oklch(0.99 0.004 70);
    --bg-deep:     oklch(0.94 0.008 70);
    --bg-card:     oklch(0.99 0.004 70 / 0.98);
    --ink:         oklch(0.20 0.012 55);
    --ink-dim:     oklch(0.42 0.014 55);
    --ink-faint:   oklch(0.58 0.014 55);
    --primary:     oklch(0.52 0.15 55);
    --primary-hi:  oklch(0.46 0.16 55);
    --primary-lo:  oklch(0.48 0.16 55);
    --primary-glow: oklch(0.52 0.15 55 / 0.22);
    --trace:       oklch(0.50 0.11 195);
    --trace-lo:    oklch(0.44 0.13 195);
    --border:    oklch(0.52 0.15 55 / 0.16);
    --border-hi: oklch(0.52 0.15 55 / 0.40);
    --text-primary:   var(--ink);
    --text-secondary: var(--ink-dim);
    --accent-primary: var(--primary);
    --accent-secondary: var(--trace);
    --bg-primary:     var(--bg);
    --bg-secondary:   var(--bg-raised);
    --btn-fill-1: var(--primary-lo);
    --btn-fill-2: var(--trace-lo);
}

[data-theme="light"] header {
    background: oklch(0.975 0.006 70 / 0.92);
    border-bottom-color: oklch(0.52 0.15 55 / 0.16);
}
[data-theme="light"] .how-section { background: oklch(0.94 0.008 70); }
[data-theme="light"] .ss-cta .btn.btn-hero,
[data-theme="light"] .btn-cta-action { color: oklch(0.99 0 0); }
[data-theme="light"] footer { background: oklch(0.94 0.008 70); }

/* ── 19. REDUCED MOTION ──────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .word-inner, .ss-label, .ss-sub, .ss-stats, .ss-cta {
        animation: none; opacity: 1; transform: none;
    }
    .scroll-reveal { opacity: 1; transform: none; transition: none; }
    #network-canvas { display: none; }
    .how-step::before { transition: none; }
    .btn.btn-hero::before, .btn-cta-action::before { transition: none; }
    .btn.btn-hero::after, .btn-cta-action::after { animation: none; }
    .ticker-track { animation: none; }
    .hud-dot, .ss-label-dot { animation: none; }
}
