/* =========================================================
   COMET SOUND — FOUNDATION
   Canonical layer (loaded first). Owns: fonts, design tokens,
   reset, typography, containers, button system, reveal +
   parallax (deep-scroll) systems, site header/footer/nav base,
   cinematic video hero, reduced motion.
   Section + component styling lives in components.css / home.css
   / pages.css. Breakpoints in responsive.css.
   ========================================================= */

/* ---------------------------------------------------------
   1. FONTS
   Conthrax (display) self-hosted + active.
   Manrope (body) / Space Mono (mono) = self-host slots:
   drop woff2 in asset/fonts/ then uncomment. No Google Fonts,
   no 404 until then (token stacks fall back to system fonts).
   --------------------------------------------------------- */
@font-face {
    font-family: "Conthrax";
    src:
        url("../fonts/Conthrax-SemiBold.otf") format("opentype"),
        local("Conthrax SemiBold");
    font-display: swap;
    font-weight: 600;
    font-style: normal;
}

/* SLOT — Manrope (body). Add files then uncomment.
@font-face { font-family:"Manrope"; src:url("../fonts/Manrope-Regular.woff2") format("woff2"); font-display:swap; font-weight:400; }
@font-face { font-family:"Manrope"; src:url("../fonts/Manrope-SemiBold.woff2") format("woff2"); font-display:swap; font-weight:600; }
*/
/* SLOT — Space Mono (mono). Add files then uncomment.
@font-face { font-family:"Space Mono"; src:url("../fonts/SpaceMono-Regular.woff2") format("woff2"); font-display:swap; font-weight:400; }
*/

/* ---------------------------------------------------------
   2. CANONICAL DESIGN TOKENS  (official Comet Sound palette)
   Green = primary brand accent. Cyan = secondary technical
   glow only. Plugin colors for cards/hover/borders/signal lines.
   --------------------------------------------------------- */
:root {
    /* surfaces */
    --cs-black: #050506;
    --cs-ink: #050706;
    --cs-ink-soft: #0A0D0B;
    --cs-panel: #0D110F;
    --cs-panel-soft: #111611;

    /* text */
    --cs-text: #F5F5F0;
    --cs-text-cold: #DDEFF1;
    --cs-muted: #91A5A9;
    --cs-muted-deep: #5E6D70;

    /* lines / glass */
    --cs-border: rgba(221, 239, 241, 0.14);
    --cs-border-strong: rgba(221, 239, 241, 0.28);
    --cs-glass: rgba(245, 245, 240, 0.055);
    --cs-glass-strong: rgba(245, 245, 240, 0.105);

    /* accent — green primary, cyan secondary glow */
    --cs-green: #7BFFA3;
    --cs-green-soft: #89FF9F;
    --cs-lime: #C9FF5D;
    --cs-cyan: #73E8FF;
    --cs-cyan-deep: #2AA7BD;

    /* plugin signal colors */
    --cs-aura: #89FF9F;
    --cs-oxiturn: #C9FF5D;
    --cs-phoenix: #FFB45D;
    --cs-starchain: #6DC8FF;
    --cs-oblivion: #FF6B74;
    --cs-eimoseq: #f6c846;

    /* soft accent washes */
    --cs-green-wash: rgba(123, 255, 163, 0.14);
    --cs-cyan-wash: rgba(115, 232, 255, 0.10);

    /* typography */
    --cs-display: "Conthrax", system-ui, sans-serif;
    --cs-body: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --cs-mono: "Space Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

    --fs-hero: clamp(2.2rem, 5.2vw, 5.3rem);
    --fs-h2: clamp(2.6rem, 6vw, 6rem);
    --fs-h3: clamp(1.65rem, 3vw, 3rem);
    --fs-body: clamp(1rem, 1.2vw, 1.15rem);
    --fs-label: 0.74rem;

    --lh-tight: 0.92;
    --lh-snug: 1.12;
    --lh-body: 1.7;
    --track-tight: -0.06em;
    --track-label: 0.16em;

    /* spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;

    /* shadows */
    --shadow-md: 0 4px 18px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 18px 50px rgba(0, 0, 0, 0.45);
    --shadow-xl: 0 30px 90px rgba(0, 0, 0, 0.55);

    /* layout */
    --cs-max: 1440px;
    --cs-gutter: clamp(1.25rem, 4vw, 4rem);
    --radius: 1rem;
    --radius-lg: 1.6rem;
    --radius-pill: 999px;
    --header-h: 92px;

    /* --- compatibility aliases (legacy --comet-* names) --- */
    --comet-bg: var(--cs-ink);
    --comet-bg-soft: var(--cs-ink-soft);
    --comet-text: var(--cs-text);
    --comet-muted: var(--cs-muted);
    --comet-border: var(--cs-border);
    --comet-accent: var(--cs-green);
    --comet-max: var(--cs-max);
    --gutter: var(--cs-gutter);
    --paper: var(--cs-text);
    --paper-dim: var(--cs-text-cold);
    --display: var(--cs-display);
    --body: var(--cs-body);
    --mono: var(--cs-mono);
    --comet: var(--cs-green);
    --comet-soft: var(--cs-green-wash);
    --line-bright: var(--cs-border-strong);
    --track: var(--track-label);
}

