/* =========================================================================
   Kerados — styles.css
   Dark pro-tool aesthetic: near-black canvas, teal brand, strict accents.
   ========================================================================= */

:root {
    /* Palette */
    --bg-0: #0a0a0b;
    --bg-1: #111114;
    --bg-2: #17171b;
    --bg-3: #1d1d22;

    --brand: #00b891;
    --brand-strong: #00d4a6;
    --brand-soft: rgba(0, 184, 145, 0.14);
    --brand-glow: rgba(0, 184, 145, 0.35);
    --brand-ink: #05221c;

    --accent-ch1: #c9a961;           /* Visual Search — chapter scope only */
    --accent-ch2: #7aa7d9;           /* Speech Search — chapter scope only */
    --accent-ch3: #d9927a;           /* Face Recognition — chapter scope only */
    --accent-ch4: #8a95a5;           /* Private & Local — chapter scope only */

    --danger: #ef4444;

    --text: rgba(255, 255, 255, 0.92);
    --text-muted: rgba(255, 255, 255, 0.64);
    --text-quiet: rgba(255, 255, 255, 0.40);

    --hairline: rgba(255, 255, 255, 0.08);
    --hairline-strong: rgba(255, 255, 255, 0.14);

    /* Spacing */
    --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px; --s-5: 24px;
    --s-6: 32px; --s-7: 48px; --s-8: 64px; --s-9: 96px; --s-10: 128px;

    /* Radii */
    --r-xs: 4px; --r-sm: 6px; --r-md: 10px; --r-lg: 14px; --r-xl: 20px;
    --r-pill: 9999px;

    /* Shadows */
    --shadow-card: 0 1px 0 rgba(255,255,255,0.04) inset, 0 10px 30px rgba(0,0,0,0.4);
    --shadow-glow: 0 0 40px var(--brand-glow);
    --shadow-modal: 0 20px 60px rgba(0,0,0,0.6);

    /* Motion */
    --ease-calm: cubic-bezier(0.22, 0.61, 0.36, 1);
    --ease-snap: cubic-bezier(0.32, 0.72, 0, 1);
    --dur-fast: 150ms;
    --dur-med: 280ms;
    --dur-slow: 520ms;

    /* Fonts */
    --font-sans: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-mono: "GeistMono", "SF Mono", "Cascadia Code", "JetBrains Mono", Consolas, monospace;

    /* Nav — keep 64px to stay in sync with navigation.js:147 hardcoded offset */
    --nav-h: 64px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: var(--font-sans);
    background: var(--bg-0);
    color: var(--text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
button { font-family: inherit; }

/* Keep <canvas id="bg"> in DOM unpainted — accessibility-widget.js references it. */
canvas#bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0;
}

nav, main, footer, .mobile-menu { position: relative; z-index: 2; }

/* ---------- Skip link / a11y ---------- */
.skip-link {
    position: absolute;
    left: -9999px;
    top: var(--s-5);
    z-index: 1000;
    background: var(--brand);
    color: var(--brand-ink);
    padding: var(--s-2) var(--s-5);
    border-radius: var(--r-sm);
    text-decoration: none;
    font-weight: 600;
}
.skip-link:focus { left: var(--s-5); }

:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
    border-radius: 2px;
}

.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;
}

/* ---------- Reveal ---------- */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity var(--dur-slow) var(--ease-calm),
                transform var(--dur-slow) var(--ease-calm);
}
.reveal.visible { opacity: 1; transform: translateY(0); }

.reveal-children > * {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity var(--dur-med) var(--ease-calm),
                transform var(--dur-med) var(--ease-calm);
}
.reveal-children.visible > * { opacity: 1; transform: translateY(0); }
.reveal-children.visible > *:nth-child(1) { transition-delay: 0ms; }
.reveal-children.visible > *:nth-child(2) { transition-delay: 80ms; }
.reveal-children.visible > *:nth-child(3) { transition-delay: 160ms; }
.reveal-children.visible > *:nth-child(4) { transition-delay: 240ms; }
.reveal-children.visible > *:nth-child(5) { transition-delay: 320ms; }
.reveal-children.visible > *:nth-child(6) { transition-delay: 400ms; }

