/* ============================================================
   FlowBar — product page
   Dark forest / woody theme: deep pine greens, sage accents,
   warm amber highlights. System typography, hairline borders.
   ============================================================ */

:root {
  --bg: #0b110d;
  --bg-soft: #0e1510;
  --panel: rgba(190, 225, 195, 0.045);
  --panel-strong: rgba(190, 225, 195, 0.075);
  --hairline: rgba(210, 235, 215, 0.1);
  --hairline-soft: rgba(210, 235, 215, 0.06);
  --text: #eef4ec;
  --muted: #93a695;
  /* ≥4.5:1 on --zone-trough (#050807) for WCAG AA on small text */
  --faint: #748c78;
  --accent: #83b78d;                 /* sage */
  --accent-2: #e5b455;               /* warm amber */
  --grad: linear-gradient(100deg, #ecc670 0%, #d9a441 100%);
  --grad-sage: linear-gradient(100deg, #a9d6ae 0%, #6fa87b 100%);
  /* Solid zone plates — frost sits proud of a deeper trough */
  --zone-frost: #161f19;
  --zone-trough: #050807;
  /* Wave depth for clip-path edges on frosted plates */
  --wave-d: clamp(20px, 2.8vw, 34px);
  --radius: 18px;
  /* Fluid gutters scale with the viewport; --max / --max-wide cap the shell.
     Padding uses --gutter so side space stays proportional on every size.
     Safe-area insets keep content clear of notches / home indicators. */
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --gutter: max(16px, env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px),
    clamp(16px, 4.5vw, 40px));
  --max: 1120px;
  --max-wide: 1240px;
  --nav-h: 60px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue",
    "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", Menlo, monospace;
  --ease: cubic-bezier(0.22, 0.61, 0.21, 1);
}

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

html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: rgba(131, 183, 141, 0.35) var(--zone-trough);
  /* Avoid horizontal bounce from full-bleed effects / mockups */
  overflow-x: clip;
  /* Anchor jumps clear the fixed nav + notch */
  scroll-padding-top: calc(var(--safe-top) + var(--nav-h) + 12px);
}

body {
  font-family: var(--font);
  /* Match trough so any sub-pixel seam in a dark band disappears into it */
  background: var(--zone-trough);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  /* Keep fixed UI clear of the home indicator when scrolling to anchors */
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

/* Lock scroll when the mobile menu is open */
body.nav-open {
  overflow: hidden;
  touch-action: none;
}

/* film-grain overlay for depth — fixed full-viewport layer; skip on small
   screens and reduced-motion where the cost outweighs the subtle texture. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 60;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
}
@media (max-width: 700px), (prefers-reduced-motion: reduce) {
  body::after { content: none; }
}

::selection { background: rgba(229, 180, 85, 0.28); }

/* ============ scrollbar — thin, forest-matched ============ */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--zone-trough);
}

::-webkit-scrollbar-thumb {
  background: rgba(131, 183, 141, 0.28);
  border: 2px solid var(--zone-trough);
  border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(131, 183, 141, 0.48);
}

::-webkit-scrollbar-thumb:active {
  background: rgba(229, 180, 85, 0.55);
}

::-webkit-scrollbar-corner {
  background: var(--zone-trough);
}

h1, h2, h3 { line-height: 1.12; letter-spacing: -0.03em; font-weight: 700; }

code {
  font-family: var(--mono);
  font-size: 0.86em;
  background: rgba(190, 225, 195, 0.08);
  border: 1px solid var(--hairline-soft);
  border-radius: 6px;
  padding: 0.1em 0.4em;
}

/* ============ buttons ============ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font: inherit;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 12px 22px;
  cursor: pointer;
  text-decoration: none;
  color: var(--text);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease),
    background 0.25s, border-color 0.25s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.btn:active { transform: scale(0.97); }
.btn-ico { width: 17px; height: 17px; flex-shrink: 0; }
.btn-ico.brand-ico {
  width: 18px;
  height: 18px;
  display: block;
  object-fit: contain;
}
.btn-large .btn-ico.brand-ico {
  width: 20px;
  height: 20px;
}

.btn-primary {
  background: var(--grad);
  color: #231a06;
  box-shadow: 0 8px 30px -8px rgba(217, 164, 65, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 40px -8px rgba(217, 164, 65, 0.65), inset 0 1px 0 rgba(255,255,255,.4); }

.btn-ghost {
  background: var(--panel);
  border-color: var(--hairline);
  color: var(--text);
}
.btn-ghost:hover { background: var(--panel-strong); transform: translateY(-2px); }

.btn-large { padding: 15px 28px; border-radius: 14px; font-size: 16px; }
.btn-small { padding: 8px 16px; border-radius: 10px; font-size: 14px; }

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

/* ============ nav ============
   Same shell as .hero-stage + .hero-inner: gutter on the outer bar,
   max-width on the inner row. Padding + max-width on the *same* box
   double-counts the gutter and leaves the logo/CTA ~40px inside the
   hero content edges. */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  padding: var(--safe-top) var(--gutter) 0;
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  background: rgba(11, 17, 13, 0.72);
  border-bottom: 1px solid var(--hairline-soft);
}
.nav-inner {
  max-width: var(--max-wide);
  width: 100%;
  margin: 0 auto;
  padding: 12px 0;
  min-height: var(--nav-h);
  display: flex;
  align-items: center;
  gap: clamp(12px, 2.5vw, 28px);
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: var(--text);
  flex-shrink: 0;
  /* Comfortable tap target without growing the bar */
  min-height: 44px;
}
.brand-mark {
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border-radius: 9px;
  background: linear-gradient(145deg, rgba(169, 214, 174, .16), rgba(217, 164, 65, .14));
  border: 1px solid rgba(131, 183, 141, 0.32);
  color: var(--accent);
}
.brand-mark svg { width: 17px; height: 17px; }
.brand-mark.small { width: 26px; height: 26px; }
.brand-name { font-weight: 650; font-size: 15.5px; letter-spacing: -0.02em; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
  margin-left: auto;
}
.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); }
/* Waitlist appears in the drawer only — desktop uses the solid CTA button */
.nav-links-cta { display: none; }
.nav-cta { flex-shrink: 0; }

/* Hamburger — hidden until the compact breakpoint */
.nav-toggle {
  display: none;
  position: relative;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  margin: 0 -8px 0 0;
  padding: 0;
  border: none;
  border-radius: 12px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: background 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.nav-toggle:hover { background: rgba(190, 225, 195, 0.08); }
.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block;
  width: 18px;
  height: 1.5px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.28s var(--ease), opacity 0.2s ease;
}
.nav-toggle-bars {
  position: absolute;
  top: 50%;
  left: 50%;
  margin: -0.75px 0 0 -9px;
}
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
}
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }
.nav-open .nav-toggle-bars { background: transparent; }
.nav-open .nav-toggle-bars::before {
  top: 0;
  transform: rotate(45deg);
}
.nav-open .nav-toggle-bars::after {
  top: 0;
  transform: rotate(-45deg);
}

/* Dim the page behind the mobile drawer */
.nav-scrim {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 45;
  background: rgba(5, 8, 7, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s var(--ease);
}
.nav-open .nav-scrim {
  display: block;
  opacity: 1;
  pointer-events: auto;
}

/* ============ hero ============ */
.hero {
  position: relative;
  /* Only top padding here — horizontal gutter lives on .hero-stage /
     content so the pillars marquee can go full-bleed edge-to-edge.
     Offset accounts for fixed nav + notch safe-area. */
  padding: calc(var(--safe-top) + var(--nav-h) + clamp(36px, 8vw, 72px)) 0 0;
  overflow: hidden;
}
/* Content + effects only; marquee sits outside so meteors hard-stop above it.
   Bottom padding restores the old gap above the ticker *inside* the meteor
   clip, so that space still has streaks (not a dead empty band).
   overflow:visible so blurred glows aren't sliced into a hard edge — meteors
   stay clipped by their own container. Horizontal spill is caught by .hero. */
.hero-stage {
  position: relative;
  width: 100%;
  overflow: visible;
  padding: 0 var(--gutter) 90px;
}
.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
  /* will-change set by JS only while parallax is active — avoids a permanent layer */
  /* Soft radial already fades to transparent; keep glow fully inside its box
     so nothing hard-clips mid-gradient. */
}
.glow-a {
  width: 720px; height: 520px;
  top: -180px; right: -140px;
  background: radial-gradient(closest-side, rgba(46, 107, 70, 0.32), transparent 70%);
}
.glow-b {
  width: 560px; height: 460px;
  top: 220px; left: -220px;
  background: radial-gradient(closest-side, rgba(217, 164, 65, 0.12), transparent 70%);
}

/* --- meteors (hero-stage background only) ---
   Port of Magic UI / shadcn.io meteors: small head + gradient tail.
   Sage-tinted; confined to .hero-stage so they never cross the pillars marquee. */
.meteors {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
  contain: paint;
}
.meteor {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 9999px;
  background: #cfe8d2;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.1),
    0 0 12px 2px rgba(169, 214, 174, 0.6);
  /* Hidden until the animation frame applies — never sit idle on load.
     Duration + negative delay set inline so each meteor starts mid-flight. */
  opacity: 0;
  animation-name: meteor-fall;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  animation-fill-mode: none;
}
/* Tail sits on local −X. Motion is also along local X after rotate(45deg),
   so the streak always matches the flight path (not viewport aspect ratio). */
.meteor::before {
  content: "";
  position: absolute;
  top: 50%;
  left: -80px;
  width: 80px;
  height: 1px;
  transform: translateY(-50%);
  background: linear-gradient(
    90deg,
    transparent,
    rgba(131, 183, 141, 0.5),
    rgba(207, 232, 210, 0.95)
  );
}
/* CSS applies right→left: translate along local +X, then rotate 45°.
   Result: true diagonal path; trail (local −X) stays directly behind the head. */