/* ---------------------------------------------------------
   3. RESET / BASE
   --------------------------------------------------------- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    max-width: 100%;
    margin: 0;
    /* clip (not hidden) so it doesn't break position: sticky descendants */
    overflow-x: clip;
}

html {
    background: var(--cs-ink);
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    min-height: 100vh;
    background:
        radial-gradient(circle at 84% 2%, var(--cs-green-wash), transparent 26rem),
        radial-gradient(circle at 6% 96%, var(--cs-cyan-wash), transparent 26rem),
        var(--cs-ink);
    color: var(--cs-text);
    font-family: var(--cs-body);
    font-size: 100%;
    line-height: var(--lh-body);
    -webkit-font-smoothing: antialiased;
    text-rendering: geometricPrecision;
}

img,
video,
svg {
    display: block;
    max-width: 100%;
}

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

button {
    font: inherit;
    color: inherit;
    cursor: pointer;
}

:focus-visible {
    outline: 2px solid var(--cs-green);
    outline-offset: 3px;
}

/* Anchor targets (sections focused programmatically by comet-lenis.js for
   screen readers) must not draw the interactive focus ring around the whole
   block — keyboard focus on real controls keeps it. */
[tabindex="-1"]:focus-visible {
    outline: none;
}

.cs-skip-link {
    position: absolute;
    left: -999px;
    top: 0;
    z-index: 200;
    padding: 0.7rem 1rem;
    background: var(--cs-green);
    color: var(--cs-black);
    font-family: var(--cs-mono);
    font-size: 0.8rem;
}

.cs-skip-link:focus {
    left: 1rem;
    top: 1rem;
}

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    white-space: nowrap;
}

/* ---------------------------------------------------------
   4. TYPOGRAPHY
   --------------------------------------------------------- */
h1, h2, h3, h4 {
    font-family: var(--cs-display);
    font-weight: 600;
    letter-spacing: var(--track-tight);
    line-height: var(--lh-tight);
}

.cs-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    margin: 0 0 1.3rem;
    color: var(--cs-muted);
    font-family: var(--cs-mono);
    font-size: var(--fs-label);
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.cs-eyebrow::before {
    content: "";
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 50%;
    background: var(--cs-green);
    box-shadow: 0 0 10px var(--cs-green-wash);
}

.cs-lead {
    margin: 0;
    color: var(--cs-muted);
    font-size: var(--fs-body);
    line-height: 1.75;
}

/* ---------------------------------------------------------
   5. LAYOUT / CONTAINERS / SECTIONS
   --------------------------------------------------------- */
.comet-page {
    width: 100%;
    max-width: 100vw;
    overflow-x: clip;
}

.cs-container {
    width: 100%;
    max-width: var(--cs-max);
    margin-inline: auto;
    padding-inline: var(--cs-gutter);
}

.cs-section,
.comet-section {
    width: 100%;
    max-width: var(--cs-max);
    margin-inline: auto;
    padding: clamp(4.5rem, 9vw, 9rem) var(--cs-gutter);
}

.cs-section-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 0.62fr);
    gap: clamp(1.5rem, 5vw, 4rem);
    align-items: end;
    margin-bottom: clamp(2.5rem, 5vw, 4.5rem);
}

.cs-section-title {
    margin: 0;
    font-size: var(--fs-h2);
    line-height: var(--lh-tight);
    letter-spacing: var(--track-tight);
}

.cs-index {
    font-family: var(--cs-mono);
    font-size: var(--fs-label);
    font-weight: 700;
    letter-spacing: var(--track-label);
    text-transform: uppercase;
    color: var(--cs-muted);
}