/* ---------- Navigation ---------- */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-h);
    background: rgba(10, 10, 11, 0.72);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid transparent;
    z-index: 100;
    transition: background var(--dur-med) var(--ease-calm),
                border-color var(--dur-med) var(--ease-calm);
}
nav.nav-scrolled {
    background: rgba(10, 10, 11, 0.92);
    border-bottom-color: var(--hairline);
}

.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    height: 100%;
    padding: 0 var(--s-6);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-left { display: flex; align-items: center; gap: var(--s-7); }

.logo {
    display: inline-flex;
    align-items: baseline;
    gap: 3px;
    text-decoration: none;
    color: var(--text);
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 1.18em;
    letter-spacing: -0.02em;
    line-height: 1;
}
.logo-mark {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--brand);
}

.nav-links {
    display: flex;
    gap: var(--s-6);
    list-style: none;
}
.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95em;
    font-weight: 500;
    transition: color var(--dur-fast) var(--ease-calm);
}
.nav-links a:hover, .nav-links a.active { color: var(--text); }

.nav-actions { display: flex; align-items: center; gap: var(--s-3); }

.nav-cta {
    background: var(--brand);
    color: var(--brand-ink);
    border: none;
    padding: 8px 16px;
    border-radius: var(--r-sm);
    font-weight: 600;
    font-size: 0.9em;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: background var(--dur-fast) var(--ease-calm),
                transform var(--dur-fast) var(--ease-calm);
}
.nav-cta:hover { background: var(--brand-strong); }
.nav-cta:active { transform: translateY(1px); }

/* ---------- Hamburger ---------- */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}
.hamburger-line {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: transform var(--dur-med) var(--ease-calm),
                opacity var(--dur-med) var(--ease-calm);
}
.hamburger[aria-expanded="true"] .hamburger-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.hamburger[aria-expanded="true"] .hamburger-line:nth-child(2) { opacity: 0; }
.hamburger[aria-expanded="true"] .hamburger-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ---------- Mobile menu ---------- */
.mobile-menu {
    position: fixed;
    inset: var(--nav-h) 0 0 0;
    background: rgba(10, 10, 11, 0.97);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    z-index: 99;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 60px;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity var(--dur-med) var(--ease-calm),
                transform var(--dur-med) var(--ease-calm);
    pointer-events: none;
}
.mobile-menu.open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
.mobile-menu-inner { width: 100%; }
.mobile-menu-links {
    list-style: none;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: var(--s-6);
}
.mobile-menu-links a {
    color: var(--text);
    text-decoration: none;
    font-size: 1.4em;
    font-weight: 500;
    transition: color var(--dur-fast) var(--ease-calm);
}
.mobile-menu-links a:hover { color: var(--brand); }

.mobile-menu-cta {
    display: inline-block;
    background: var(--brand);
    color: var(--brand-ink);
    padding: var(--s-3) var(--s-7);
    border-radius: var(--r-sm);
    font-weight: 600;
    font-size: 1.1em;
}

/* ---------- Buttons ---------- */
.btn-primary {
    background: var(--brand);
    color: var(--brand-ink);
    border: none;
    padding: 14px 28px;
    border-radius: var(--r-sm);
    font-weight: 600;
    font-size: 1em;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: background var(--dur-fast) var(--ease-calm),
                transform var(--dur-fast) var(--ease-calm);
}
.btn-primary:hover { background: var(--brand-strong); }
.btn-primary:active { transform: translateY(1px); }