@keyframes meteor-fall {
  0% {
    transform: rotate(45deg) translate3d(0, 0, 0);
    opacity: 1;
  }
  70% {
    opacity: 1;
  }
  100% {
    transform: rotate(45deg) translate3d(140vmax, 0, 0);
    opacity: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .meteors { display: none; }
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: var(--max-wide);
  width: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}

.hero-copy h1 {
  font-size: clamp(34px, 8.5vw + 6px, 68px);
  font-weight: 800;
  letter-spacing: -0.045em;
  margin: 0 0 22px;
  text-wrap: balance;
}
.grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lede {
  font-size: clamp(16.5px, 1.4vw + 12px, 18.5px);
  color: var(--muted);
  max-width: min(30em, 100%);
}
.lede strong { color: var(--text); font-weight: 600; }
.hero-actions {
  display: inline-flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  margin-top: 34px;
  max-width: 100%;
}
.hero-ctas {
  display: flex;
  gap: 14px;
  flex-wrap: nowrap;
}
.hero-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  box-sizing: border-box;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(190, 225, 195, 0.06);
  border: 1px solid var(--hairline-soft);
  font-size: 13.5px;
  line-height: 1.35;
  color: var(--muted);
  text-wrap: balance;
}
.hero-status-text { min-width: 0; }
.hero-status-dot {
  width: 7px;
  height: 7px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(131, 183, 141, 0.55);
  animation: status-pulse 2.2s ease-out infinite;
}
.hero-status-text strong {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  letter-spacing: -0.02em;
}
@keyframes status-pulse {
  0% { box-shadow: 0 0 0 0 rgba(131, 183, 141, 0.55); }
  70% { box-shadow: 0 0 0 8px rgba(131, 183, 141, 0); }
  100% { box-shadow: 0 0 0 0 rgba(131, 183, 141, 0); }
}
.hero-fine { margin-top: 14px; font-size: 13.5px; color: var(--faint); }

/* --- desktop scene --- */
.scene {
  position: relative;
  /* Room for the EQ callout + L-arrow sitting above the menu bar */
  padding-top: 28px;
}
.desktop {
  position: relative;
  border-radius: 10px;
  border: 1px solid var(--hairline);
  /* Soft radials that fully dissolve before the card edge; base fill eases
     into page bg so the panel doesn't read as a hard-cut green rectangle. */
  background:
    radial-gradient(ellipse 85% 75% at 72% 6%, rgba(46, 107, 70, 0.26) 0%, transparent 68%),
    radial-gradient(ellipse 70% 65% at 18% 95%, rgba(217, 164, 65, 0.09) 0%, transparent 62%),
    radial-gradient(ellipse 100% 95% at 50% 38%, #121b14 0%, #0e1510 38%, var(--bg) 72%);
  box-shadow:
    0 40px 90px -30px rgba(0, 0, 0, 0.75),
    0 0 0 1px rgba(0, 0, 0, 0.35),
    0 0 120px -28px rgba(46, 107, 70, 0.3),
    /* Light inset vignette — feathers the last few dozen px into the page */
    inset 0 0 70px 36px rgba(11, 17, 13, 0.4);
  overflow: hidden;
  padding-bottom: 36px;
}
/* Text to the left of the EQ; L-arrow tip is pinned to the icon by app.js */
.scene-callout {
  position: absolute;
  top: 2px;
  left: 0;
  z-index: 4;
  display: flex;
  align-items: flex-start;
  gap: 3px;
  pointer-events: none;
  color: rgba(217, 164, 65, 0.85);
  font-size: 13px;
}
.scene-caption {
  margin: 0;
  line-height: 1;
  font-size: inherit;
  font-weight: 500;
  font-variant: small-caps;
  font-feature-settings: "smcp" 1, "c2sc" 1;
  letter-spacing: 0.06em;
  color: rgba(210, 190, 140, 0.88);
  white-space: nowrap;
}
.scene-caption em {
  color: var(--accent-2);
  font-style: normal;
}
.scene-arrow {
  flex: none;
  display: block;
  width: 12px;
  height: 16px;
  /* Horizontal stroke is at y=1 in the SVG — sit it on the text mid-line */
  margin-top: calc(0.5em - 1px);
  overflow: visible;
}

/* menu bar — Apple + app name left; status items + clock right */
.menubar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 24px;
  padding: 0 14px 0 12px;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1;
  background: rgba(22, 28, 24, 0.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.92);
  user-select: none;
}
.mb-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  height: 100%;
}
.mb-apple {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  opacity: 0.95;
}
.mb-app {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mb-right {
  display: flex;
  align-items: center;
  height: 100%;
  gap: 0;
  flex-shrink: 0;
  margin-left: 12px;
}
.mb-status {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin: 0 6px;
  color: inherit;
  opacity: 0.95;
}
.mb-status.mb-battery {
  width: 22px;
  margin: 0 5px;
}
.mb-clock {
  font-variant-numeric: tabular-nums;
  font-weight: 400;
  font-size: 13px;
  letter-spacing: -0.01em;
  padding: 0 0 0 4px;
  margin-left: 2px;
  white-space: nowrap;
}

/*
 * FlowBar status item — mirrors WaveformIcon.swift bars,
 * tinted with the hero gold so it reads as the live app in the menu bar.
 */
.mb-eq {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.8px;
  width: 16px;
  height: 16px;
  margin: 0 6px;
  padding: 0;
  background: none;
  box-shadow: none;
  border-radius: 0;
  color: var(--accent-2);
  opacity: 1;
  filter: drop-shadow(0 0 5px rgba(217, 164, 65, 0.55));
}
.mb-eq i {
  display: block;
  width: 1.5px;
  /* Fixed height; animate transform (composited) instead of height (layout). */
  height: 13px;
  background: var(--grad);
  border-radius: 999px;
  transform-origin: center center;
  transform: scaleY(var(--h, 0.4));
  animation: eq 0.95s ease-in-out infinite;
  animation-play-state: paused;
}
/* Unitless 0–1 scales match former % heights of the 16×16 glyph box */
.mb-eq i:nth-child(1) { animation-delay: -0.55s; --peak: 0.55; --mid: 0.30; }
.mb-eq i:nth-child(2) { animation-delay: -0.2s;  --peak: 0.92; --mid: 0.48; }
.mb-eq i:nth-child(3) { animation-delay: -0.75s; --peak: 0.68; --mid: 0.38; }
.mb-eq i:nth-child(4) { animation-delay: -0.05s; --peak: 1;    --mid: 0.52; }
.mb-eq i:nth-child(5) { animation-delay: -0.4s;  --peak: 0.78; --mid: 0.42; }
.mb-eq i:nth-child(6) { animation-delay: -0.9s;  --peak: 0.88; --mid: 0.45; }
.mb-eq i:nth-child(7) { animation-delay: -0.3s;  --peak: 0.60; --mid: 0.32; }
.playing .mb-eq i { animation-play-state: running; }

@keyframes eq {
  0%, 100% { transform: scaleY(var(--h, 0.28)); }
  28% { transform: scaleY(var(--peak, 0.9)); }
  52% { transform: scaleY(var(--mid, 0.4)); }
  74% { transform: scaleY(calc(var(--peak, 0.9) * 0.82)); }
}

/* ============ popover player (mirrors the real app UI) ============
   Anchored under the waveform status item; left/notch set by app.js.
   Collapse shows a compact mini bar but keeps the expanded layout box
   in-flow (opacity/visibility only) so page height never jumps. */
.popover {
  --pop-ease: cubic-bezier(0.22, 0.61, 0.21, 1);
  --pop-dur: 0.38s;
  position: relative;
  z-index: 2;
  width: 352px;
  margin: 8px 0 0; /* tight under menu bar — like a real status-item panel */
  left: 0; /* JS sets this so the panel sits under #mbEq */
  border-radius: 20px;
  background: rgba(20, 29, 23, 0.96);
  border: 1px solid rgba(210, 235, 215, 0.1);
  box-shadow: 0 30px 70px -18px rgba(0, 0, 0, 0.8);
  padding: 10px 16px 18px;
  text-align: left;
  transition:
    background var(--pop-dur) var(--pop-ease),
    border-color var(--pop-dur) var(--pop-ease),
    box-shadow var(--pop-dur) var(--pop-ease);
}
/* Caret pointing up at the waveform icon */
.pop-notch {
  position: absolute;
  top: -6px;
  left: 50%; /* fallback; JS pins to waveform center */
  width: 12px;
  height: 12px;
  margin-left: -6px;
  transform: rotate(45deg);
  background: #17211a;
  border-left: 1px solid rgba(210, 235, 215, 0.1);
  border-top: 1px solid rgba(210, 235, 215, 0.1);
  z-index: 1;
  pointer-events: none;
  transition: opacity calc(var(--pop-dur) * 0.7) var(--pop-ease);
}

/* Expanded panel: fades/scales out but stays in layout for height stability */
.pop-expanded {
  transition:
    opacity var(--pop-dur) var(--pop-ease),
    transform var(--pop-dur) var(--pop-ease),
    visibility 0s linear 0s;
  transform-origin: top center;
}
.popover.minimized {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}
.popover.minimized .pop-notch { opacity: 0; }
.popover.minimized .pop-expanded {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  /* Slight fade only — same width/radius stay put so it feels like a height collapse */
  transform: none;
  transition:
    opacity var(--pop-dur) var(--pop-ease),
    transform var(--pop-dur) var(--pop-ease),
    visibility 0s linear var(--pop-dur);
}

/* ---- minimised bar: same width + radius as expanded shell so it reads as
   the same window, just shorter. Absolute children are relative to the padding
   box (inside the border), so left/right: 0 matches the expanded chrome width
   — do not use negative offsets or it grows wider than .popover. */
.pop-mini {
  display: flex;
  align-items: center;
  gap: 8px;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 3;
  width: auto; /* fills padding box = same outer width as expanded panel */
  min-width: 0;
  box-sizing: border-box;
  padding: 10px 14px 10px 10px;
  border-radius: 20px; /* match .popover */
  background: rgba(20, 29, 23, 0.96);
  border: 1px solid rgba(210, 235, 215, 0.1);
  box-shadow: 0 30px 70px -18px rgba(0, 0, 0, 0.8); /* match .popover */
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: scale(0.98) translateY(6px);
  transform-origin: top center;
  transition:
    opacity var(--pop-dur) var(--pop-ease),
    transform var(--pop-dur) var(--pop-ease),
    visibility 0s linear var(--pop-dur);
}
.popover.minimized .pop-mini {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: scale(1) translateY(0);
  transition:
    opacity var(--pop-dur) var(--pop-ease),
    transform var(--pop-dur) var(--pop-ease),
    visibility 0s linear 0s;
}

.mini-hit {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  border-radius: 10px;
}
.mini-hit:hover .mini-title { color: #fff; }
/* YouTube thumbnail aspect ratio (16:9) */
.mini-art {
  flex: none;
  width: 58px;
  aspect-ratio: 16 / 9;
  height: auto;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}
.mini-art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.mini-meta {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
}
.mini-title {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.15;
  color: rgba(255, 255, 255, 0.92);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.15s;
}
.mini-artist {
  font-style: normal;
  font-size: 11.5px;
  line-height: 1.15;
  color: rgba(180, 190, 185, 0.75);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mini-transport {
  display: flex;
  align-items: center;
  flex: none;
  gap: 0;
  margin-left: 4px;
}
.mini-btn {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  background: none;
  border: none;
  color: rgba(245, 248, 246, 0.92);
  cursor: pointer;
  border-radius: 8px;
  padding: 0;
  transition: background 0.15s, transform 0.12s;
}
.mini-btn svg { width: 16px; height: 16px; }
.mini-btn:hover { background: rgba(255, 255, 255, 0.08); }
.mini-btn:active { transform: scale(0.92); }
.mini-play { border-radius: 50%; }
.mini-play .ico-play { display: none; }
#player:not(.playing) .mini-play .ico-pause { display: none; }
#player:not(.playing) .mini-play .ico-play { display: block; }

/* header row */
.pop-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0 12px;
}
.ph-title { font-size: 15px; font-weight: 650; letter-spacing: -0.01em; }
.ph-icons { margin-left: auto; display: flex; gap: 2px; }
.ph-btn {
  position: relative;
  width: 30px; height: 30px;
  display: grid; place-items: center;
  background: none;
  border: none;
  color: #c9d6c8;
  cursor: pointer;
  border-radius: 8px;
  transition: background 0.2s, color 0.2s;
}
.ph-btn svg { width: 17px; height: 17px; }
.ph-btn:hover { background: rgba(190, 225, 195, 0.09); }

/* Shared hover tooltips (header + queue action icons) */
.has-tip {
  position: relative;
}
.has-tip::after {
  content: attr(data-tip);
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(2px);
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  color: var(--text);
  background: #1a241c;
  border: 1px solid var(--hairline);
  border-radius: 7px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 5;
}
.has-tip::before {
  content: "";
  position: absolute;
  top: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%) rotate(45deg) translateY(2px);
  width: 8px;
  height: 8px;
  background: #1a241c;
  border-left: 1px solid var(--hairline);
  border-top: 1px solid var(--hairline);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 6;
}
.has-tip:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.has-tip:hover::before {
  opacity: 1;
  transform: translateX(-50%) rotate(45deg) translateY(0);
}

/* artwork */
.art {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(210, 235, 215, 0.09);
  background: #0c1710;
}
.art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* now playing text */
.np-info {
  position: relative;
  text-align: center;
  padding: 18px 34px 2px;
}
.np-title {
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.01em;
  line-height: 1.35;
}
.np-artist { margin-top: 5px; font-size: 12.5px; color: var(--muted); }
.np-star {
  position: absolute;
  right: 0; top: 22px;
  width: 34px; height: 34px;
  display: grid; place-items: center;
  background: none;
  border: none;
  color: var(--accent-2);
  cursor: pointer;
  border-radius: 9px;
  transition: background 0.2s, transform 0.2s;
}
.np-star svg { width: 21px; height: 21px; }
.np-star:hover { background: rgba(229, 180, 85, 0.12); }
.np-star.faved svg path { fill: currentColor; }
.np-star.faved { animation: pop 0.35s var(--ease); }
@keyframes pop { 40% { transform: scale(1.25); } }

/* scrubber */
.scrub { margin-top: 16px; }
.scrub-track {
  position: relative;
  height: 4px;
  border-radius: 3px;
  background: rgba(210, 235, 215, 0.15);
}
.scrub-fill {
  position: absolute;
  inset: 0 98.1% 0 0;
  border-radius: 3px;
  background: rgba(238, 244, 236, 0.85);
}
.scrub-thumb {
  position: absolute;
  top: 50%;
  left: 1.9%;
  width: 13px; height: 13px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.6);
}
.scrub-times {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 11.5px;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}