.cs-index b {
    color: var(--cs-text);
    font-weight: 700;
}

/* ---------------------------------------------------------
   6. BUTTON SYSTEM + CTA MICROINTERACTION
   --------------------------------------------------------- */
.cs-btn,
.comet-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    min-height: 3rem;
    padding: 0 1.3rem;
    border: 1px solid transparent;
    border-radius: var(--radius-pill);
    font-family: var(--cs-mono);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    cursor: pointer;
    transition: transform 200ms cubic-bezier(0.22, 1, 0.36, 1),
        background 200ms ease, color 200ms ease,
        border-color 200ms ease, box-shadow 200ms ease;
}

.cs-btn:hover { transform: translateY(-2px); }

.cs-btn--accent {
    background: var(--cs-green);
    color: var(--cs-black);
    box-shadow: 0 0 0 0 var(--cs-green-wash);
}

.cs-btn--accent:hover {
    box-shadow: 0 10px 34px var(--cs-green-wash);
}

.cs-btn--outline {
    border-color: var(--cs-border-strong);
    color: var(--cs-text);
    background: var(--cs-glass);
}

.cs-btn--outline:hover {
    border-color: var(--cs-green);
    color: var(--cs-green);
}

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

.cs-btn--ghost:hover { color: var(--cs-green); }

.cs-btn--solid {
    background: var(--cs-text);
    color: var(--cs-black);
}

.cs-btn__arrow {
    flex: none;
    transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

.cs-btn:hover .cs-btn__arrow { transform: translateX(4px); }

/* ---------------------------------------------------------
   7. DEEP-SCROLL: REVEAL + PARALLAX
   comet-scroll.js toggles .is-visible and sets --parallax-y.
   --------------------------------------------------------- */
.cs-reveal {
    opacity: 0;
    transform: translate3d(0, 40px, 0);
    transition:
        opacity 0.85s cubic-bezier(0.22, 1, 0.36, 1) var(--reveal-delay, 0s),
        transform 0.85s cubic-bezier(0.22, 1, 0.36, 1) var(--reveal-delay, 0s);
    will-change: opacity, transform;
}

.cs-reveal--left { transform: translate3d(-44px, 0, 0); }
.cs-reveal--right { transform: translate3d(44px, 0, 0); }
.cs-reveal--scale { transform: scale(0.94); }

.cs-reveal.is-visible {
    opacity: 1;
    transform: none;
    /* Drop the layer promotion once the entrance has played: keeping
       will-change active leaves every revealed block on its own composited
       layer, and Safari clips children (e.g. button hover lift) at the
       layer bounds when the container hugs them exactly. */
    will-change: auto;
}

/* Controlled parallax: JS writes --parallax-y (px) per element */
[data-parallax] {
    transform: translate3d(0, var(--parallax-y, 0px), 0);
    will-change: transform;
}

/* Legacy section reveal (kept for compatibility) */
.comet-section,
.comet-plugin-row,
.comet-ai-console,
.comet-waveform-stage,
.comet-final-cta {
    opacity: 0;
    transform: translate3d(0, 34px, 0);
    transition:
        opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.comet-section.is-visible,
.comet-plugin-row.is-visible,
.comet-ai-console.is-visible,
.comet-waveform-stage.is-visible,
.comet-final-cta.is-visible {
    opacity: 1;
    transform: translate3d(0, 0, 0);
}

/* signal line — thin animated accent divider */
.cs-signal-line {
    position: relative;
    height: 1px;
    width: 100%;
    background: var(--cs-border);
    overflow: hidden;
}

.cs-signal-line::after {
    content: "";
    position: absolute;
    inset: 0 auto 0 -30%;
    width: 30%;
    background: linear-gradient(90deg, transparent, var(--cs-green), transparent);
    animation: csSignalSweep 4.5s linear infinite;
}

@keyframes csSignalSweep {
    to { transform: translateX(440%); }
}

/* ---------------------------------------------------------
   8. SITE HEADER / BRAND / NAV
   Layout: [brand stacked] [centered nav] [hamburger].
   The hamburger opens a fullscreen overlay menu (cs-overlay-nav).
   --------------------------------------------------------- */
.comet-site-header {
    position: sticky;
    top: 0;
    z-index: 90;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 1.5rem;
    width: 100%;
    min-height: var(--header-h);
    padding: 1.15rem var(--cs-gutter);
    border-bottom: 1px solid var(--cs-border);
    background: #060807;
    /* matches the overlay fade so the top cross-fades in sync (no jank) */
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.admin-bar .comet-site-header { top: 32px; }

/* header hides while the fullscreen menu is open */
body.cs-nav-open .comet-site-header {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.comet-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    flex: none;
    justify-self: start;
}

.comet-brand-mark {
    width: auto;
    height: 30px;
    flex: none;
    filter: drop-shadow(0 0 12px var(--cs-cyan-wash));
}

/* brand wordmark — ALWAYS stacked: COMET over SOUND */
.comet-brand-word {
    display: flex;
    flex-direction: column;
    font-family: var(--cs-display);
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--cs-text);
}

.comet-brand-word span:last-child { color: var(--cs-text-cold); }

/* centered primary nav — Conthrax, heavier presence */
.comet-main-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(1rem, 2.2vw, 2.2rem);
    justify-self: center;
}

.comet-main-nav a {
    font-family: var(--cs-display);
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--cs-muted);
    transition: color 180ms ease;
}