.btn-secondary {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--hairline-strong);
    padding: 13px 27px;
    border-radius: var(--r-sm);
    font-weight: 500;
    font-size: 1em;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: border-color var(--dur-fast) var(--ease-calm),
                background var(--dur-fast) var(--ease-calm);
}
.btn-secondary:hover {
    border-color: var(--brand);
    background: var(--brand-soft);
}

/* ---------- Hero ---------- */
.hero {
    position: relative;
    min-height: 100vh;
    padding: calc(var(--nav-h) + var(--s-7)) var(--s-6) var(--s-8);
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    top: 38%;
    right: -10%;
    width: 70vw;
    height: 70vw;
    max-width: 900px;
    max-height: 900px;
    background: radial-gradient(circle at center,
                                var(--brand-soft) 0%,
                                rgba(0, 184, 145, 0.06) 30%,
                                transparent 60%);
    z-index: 1;
    pointer-events: none;
    animation: stage-breath 12s var(--ease-calm) infinite;
}
@keyframes stage-breath {
    0%, 100% { opacity: 0.85; transform: scale(1); }
    50%      { opacity: 1;    transform: scale(1.06); }
}

.hero-inner {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--s-7);
    align-items: center;
    z-index: 3;
}
@media (min-width: 960px) {
    .hero-inner {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
        gap: var(--s-8);
    }
}

.hero-copy { position: relative; }

.hero-headline {
    font-size: clamp(2.4rem, 5.5vw, 4.2rem);
    font-weight: 600;
    letter-spacing: -0.035em;
    line-height: 1.05;
    margin-bottom: var(--s-5);
}
.hero-headline em {
    font-style: normal;
    color: var(--brand);
}

.hero-sub {
    font-size: clamp(1rem, 1.5vw, 1.15rem);
    color: var(--text-muted);
    line-height: 1.55;
    max-width: 520px;
    margin-bottom: var(--s-6);
}

.hero-buttons {
    display: flex;
    gap: var(--s-3);
    flex-wrap: wrap;
    margin-bottom: var(--s-5);
}

.hero-trust {
    font-family: var(--font-mono);
    font-size: 0.8em;
    color: var(--text-quiet);
    letter-spacing: 0.01em;
    line-height: 1.5;
}

/* ---------- Hero demo (mocked app search bar) ---------- */
.hero-demo-wrap { position: relative; z-index: 3; }

.hero-demo {
    background: var(--bg-1);
    border: 1px solid var(--hairline-strong);
    border-radius: var(--r-lg);
    padding: var(--s-4);
    box-shadow: var(--shadow-card);
    overflow: hidden;
}

.hero-demo-bar {
    display: flex;
    align-items: center;
    gap: var(--s-3);
    padding: var(--s-3) var(--s-4);
    background: var(--bg-2);
    border: 1px solid var(--brand);
    border-radius: var(--r-pill);
    margin-bottom: var(--s-4);
    box-shadow: 0 0 0 3px var(--brand-glow);
    min-height: 44px;
}

.hero-demo-toggle {
    display: inline-flex;
    align-items: center;
    padding: 5px 14px;
    border-radius: var(--r-pill);
    border: 1px solid var(--brand);
    color: var(--brand);
    font-size: 0.82em;
    font-weight: 500;
    font-family: var(--font-sans);
    flex-shrink: 0;
}
.hero-demo-toggle-muted {
    color: var(--text-quiet);
    border-color: var(--hairline);
    padding: 5px 14px;
    border-radius: var(--r-pill);
    border-style: solid;
    border-width: 1px;
    font-size: 0.82em;
    font-family: var(--font-sans);
    flex-shrink: 0;
    display: none;
}
@media (min-width: 520px) {
    .hero-demo-toggle-muted { display: inline-flex; align-items: center; }
}