/* transport */
.transport {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  padding: 0 6px;
}
.t-btn {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  background: none;
  border: none;
  color: #dfe7dc;
  cursor: pointer;
  border-radius: 10px;
  transition: background 0.2s, transform 0.15s;
}
.t-btn svg { width: 22px; height: 22px; }
.t-btn:hover { background: rgba(190, 225, 195, 0.09); }
.t-btn:active { transform: scale(0.9); }
.t-text {
  font-size: 15px;
  font-weight: 650;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.t-play {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: #f2f5ef;
  color: #131b15;
  box-shadow: 0 8px 22px -6px rgba(0, 0, 0, 0.6);
}
.t-play svg { width: 26px; height: 26px; }
.t-play:hover { background: #fff; transform: scale(1.05); }
.t-play .ico-play { display: none; }
#player:not(.playing) .t-play .ico-pause { display: none; }
#player:not(.playing) .t-play .ico-play { display: block; }

/* queue */
.queue {
  margin-top: 18px;
}
.q-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.q-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--faint);
}
.q-rule { flex: 1; height: 1px; background: var(--hairline-soft); }
.q-head-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: none;
}
.q-head-btn {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  border-radius: 7px;
  transition: background 0.2s, color 0.2s;
}
.q-head-btn svg { width: 18px; height: 18px; display: block; }
.q-head-btn:hover {
  background: rgba(190, 225, 195, 0.09);
  color: var(--text);
}

.q-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 6px;
  margin: 0 -6px;
  border-radius: 10px;
  transition: background 0.2s;
}
.q-item:hover { background: rgba(190, 225, 195, 0.06); }
.q-thumb {
  position: relative;
  flex: none;
  width: 46px; height: 30px;
  border-radius: 6px;
  border: 1px solid rgba(210, 235, 215, 0.1);
  overflow: hidden;
  background: #0c1710;
}
.q-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.q-thumb i {
  position: absolute;
  left: 4px; bottom: 3px;
  font-style: normal;
  font-size: 6.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
  white-space: nowrap;
}
.q-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.q-text b {
  font-size: 12.8px;
  font-weight: 550;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.q-text i { font-style: normal; font-size: 11.5px; color: var(--faint); }
.q-actions {
  display: flex;
  align-items: center;
  flex: none;
  gap: 2px;
  margin-left: auto;
}
.q-ico {
  flex: none;
  width: 28px; height: 28px;
  display: grid; place-items: center;
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  border-radius: 7px;
  transition: background 0.2s, color 0.2s;
}
.q-ico svg { width: 15px; height: 15px; }
.q-ico:hover { background: rgba(190, 225, 195, 0.09); color: var(--text); }
.q-drag {
  flex: none;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  color: var(--muted);
  border-radius: 7px;
  cursor: grab;
  transition: background 0.2s, color 0.2s;
}
.q-drag svg { width: 15px; height: 15px; display: block; }
.q-drag:hover { background: rgba(190, 225, 195, 0.09); color: var(--text); }

/* --- marquee --- */
.marquee {
  position: relative;
  z-index: 2;
  /* Spacing above comes from .hero-stage padding-bottom so meteors
     reach the top rule, then stop. Full-bleed horizontal edges. */
  margin-top: 0;
  border-top: 1px solid var(--hairline-soft);
  border-bottom: 1px solid var(--hairline-soft);
  padding: 16px 0;
  overflow: hidden;
  -webkit-mask: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.marquee-track {
  display: flex;
  width: max-content;
  /* Distance/duration set by JS from measured group width so the loop
     resets after exactly one segment — never gaps or hard-cuts. */
  --marquee-distance: 0px;
  --marquee-duration: 36s;
  animation: marquee-scroll var(--marquee-duration) linear infinite;
  /* Promote once; avoid toggling will-change during scroll (iOS jank). */
  transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
/* Identical cloned groups. Trailing padding matches gap so the seam
   between the last · of one group and the first span of the next is even. */
.marquee-group {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: 34px;
  padding-inline-end: 34px;
}
.marquee-group span {
  font-size: 14px;
  font-weight: 550;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--faint);
  white-space: nowrap;
}
.marquee-group i {
  font-style: normal;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  opacity: 0.85;
}
@keyframes marquee-scroll {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(var(--marquee-distance), 0, 0); }
}

/* ============ sections ============
   Frosted plates are ONE continuous fill, clipped to a wavy silhouette
   via clip-path: shape(). They sit above rectangular troughs and overlap
   them slightly so the wave reveals the dark band underneath — no separate
   join masks, no dual-half seams. */
.section {
  --pad-y: clamp(72px, 10vw, 120px);
  position: relative;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: var(--pad-y) var(--gutter);
}

/* Keep section content on the same readable measure as before,
   and above raised-section sheen layers */
.section > * {
  position: relative;
  z-index: 1;
  max-width: var(--max);
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

/* ---- Raised / frosted plates (wavy clip) ----
   Single shared background + mesh for the whole plate including the
   wavy edges. Overlaps troughs so the clip edge is the only seam.
   drop-shadow follows the mask/clip silhouette so the plate casts into
   the trough and picks up a light top rim (raised emboss). */
main > .section:nth-of-type(even) {
  z-index: 2;
  background-color: var(--zone-frost);
  /* Extra pad so content clears the wave; pull into troughs for overlap */
  padding-top: calc(var(--pad-y) + var(--wave-d));
  padding-bottom: calc(var(--pad-y) + var(--wave-d));
  margin-top: calc(var(--wave-d) * -1);
  margin-bottom: calc(var(--wave-d) * -1);
  /*
    Wavy silhouette — preferred: CSS shape() (readable, scales with %).
    Fallback: SVG mask (preserveAspectRatio=none) for browsers without shape().
  */
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 800' preserveAspectRatio='none'%3E%3Cpath fill='white' d='M0,32C206,10 308,58 514,42C720,26 822,52 1028,36C1234,20 1337,44 1440,32V768C1234,790 1131,742 925,758C720,774 617,748 411,764C206,780 103,756 0,768Z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 800' preserveAspectRatio='none'%3E%3Cpath fill='white' d='M0,32C206,10 308,58 514,42C720,26 822,52 1028,36C1234,20 1337,44 1440,32V768C1234,790 1131,742 925,758C720,774 617,748 411,764C206,780 103,756 0,768Z'/%3E%3C/svg%3E");
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  /* Raised plate: bright rim on the crest, dark contact + deep cast into troughs */
  filter:
    drop-shadow(0 -1.5px 0 rgba(238, 244, 236, 0.14))
    drop-shadow(0 -0.5px 0 rgba(169, 214, 174, 0.12))
    drop-shadow(0 1.5px 0 rgba(0, 0, 0, 0.55))
    drop-shadow(0 10px 18px rgba(0, 0, 0, 0.55))
    drop-shadow(0 28px 48px rgba(0, 0, 0, 0.45));
  --frost-mesh:
    radial-gradient(ellipse 85% 50% at 20% 8%, rgba(131, 183, 141, 0.26), transparent 70%),
    radial-gradient(ellipse 80% 45% at 80% 12%, rgba(190, 225, 195, 0.14), transparent 68%),
    radial-gradient(ellipse 70% 50% at 15% 45%, rgba(131, 183, 141, 0.2), transparent 68%),
    radial-gradient(ellipse 65% 48% at 88% 55%, rgba(229, 180, 85, 0.12), transparent 64%),
    radial-gradient(ellipse 55% 42% at 50% 50%, rgba(70, 130, 90, 0.12), transparent 66%),
    radial-gradient(ellipse 85% 50% at 25% 92%, rgba(131, 183, 141, 0.16), transparent 70%),
    radial-gradient(ellipse 80% 45% at 75% 88%, rgba(190, 225, 195, 0.08), transparent 68%);
  /* Top-lit emboss: brighter crest, soft dark under-edge so the plate reads lifted */
  --frost-sheen: linear-gradient(
    180deg,
    rgba(238, 244, 236, 0.09) 0%,
    rgba(190, 225, 195, 0.035) 14%,
    rgba(190, 225, 195, 0.012) 36%,
    rgba(0, 0, 0, 0.04) 72%,
    rgba(0, 0, 0, 0.14) 100%
  );
}

/* Modern shape() clip — same idea as the SVG mask, nicer authoring */
@supports (clip-path: shape(from 0 0, hline to 1px, vline to 1px, hline to 0)) {
  main > .section:nth-of-type(even) {
    -webkit-mask-image: none;
    mask-image: none;
    clip-path: shape(
      from 0 20.5px,
      curve to 21.43% 12px with 14.29% 6px,
      smooth to 35.71% 28.5px,
      smooth to 50% 23px,
      smooth to 64.29% 21px,
      smooth to 78.57% 20px,
      smooth to 100% 20.5px,
      vline to calc(100% - 20.5px),
      curve to 78.57% calc(100% - 10px) with 85.71% calc(100% - 14px),
      smooth to 64.29% calc(100% - 22.5px),
      smooth to 50% calc(100% - 30.5px),
      smooth to 35.71% calc(100% - 30.5px),
      smooth to 21.43% calc(100% - 23.5px),
      smooth to 0 calc(100% - 20.5px),
      vline to 0
    );
  }
}

/* Soft gradient mesh — full bleed inside the clipped plate */
main > .section:nth-of-type(even)::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: var(--frost-mesh);
  filter: blur(48px);
  opacity: 0.92;
}

/* Soft frost sheen — full bleed inside the clipped plate */
main > .section:nth-of-type(even)::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: var(--frost-sheen);
}