.comet-main-nav a:hover,
.comet-main-nav .current-menu-item > a {
    color: var(--cs-text);
}

.comet-header-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.6rem;
    flex: none;
    justify-self: end;
}

/* language switch (globe + IT/EN) — sits left of account + hamburger.
   Borderless: just the globe + IT/EN, no pill box. */
.comet-lang {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    height: 40px;
    padding: 0;
    border: 0;
    background: none;
    font-family: var(--cs-mono);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
}

.comet-lang__globe {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--cs-text);
    cursor: pointer;
    transition: color 0.2s ease;
}

.comet-lang__opt {
    color: var(--cs-text);
    transition: color 180ms ease;
}

.comet-lang__opt.is-active,
.comet-lang__opt:hover {
    color: var(--cs-green);
}

.comet-lang__sep { color: var(--cs-muted-deep); }

/* language menu — globe only in the bar, options in a hover/focus box */
.comet-lang--menu {
    position: relative;
    gap: 0;
}

.comet-lang--menu:hover .comet-lang__globe,
.comet-lang--menu:focus-within .comet-lang__globe {
    color: var(--cs-green);
}

.comet-lang__menu {
    position: absolute;
    top: calc(100% + 6px);
    /* keep :hover alive while the pointer crosses the 6px gap */
    --lang-menu-bridge: 10px;
    left: 50%;
    transform: translateX(-50%) translateY(-4px);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    min-width: 64px;
    padding: 0.4rem;
    background: var(--cs-panel);
    border: 1px solid var(--cs-border-strong);
    border-radius: var(--radius);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 180ms ease, transform 180ms ease, visibility 0s linear 180ms;
    z-index: 60;
}

.comet-lang--menu:hover .comet-lang__menu,
.comet-lang--menu:focus-within .comet-lang__menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
    transition-delay: 0s;
}

.comet-lang__menu::before {
    content: "";
    position: absolute;
    top: calc(-1 * var(--lang-menu-bridge));
    left: 0;
    right: 0;
    height: var(--lang-menu-bridge);
}

.comet-lang__menu .comet-lang__opt {
    display: block;
    padding: 0.45rem 0.7rem;
    border-radius: calc(var(--radius) * 0.55);
    text-align: center;
}

.comet-lang__menu .comet-lang__opt:hover {
    background: var(--cs-glass);
}

.comet-lang__menu .comet-lang__opt.is-active {
    color: var(--cs-green);
    background: var(--cs-green-wash);
}

/* cart — same borderless icon language as the account control */
.comet-cart {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex: none;
    border: 0;
    background: none;
    color: var(--cs-text);
    transition: color 0.2s ease;
}

.comet-cart:hover {
    color: var(--cs-green);
}

.comet-cart__badge {
    position: absolute;
    top: 4px;
    right: 2px;
    min-width: 15px;
    height: 15px;
    padding: 0 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--cs-green);
    color: var(--cs-black);
    border-radius: var(--radius-pill);
    font-family: var(--cs-mono);
    font-size: 0.58rem;
    font-weight: 700;
    line-height: 1;
}

/* account — borderless icon, no box (44px hit area kept for touch) */
.comet-account {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex: none;
    border: 0;
    background: none;
    color: var(--cs-text);
    transition: color 0.2s ease;
}