.hero-demo-input {
    flex: 1;
    min-width: 0;
    font-family: var(--font-mono);
    font-size: 0.95em;
    color: var(--text);
    min-height: 1.4em;
    white-space: nowrap;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 1px;
}
.hero-demo-query {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}
.hero-demo-caret {
    display: inline-block;
    width: 2px;
    height: 1.1em;
    background: var(--brand);
    animation: caret-blink 1s step-end infinite;
    vertical-align: middle;
}
@keyframes caret-blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.hero-demo-filter {
    padding: 4px 12px;
    border-radius: var(--r-pill);
    background: var(--bg-3);
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 0.8em;
    font-weight: 500;
    flex-shrink: 0;
    display: none;
}
@media (min-width: 680px) {
    .hero-demo-filter { display: inline-flex; align-items: center; }
}

.hero-demo-results {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--s-3);
    min-height: 170px;
}
@media (max-width: 480px) {
    .hero-demo-results {
        grid-template-columns: repeat(2, 1fr);
        min-height: 140px;
    }
}

.hero-demo-card {
    background: var(--bg-2);
    border: 1px solid var(--hairline);
    border-radius: var(--r-md);
    overflow: hidden;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity var(--dur-med) var(--ease-calm),
                transform var(--dur-med) var(--ease-calm);
}
.hero-demo-card.visible { opacity: 1; transform: translateY(0); }
.hero-demo-card:nth-child(1).visible { transition-delay: 0ms; }
.hero-demo-card:nth-child(2).visible { transition-delay: 80ms; }
.hero-demo-card:nth-child(3).visible { transition-delay: 160ms; }