/* First frost (features): flat top under the marquee — wave only on bottom */
main > .section:nth-of-type(2) {
  margin-top: 0;
  padding-top: var(--pad-y);
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 800' preserveAspectRatio='none'%3E%3Cpath fill='white' d='M0,0H1440V768C1234,790 1131,742 925,758C720,774 617,748 411,764C206,780 103,756 0,768Z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 800' preserveAspectRatio='none'%3E%3Cpath fill='white' d='M0,0H1440V768C1234,790 1131,742 925,758C720,774 617,748 411,764C206,780 103,756 0,768Z'/%3E%3C/svg%3E");
}

/* Last frost (download): flat bottom into the footer — wave only on top */
main > .section.download {
  margin-bottom: 0;
  padding-bottom: clamp(80px, 12vw, 130px);
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 800' preserveAspectRatio='none'%3E%3Cpath fill='white' d='M0,32C206,10 308,58 514,42C720,26 822,52 1028,36C1234,20 1337,44 1440,32V800H0Z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 800' preserveAspectRatio='none'%3E%3Cpath fill='white' d='M0,32C206,10 308,58 514,42C720,26 822,52 1028,36C1234,20 1337,44 1440,32V800H0Z'/%3E%3C/svg%3E");
}

/* Matching flat-edge shape() clips for modern browsers */
@supports (clip-path: shape(from 0 0, hline to 1px, vline to 1px, hline to 0)) {
  main > .section:nth-of-type(2) {
    -webkit-mask-image: none;
    mask-image: none;
    clip-path: shape(
      from 0 0,
      hline to 100%,
      vline to calc(100% - 20.5px),
      curve to 78.57% calc(100% - 10px) with 85.71% calc(100% - 14px),
      smooth to 64.29% calc(100% - 22.5px),
      smooth to 50% calc(100% - 30.5px),
      smooth to 35.71% calc(100% - 30.5px),
      smooth to 21.43% calc(100% - 23.5px),
      smooth to 0 calc(100% - 20.5px),
      vline to 0
    );
  }

  main > .section.download {
    -webkit-mask-image: none;
    mask-image: none;
    clip-path: shape(
      from 0 20.5px,
      curve to 21.43% 12px with 14.29% 6px,
      smooth to 35.71% 28.5px,
      smooth to 50% 23px,
      smooth to 64.29% 21px,
      smooth to 78.57% 20px,
      smooth to 100% 20.5px,
      vline to 100%,
      hline to 0,
      vline to 20.5px
    );
  }
}

/* ---- Lowered troughs — pure --zone-trough rectangles under the waves ----
   Inset shading + edge vignettes make the band recede under the frost plates.
   Soft gold ambient echoes the hero title gradient so the pits don’t go cold. */
main > .section:nth-of-type(odd) {
  z-index: 1;
  background-color: var(--zone-trough);
  background-image:
    /* Soft falloff from the frost above / below into the pit */
    linear-gradient(
      180deg,
      rgba(0, 0, 0, 0.55) 0%,
      rgba(0, 0, 0, 0.18) 10%,
      transparent 28%,
      transparent 72%,
      rgba(0, 0, 0, 0.18) 90%,
      rgba(0, 0, 0, 0.55) 100%
    ),
    /* Warm gold pools — same palette as --grad (#ecc670 → #d9a441) */
    radial-gradient(
      ellipse 58% 48% at 16% 28%,
      rgba(236, 198, 112, 0.11),
      transparent 68%
    ),
    radial-gradient(
      ellipse 52% 42% at 88% 72%,
      rgba(217, 164, 65, 0.09),
      transparent 66%
    ),
    radial-gradient(
      ellipse 45% 36% at 50% 100%,
      rgba(229, 180, 85, 0.06),
      transparent 70%
    ),
    /* Gentle center lift so the floor isn’t pure void */
    radial-gradient(
      ellipse 70% 55% at 50% 50%,
      rgba(18, 28, 22, 0.45),
      transparent 70%
    );
  box-shadow:
    inset 0 36px 56px -12px rgba(0, 0, 0, 0.7),
    inset 0 -36px 56px -12px rgba(0, 0, 0, 0.65),
    inset 0 0 90px 10px rgba(0, 0, 0, 0.35);
  /* Room for frost wave overlap so content isn’t covered */
  padding-top: calc(var(--pad-y) + var(--wave-d));
  padding-bottom: calc(var(--pad-y) + var(--wave-d));
}

.section > .section-head {
  max-width: min(640px, 100%);
  margin-bottom: clamp(32px, 5vw, 56px);
}
/* Long section titles: first line stays intact; <br> still starts the second line.
   After reorder: #how is first frost plate, #features is first trough. */
#how .section-head {
  max-width: min(920px, 100%);
  text-align: center;
}
#how .section-head h2 {
  /* Prefer a single line when it fits; wrap cleanly below ~720px */
  white-space: nowrap;
  font-size: clamp(24px, 3.2vw + 10px, 44px);
  text-wrap: balance;
}
#features .section-head {
  max-width: min(980px, 100%);
  text-align: center;
}
#features .section-head h2 {
  white-space: nowrap;
  font-size: clamp(24px, 3.2vw + 10px, 44px);
  text-wrap: balance;
}
@media (max-width: 720px) {
  #features .section-head h2,
  #how .section-head h2 {
    white-space: normal;
    font-size: clamp(26px, 6.5vw, 36px);
  }
}
#notes .section-head {
  text-align: center;
}
/* Gold underline on trough-section titles — same --grad as the hero */
#features .section-head h2::after,
#notes .section-head h2::after {
  content: "";
  display: block;
  width: 52px;
  height: 2.5px;
  margin: 18px auto 0;
  border-radius: 2px;
  background: var(--grad);
  box-shadow: 0 0 18px rgba(217, 164, 65, 0.45);
}
.section-head h2 {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 750;
  text-wrap: balance;
}
.section-head .dim { color: var(--faint); }
.section-sub {
  margin-top: 18px;
  font-size: clamp(15px, 1.2vw + 12px, 17px);
  color: var(--muted);
  text-wrap: pretty;
}
.section-sub strong { color: var(--text); font-weight: 600; }

/* features grid */
.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(12px, 1.5vw, 18px);
}
.card {
  position: relative;
  border: 1px solid var(--hairline-soft);
  border-radius: var(--radius);
  background: var(--panel);
  padding: clamp(22px, 2.5vw, 28px) clamp(18px, 2.2vw, 26px);
  transition: transform 0.35s var(--ease), border-color 0.35s, background 0.35s,
    box-shadow 0.35s var(--ease);
  min-width: 0;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  border-radius: var(--radius) var(--radius) 0 0;
  background: linear-gradient(90deg, transparent, rgba(229, 180, 85, 0.45), transparent);
  opacity: 0;
  transition: opacity 0.35s;
}
.card:hover { transform: translateY(-4px); border-color: var(--hairline); background: var(--panel-strong); }
.card:hover::before { opacity: 1; }

/*
 * Features info cards — 3D glass tilt inspired by uiverse smart-liger-5.
 * Perspective + layered icon plates; project sage/amber palette (not the original
 * teal). Hover + :focus-within so keyboard focus matches. Browser mockup untouched.
 * Transform is shared with .reveal, so entrance + tilt are combined carefully.
 */