.comet-account:hover {
    color: var(--cs-green);
}

/* hamburger — borderless, just three lines; opens fullscreen overlay.
   40px box is the touch target only (no visible border/background). */
.comet-nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex: none;
    padding: 0;
    border: 0;
    background: none;
    color: var(--cs-text);
    transition: color 0.2s ease;
}

.comet-nav-toggle:hover { color: var(--cs-green); }

/* three equal lines — the element itself is the middle bar */
.comet-nav-toggle__icon {
    position: relative;
    display: block;
    width: 22px;
    height: 1.6px;
    flex: none;
    background: currentColor;
    transition: background 200ms ease;
}

.comet-nav-toggle__icon::before,
.comet-nav-toggle__icon::after {
    content: "";
    position: absolute;
    left: 0;
    width: 100%;
    height: 1.6px;
    background: currentColor;
    transition: transform 240ms cubic-bezier(0.22, 1, 0.36, 1), top 240ms ease;
}

.comet-nav-toggle__icon::before { top: -6px; }
.comet-nav-toggle__icon::after { top: 6px; }

/* No X-morph on the hamburger: when the menu opens the whole header cross-fades
   out while the overlay's own close (X) fades in, so the icon should stay the
   three lines and simply dissolve — morphing it here created a busy double
   motion (rotate + fade) on top of the overlay X. */

/* ---------- fullscreen overlay menu ---------- */
.cs-overlay-nav {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: flex;
    align-items: center;
    padding: calc(var(--header-h) + 2rem) var(--cs-gutter) var(--cs-gutter);
    /* Fully opaque panel, NO backdrop-filter: animating the opacity of a
       fullscreen backdrop-filtered layer forced a per-frame blur recompute
       (most visible at the top-right green glow) — that was the residual
       stutter on open. The panel is opaque so nothing is lost visually, and
       the fade now runs purely on the GPU. (Lenis is untouched.) */
    background:
        radial-gradient(circle at 80% 12%, var(--cs-green-wash), transparent 40%),
        var(--cs-ink);
    opacity: 0;
    visibility: hidden;
    /* Reveal with a cheap opacity fade (no clip-path wipe — animating clip-path
       over a fullscreen backdrop-filter was the source of the open lag). The
       staggered link slide-in below carries the motion. */
    will-change: opacity;
    transition:
        opacity 0.3s ease,
        visibility 0.3s ease;
}

.cs-overlay-nav.is-open {
    opacity: 1;
    visibility: visible;
}

.cs-overlay-nav__inner {
    width: 100%;
    max-width: var(--cs-max);
    margin-inline: auto;
    /* Panels (main / Plugins / Bundle) stack in the same cell and swap
       in place — the second level opens on the same screen. */
    display: grid;
}

.cs-overlay-nav__panel {
    grid-area: 1 / 1;
    transform: translateY(0);
    transition: opacity 0.34s ease, transform 0.34s ease;
}

/* The leaving panel dissolves and drifts down a touch, in step with its
   items' slide (same 0.26s), then drops out of hit-testing; the incoming
   items are delayed past this fade (stagger below), so the two levels never
   overlap and nothing gets visually cut mid-motion. */
.cs-overlay-nav__panel:not(.is-active) {
    opacity: 0;
    transform: translateY(12px);
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.26s ease, transform 0.26s ease, visibility 0s linear 0.26s;
}

/* Back: just the arrow — no label, no box. 44px hit area kept. */
.cs-overlay-nav__back {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    margin: 0 0 0.9rem -11px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--cs-muted);
    cursor: pointer;
    transition: color 0.2s ease, transform 0.2s ease;
}

.cs-overlay-nav__back:hover {
    color: var(--cs-green);
    transform: translateX(-3px);
}

.cs-overlay-nav__chev {
    margin-left: 0.28em;
    opacity: 0.55;
}

.cs-overlay-nav__eyebrow {
    margin: 0 0 1.6rem;
    font-family: var(--cs-mono);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--cs-muted);
}

.cs-overlay-nav__primary {
    list-style: none;
    margin: 0;
    padding: 0;
}

.cs-overlay-nav__primary li { overflow: hidden; }