.hero-demo-thumb {
    aspect-ratio: 16 / 10;
    position: relative;
}
.hero-demo-thumb::after {
    content: attr(data-dur);
    position: absolute;
    bottom: 6px;
    right: 6px;
    background: rgba(0, 0, 0, 0.78);
    color: var(--text);
    font-family: var(--font-mono);
    font-size: 0.7em;
    padding: 2px 6px;
    border-radius: var(--r-xs);
    letter-spacing: 0.02em;
}
.hero-demo-thumb.thumb-1 { background: linear-gradient(135deg, #2a2318, #15120b); }
.hero-demo-thumb.thumb-2 { background: linear-gradient(135deg, #1f2a1e, #10160f); }
.hero-demo-thumb.thumb-3 { background: linear-gradient(135deg, #1a2231, #0e1320); }

.hero-demo-caption {
    padding: var(--s-2) var(--s-3);
    font-family: var(--font-mono);
    font-size: 0.72em;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border-top: 1px solid var(--hairline);
}

/* ---------- Query pills (ambient) ---------- */
.query-pills {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 2;
    overflow: hidden;
}
.query-pill {
    position: absolute;
    pointer-events: auto;
    font-family: var(--font-mono);
    font-size: 0.78em;
    color: var(--text);
    background: rgba(23, 23, 27, 0.7);
    border: 1px solid var(--hairline-strong);
    padding: 6px 12px;
    border-radius: var(--r-pill);
    cursor: pointer;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    white-space: nowrap;
    animation: pill-drift 8s var(--ease-calm) infinite;
    transition: color var(--dur-fast) var(--ease-calm),
                border-color var(--dur-fast) var(--ease-calm),
                box-shadow var(--dur-fast) var(--ease-calm);
}
.query-pill::before { content: "\201C"; color: var(--text-quiet); margin-right: 1px; }
.query-pill::after  { content: "\201D"; color: var(--text-quiet); margin-left: 1px; }
.query-pill:hover {
    color: var(--brand);
    border-color: var(--brand);
    box-shadow: 0 0 20px var(--brand-glow);
}
.query-pill.activated {
    animation: pill-pulse var(--dur-slow) var(--ease-snap);
}
@keyframes pill-drift {
    0%, 100% { opacity: 0; transform: translateY(4px); }
    15%, 70% { opacity: 0.42; transform: translateY(0); }
    85%      { opacity: 0; transform: translateY(-4px); }
}
@keyframes pill-pulse {
    0%   { box-shadow: 0 0 0 0 var(--brand-glow); }
    100% { box-shadow: 0 0 0 20px rgba(0, 184, 145, 0); }
}

.query-pill-1 { top: 14%; left: 4%;  animation-delay: 0s;   }
.query-pill-2 { top: 72%; left: 10%; animation-delay: 1.8s; }
.query-pill-3 { top: 24%; right: 4%; animation-delay: 3.2s; }
.query-pill-4 { top: 80%; right: 8%; animation-delay: 4.4s; }
.query-pill-5 { top: 50%; left: 2%;  animation-delay: 6s;   }
.query-pill-6 { top: 6%;  right: 28%; animation-delay: 2.5s; }

@media (max-width: 959px) {
    .query-pill-5, .query-pill-6 { display: none; }
    .query-pill-1 { top: 62%; left: 4%;  }
    .query-pill-2 { top: 72%; left: 2%;  }
    .query-pill-3 { top: 56%; right: 4%; }
    .query-pill-4 { top: 94%; right: 4%; }
}
@media (max-width: 520px) {
    .query-pill-1, .query-pill-2 { display: none; }
    .query-pill-3 { top: 58%; right: 3%; }
    .query-pill-4 { top: 94%; left: 3%;  }
}

/* ---------- Problem ---------- */
.problem {
    padding: var(--s-10) var(--s-6);
    max-width: 960px;
    margin: 0 auto;
}
.problem h2 {
    font-size: clamp(1.8rem, 4.5vw, 3.2rem);
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: var(--s-5);
    max-width: 760px;
}
.problem p {
    font-size: 1.1em;
    color: var(--text-muted);
    max-width: 580px;
    line-height: 1.6;
}

/* ---------- Chapters ---------- */
.chapter {
    padding: var(--s-9) var(--s-6);
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}
.chapter-inner {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--s-7);
    align-items: center;
}
@media (min-width: 900px) {
    .chapter-inner {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
        gap: var(--s-9);
    }
    .chapter.flipped .chapter-copy  { order: 2; }
    .chapter.flipped .chapter-visual { order: 1; }
}

.chapter-eyebrow {
    font-family: var(--font-mono);
    font-size: 0.78em;
    color: var(--text-quiet);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: var(--s-3);
}
.chapter-heading {
    font-size: clamp(1.7rem, 3.4vw, 2.4rem);
    font-weight: 600;
    letter-spacing: -0.025em;
    line-height: 1.15;
    margin-bottom: var(--s-4);
}
.chapter p {
    color: var(--text-muted);
    font-size: 1.05em;
    line-height: 1.6;
    max-width: 480px;
    margin-bottom: var(--s-3);
}
.chapter p:last-child { margin-bottom: 0; }

.chapter-visual {
    position: relative;
    padding: var(--s-4);
}
.chapter-frame {
    position: relative;
    border: 2px solid var(--hairline-strong);
    border-radius: var(--r-lg);
    overflow: hidden;
    background: var(--bg-1);
    box-shadow: var(--shadow-card);
    z-index: 1;
}
.chapter-frame img {
    width: 100%;
    height: auto;
    display: block;
}

.chapter-visual::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    filter: blur(40px);
    opacity: 0.9;
}

/* Chapter accent — scoped strictly to frame border + glow only */
.chapter[data-accent="ch1"] .chapter-frame { border-color: var(--accent-ch1); }   /* chapter accent — scoped */
.chapter[data-accent="ch1"] .chapter-visual::before {
    background: radial-gradient(ellipse at center, rgba(201, 169, 97, 0.30) 0%, transparent 60%);  /* chapter accent — scoped */
}
.chapter[data-accent="ch2"] .chapter-frame { border-color: var(--accent-ch2); }   /* chapter accent — scoped */
.chapter[data-accent="ch2"] .chapter-visual::before {
    background: radial-gradient(ellipse at center, rgba(122, 167, 217, 0.30) 0%, transparent 60%);  /* chapter accent — scoped */
}
.chapter[data-accent="ch3"] .chapter-frame { border-color: var(--accent-ch3); }   /* chapter accent — scoped */
.chapter[data-accent="ch3"] .chapter-visual::before {
    background: radial-gradient(ellipse at center, rgba(217, 146, 122, 0.30) 0%, transparent 60%);  /* chapter accent — scoped */
}
.chapter[data-accent="ch4"] .chapter-frame { border-color: var(--accent-ch4); }   /* chapter accent — scoped */
.chapter[data-accent="ch4"] .chapter-visual::before {
    background: radial-gradient(ellipse at center, rgba(138, 149, 165, 0.30) 0%, transparent 60%);  /* chapter accent — scoped */
}

/* Chapter 4 centered variant */
.chapter-centered .chapter-inner {
    grid-template-columns: 1fr;
    text-align: center;
    justify-items: center;
    gap: var(--s-7);
}
.chapter-centered .chapter-copy { max-width: 620px; }
.chapter-centered .chapter-visual { max-width: 780px; width: 100%; }
.chapter-centered .chapter-copy p { margin-left: auto; margin-right: auto; }

/* ---------- Works With ---------- */
.works-with {
    padding: var(--s-9) var(--s-6);
    max-width: 960px;
    margin: 0 auto;
    text-align: center;
}
.works-with h2 {
    font-size: clamp(1.5rem, 3vw, 1.9rem);
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: var(--s-6);
}
.formats-strip {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--s-2);
    max-width: 700px;
    margin: 0 auto var(--s-5);
}
.format-badge {
    background: var(--bg-2);
    border: 1px solid var(--hairline);
    color: var(--text-muted);
    padding: 6px 14px;
    border-radius: var(--r-pill);
    font-family: var(--font-mono);
    font-size: 0.82em;
    letter-spacing: 0.02em;
}
.works-with-editors {
    font-family: var(--font-mono);
    font-size: 0.82em;
    color: var(--text-quiet);
    margin-top: var(--s-4);
    letter-spacing: 0.02em;
}

/* ---------- Pricing ---------- */
.pricing {
    padding: var(--s-10) var(--s-6);
    max-width: 820px;
    margin: 0 auto;
}
.price-block { padding: var(--s-7) 0; }
.price-label {
    font-family: var(--font-mono);
    font-size: 0.78em;
    color: var(--text-quiet);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: var(--s-4);
}
.price-display {
    font-size: clamp(3rem, 8vw, 5rem);
    font-weight: 700;
    letter-spacing: -0.045em;
    line-height: 0.95;
    margin-bottom: var(--s-3);
    color: var(--text);
}
.price-accent {
    color: var(--brand);
}
.price-sub {
    font-size: clamp(1.25rem, 2.8vw, 1.8rem);
    font-weight: 500;
    color: var(--text);
    margin-bottom: var(--s-4);
    line-height: 1.2;
    letter-spacing: -0.015em;
}
.price-note {
    font-family: var(--font-mono);
    font-size: 0.82em;
    color: var(--text-muted);
    letter-spacing: 0.01em;
    line-height: 1.5;
    margin-bottom: var(--s-4);
}
.price-tagline {
    color: var(--text-muted);
    font-size: 1.02em;
    max-width: 480px;
    line-height: 1.55;
    margin-bottom: var(--s-5);
}
.price-divider {
    border: 0;
    border-top: 1px solid var(--hairline-strong);
    margin: 0;
}
.price-block .btn-primary { padding: 14px 32px; }

/* ---------- FAQ ---------- */
.faq {
    padding: var(--s-9) var(--s-6);
    max-width: 820px;
    margin: 0 auto;
}
.faq-heading {
    font-size: clamp(1.6rem, 3vw, 2rem);
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: var(--s-5);
}
.faq-grid { display: flex; flex-direction: column; }
.faq-item {
    background: transparent;
    border-bottom: 1px solid var(--hairline);
}
.faq-item[open] summary { color: var(--brand); }
.faq-item summary {
    padding: var(--s-5) 0;
    font-weight: 500;
    font-size: 1.05em;
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text);
    transition: color var(--dur-fast) var(--ease-calm);
    outline-offset: 4px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
    content: "+";
    font-family: var(--font-mono);
    font-size: 1.3em;
    font-weight: 400;
    color: var(--text-quiet);
    transition: color var(--dur-fast) var(--ease-calm);
    flex-shrink: 0;
    margin-left: var(--s-4);
}
.faq-item[open] summary::after { content: "\2212"; color: var(--brand); }
.faq-answer {
    padding: 0 0 var(--s-5);
    color: var(--text-muted);
    line-height: 1.6;
    font-size: 0.98em;
    max-width: 680px;
}

/* ---------- Tech honesty line ---------- */
.tech-line {
    padding: var(--s-7) var(--s-6);
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
    font-family: var(--font-mono);
    font-size: 0.82em;
    color: var(--text-quiet);
    letter-spacing: 0.02em;
    border-top: 1px solid var(--hairline);
}

/* ---------- Footer ---------- */
footer {
    padding: var(--s-8) var(--s-6) var(--s-6);
    max-width: 1200px;
    margin: 0 auto;
    color: var(--text-quiet);
}
.footer-inner {
    display: flex;
    flex-wrap: wrap;
    gap: var(--s-7);
    justify-content: space-between;
    align-items: flex-start;
}
.footer-brand .logo { margin-bottom: var(--s-3); }
.footer-tagline {
    font-size: 0.9em;
    color: var(--text-muted);
    max-width: 320px;
    line-height: 1.5;
}
.footer-cols {
    display: flex;
    gap: var(--s-8);
    flex-wrap: wrap;
}
.footer-col h3 {
    font-size: 0.78em;
    font-family: var(--font-mono);
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 500;
    margin-bottom: var(--s-3);
}
.footer-col a {
    display: block;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95em;
    margin-bottom: var(--s-2);
    transition: color var(--dur-fast) var(--ease-calm);
}
.footer-col a:hover { color: var(--text); }

.footer-bottom {
    margin-top: var(--s-7);
    padding-top: var(--s-5);
    border-top: 1px solid var(--hairline);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--s-3);
    font-size: 0.82em;
    color: var(--text-muted);
    font-family: var(--font-mono);
}
.footer-made {
    color: var(--text-muted);
}

/* ---------- Notify modal (preserve every .notify-* class name) ---------- */
.notify-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--s-5);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity var(--dur-med) var(--ease-calm),
                visibility var(--dur-med) var(--ease-calm);
}
.notify-overlay.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.notify-popup {
    background: var(--bg-1);
    border: 1px solid var(--hairline-strong);
    border-radius: var(--r-lg);
    padding: var(--s-7) var(--s-6);
    max-width: 440px;
    width: 100%;
    position: relative;
    box-shadow: var(--shadow-modal);
    transform: scale(0.96);
    transition: transform var(--dur-med) var(--ease-calm);
}
.notify-overlay.open .notify-popup { transform: scale(1); }