#features .grid {
  perspective: 1100px;
  perspective-origin: 50% 40%;
}
#features .card {
  transform-style: preserve-3d;
  background:
    radial-gradient(ellipse 90% 70% at 50% 0%, rgba(217, 164, 65, 0.07), transparent 65%),
    linear-gradient(160deg, rgba(190, 225, 195, 0.06), transparent 55%),
    var(--panel);
  border-color: rgba(217, 164, 65, 0.12);
  /* Resting cast — soft, centered under the plate */
  box-shadow:
    0 10px 22px -16px rgba(0, 0, 0, 0.45),
    0 22px 40px -28px rgba(5, 28, 14, 0.28),
    0 1px 0 rgba(210, 235, 215, 0.04) inset;
  transition:
    transform 0.55s var(--ease),
    opacity 0.8s var(--ease),
    border-color 0.4s ease,
    background 0.4s ease,
    box-shadow 0.55s var(--ease);
  transition-delay: var(--d, 0ms), var(--d, 0ms), 0s, 0s, 0s;
}
/* Pre-reveal: keep the 3D basis so the hover tilt doesn't pop after scroll-in */
#features .card.reveal:not(.in) {
  opacity: 0;
  transform: rotate3d(1, 1, 0, 0deg) translateY(26px);
}
#features .card.reveal.in,
#features .card:not(.reveal) {
  opacity: 1;
  transform: rotate3d(1, 1, 0, 0deg) translateZ(0);
}
#features .card::before {
  opacity: 0.55;
  background: linear-gradient(90deg, transparent, rgba(236, 198, 112, 0.55), transparent);
  z-index: 2;
}
/* Soft frost edge on the plate — glass-adjacent, not a neon rim */
#features .card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow:
    inset 0 1px 0 rgba(238, 244, 236, 0.06),
    inset 0 0 0 1px rgba(210, 235, 215, 0.03);
  opacity: 0.85;
  transition: opacity 0.4s ease;
}
#features .card:hover,
#features .card:focus-within,
#features .card.reveal.in:hover,
#features .card.reveal.in:focus-within {
  z-index: 3;
  border-color: rgba(217, 164, 65, 0.32);
  background:
    radial-gradient(ellipse 95% 75% at 42% 0%, rgba(217, 164, 65, 0.12), transparent 62%),
    radial-gradient(ellipse 70% 60% at 100% 100%, rgba(46, 107, 70, 0.14), transparent 55%),
    linear-gradient(160deg, rgba(190, 225, 195, 0.09), transparent 55%),
    var(--panel-strong);
  /* Tilt toward top-left light — softer than the reference’s 30° so body copy stays legible */
  transform: rotate3d(1, 1, 0, 12deg) translateZ(6px);
  /*
   * Layered cast shadows match the tilt (light from top-left → weight bottom-right),
   * same idea as the uiverse card’s green-tinted offset shadow stack.
   */
  box-shadow:
    /* tight contact under the lifted edge */
    14px 22px 12px -14px rgba(0, 0, 0, 0.55),
    /* mid cast — primary depth cue */
    28px 42px 28px -22px rgba(5, 28, 14, 0.5),
    /* far soft pool */
    36px 64px 52px -18px rgba(0, 0, 0, 0.38),
    /* ambient fill under the plate */
    8px 28px 48px -10px rgba(0, 0, 0, 0.28),
    /* sage under-glow where the card lifts */
    -10px -14px 40px -18px rgba(46, 107, 70, 0.22),
    /* warm edge light on the high corner */
    0 1px 0 rgba(236, 198, 112, 0.12) inset,
    /* underside shade on the low edge of the tilt */
    inset 0 -20px 36px -28px rgba(0, 0, 0, 0.22);
  transition-delay: 0s, 0s, 0s, 0s, 0s;
}
#features .card:hover::before,
#features .card:focus-within::before { opacity: 1; }
#features .card:hover::after,
#features .card:focus-within::after { opacity: 1; }

/* Lift content slightly in Z so type and icon sit proud of the plate */
#features .card .card-ico,
#features .card h3,
#features .card p {
  position: relative;
  transform: translateZ(0);
  transition: transform 0.55s var(--ease), filter 0.55s var(--ease);
  filter: drop-shadow(0 0 0 transparent);
}
#features .card:hover .card-ico,
#features .card:focus-within .card-ico {
  transform: translate3d(0, 0, 36px);
  /* Floating icon cast — harder + softer layers in the tilt direction */
  filter:
    drop-shadow(10px 16px 10px rgba(0, 0, 0, 0.42))
    drop-shadow(4px 8px 4px rgba(5, 28, 14, 0.35))
    drop-shadow(-2px -3px 8px rgba(131, 183, 141, 0.12));
}
#features .card:hover h3,
#features .card:focus-within h3 {
  transform: translate3d(0, 0, 22px);
  /* Light text cast only — keeps glyphs readable while selling lift */
  filter: drop-shadow(5px 9px 6px rgba(0, 0, 0, 0.32));
}
#features .card:hover p,
#features .card:focus-within p {
  transform: translate3d(0, 0, 14px);
  filter: drop-shadow(4px 7px 5px rgba(0, 0, 0, 0.24));
}

.card-ico {
  position: relative;
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(169, 214, 174, 0.14), rgba(111, 168, 123, 0.1));
  border: 1px solid rgba(131, 183, 141, 0.24);
  color: var(--accent);
  margin-bottom: 20px;
  transform-style: preserve-3d;
  z-index: 1;
  box-shadow: 0 1px 0 rgba(238, 244, 236, 0.05) inset;
}
.card-ico svg {
  position: relative;
  z-index: 2;
  width: 22px; height: 22px;
  filter: drop-shadow(0 1px 0 rgba(0, 0, 0, 0.2));
  transition: filter 0.55s var(--ease);
}
#features .card:hover .card-ico svg,
#features .card:focus-within .card-ico svg {
  filter:
    drop-shadow(0 1px 0 rgba(0, 0, 0, 0.25))
    drop-shadow(3px 5px 4px rgba(0, 0, 0, 0.3));
}
/*
 * Nested square plates — inset from the icon box so they stay perfectly
 * concentric (no left/top/scale drift). Small shared-Z offsets only: large
 * ΔZ under the card’s rotate3d reads as a skewed stack of squares.
 */
#features .card-ico::before,
#features .card-ico::after {
  content: "";
  position: absolute;
  /* inset keeps every edge equidistant from the 42×42 face */
  inset: 0;
  border-radius: 12px;
  pointer-events: none;
  background: transparent;
  border: 1px solid rgba(169, 214, 174, 0.2);
  box-shadow:
    0 0 0 0 transparent,
    inset 0 1px 0 rgba(238, 244, 236, 0.06);
  transition:
    transform 0.55s var(--ease),
    opacity 0.4s ease,
    inset 0.55s var(--ease),
    border-radius 0.55s var(--ease),
    border-color 0.4s ease,
    background 0.4s ease,
    box-shadow 0.55s var(--ease),
    filter 0.55s var(--ease);
  opacity: 0;
  /* rest: collapsed onto the face, slightly behind */
  transform: translateZ(-1px);
  filter: drop-shadow(0 0 0 transparent);
}
/* Mid plate */
#features .card-ico::before {
  transition-delay: 0.02s;
}
/* Outer plate */
#features .card-ico::after {
  border-color: rgba(229, 180, 85, 0.16);
  transition-delay: 0.06s;
}
#features .card:hover .card-ico::before,
#features .card:focus-within .card-ico::before {
  /* 42 + 2×6 = 54 — one step out, same center */
  inset: -6px;
  border-radius: 14px;
  opacity: 0.95;
  background: rgba(131, 183, 141, 0.1);
  border-color: rgba(169, 214, 174, 0.28);
  /* Mid plate: short cast + soft rim, bias bottom-right with the card tilt */
  box-shadow:
    6px 10px 12px -6px rgba(0, 0, 0, 0.4),
    2px 4px 6px -2px rgba(5, 28, 14, 0.25),
    inset 0 1px 0 rgba(238, 244, 236, 0.1);
  transform: translateZ(-4px);
  filter:
    drop-shadow(6px 10px 6px rgba(0, 0, 0, 0.28))
    drop-shadow(2px 4px 3px rgba(5, 28, 14, 0.2));
}
#features .card:hover .card-ico::after,
#features .card:focus-within .card-ico::after {
  /* 42 + 2×12 = 66 — outer step, still concentric */
  inset: -12px;
  border-radius: 16px;
  opacity: 0.85;
  background: rgba(217, 164, 65, 0.07);
  border-color: rgba(229, 180, 85, 0.22);
  /* Outer plate: longer, softer cast so it sits deeper in the stack */
  box-shadow:
    10px 16px 18px -8px rgba(0, 0, 0, 0.38),
    4px 8px 10px -4px rgba(5, 28, 14, 0.22),
    inset 0 1px 0 rgba(238, 244, 236, 0.06);
  transform: translateZ(-8px);
  filter:
    drop-shadow(10px 16px 10px rgba(0, 0, 0, 0.26))
    drop-shadow(4px 8px 5px rgba(5, 28, 14, 0.18));
}
.card h3 { font-size: 17.5px; font-weight: 650; margin-bottom: 9px; }
.card p { font-size: 14.5px; color: var(--muted); }

/* steps */
.steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(12px, 1.5vw, 18px);
  counter-reset: step;
}
.step {
  position: relative;
  border: 1px solid var(--hairline-soft);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 26px;
}
/* How sits on the first frost plate — soft raised cards, green accents */
#how .step {
  background: var(--panel);
  border-color: var(--hairline-soft);
}
#how .step::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  border-radius: var(--radius) var(--radius) 0 0;
  background: linear-gradient(90deg, transparent, rgba(169, 214, 174, 0.4), transparent);
  opacity: 0.65;
  pointer-events: none;
}
.step-num {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 0.12em;
}
#how .step-num {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 650;
}
.step-visual {
  margin: 18px 0 20px;
  height: 74px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--hairline-soft);
}
#how .step-visual {
  background:
    radial-gradient(ellipse 80% 90% at 50% 100%, rgba(131, 183, 141, 0.1), transparent 70%),
    rgba(0, 0, 0, 0.22);
  border-color: var(--hairline-soft);
}
.chip-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--muted);
  background: rgba(190, 225, 195, 0.06);
  border: 1px solid var(--hairline);
  padding: 9px 15px;
  border-radius: 100px;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chip-link svg { width: 15px; height: 15px; color: var(--accent); flex: none; }