.cs-overlay-nav__primary a,
.cs-overlay-nav__primary button {
    display: inline-flex;
    align-items: center;
    margin: 0;
    padding: 0.22rem 0;
    border: 0;
    background: none;
    font-family: var(--cs-display);
    font-size: clamp(1.6rem, 4.4vw, 3.1rem);
    line-height: 1.08;
    letter-spacing: -0.02em;
    text-transform: uppercase;
    color: var(--cs-text);
    cursor: pointer;
    transform: translateY(115%);
    /* Soft ease-out (no steep launch): the previous curve read as a snap. */
    transition: transform 0.85s cubic-bezier(0.33, 1, 0.68, 1), color 0.2s ease;
}

/* Only the ACTIVE panel's items slide in (same animation on both levels). */
.cs-overlay-nav.is-open .cs-overlay-nav__panel.is-active .cs-overlay-nav__primary a,
.cs-overlay-nav.is-open .cs-overlay-nav__panel.is-active .cs-overlay-nav__primary button { transform: translateY(0); }

/* Stagger starts AFTER the leaving panel's 0.26s dissolve — clean handoff.
   Two-value delays: the stagger applies to the slide (transform) ONLY; the
   hover color must always react instantly (second value = 0s). */
.cs-overlay-nav__primary li:nth-child(1) a, .cs-overlay-nav__primary li:nth-child(1) button { transition-delay: 0.30s, 0s; }
.cs-overlay-nav__primary li:nth-child(2) a, .cs-overlay-nav__primary li:nth-child(2) button { transition-delay: 0.36s, 0s; }
.cs-overlay-nav__primary li:nth-child(3) a, .cs-overlay-nav__primary li:nth-child(3) button { transition-delay: 0.42s, 0s; }
.cs-overlay-nav__primary li:nth-child(4) a, .cs-overlay-nav__primary li:nth-child(4) button { transition-delay: 0.48s, 0s; }
.cs-overlay-nav__primary li:nth-child(5) a, .cs-overlay-nav__primary li:nth-child(5) button { transition-delay: 0.54s, 0s; }
.cs-overlay-nav__primary li:nth-child(6) a, .cs-overlay-nav__primary li:nth-child(6) button { transition-delay: 0.60s, 0s; }

/* Leaving panel: items glide back down in step with the panel dissolve,
   no stagger (exit faster than enter), soft ease-in on the slide only. */
.cs-overlay-nav__panel:not(.is-active) .cs-overlay-nav__primary a,
.cs-overlay-nav__panel:not(.is-active) .cs-overlay-nav__primary button {
    transition-delay: 0s, 0s;
    transition-duration: 0.26s, 0.2s;
    transition-timing-function: cubic-bezier(0.32, 0, 0.67, 0), ease;
}

.cs-overlay-nav__primary a:hover,
.cs-overlay-nav__primary button:hover { color: var(--cs-green); }

.cs-overlay-nav__secondary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.9rem 1.6rem;
    margin-top: clamp(2rem, 5vw, 3.5rem);
    padding-top: clamp(1.5rem, 3vw, 2.2rem);
    border-top: 1px solid var(--cs-border);
    opacity: 0;
    transition: opacity 0.5s ease 0.3s;
}

.cs-overlay-nav__secondary-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.9rem 1.6rem;
}

/* social icons sit on the same baseline as the secondary links, pushed right */
.comet-social--overlay {
    flex-direction: row;
    gap: 0.15rem;
}

.cs-overlay-nav.is-open .cs-overlay-nav__secondary { opacity: 1; }

.cs-overlay-nav__secondary a {
    font-family: var(--cs-mono);
    font-size: 0.78rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--cs-muted);
    transition: color 0.2s ease;
}

.cs-overlay-nav__secondary a:hover { color: var(--cs-text); }

/* close control inside the overlay (header is hidden while open) */
.cs-overlay-nav__close {
    position: absolute;
    /* align with the header hamburger: borderless, just the X glyph */
    top: calc((var(--header-h) - 40px) / 2);
    right: var(--cs-gutter);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--cs-text);
    transition: color 0.2s ease;
}

.cs-overlay-nav__close:hover { color: var(--cs-green); }

/* keep Close aligned to the hamburger when the WP admin bar offsets the header */
.admin-bar .cs-overlay-nav__close { top: calc((var(--header-h) - 40px) / 2 + 32px); }

.cs-overlay-nav__close svg { flex: none; }

body.cs-nav-open { overflow: hidden; }

/* ---------------------------------------------------------
   9. SITE FOOTER (base — columns styled in components.css)
   --------------------------------------------------------- */