.notify-close {
    position: absolute;
    top: 10px;
    right: 12px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5em;
    cursor: pointer;
    line-height: 1;
    padding: 4px 10px;
    border-radius: var(--r-xs);
    transition: color var(--dur-fast) var(--ease-calm),
                background var(--dur-fast) var(--ease-calm);
}
.notify-close:hover, .notify-close:focus-visible {
    color: var(--text);
    background: var(--bg-2);
}

.notify-heading {
    text-align: center;
    font-size: 1.45em;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--text);
    margin-bottom: var(--s-2);
}
.notify-subtext {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.95em;
    margin-bottom: var(--s-6);
    line-height: 1.5;
}

.notify-form { display: flex; flex-direction: column; }
.notify-input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--hairline-strong);
    border-radius: var(--r-sm);
    background: var(--bg-2);
    color: var(--text);
    font-size: 1em;
    font-family: var(--font-sans);
    transition: border-color var(--dur-fast) var(--ease-calm),
                box-shadow var(--dur-fast) var(--ease-calm);
}
.notify-input::placeholder { color: var(--text-quiet); }
.notify-input:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px var(--brand-glow);
}
.notify-input.notify-input-error {
    border-color: var(--danger);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
}

.notify-error {
    color: var(--danger);
    font-size: 0.85em;
    min-height: 1.25em;
    margin: 6px 0 0;
}