#how .chip-link svg { color: var(--accent); }
.chip-accent { border-color: rgba(131, 183, 141, 0.45); color: var(--text); background: rgba(131, 183, 141, 0.1); }
#how .chip-accent {
  border-color: rgba(131, 183, 141, 0.5);
  color: var(--text);
  background: rgba(131, 183, 141, 0.12);
  box-shadow: 0 0 20px -6px rgba(131, 183, 141, 0.3);
}
.step h3 { font-size: 17px; font-weight: 650; margin-bottom: 8px; }
.step p { font-size: 14.5px; color: var(--muted); }
.step em { color: var(--text); font-style: normal; font-weight: 550; }

/* split (extension) */
.split {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: clamp(36px, 5vw, 64px);
  align-items: center;
}
.split-copy h2 { font-size: clamp(30px, 4vw, 44px); font-weight: 750; }
.ticks { list-style: none; margin: 26px 0 20px; display: grid; gap: 14px; }
.ext-note {
  margin: 0 0 28px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--faint);
}
.ext-note strong { color: var(--muted); font-weight: 600; }
.store-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
.store-or {
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: lowercase;
  color: var(--faint);
  user-select: none;
}
.ticks li {
  position: relative;
  padding-left: 34px;
  font-size: 15px;
  line-height: 1.45;
  color: var(--muted);
}
/* Soft sage box + crisp SVG check — cleaner than border-drawn ticks */
.ticks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.1em;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M3.5 8.2l3 3.1 6-6.3' stroke='%23a9d6ae' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
      center / 11px 11px no-repeat,
    linear-gradient(160deg, rgba(169, 214, 174, 0.22) 0%, rgba(131, 183, 141, 0.1) 100%);
  border: 1px solid rgba(131, 183, 141, 0.4);
  box-shadow:
    0 0 0 3px rgba(131, 183, 141, 0.07),
    0 1px 6px -1px rgba(131, 183, 141, 0.22),
    inset 0 1px 0 rgba(238, 244, 236, 0.08);
}

/* Browser mock + callout: caption below the chrome, arrow reaches up toward the ＋ */
.browser-scene {
  position: relative;
  /* Room for the caption line under the mock */
  padding-bottom: 40px;
}
.thumb-callout {
  position: absolute;
  z-index: 5;
  display: flex;
  align-items: flex-end;
  gap: 3px;
  width: max-content;
  pointer-events: none;
  color: rgba(217, 164, 65, 0.85);
  font-size: 13px;
  /* top/left set by app.js — tip in the browser/thumb gap, arm on the caption */
}
.thumb-callout .thumb-arrow {
  flex: none;
  display: block;
  width: 12px;
  height: 48px;
  /* Horizontal stroke on the caption mid-line */
  margin-bottom: calc(0.3em - 1px);
  overflow: visible;
}
.browser {
  border-radius: 16px;
  border: 1px solid var(--hairline);
  background: #0d130e;
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.7);
  overflow: hidden;
}
.browser-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--hairline-soft);
  background: rgba(190, 225, 195, 0.03);
}
.b-dot { width: 11px; height: 11px; border-radius: 50%; background: rgba(210, 235, 215, 0.14); }
.b-url {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-left: 14px;
  font-size: 12.5px;
  color: var(--muted);
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--hairline-soft);
  border-radius: 8px;
  padding: 6px 14px;
  flex: 1;
  min-width: 0;
}
.b-url svg { width: 12px; height: 12px; flex-shrink: 0; }
.b-url .b-yt { width: 18px; height: 13px; }
.browser-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  padding: 18px;
}
.thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  border: 1px solid rgba(210, 235, 215, 0.08);
  overflow: hidden;
}
.thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.thumb.t1 { background: linear-gradient(140deg, #2c4531, #121c14); }
.thumb.t2 { background: linear-gradient(140deg, #26331f, #10170d); }
.thumb.t3 { background: linear-gradient(140deg, #3a4a2c, #181f10); }
.thumb.t4 { background: linear-gradient(140deg, #1f3324, #0d140e); }
.thumb-dur {
  position: absolute;
  right: 8px; bottom: 8px;
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
  background: rgba(0, 0, 0, 0.75);
  padding: 2px 6px;
  border-radius: 5px;
  color: #d7e0d3;
}
.thumb-add {
  position: absolute;
  left: 8px; bottom: 8px;
  width: 24px; height: 24px;
  display: grid; place-items: center;
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.88);
  border: 1px solid rgba(210, 235, 215, 0.22);
  color: #fff;
  font-size: 15px;
  line-height: 1;
  opacity: 0.82;
  cursor: pointer;
  transition:
    opacity 0.18s ease,
    background 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease,
    box-shadow 0.18s ease,
    font-weight 0.18s ease;
  z-index: 2;
}
.thumb-add-demo {
  /* Callout target — a touch more present than the other ＋ buttons */
  opacity: 1;
}
.thumb-add:hover {
  opacity: 1;
  background: var(--grad);
  border-color: transparent;
  color: #231a06;
  font-weight: 700;
  box-shadow: 0 4px 16px -2px rgba(217, 164, 65, 0.6);
}
/* Hover tooltip above the + button */
.thumb-add::after {
  content: "Add to FlowBar";
  position: absolute;
  left: 0;
  bottom: calc(100% + 8px);
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  color: var(--text);
  background: #1a241c;
  border: 1px solid var(--hairline);
  border-radius: 7px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transform: translateY(2px);
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 5;
}
.thumb-add::before {
  content: "";
  position: absolute;
  left: 8px;
  bottom: calc(100% + 4px);
  width: 8px;
  height: 8px;
  background: #1a241c;
  border-right: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  transform: rotate(45deg) translateY(2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 6;
}
.thumb-add:hover::after {
  opacity: 1;
  transform: translateY(0);
}
.thumb-add:hover::before {
  opacity: 1;
  transform: rotate(45deg) translateY(0);
}

/* notes */
.notes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(18px, 3vw, 28px);
}
.note {
  position: relative;
  border-left: none;
  padding: 6px 0 6px 22px;
}
/* Gold gradient rule — same --grad as the hero title */
.note::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 2.5px;
  border-radius: 2px;
  background: var(--grad);
  box-shadow: 0 0 14px rgba(217, 164, 65, 0.35);
}
.note h3 { font-size: 15.5px; font-weight: 650; margin-bottom: 8px; display: flex; align-items: center; gap: 9px; }
.note-ico {
  font-size: 16px;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.note p { font-size: 14px; color: var(--muted); }
.note strong { color: var(--text); }

/* download */
/* download padding is handled with the wave mask rules above */
.dl-card {
  position: relative;
  text-align: center;
  border: 1px solid rgba(217, 164, 65, 0.18);
  border-radius: clamp(18px, 3vw, 28px);
  background:
    radial-gradient(80% 120% at 50% -20%, rgba(236, 198, 112, 0.18) 0%, transparent 58%),
    radial-gradient(60% 80% at 80% 100%, rgba(217, 164, 65, 0.08) 0%, transparent 55%),
    var(--bg-soft);
  box-shadow:
    0 0 0 1px rgba(217, 164, 65, 0.06),
    0 30px 70px -28px rgba(217, 164, 65, 0.2);
  padding: clamp(48px, 8vw, 76px) clamp(20px, 4vw, 32px) clamp(40px, 6vw, 60px);
  overflow: hidden;
}
.dl-glow {
  position: absolute;
  width: 420px; height: 420px;
  top: -260px; left: 50%;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(
    closest-side,
    rgba(236, 198, 112, 0.22),
    rgba(217, 164, 65, 0.08),
    transparent
  );
  filter: blur(30px);
  pointer-events: none;
}
.dl-icon {
  width: 84px; height: 84px;
  margin: 0 auto 26px;
  border-radius: 21px;
  box-shadow: 0 24px 50px -12px rgba(217, 164, 65, 0.35);
}
.dl-icon svg { width: 100%; height: 100%; display: block; border-radius: 21px; }
.dl-card h2 { font-size: clamp(30px, 4vw, 42px); font-weight: 780; letter-spacing: -0.035em; }
.dl-meta { margin-top: 10px; color: var(--muted); font-size: 15px; }
.dl-cta-block {
  display: inline-flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  margin: 34px auto 0;
  max-width: 100%;
}
.dl-actions {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: nowrap;
}
.dl-fine { margin-top: 22px; font-size: 13px; color: var(--faint); }

@media (max-width: 720px) {
  .dl-cta-block { width: 100%; }
  .dl-actions {
    flex-wrap: wrap;
  }
  .dl-actions .btn {
    flex: 1 1 auto;
    justify-content: center;
  }
}

/* footer — gold hairline + soft ambient depth to match download / hero */
.footer {
  position: relative;
  overflow: hidden;
  border-top: none;
  background-image: linear-gradient(
    90deg,
    transparent 0%,
    rgba(236, 198, 112, 0.35) 30%,
    rgba(217, 164, 65, 0.4) 50%,
    rgba(236, 198, 112, 0.35) 70%,
    transparent 100%
  );
  background-size: 100% 1px;
  background-repeat: no-repeat;
  background-position: top center;
  background-color: var(--zone-trough);
}
.footer-glow {
  position: absolute;
  width: min(520px, 70vw);
  height: min(520px, 70vw);
  left: 50%;
  top: -40%;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(
    closest-side,
    rgba(131, 183, 141, 0.09),
    rgba(217, 164, 65, 0.04),
    transparent
  );
  pointer-events: none;
  filter: blur(8px);
}
.footer-inner {
  position: relative;
  max-width: var(--max-wide);
  width: 100%;
  margin: 0 auto;
  padding: clamp(44px, 7vw, 72px) var(--gutter) clamp(28px, 4vw, 40px);
}
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 0.7fr));
  gap: clamp(28px, 5vw, 48px) clamp(24px, 4vw, 40px);
  align-items: start;
}
.footer-brand { max-width: 320px; }
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  margin-bottom: 14px;
}
.footer-logo:hover .brand-name { color: var(--text); }
.footer-logo .brand-name {
  font-size: 16px;
  font-weight: 650;
  letter-spacing: -0.02em;
}
.footer .brand-mark {
  color: var(--accent);
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 10px;
}
.footer .brand-mark svg { width: 18px; height: 18px; }
.footer-tagline {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--muted);
}
.footer-heading {
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 14px;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--text); }
.footer-meta {
  font-size: 13.5px;
  color: var(--faint);
  line-height: 1.4;
}
.footer-bottom {
  margin-top: clamp(36px, 5vw, 52px);
  padding-top: clamp(20px, 3vw, 28px);
  border-top: 1px solid var(--hairline-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}
.footer-fine {
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--faint);
  max-width: 52ch;
}
.to-top {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: none;
  font-size: 13px;
  font-weight: 550;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
  padding: 8px 14px;
  border-radius: 100px;
  border: 1px solid var(--hairline);
  background: var(--panel);
  transition: color 0.2s, background 0.2s, border-color 0.2s, transform 0.25s var(--ease);
}
.to-top:hover {
  color: var(--text);
  background: var(--panel-strong);
  border-color: rgba(210, 235, 215, 0.16);
  transform: translateY(-1px);
}
.to-top svg { opacity: 0.85; }

/* legal pages (privacy / terms) */
.legal-page .nav { border-bottom: 1px solid var(--hairline-soft); }
.legal-page .nav-inner .btn { margin-left: auto; }
.legal {
  padding:
    calc(var(--safe-top) + var(--nav-h) + clamp(28px, 6vw, 64px))
    var(--gutter)
    clamp(48px, 8vw, 80px);
  min-height: 70vh;
}
.legal-inner {
  max-width: 680px;
  margin: 0 auto;
}
.legal-kicker {
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 10px;
}
.legal h1 {
  font-size: clamp(32px, 5vw, 42px);
  font-weight: 780;
  letter-spacing: -0.035em;
  margin-bottom: 8px;
}
.legal-updated {
  font-size: 13.5px;
  color: var(--faint);
  margin-bottom: 28px;
}
.legal h2 {
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -0.02em;
  margin: 32px 0 10px;
  color: var(--text);
}
.legal p {
  font-size: 15.5px;
  color: var(--muted);
  line-height: 1.65;
  margin-bottom: 14px;
}
.legal p strong { color: var(--text); font-weight: 600; }
.legal a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(131, 183, 141, 0.35);
  transition: color 0.2s, border-color 0.2s;
}
.legal a:hover {
  color: var(--text);
  border-bottom-color: rgba(238, 244, 236, 0.35);
}
.legal ul {
  margin: 0 0 14px;
  padding-left: 1.2em;
  color: var(--muted);
  font-size: 15.5px;
  line-height: 1.65;
}
.legal li { margin-bottom: 6px; }
.legal li::marker { color: var(--accent-2); }
.legal-nav {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--hairline-soft);
}
.footer-simple .footer-inner {
  padding-top: clamp(24px, 4vw, 32px);
  padding-bottom: clamp(24px, 4vw, 36px);
}
.footer-bottom-solo {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}
.footer-legal-links {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}
.footer-legal-links a {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-legal-links a:hover { color: var(--text); }

/* toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + var(--safe-bottom));
  transform: translate(-50%, 24px);
  z-index: 70;
  max-width: min(420px, calc(100vw - 32px));
  background: #17211a;
  border: 1px solid var(--hairline);
  color: var(--text);
  font-size: 14px;
  font-weight: 550;
  line-height: 1.35;
  text-align: center;
  padding: 13px 20px;
  border-radius: 100px;
  box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.7);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* waitlist modal — single-column, calm hierarchy */
.waitlist-modal {
  position: fixed;
  inset: 0;
  margin: auto;
  width: min(400px, calc(100vw - 32px - var(--safe-left) - var(--safe-right)));
  max-height: min(calc(100dvh - 40px - var(--safe-top) - var(--safe-bottom)), 640px);
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--hairline);
  border-radius: 22px;
  padding: 0;
  color: var(--text);
  background: #121a14;
  box-shadow:
    0 0 0 1px rgba(190, 225, 195, 0.04),
    0 28px 70px -18px rgba(0, 0, 0, 0.72);
}
.waitlist-modal::backdrop {
  background: rgba(5, 8, 7, 0.78);
  backdrop-filter: blur(10px) saturate(1.1);
  -webkit-backdrop-filter: blur(10px) saturate(1.1);
}
.waitlist-modal:focus { outline: none; }
.waitlist-modal[open] {
  animation: waitlist-in 0.28s var(--ease) both;
}
.waitlist-modal[open]::backdrop {
  animation: waitlist-backdrop-in 0.28s var(--ease) both;
}
@keyframes waitlist-in {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to { opacity: 1; transform: none; }
}
@keyframes waitlist-backdrop-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.waitlist-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 1;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--faint);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.waitlist-close:hover {
  color: var(--text);
  background: rgba(190, 225, 195, 0.1);
}