.comet-site-footer {
    border-top: 1px solid var(--cs-border);
    background: var(--cs-ink-soft);
}

/* ---------------------------------------------------------
   10. CINEMATIC VIDEO HERO
   front-page hero: .comet-hero.comet-hero-original
   Parallax vars set by comet-home.js.
   --------------------------------------------------------- */
.comet-hero { position: relative; }

.comet-hero-original {
    position: relative;
    display: flex;
    width: 100%;
    max-width: 100vw;
    min-height: calc(100svh - var(--header-h));
    overflow: hidden;
    contain: paint;
    background: var(--cs-ink);
    isolation: isolate;
}

/* media panel: video lives on the RIGHT, masked on its left edge so the
   star floats free on dark — not full-bleed, not bleeding left, not under text */
/* full-bleed video background (first parallax). Star sits upper-left in
   the source; text content is aligned to the right over the dark side. */
.comet-hero-media {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

/* Extra vertical overscan (top:-16%, height:132%) gives the video room to
   drift DOWN as you scroll — the star baked into the footage travels toward
   the end of the hero without ever revealing the frame's top/bottom edge.
   --hero-video-y is written by comet-home.js (Lenis-smoothed). */
.comet-hero-video {
    position: absolute;
    top: -16%;
    left: 0;
    right: 0;
    width: 100%;
    height: 132%;
    max-width: none;
    object-fit: cover;
    object-position: 22% 42%;
    transform: translate3d(0, var(--hero-video-y, 0px), 0) scale(var(--hero-video-scale, 1));
    transform-origin: center center;
    will-change: transform;
}

.comet-hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
        linear-gradient(90deg, rgba(5, 7, 6, 0) 0%, rgba(5, 7, 6, 0) 30%, rgba(5, 7, 6, 0.55) 64%, rgba(5, 7, 6, 0.82) 100%),
        linear-gradient(180deg, rgba(5, 7, 6, 0.34) 0%, transparent 24%, transparent 60%, rgba(5, 7, 6, 0.6) 100%);
}

.comet-hero-inner {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: clamp(2.4rem, 5.5vw, 4rem);
    width: 100%;
    max-width: 100%;
    min-height: calc(100svh - var(--header-h));
    padding: clamp(1.75rem, 3vw, 3.25rem);
    overflow: hidden;
    color: var(--cs-text-cold);
}

.comet-hero-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.5rem;
    font-family: var(--cs-mono);
    font-size: clamp(0.6rem, 0.9vw, 0.78rem);
    font-weight: 700;
    letter-spacing: var(--track-label);
    text-transform: uppercase;
    color: var(--cs-text-cold);
}

.comet-hero-kicker { color: var(--cs-muted); }
.comet-hero-tag { color: var(--cs-text); text-align: right; }

.comet-hero-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.comet-hero-title {
    margin: 0;
    max-width: 100%;
    font-family: var(--cs-display);
    font-weight: 600;
    font-size: var(--fs-hero);
    line-height: 1;
    letter-spacing: var(--track-tight);
    text-transform: uppercase;
    text-align: right;
    color: var(--cs-text);
}

.comet-hero-title span { display: block; overflow: hidden; }

.comet-hero-accent {
    color: var(--cs-green);
    text-shadow: 0 0 34px var(--cs-green-wash);
}

.comet-hero-headline {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: clamp(1.4rem, 3vw, 2rem);
    max-width: 58%;
    text-align: right;
}

.comet-hero-support {
    margin: 0;
    color: var(--cs-text-cold);
    font-size: clamp(0.95rem, 1.15vw, 1.15rem);
    line-height: 1.65;
}

.comet-hero-claim {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    margin: 0;
    font-family: var(--cs-mono);
    font-size: clamp(0.62rem, 0.85vw, 0.76rem);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--cs-muted);
}

.comet-hero-claim::before {
    content: "";
    flex: none;
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: var(--cs-green);
    box-shadow: 0 0 12px var(--cs-green-wash);
}

.comet-hero-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.8rem;
    margin-top: 0.5rem;
}

.comet-hero-foot {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 2rem;
}

.comet-hero-foot-left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.1rem;
}

.comet-hero-stats {
    display: flex;
    justify-content: flex-end;
    gap: clamp(1.25rem, 3vw, 2.75rem);
    margin: 0;
    padding: 0;
    list-style: none;
}

.comet-hero-stats li { text-align: right; }