.notify-consent {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: var(--s-4);
}
.notify-consent input[type="checkbox"] {
    margin-top: 3px;
    flex-shrink: 0;
    accent-color: var(--brand);
}
.notify-consent label {
    color: var(--text-muted);
    font-size: 0.85em;
    line-height: 1.5;
}
.notify-consent a {
    color: var(--brand);
    text-decoration: underline;
}
.notify-consent a:hover { color: var(--brand-strong); }

.notify-submit {
    width: 100%;
    margin-top: var(--s-5);
    padding: 14px;
    font-size: 1em;
}
.notify-submit:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
}

.notify-success { text-align: center; padding: var(--s-5) 0; }
.notify-success-icon {
    font-size: 2.8em;
    color: var(--brand);
    margin-bottom: var(--s-4);
    line-height: 1;
}
.notify-success-text {
    color: var(--text-muted);
    font-size: 0.95em;
    line-height: 1.55;
}

.notify-hp {
    position: absolute;
    left: -9999px;
    height: 0;
    overflow: hidden;
    opacity: 0;
}

body.notify-open { overflow: hidden; }

/* ---------- Responsive ---------- */
@media (max-width: 959px) {
    .nav-inner { padding: 0 var(--s-5); }
    .nav-links, .nav-cta { display: none; }
    .hamburger { display: flex; }
    .hero {
        min-height: auto;
        padding: calc(var(--nav-h) + var(--s-6)) var(--s-5) var(--s-8);
    }
    .hero-inner { gap: var(--s-6); }
    .hero-headline { font-size: clamp(2rem, 7vw, 2.8rem); }
    .hero-buttons { flex-direction: column; align-items: stretch; }
    .hero-buttons .btn-primary,
    .hero-buttons .btn-secondary { text-align: center; }
    .chapter { padding: var(--s-8) var(--s-5); }
    .chapter-inner { gap: var(--s-5); }
    .chapter.flipped .chapter-copy,
    .chapter.flipped .chapter-visual { order: initial; }
    .hero-demo-results { min-height: 140px; }
    .footer-cols { gap: var(--s-6); }
}

body.menu-open { overflow: hidden; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
    html { scroll-behavior: auto; }
    .hero::before { animation: none; transform: none; opacity: 1; }
    .query-pill { opacity: 0.5 !important; transform: none !important; }
    .hero-demo-caret { opacity: 1; animation: none; }
    .hero-demo-card { opacity: 1; transform: none; }
    .reveal, .reveal-children > * { opacity: 1; transform: none; }
}

/* ---------- Forced colors ---------- */
@media (forced-colors: active) {
    canvas#bg { display: none !important; }
    .hero::before,
    .chapter-visual::before,
    .query-pill::before,
    .query-pill::after { display: none; }
    .btn-primary, .nav-cta { forced-color-adjust: none; }
    .price-display-pro { color: CanvasText !important; text-shadow: none !important; }
}

/* ---------- Print ---------- */
@media print {
    nav, .mobile-menu, .hamburger, .skip-link,
    .hero-buttons, .query-pills, .hero-demo, canvas#bg,
    .notify-overlay, .footer-cols { display: none !important; }
    body { background: #fff !important; color: #000 !important; }
    *, *::before, *::after {
        color: #000 !important;
        background: transparent !important;
        box-shadow: none !important;
    }
    a { text-decoration: underline !important; }
}