.waitlist-panel {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 44px 28px 28px;
  text-align: center;
}
/* display:flex above would otherwise beat the UA [hidden] { display:none } rule */
.waitlist-modal [hidden] {
  display: none !important;
}

.waitlist-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 18px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: var(--accent-2);
  background:
    linear-gradient(155deg, rgba(236, 198, 112, 0.16), rgba(169, 214, 174, 0.08));
  border: 1px solid rgba(229, 180, 85, 0.22);
  box-shadow: 0 10px 28px -14px rgba(217, 164, 65, 0.45);
}
.waitlist-icon svg { width: 22px; height: 22px; }

.waitlist-kicker {
  position: absolute;
  top: 18px;
  left: 20px;
  z-index: 1;
  margin: 0;
  font-size: 11.5px;
  font-weight: 650;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-2);
  line-height: 1;
  pointer-events: none;
}
.waitlist-modal h2 {
  font-size: clamp(22px, 4vw, 26px);
  font-weight: 750;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 8px;
}
.waitlist-lede {
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--muted);
  margin: 0 auto 14px;
  max-width: 30ch;
}
.waitlist-count {
  align-self: stretch;
  width: 100%;
  margin: 0 0 22px;
  box-sizing: border-box;
}

.waitlist-form {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  text-align: left;
}
.waitlist-label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 8px;
}
.waitlist-input {
  width: 100%;
  font: inherit;
  /* ≥16px prevents iOS Safari auto-zoom on focus */
  font-size: 16px;
  color: var(--text);
  background: rgba(5, 8, 7, 0.55);
  border: 1px solid var(--hairline);
  border-radius: 12px;
  padding: 13px 14px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  /* Soft keyboard-friendly: round corners on iOS */
  -webkit-appearance: none;
  appearance: none;
}
.waitlist-input::placeholder { color: var(--faint); }
.waitlist-input:hover { border-color: rgba(210, 235, 215, 0.18); }
.waitlist-input:focus {
  border-color: rgba(229, 180, 85, 0.5);
  box-shadow: 0 0 0 3px rgba(229, 180, 85, 0.12);
  background: rgba(5, 8, 7, 0.72);
}
.waitlist-input.is-invalid {
  border-color: rgba(220, 100, 90, 0.65);
  box-shadow: 0 0 0 3px rgba(220, 100, 90, 0.1);
}
.waitlist-error {
  margin-top: 8px;
  font-size: 12.5px;
  color: #e8a39a;
}
.waitlist-submit:disabled {
  opacity: 0.72;
  cursor: wait;
}
.waitlist-submit {
  width: 100%;
  justify-content: center;
  margin-top: 14px;
}

.waitlist-fine {
  margin-top: 16px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--faint);
}

.waitlist-success .waitlist-lede {
  margin-bottom: 22px;
}
.waitlist-check {
  width: 52px;
  height: 52px;
  margin: 4px auto 18px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #a9d6ae;
  background: linear-gradient(160deg, rgba(169, 214, 174, 0.22), rgba(131, 183, 141, 0.1));
  border: 1px solid rgba(131, 183, 141, 0.38);
  box-shadow: 0 0 0 5px rgba(131, 183, 141, 0.07);
}
.waitlist-check svg { width: 22px; height: 22px; }

@media (prefers-reduced-motion: reduce) {
  .waitlist-modal[open],
  .waitlist-modal[open]::backdrop {
    animation: none;
  }
  .hero-status-dot { animation: none; }
}

/* reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
  transition-delay: var(--d, 0ms);
}
.reveal.in { opacity: 1; transform: none; }

/* ============ responsive ============ */
/* Large tablets / small laptops: keep two-up where it fits, stack hero earlier */
@media (max-width: 1100px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: clamp(40px, 7vw, 64px);
  }
  .hero-copy { text-align: center; }
  .lede { margin: 0 auto; }
  .hero-actions { margin-inline: auto; }
  .hero-ctas { justify-content: center; }
  .scene { max-width: min(560px, 100%); margin: 0 auto; width: 100%; }
  .split { grid-template-columns: 1fr; }
  .split-copy { text-align: center; }
  .ticks { text-align: left; max-width: 36em; margin-inline: auto; }
  .ext-note { max-width: 36em; margin-inline: auto; }
  .store-actions { justify-content: center; }
}

@media (max-width: 900px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: 1fr; }
  .notes { grid-template-columns: 1fr; }
  .nav-links { gap: 18px; }
  .footer-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .footer-brand {
    grid-column: 1 / -1;
    max-width: min(420px, 100%);
  }
  .hero-stage { padding-bottom: 64px; }
  .section { --pad-y: clamp(56px, 9vw, 96px); }
}