.comet-hero-stats span {
    display: block;
    font-family: var(--cs-display);
    color: var(--cs-text-cold);
    font-size: clamp(1.8rem, 4vw, 3.2rem);
    line-height: var(--lh-tight);
    letter-spacing: -0.04em;
}

.comet-hero-stats p {
    margin: 0.55rem 0 0;
    font-family: var(--cs-mono);
    color: var(--cs-muted);
    font-size: clamp(0.58rem, 0.95vw, 0.82rem);
    line-height: var(--lh-snug);
    letter-spacing: var(--track-label);
    text-transform: uppercase;
}

.comet-hero-eq {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    width: clamp(120px, 14vw, 168px);
    height: 40px;
}

.comet-hero-eq span {
    flex: 1;
    height: 100%;
    border-radius: 2px;
    background: var(--cs-green);
    transform-origin: bottom;
    transform: scaleY(0.45);
    box-shadow: 0 0 10px var(--cs-green-wash);
    animation: cometEq 1.4s ease-in-out infinite;
}

@keyframes cometEq {
    0%, 100% { transform: scaleY(0.28); }
    50% { transform: scaleY(1); }
}

.comet-hero-eq span:nth-child(1)  { height: 35%; animation-delay: 0s; }
.comet-hero-eq span:nth-child(2)  { height: 60%; animation-delay: 0.10s; }
.comet-hero-eq span:nth-child(3)  { height: 85%; animation-delay: 0.20s; }
.comet-hero-eq span:nth-child(4)  { height: 50%; animation-delay: 0.30s; }
.comet-hero-eq span:nth-child(5)  { height: 95%; animation-delay: 0.15s; }
.comet-hero-eq span:nth-child(6)  { height: 65%; animation-delay: 0.40s; }
.comet-hero-eq span:nth-child(7)  { height: 40%; animation-delay: 0.25s; }
.comet-hero-eq span:nth-child(8)  { height: 75%; animation-delay: 0.50s; }
.comet-hero-eq span:nth-child(9)  { height: 55%; animation-delay: 0.12s; }
.comet-hero-eq span:nth-child(10) { height: 90%; animation-delay: 0.34s; }
.comet-hero-eq span:nth-child(11) { height: 45%; animation-delay: 0.22s; }
.comet-hero-eq span:nth-child(12) { height: 70%; animation-delay: 0.46s; }

/* hero entrance */
.comet-hero-support,
.comet-hero-actions,
.comet-hero-foot {
    opacity: 0;
    animation: cometFadeUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.comet-hero-top {
    opacity: 0;
    animation: cometFadeDown 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    animation-delay: 0.12s;
}

@keyframes cometFadeUp {
    from { opacity: 0; transform: translate3d(0, 32px, 0); }
    to { opacity: 1; transform: translate3d(0, 0, 0); }
}

@keyframes cometFadeDown {
    from { opacity: 0; transform: translate3d(0, -20px, 0); }
    to { opacity: 1; transform: translate3d(0, 0, 0); }
}

@keyframes cometTitleRise {
    from { transform: translate3d(0, 110%, 0); }
    to { transform: translate3d(0, 0, 0); }
}

.comet-hero-support { animation-delay: 0.55s; }
.comet-hero-actions { animation-delay: 0.68s; }
.comet-hero-foot { animation-delay: 0.8s; }

.comet-hero-title span {
    transform: translate3d(0, 110%, 0);
    animation: cometTitleRise 0.85s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.comet-hero-title span:nth-child(1) { animation-delay: 0.20s; }
.comet-hero-title span:nth-child(2) { animation-delay: 0.34s; }
.comet-hero-title span:nth-child(3) { animation-delay: 0.48s; }

/* ---------------------------------------------------------
   11. REDUCED MOTION  (canonical, single source)
   --------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }

    .comet-hero-video { transform: none; }

    [data-parallax] { transform: none !important; }

    .cs-signal-line::after,
    .comet-hero-eq span { animation: none; }

    .cs-reveal,
    .comet-hero-top,
    .comet-hero-title span,
    .comet-hero-support,
    .comet-hero-actions,
    .comet-hero-foot,
    .comet-hero-eq span,
    .comet-section,
    .comet-plugin-row,
    .comet-ai-console,
    .comet-waveform-stage,
    .comet-final-cta {
        opacity: 1;
        transform: none;
        animation: none;
        transition: none;
    }

    .cs-btn:hover { transform: none; }
}