/* Compact header: drawer nav replaces inline links */
@media (max-width: 760px) {
  .nav-links {
    position: fixed;
    top: calc(var(--safe-top) + var(--nav-h));
    left: 0;
    right: 0;
    z-index: 49;
    margin: 0;
    padding:
      12px var(--gutter)
      calc(20px + var(--safe-bottom));
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    background: rgba(11, 17, 13, 0.96);
    border-bottom: 1px solid var(--hairline-soft);
    box-shadow: 0 24px 48px -16px rgba(0, 0, 0, 0.65);
    /* Slide closed by default */
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition:
      transform 0.28s var(--ease),
      opacity 0.24s ease,
      visibility 0s linear 0.28s;
  }
  .nav-open .nav-links {
    transform: none;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition:
      transform 0.28s var(--ease),
      opacity 0.24s ease,
      visibility 0s linear 0s;
  }
  .nav-links a {
    display: flex;
    align-items: center;
    min-height: 48px;
    padding: 0 14px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 550;
    color: var(--text);
  }
  .nav-links a:hover,
  .nav-links a:focus-visible {
    background: rgba(190, 225, 195, 0.08);
    color: var(--text);
  }
  .nav-links-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 48px;
    margin-top: 8px;
    padding: 0 14px;
    border: none;
    border-radius: 12px;
    font: inherit;
    font-size: 16px;
    font-weight: 650;
    letter-spacing: -0.01em;
    cursor: pointer;
    background: var(--grad);
    color: #231a06;
    box-shadow: 0 8px 24px -8px rgba(217, 164, 65, 0.5);
    -webkit-tap-highlight-color: transparent;
  }
  .nav-links-cta:hover,
  .nav-links-cta:focus-visible {
    filter: brightness(1.05);
  }
  /* Desktop CTA moves into the drawer; keep bar uncluttered */
  .nav-cta { display: none; }
  .nav-toggle { display: grid; place-items: center; }
  .nav-inner {
    padding-block: 8px;
    gap: 10px;
  }
  .brand { margin-right: auto; }
}

@media (max-width: 640px) {
  :root {
    --gutter: max(16px, env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px),
      clamp(16px, 5vw, 24px));
    --wave-d: clamp(14px, 4vw, 22px);
  }

  .grid { grid-template-columns: 1fr; }
  .hero-stage { padding-bottom: 48px; }
  .hero-fine { font-size: 12.5px; line-height: 1.45; }
  .hero-actions { width: 100%; max-width: 360px; }
  .hero-ctas {
    flex-direction: column;
    align-items: stretch;
  }
  .hero-ctas .btn {
    width: 100%;
    justify-content: center;
    min-height: 48px;
  }
  .btn-large { padding: 14px 22px; font-size: 15.5px; }

  /* Desktop mock — slim chrome so the player still fits */
  .scene {
    max-width: min(100%, 420px);
    padding-top: 22px;
  }
  .scene-callout {
    /* Single-line caption; slightly tighter so it fits narrow scenes */
    font-size: 11px;
    letter-spacing: 0.04em;
    max-width: none;
  }
  .scene-caption {
    white-space: nowrap;
    line-height: 1;
    max-width: none;
    letter-spacing: 0.04em;
  }
  .desktop {
    padding-bottom: 20px;
    /* Center the popover shell; JS also centers left on narrow desktops */
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .menubar {
    align-self: stretch;
    height: 22px;
    padding: 0 8px 0 8px;
    font-size: 11.5px;
  }
  .mb-app { font-size: 11.5px; }
  /* Drop less-essential status glyphs so clock + EQ stay visible */
  .mb-status:not(.mb-eq):not(.mb-battery) { display: none; }
  .mb-status.mb-battery { margin: 0 3px; width: 18px; }
  .mb-eq { margin: 0 4px; }
  .mb-clock {
    font-size: 11px;
    padding-left: 2px;
  }
  .popover {
    /* Centered in the desktop card; width leaves even side gutters */
    width: calc(100% - 24px);
    max-width: 340px;
    margin-top: 6px;
    margin-left: auto;
    margin-right: auto;
    left: auto !important; /* override JS EQ-anchored left on mobile */
    padding: 8px 12px 14px;
    border-radius: 16px;
  }
  .pop-mini {
    border-radius: 16px;
    padding: 8px 10px 8px 8px;
    gap: 6px;
  }
  .mini-art { width: 48px; }
  .mini-btn { width: 36px; height: 36px; }
  .np-info { padding: 14px 28px 2px; }
  .transport { padding: 0; }
  .t-btn { width: 36px; height: 36px; }
  .t-play { width: 50px; height: 50px; }
  .t-play svg { width: 22px; height: 22px; }

  /* Extension mock — single-column thumbs so + buttons stay tappable */
  .browser-body {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 12px;
  }
  .browser-bar { padding: 10px 12px; }
  .b-url { margin-left: 8px; padding: 5px 10px; font-size: 11.5px; }
  .thumb-callout {
    font-size: 11.5px;
    max-width: min(100%, 220px);
  }
  .thumb-callout .scene-caption {
    white-space: normal;
    line-height: 1.2;
  }

  .store-actions {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    max-width: 320px;
    margin-inline: auto;
  }
  .store-actions .btn {
    width: 100%;
    justify-content: center;
    min-height: 48px;
  }
  .store-or { text-align: center; }

  .step { padding: 22px 18px; }
  .step-visual {
    height: 64px;
    overflow: hidden;
  }
  .chip-link {
    font-size: 11.5px;
    padding: 8px 12px;
    gap: 7px;
  }

  .section-sub { font-size: 15.5px; }
  .card { padding: 20px 18px; }
  .card h3 { font-size: 16.5px; }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 28px 20px;
  }
  .footer-brand {
    grid-column: 1 / -1;
    max-width: none;
  }
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
  .to-top {
    min-height: 44px;
    padding: 10px 16px;
  }

  .marquee { padding: 14px 0; }
  .marquee-group { gap: 24px; padding-inline-end: 24px; }
  .marquee-group span { font-size: 12.5px; }

  .dl-card {
    padding: 40px 18px 36px;
  }
  .dl-icon { width: 72px; height: 72px; margin-bottom: 20px; border-radius: 18px; }
  .dl-meta { font-size: 14px; line-height: 1.45; }

  .waitlist-modal {
    width: min(400px, calc(100vw - 24px - var(--safe-left) - var(--safe-right)));
    max-height: calc(100dvh - 24px - var(--safe-top) - var(--safe-bottom));
    border-radius: 18px;
    /* Sit slightly high so the keyboard doesn’t cover the field on phones */
    margin: auto auto max(16px, var(--safe-bottom));
  }
  .waitlist-panel { padding: 40px 20px 22px; }
  .waitlist-close {
    top: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
  }
  .waitlist-submit { min-height: 48px; }

  .toast {
    border-radius: 16px;
    padding: 12px 16px;
    font-size: 13.5px;
  }
}

/* Very narrow phones (iPhone SE / small Android) */
@media (max-width: 420px) {
  .footer-grid { grid-template-columns: 1fr; }
  .browser-body {
    grid-template-columns: 1fr;
  }
  /* On single-column thumbs, keep the demo thumb visible without crowding */
  .thumb.t2,
  .thumb.t4 { display: none; }
  .hero-copy h1 { font-size: clamp(32px, 9.5vw, 40px); }
  .mb-app { display: none; }
  .scene-callout {
    font-size: 10.5px;
    letter-spacing: 0.03em;
  }
  .scene-caption { letter-spacing: 0.03em; }
  .popover {
    width: calc(100% - 20px);
    padding: 8px 10px 12px;
  }
  .q-actions .q-drag { display: none; }
  .dl-actions .btn { min-height: 48px; }
}

/* Coarse pointers (phones/tablets): no sticky hover tilt on feature cards */
@media (hover: none), (pointer: coarse) {
  #features .grid { perspective: none; }
  #features .card,
  #features .card.reveal:not(.in),
  #features .card.reveal.in,
  #features .card:not(.reveal),
  #features .card:hover,
  #features .card:focus-within,
  #features .card.reveal.in:hover,
  #features .card.reveal.in:focus-within {
    transform: none;
  }
  #features .card.reveal:not(.in) {
    transform: translateY(26px);
  }
  #features .card.reveal.in,
  #features .card:not(.reveal) {
    transform: none;
  }
  #features .card:hover,
  #features .card:focus-within,
  #features .card.reveal.in:hover,
  #features .card.reveal.in:focus-within {
    /* Quiet lift only — no 3D that sticks after a tap */
    transform: translateY(-2px);
    box-shadow:
      0 14px 28px -16px rgba(0, 0, 0, 0.5),
      0 1px 0 rgba(236, 198, 112, 0.1) inset;
  }
  #features .card:hover .card-ico,
  #features .card:focus-within .card-ico,
  #features .card:hover h3,
  #features .card:focus-within h3,
  #features .card:hover p,
  #features .card:focus-within p,
  #features .card-ico::before,
  #features .card-ico::after,
  #features .card:hover .card-ico::before,
  #features .card:focus-within .card-ico::before,
  #features .card:hover .card-ico::after,
  #features .card:focus-within .card-ico::after {
    transform: none;
    filter: none;
  }
  #features .card:hover .card-ico::before,
  #features .card:focus-within .card-ico::before {
    inset: 0;
    opacity: 0;
  }
  #features .card:hover .card-ico::after,
  #features .card:focus-within .card-ico::after {
    inset: 0;
    opacity: 0;
  }
  /* Tooltips are hover-only chrome — hide on touch */
  .has-tip::after,
  .has-tip::before,
  .thumb-add::after,
  .thumb-add::before {
    content: none;
  }
}

/* Prefer reduced data / very small screens: soften expensive filters a bit */
@media (max-width: 640px) {
  .glow-a,
  .glow-b {
    filter: blur(70px);
  }
  main > .section:nth-of-type(even)::before {
    filter: blur(36px);
  }
}

/* Extra-wide desktops: give content a touch more room */
@media (min-width: 1440px) {
  :root {
    --max: 1200px;
    --max-wide: 1320px;
  }
}

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .marquee-track { animation: none; will-change: auto; }
  .mb-eq i { animation: none; transform: scaleY(var(--h, 0.45)); }
  /* Flatten the feature-card 3D tilt; keep a quiet border/bg lift only */
  #features .grid { perspective: none; }
  #features .card,
  #features .card.reveal:not(.in),
  #features .card.reveal.in,
  #features .card:not(.reveal),
  #features .card:hover,
  #features .card:focus-within,
  #features .card.reveal.in:hover,
  #features .card.reveal.in:focus-within {
    transform: none;
  }
  #features .card:hover .card-ico,
  #features .card:focus-within .card-ico,
  #features .card:hover h3,
  #features .card:focus-within h3,
  #features .card:hover p,
  #features .card:focus-within p,
  #features .card-ico::before,
  #features .card-ico::after,
  #features .card:hover .card-ico::before,
  #features .card:focus-within .card-ico::before,
  #features .card:hover .card-ico::after,
  #features .card:focus-within .card-ico::after {
    transform: none;
  }
  #features .card:hover .card-ico::before,
  #features .card:focus-within .card-ico::before {
    inset: -6px;
  }
  #features .card:hover .card-ico::after,
  #features .card:focus-within .card-ico::after {
    inset: -12px;
  }
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
