/* ==========================================================================
   UltraPod home — everything below the first screen (web-src/home/*.js)
   ========================================================================== */

:root {
  --ink: #0a0b0a;
  --ivory: #ece7db;
  --lime: #c3ff6a;
  --violet: #b400ff;
  --copper: #d49a63;
  --gutter: clamp(20px, 5vw, 88px);
  --font-mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, monospace;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --line: color-mix(in srgb, currentColor 14%, transparent);
  --muted: color-mix(in srgb, currentColor 62%, transparent);
}

html { scroll-padding-top: 84px; }

body.home-remix {
  overflow-x: clip;
  color: var(--ivory);
  background: var(--ink);
}

body.home-remix main { position: relative; }

.entrance-stage { display: flex; opacity: 1; visibility: visible; }

/* Reading progress rail */
.revival-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 120;
  width: 2px;
  height: 100svh;
  background: rgba(255, 255, 255, 0.06);
  pointer-events: none;
}

.revival-progress-fill {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, var(--lime), var(--violet));
  transform: scaleY(0);
  transform-origin: top;
}

/* --------------------------------------------------------------------------
   Shared type & components
   -------------------------------------------------------------------------- */

.scene { position: relative; color: inherit; }

.eyebrow {
  display: flex;
  gap: 14px;
  align-items: center;
  margin: 0 0 clamp(18px, 2.2vw, 30px);
  color: var(--muted);
  font: 600 12px/1 var(--font-mono);
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.eyebrow__index {
  color: var(--lime);
}

.eyebrow__index::after {
  content: "";
  display: inline-block;
  width: 36px;
  height: 1px;
  margin-left: 14px;
  vertical-align: middle;
  background: currentColor;
  opacity: 0.6;
}

.display {
  max-width: 14ch;
  margin: 0;
  font-family: var(--font-display, "New York", "Iowan Old Style", Georgia, serif);
  font-size: clamp(44px, 6.2vw, 108px);
  font-weight: 600;
  line-height: 0.95;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

.display--xl { font-size: clamp(56px, 9vw, 168px); line-height: 0.9; }
.display--md { font-size: clamp(34px, 3.8vw, 68px); }

.lede {
  max-width: 44ch;
  margin: clamp(20px, 2.4vw, 32px) 0 0;
  color: var(--muted);
  font-size: clamp(16px, 1.25vw, 20px);
  line-height: 1.62;
}

.section-head { padding: 0 var(--gutter); }
.section-head--center { display: grid; justify-items: center; text-align: center; }
.section-head--center .display { max-width: 16ch; }
.section-head--center .lede { margin-inline: auto; }

.pill {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font: 600 11px/1 var(--font-mono);
  letter-spacing: 0.08em;
}

.btn-solid,
.btn-ghost {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 0 28px;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  transition: background-color 300ms var(--ease-out), color 300ms var(--ease-out), border-color 300ms var(--ease-out);
}

.btn-solid { color: var(--ink); background: var(--lime); }
.btn-solid:hover { background: #fff; }
.btn-solid svg { width: 22px; height: 22px; fill: currentColor; }
.btn-solid--xl { min-height: 72px; padding: 0 40px; font-size: 18px; }
.btn-ghost { border: 1px solid var(--line); color: inherit; }
.btn-ghost:hover { border-color: currentColor; }
.btn-ghost i { font-style: normal; transition: transform 300ms var(--ease-out); }
.btn-ghost:hover i { transform: translateX(4px); }

.section-cta { display: flex; justify-content: center; padding: clamp(40px, 6vw, 80px) var(--gutter) 0; }

.text-link {
  display: inline-block;
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  padding-bottom: 5px;
}

:is(.btn-solid, .btn-ghost, .text-link, .round-btn, .theme-orbit button):focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 4px;
}

/* A CSS-drawn device frame around real UltraPod screens (904 × 1967). */
.phone {
  position: relative;
  width: clamp(190px, 19vw, 330px);
  aspect-ratio: 904 / 1967;
  overflow: hidden;
  border-radius: 13.5% / 6.2%;
  background: #000;
  box-shadow:
    0 0 0 1.5px #3b3e3c,
    0 0 0 6px #111312,
    0 0 0 7px rgba(255, 255, 255, 0.14),
    0 50px 90px -30px rgba(0, 0, 0, 0.75);
}

.phone img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.phone--glow {
  box-shadow:
    0 0 0 1.5px #3b3e3c,
    0 0 0 6px #111312,
    0 0 0 7px rgba(255, 255, 255, 0.14),
    0 0 120px -10px color-mix(in srgb, var(--lime) 45%, transparent),
    0 60px 100px -30px rgba(0, 0, 0, 0.8);
}

.phone--stack img { position: absolute; inset: 0; opacity: 0; }
.phone--stack img.is-active { opacity: 1; }

/* Masked word / character reveals (split-heading.js) */
.split-mask {
  display: inline-block;
  overflow: hidden;
  overflow: clip;
  padding-bottom: 0.14em;
  margin-bottom: -0.14em;
  vertical-align: top;
}

.split-inner { display: inline-block; will-change: transform; }

[data-spotlight] {
  --mx: 50%;
  --my: 50%;
  position: relative;
  isolation: isolate;
}

[data-spotlight]::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: radial-gradient(420px circle at var(--mx) var(--my), color-mix(in srgb, var(--lime) 16%, transparent), transparent 60%);
  opacity: 0;
  transition: opacity 400ms var(--ease-out);
  pointer-events: none;
}

[data-spotlight]:hover::before { opacity: 1; }

/* --------------------------------------------------------------------------
   01 · Noise → silence
   -------------------------------------------------------------------------- */

.scene-noise { background: #070807; }

.noise-pin {
  position: relative;
  height: 100svh;
  overflow: hidden;
  background: radial-gradient(110% 80% at 68% 50%, #111812, #070807 62%);
}

.noise-bg {
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 3px),
    radial-gradient(60% 55% at 30% 40%, rgba(255, 45, 85, 0.28), transparent 70%),
    radial-gradient(55% 60% at 75% 65%, rgba(255, 106, 61, 0.2), transparent 70%),
    #120708;
  animation: noiseFlicker 180ms steps(2) infinite;
  pointer-events: none;
}

@keyframes noiseFlicker {
  0% { filter: brightness(1); }
  50% { filter: brightness(1.18); }
  100% { filter: brightness(0.92); }
}

.noise-word {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  transform-origin: 50% 50%;
}

.noise-word span {
  grid-area: 1 / 1;
  font-family: var(--font-display, Georgia, serif);
  font-size: 30vw;
  font-weight: 700;
  line-height: 0.8;
  letter-spacing: -0.06em;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(255, 255, 255, 0.22);
  mix-blend-mode: screen;
}

.noise-word span:nth-child(1) { -webkit-text-stroke-color: rgba(255, 45, 85, 0.55); animation: glitchA 1.1s steps(1) infinite; }
.noise-word span:nth-child(2) { -webkit-text-stroke-color: rgba(64, 210, 255, 0.45); animation: glitchB 0.9s steps(1) infinite; }

@keyframes glitchA {
  0%, 100% { transform: translate(-6px, 0); clip-path: inset(0 0 55% 0); }
  25% { transform: translate(8px, -3px); clip-path: inset(30% 0 20% 0); }
  50% { transform: translate(-3px, 4px); clip-path: inset(60% 0 0 0); }
  75% { transform: translate(5px, 0); clip-path: inset(10% 0 70% 0); }
}

@keyframes glitchB {
  0%, 100% { transform: translate(6px, 2px); clip-path: inset(50% 0 0 0); }
  33% { transform: translate(-9px, 0); clip-path: inset(0 0 60% 0); }
  66% { transform: translate(4px, -4px); clip-path: inset(25% 0 35% 0); }
}

.noise-wave { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

.noise-field { position: absolute; inset: 0; }

.noise-chip {
  position: absolute;
  top: 50%;
  left: 50%;
  display: inline-flex;
  gap: 9px;
  align-items: center;
  padding: 10px 16px 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.92);
  background: rgba(28, 30, 29, 0.9);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45);
  font: 600 14px/1 var(--font-sans, sans-serif);
  white-space: nowrap;
  cursor: pointer;
  will-change: transform, opacity;
}

.noise-chip.is-far { filter: blur(2px); }
.noise-chip.is-near { filter: blur(3px); }

.noise-chip__icon {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  font-size: 13px;
  background: var(--chip-tint, #444);
}

.noise-chip b {
  min-width: 20px;
  padding: 3px 7px;
  border-radius: 999px;
  color: #fff;
  background: #ff3b30;
  font-size: 11px;
  text-align: center;
}

.noise-shock {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 60;
  width: 22vmin;
  height: 22vmin;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  box-shadow: 0 0 60px 10px rgba(195, 255, 106, 0.35), inset 0 0 40px rgba(255, 255, 255, 0.3);
  opacity: 0;
  translate: -50% -50%;
  pointer-events: none;
}

.noise-device {
  position: absolute;
  top: 50%;
  left: 68%;
  z-index: 50;
  translate: -50% -50%;
}

.noise-device .phone { width: clamp(210px, 21vw, 340px); }

.noise-copy {
  position: absolute;
  bottom: clamp(48px, 12svh, 140px);
  left: var(--gutter);
  z-index: 55;
  width: min(52vw, 820px);
}

.noise-copy .display { max-width: 11ch; }

.noise-prompt {
  position: absolute;
  bottom: 36px;
  left: 50%;
  z-index: 70;
  display: grid;
  justify-items: center;
  gap: 12px;
  margin: 0;
  color: #fff;
  font: 700 11px/1 var(--font-mono);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  translate: -50% 0;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.8);
}

.noise-prompt i {
  width: 1px;
  height: 46px;
  background: linear-gradient(#fff, transparent);
  animation: promptDrop 1.4s var(--ease-out) infinite;
  transform-origin: top;
}

@keyframes promptDrop {
  0% { transform: scaleY(0); opacity: 1; }
  70% { transform: scaleY(1); opacity: 1; }
  100% { transform: scaleY(1); opacity: 0; }
}

.noise-meter {
  position: absolute;
  top: calc(var(--nav-height, 72px) + 28px);
  right: var(--gutter);
  z-index: 70;
  display: grid;
  grid-template-columns: auto auto;
  gap: 6px 14px;
  align-items: baseline;
  font-family: var(--font-mono);
}

.noise-meter__label { color: var(--muted); font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; }
.noise-meter__value { color: #ff4d42; font-size: clamp(34px, 3.4vw, 54px); font-variant-numeric: tabular-nums; text-align: right; text-shadow: 0 0 24px rgba(255, 60, 50, 0.6); transition: color 400ms, text-shadow 400ms; }
.noise-meter.is-calm .noise-meter__value { color: var(--lime); text-shadow: 0 0 24px rgba(195, 255, 106, 0.5); }
.noise-meter__bar { grid-column: 1 / -1; width: 200px; height: 2px; background: rgba(255, 255, 255, 0.1); }
.noise-meter__bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--lime), #ff4d42); transform-origin: left; }

/* --------------------------------------------------------------------------
   02 · Sources
   -------------------------------------------------------------------------- */

.scene-sources { padding: clamp(80px, 14svh, 160px) 0 clamp(90px, 16svh, 180px); overflow: hidden; }

.sources-marquee {
  margin-bottom: clamp(50px, 8vw, 120px);
  overflow: hidden;
  font-family: var(--font-display, Georgia, serif);
  font-size: clamp(80px, 13vw, 240px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.05em;
  white-space: nowrap;
}

.marquee-track {
  display: inline-flex;
  gap: 0.35em;
  align-items: center;
  padding-right: 0.35em;
  will-change: transform;
}

.marquee-track span {
  color: transparent;
  -webkit-text-stroke: 1.2px color-mix(in srgb, var(--ivory) 55%, transparent);
}

.marquee-track span:nth-of-type(2n) { color: var(--ivory); -webkit-text-stroke: 0; }
.marquee-track i { color: var(--lime); font-size: 0.4em; font-style: normal; }

.source-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(14px, 1.6vw, 24px);
  margin-top: clamp(40px, 5vw, 72px);
  padding: 0 var(--gutter);
}

.source-card {
  display: grid;
  align-content: start;
  gap: 14px;
  min-height: 340px;
  padding: clamp(26px, 2.6vw, 40px);
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.025);
}

.source-card__index { color: var(--muted); font: 600 12px/1 var(--font-mono); letter-spacing: 0.2em; }
.source-card__icon { width: 52px; height: 52px; margin: 26px 0 8px; fill: none; stroke: var(--lime); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.source-card h3 { margin: 0; font-family: var(--font-display, Georgia, serif); font-size: clamp(26px, 2.2vw, 36px); font-weight: 600; letter-spacing: -0.03em; }
.source-card p { margin: 0 0 14px; color: var(--muted); line-height: 1.6; }
.source-card .pill { justify-self: start; margin-top: auto; }

/* --------------------------------------------------------------------------
   03 · The wheel (ivory stage)
   -------------------------------------------------------------------------- */

.scene-wheel { color: var(--ink); background: var(--ivory); }
.scene-wheel .eyebrow__index { color: #5c7d1f; }

.wheel-pin {
  position: relative;
  display: grid;
  grid-template-columns: 44vw minmax(0, 1fr) 26vw;
  gap: clamp(20px, 2.4vw, 44px);
  align-items: center;
  height: 100svh;
  padding: calc(var(--nav-height, 72px) + 20px) var(--gutter) 40px 0;
  overflow: hidden;
}

/* The wheel is a backdrop object: absolutely placed, half off the left edge. */
.wheel-giant {
  position: absolute;
  top: 50%;
  left: -34vmin;
  width: 100vmin;
  max-width: none;
  transform: translateY(-50%);
  filter: drop-shadow(0 50px 70px rgba(0, 0, 0, 0.28));
}

.wheel-giant svg { display: block; width: 100%; height: auto; overflow: visible; }
.wheel-giant text { fill: rgba(255, 255, 255, 0.62); font: 700 30px/1 var(--font-sans, sans-serif); letter-spacing: 0.08em; }
.wheel-giant line { stroke: rgba(255, 255, 255, 0.16); stroke-width: 2; }
.wheel-giant line.is-major { stroke: var(--lime); stroke-width: 3; }

.wheel-copy { position: relative; z-index: 2; grid-column: 2; }
.wheel-copy .display { max-width: 11ch; font-size: clamp(34px, 3.3vw, 60px); }

.wheel-steps {
  display: grid;
  gap: 0;
  margin: clamp(30px, 4svh, 50px) 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.wheel-steps li {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 2px 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  opacity: 0.32;
  transition: opacity 400ms var(--ease-out);
}

.wheel-steps li.is-active { opacity: 1; }
.wheel-steps span { grid-row: span 2; font: 600 12px/1.7 var(--font-mono); }
.wheel-steps strong { font-size: 18px; }
.wheel-steps em { color: var(--muted); font-style: normal; font-size: 14px; }

.wheel-device { position: relative; z-index: 2; grid-column: 3; display: grid; place-items: center; }
.wheel-device .phone { width: clamp(200px, 19vw, 320px); }

/* --------------------------------------------------------------------------
   04 · Rail (horizontal on desktop)
   -------------------------------------------------------------------------- */

.rail-pin { position: relative; height: 100svh; overflow: hidden; }

.rail-track {
  display: flex;
  width: max-content;
  height: 100%;
  will-change: transform;
}

.rail-intro {
  display: grid;
  align-content: center;
  width: 72vw;
  padding: 0 var(--gutter);
}

.rail-hint {
  display: inline-flex;
  gap: 14px;
  align-items: center;
  margin-top: 48px;
  color: var(--muted);
  font: 600 11px/1 var(--font-mono);
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.rail-hint i { width: 64px; height: 1px; background: currentColor; }

.rail-panel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(20px, 3vw, 60px);
  align-items: center;
  width: 100vw;
  height: 100%;
  padding: calc(var(--nav-height, 72px) + 30px) var(--gutter) 60px;
  overflow: hidden;
}

.rail-panel--fitness { color: var(--ivory); background: #0c1a0f; }
.rail-panel--reading { color: #1c1b17; background: #ebe4d3; }
.rail-panel--widgets { color: var(--ivory); background: #1b120d; }
.rail-panel--more { grid-template-columns: minmax(0, 0.5fr) minmax(0, 1.5fr); width: 100vw; color: var(--ivory); background: var(--ink); }
.rail-panel--reading .eyebrow { color: #6f6451; }
.rail-panel--widgets .eyebrow span { color: var(--copper); }

.rail-panel__word {
  position: absolute;
  right: -2vw;
  bottom: -0.2em;
  z-index: 0;
  font-family: var(--font-display, Georgia, serif);
  font-size: 34vw;
  font-weight: 600;
  line-height: 0.8;
  letter-spacing: -0.06em;
  color: transparent;
  -webkit-text-stroke: 1.4px color-mix(in srgb, currentColor 16%, transparent);
  pointer-events: none;
  user-select: none;
}

.rail-panel__copy { position: relative; z-index: 2; max-width: 560px; }
.rail-panel__copy > p:not(.eyebrow) { max-width: 40ch; margin: 24px 0 0; color: var(--muted); font-size: clamp(16px, 1.2vw, 19px); line-height: 1.62; }

.rail-panel__media {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  gap: clamp(16px, 2vw, 36px);
}

.phone--tilt-left { transform: rotate(-5deg) translateY(4%); }
.phone--tilt-right { transform: rotate(4deg) translateY(-6%); }

.route {
  position: absolute;
  inset: 12% 4% 8% 36%;
  z-index: 1;
  width: 60%;
  height: auto;
  overflow: visible;
  pointer-events: none;
}

.route path { fill: none; stroke: var(--lime); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; filter: drop-shadow(0 0 12px rgba(195, 255, 106, 0.6)); }
.route__dot { fill: var(--lime); }

.stat-row {
  display: grid;
  grid-template-columns: repeat(3, auto);
  gap: 0 clamp(20px, 3vw, 44px);
  justify-content: start;
  margin: 36px 0 0;
}

.stat-row dt { color: var(--muted); font: 600 11px/1 var(--font-mono); letter-spacing: 0.18em; text-transform: uppercase; }
.stat-row dd { margin: 10px 0 0; color: var(--lime); font-family: var(--font-display, Georgia, serif); font-size: clamp(30px, 2.6vw, 44px); }

.tool-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(14px, 1.6vw, 28px);
}

.tool-card {
  display: grid;
  gap: 18px;
  justify-items: center;
  margin: 0;
  padding: 26px 16px 22px;
  border: 1px solid var(--line);
  border-radius: 28px;
}

.tool-card .phone { width: 100%; max-width: min(190px, 22svh); }
.tool-card figcaption { display: grid; gap: 6px; text-align: center; }
.tool-card strong { font-size: 18px; }
.tool-card span { color: var(--muted); font-size: 14px; }

.rail-progress {
  position: absolute;
  right: var(--gutter);
  bottom: 28px;
  left: var(--gutter);
  z-index: 5;
  height: 2px;
  background: rgba(255, 255, 255, 0.12);
  mix-blend-mode: difference;
}

.rail-progress i { display: block; height: 100%; background: #fff; transform: scaleX(0); transform-origin: left; }

/* --------------------------------------------------------------------------
   05 · Themes — 3D carousel (web-src/home/themes.js)
   -------------------------------------------------------------------------- */

.scene-themes { --theme-bg: #2a3150; --theme-ink: var(--ivory); color: var(--theme-ink); }

.themes-stage {
  position: relative;
  height: 100svh;
  min-height: 640px;
  overflow: hidden;
  transition: color 700ms var(--ease-out);
}

.themes-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(55% 60% at 50% 62%, color-mix(in srgb, #fff 22%, var(--theme-bg)), transparent 72%),
    var(--theme-bg);
}

.theme-word {
  position: absolute;
  top: 52%;
  left: 50%;
  display: flex;
  font-family: var(--font-display, Georgia, serif);
  font-size: clamp(120px, 19vw, 340px);
  font-weight: 700;
  line-height: 0.8;
  letter-spacing: -0.05em;
  white-space: nowrap;
  translate: -50% -50%;
  pointer-events: none;
}

.theme-word span {
  display: inline-block;
  color: transparent;
  -webkit-text-stroke: 1.5px color-mix(in srgb, var(--theme-ink) 34%, transparent);
}

.themes-copy {
  position: absolute;
  top: calc(var(--nav-height, 72px) + 24px);
  left: var(--gutter);
  z-index: 5;
  width: min(34vw, 520px);
}

.themes-copy .display { max-width: 10ch; font-size: clamp(36px, 3.6vw, 64px); }
.themes-copy .lede { max-width: 32ch; font-size: clamp(14px, 1vw, 17px); }

.theme-carousel {
  --card-width: clamp(118px, 11.5vw, 190px);
  position: absolute;
  top: 56%;
  left: 55%;
  z-index: 3;
  width: var(--card-width);
  aspect-ratio: 904 / 1967;
  translate: -50% -50%;
  perspective: 1800px;
  cursor: grab;
  touch-action: pan-y;
}

.theme-carousel:active { cursor: grabbing; }

.theme-ring {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  will-change: transform;
}

.theme-card {
  --shade: 0;
  position: absolute;
  inset: 0;
  padding: 0;
  border: 0;
  border-radius: 13.5% / 6.2%;
  background: #000;
  box-shadow: 0 0 0 1.5px #3b3e3c, 0 0 0 5px #111312, 0 40px 60px -24px rgba(0, 0, 0, 0.6);
  cursor: inherit;
  backface-visibility: visible;
  overflow: hidden;
}

.theme-card img { display: block; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.theme-card::after { content: ""; position: absolute; inset: 0; background: #000; opacity: var(--shade); pointer-events: none; }
.theme-card:focus-visible { outline: 3px solid var(--lime); outline-offset: 6px; }

.theme-now {
  position: absolute;
  right: var(--gutter);
  bottom: calc(clamp(64px, 11svh, 110px) + 40px);
  z-index: 5;
  display: grid;
  justify-items: end;
  gap: 8px;
  text-align: right;
}

.theme-now__count { color: var(--muted); font: 600 13px/1 var(--font-mono); letter-spacing: 0.16em; }
.theme-now__count b { color: inherit; }
.theme-now__name { font-family: var(--font-display, Georgia, serif); font-size: clamp(34px, 3.4vw, 60px); font-weight: 600; letter-spacing: -0.03em; }

.theme-dock {
  position: absolute;
  bottom: clamp(24px, 4svh, 44px);
  left: 50%;
  z-index: 5;
  display: flex;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid color-mix(in srgb, currentColor 18%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--theme-bg) 60%, rgba(0, 0, 0, 0.4));
  translate: -50% 0;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.theme-dock button {
  width: clamp(30px, 2.8vw, 44px);
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  opacity: 0.6;
  transform: translateY(0) scale(1);
  transition: transform 450ms cubic-bezier(0.34, 1.56, 0.64, 1), opacity 300ms;
}

.theme-dock button img { display: block; width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.theme-dock button:hover { opacity: 1; transform: translateY(-6px) scale(1.18); }
.theme-dock button.is-active { opacity: 1; transform: translateY(-10px) scale(1.34); }
.theme-dock button:focus-visible { outline: 2px solid var(--lime); outline-offset: 4px; border-radius: 10px; }

/* --------------------------------------------------------------------------
   06 · Looks
   -------------------------------------------------------------------------- */

.scene-looks { padding: clamp(100px, 16svh, 180px) 0; overflow: hidden; }

.looks-rows {
  display: grid;
  gap: clamp(14px, 1.6vw, 24px);
  margin-top: clamp(50px, 7vw, 100px);
  transform: rotate(-4deg) scale(1.08);
}

.looks-row { display: flex; gap: clamp(14px, 1.6vw, 24px); width: max-content; will-change: transform; }

.looks-row img {
  display: block;
  width: auto;
  height: clamp(220px, 30svh, 360px);
  aspect-ratio: 480 / 853;
  border-radius: 22px;
  object-fit: cover;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.8);
}

/* --------------------------------------------------------------------------
   07 · Privacy
   -------------------------------------------------------------------------- */

.scene-privacy { background: #050605; }

.privacy-pin {
  position: relative;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: clamp(30px, 5svh, 56px);
  height: 100svh;
  padding: calc(var(--nav-height, 72px) + 20px) var(--gutter) 40px;
  overflow: hidden;
  text-align: center;
}

.privacy-field { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.privacy-pin > :not(canvas) { position: relative; z-index: 1; }

.odometers {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(16px, 3vw, 56px);
  width: min(100%, 1180px);
}

.odometer { display: grid; justify-items: center; gap: 14px; }
.odometer > span { color: var(--muted); font: 600 11px/1.4 var(--font-mono); letter-spacing: 0.16em; text-transform: uppercase; }

.odometer__digits {
  display: flex;
  -webkit-mask-image: linear-gradient(transparent, #000 22%, #000 78%, transparent);
  mask-image: linear-gradient(transparent, #000 22%, #000 78%, transparent);
  height: 1em;
  overflow: hidden;
  color: var(--lime);
  font-family: var(--font-display, Georgia, serif);
  font-size: clamp(64px, 8vw, 150px);
  font-weight: 600;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.odometer__col { display: flex; flex-direction: column; align-self: flex-start; transition: opacity 400ms var(--ease-out); will-change: transform; }
.odometer__col span { display: block; height: 1em; }

.privacy-note { max-width: 58ch; margin: 0; color: var(--muted); line-height: 1.6; }

/* --------------------------------------------------------------------------
   08 · Reuse (ivory)
   -------------------------------------------------------------------------- */

.scene-reuse { display: grid; align-items: center; min-height: 100svh; color: var(--ink); background: var(--ivory); padding: calc(var(--nav-height, 72px) + 20px) var(--gutter) 40px; }


.reuse-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(40px, 6vw, 120px);
  align-items: center;
  max-width: 1320px;
  margin: 0 auto;
}

.reuse-hint { margin-top: 40px; color: var(--muted); font: 600 11px/1 var(--font-mono); letter-spacing: 0.22em; text-transform: uppercase; }

.compare {
  --pos: 50%;
  position: relative;
  width: min(26vw, 34svh, 400px);
  min-width: 220px;
  aspect-ratio: 904 / 1967;
  border-radius: 13.5% / 6.2%;
  overflow: hidden;
  cursor: ew-resize;
  touch-action: pan-y;
  box-shadow: 0 0 0 1.5px #3b3e3c, 0 0 0 7px #111312, 0 60px 90px -30px rgba(0, 0, 0, 0.5);
}

.compare__side { position: absolute; inset: 0; }
.compare__side img { width: 100%; height: 100%; object-fit: cover; }
.compare__side--before { z-index: 2; clip-path: inset(0 calc(100% - var(--pos)) 0 0); background: #1b1c1e; }

.clutter {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 9% 8%;
  padding: 22% 9% 0;
  filter: grayscale(0.35);
}

.clutter i {
  position: relative;
  aspect-ratio: 1;
  border-radius: 24%;
  background: var(--tile, #555);
}

.clutter i b {
  position: absolute;
  top: -18%;
  right: -18%;
  min-width: 46%;
  padding: 6% 12%;
  border-radius: 999px;
  color: #fff;
  background: #ff3b30;
  font: 700 clamp(8px, 0.7vw, 11px)/1 var(--font-sans, sans-serif);
  text-align: center;
}

.clutter em {
  position: absolute;
  left: 6%;
  right: 6%;
  padding: 5% 6%;
  border-radius: 14px;
  color: #111;
  background: rgba(240, 240, 240, 0.94);
  font: 600 clamp(9px, 0.75vw, 12px)/1.3 var(--font-sans, sans-serif);
  font-style: normal;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.25);
}

.compare__tag {
  position: absolute;
  top: 5%;
  z-index: 3;
  padding: 6px 10px;
  border-radius: 999px;
  color: #fff;
  background: rgba(0, 0, 0, 0.55);
  font: 600 10px/1 var(--font-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.compare__side--before .compare__tag { left: 7%; }
.compare__side--after .compare__tag { right: 7%; color: var(--ink); background: var(--lime); }

.compare__handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--pos);
  z-index: 4;
  width: 2px;
  margin-left: -1px;
  background: #fff;
  pointer-events: none;
}

.compare__handle i {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  color: var(--ink);
  background: #fff;
  font-style: normal;
  transform: translate(-50%, -50%);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* --------------------------------------------------------------------------
   09 · Pricing
   -------------------------------------------------------------------------- */

.scene-pricing { display: grid; align-content: center; min-height: 100svh; padding: calc(var(--nav-height, 72px) + 24px) 0 48px; }
.scene-pricing .display { font-size: clamp(40px, 4.6vw, 80px); }
.scene-pricing .lede { margin-top: 16px; }
.scene-pricing .section-cta { padding-top: clamp(24px, 4svh, 48px); }

.price-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(14px, 1.6vw, 24px);
  max-width: 1280px;
  margin: clamp(28px, 4svh, 56px) auto 0;
  padding: 0 var(--gutter);
  perspective: 1200px;
}

.price-card {
  display: grid;
  align-content: start;
  gap: 18px;
  min-height: 0;
  padding: clamp(24px, 2.4vw, 38px);
  border: 1px solid var(--line);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.025);
  transform-style: preserve-3d;
  will-change: transform;
}

.price-card__tier { color: var(--muted); font: 600 12px/1 var(--font-mono); letter-spacing: 0.2em; text-transform: uppercase; }
.price-card__amount { font-family: var(--font-display, Georgia, serif); font-size: clamp(48px, 4.6vw, 80px); font-weight: 600; letter-spacing: -0.04em; line-height: 1; }
.price-card ul { display: grid; gap: 12px; margin: 10px 0 0; padding: 22px 0 0; border-top: 1px solid var(--line); list-style: none; }
.price-card li { position: relative; padding-left: 22px; color: var(--muted); line-height: 1.5; }
.price-card li::before { content: ""; position: absolute; top: 0.62em; left: 0; width: 8px; height: 8px; border-radius: 50%; background: var(--lime); }

@property --spin {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

.price-card--featured {
  border-color: transparent;
  background:
    linear-gradient(#101210, #101210) padding-box,
    conic-gradient(from var(--spin), var(--lime), var(--violet), #ff6a3d, var(--lime)) border-box;
  animation: spinBorder 6s linear infinite;
}

@keyframes spinBorder { to { --spin: 360deg; } }

.price-card__badge {
  justify-self: start;
  padding: 7px 12px;
  border-radius: 999px;
  color: var(--ink);
  background: var(--lime);
  font: 700 11px/1 var(--font-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   10 · FAQ
   -------------------------------------------------------------------------- */

.scene-faq {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(40px, 8vw, 140px);
  padding: clamp(90px, 14svh, 160px) var(--gutter);
  border-top: 1px solid var(--line);
}

.scene-faq .section-head { padding: 0; }
.scene-faq .display { max-width: 10ch; font-size: clamp(40px, 4.6vw, 80px); }
.scene-faq .faq-list { display: block; margin: 0; border-top: 1px solid var(--line); }

.scene-faq details {
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  transition: none;
}

.scene-faq summary {
  display: flex;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
  min-height: 92px;
  font-size: clamp(18px, 1.5vw, 23px);
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.scene-faq summary::after { content: none; }
.scene-faq summary::-webkit-details-marker { display: none; }

.scene-faq summary i {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 50%;
  font-style: normal;
  transition: transform 400ms var(--ease-out), background-color 400ms var(--ease-out), color 400ms var(--ease-out);
}

.scene-faq details[open] summary i { color: var(--ink); background: var(--lime); transform: rotate(45deg); }
.scene-faq details.is-closing summary i { color: inherit; background: transparent; transform: none; }
.scene-faq details p { max-width: 62ch; margin: 0; padding: 0 60px 30px 0; color: var(--muted); line-height: 1.7; }

/* --------------------------------------------------------------------------
   11 · Outro (lime)
   -------------------------------------------------------------------------- */

.scene-outro {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 100svh;
  padding: 120px var(--gutter);
  overflow: hidden;
  color: var(--ink);
  background: var(--lime);
}

.outro-mark { color: var(--ink); }
.outro-inner { position: relative; z-index: 1; display: grid; justify-items: center; gap: clamp(30px, 4svh, 50px); text-align: center; }

.outro-title {
  max-width: 9ch;
  margin: 0;
  font-family: var(--font-display, Georgia, serif);
  font-size: clamp(72px, 15vw, 280px);
  font-weight: 600;
  line-height: 0.84;
  letter-spacing: -0.06em;
}

.scene-outro .btn-solid { color: var(--lime); background: var(--ink); }
.scene-outro .btn-solid:hover { color: var(--ink); background: #fff; }
.outro-note { margin: 0; font: 600 12px/1 var(--font-mono); letter-spacing: 0.16em; text-transform: uppercase; opacity: 0.7; }

.site-footer { color: var(--ivory); background: var(--ink); }

/* --------------------------------------------------------------------------
   Grain + cursor
   -------------------------------------------------------------------------- */

.grain {
  position: fixed;
  inset: -50%;
  z-index: 150;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  pointer-events: none;
  animation: grain 1.2s steps(6) infinite;
}

@keyframes grain {
  0% { transform: translate(0, 0); }
  20% { transform: translate(-4%, 3%); }
  40% { transform: translate(3%, -5%); }
  60% { transform: translate(-6%, -2%); }
  80% { transform: translate(5%, 4%); }
  100% { transform: translate(0, 0); }
}

.cursor { display: none; }

@media (hover: hover) and (pointer: fine) {
  .cursor {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 300;
    display: grid;
    place-items: center;
    width: 0;
    height: 0;
    pointer-events: none;
    mix-blend-mode: difference;
  }

  .cursor__dot {
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #fff;
    transform: translate(-50%, -50%) scale(var(--cursor-scale, 1));
    transition: transform 380ms var(--ease-out);
  }

  .cursor__label {
    position: absolute;
    color: #000;
    font: 700 10px/1 var(--font-mono);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    white-space: nowrap;
    opacity: 0;
    transform: translate(-50%, -50%);
    transition: opacity 250ms var(--ease-out);
  }

  .cursor.is-hover { --cursor-scale: 4.2; }
  .cursor.has-label { --cursor-scale: 7; }
  .cursor.has-label .cursor__label { opacity: 1; }
  .cursor.is-hidden { opacity: 0; }
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1024px) {
  .source-grid { grid-template-columns: 1fr; }
  .source-card { min-height: 0; }
  .price-grid { grid-template-columns: 1fr; max-width: 560px; }
  .price-card { min-height: 0; }
  .odometers { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 768px) {
  .display { font-size: clamp(40px, 11vw, 64px); }
  .display--xl { font-size: clamp(48px, 14vw, 80px); }

  .noise-device { top: 34%; left: 50%; }
  .noise-device .phone { width: 36vw; }
  .noise-word span { font-size: 38vw; }
  .noise-chip { font-size: 12px; padding: 8px 12px 8px 9px; }
  .noise-prompt { display: none; }
  .noise-copy { bottom: 40px; width: calc(100% - 2 * var(--gutter)); }
  .noise-meter { top: calc(var(--nav-height, 72px) + 14px); }
  .noise-meter__value { font-size: 22px; }
  .noise-meter__bar { width: 110px; }

  .wheel-pin { grid-template-columns: 1fr; grid-template-rows: auto auto; align-content: center; padding: calc(var(--nav-height, 72px) + 16px) var(--gutter) 30px; }
  .wheel-pin { align-content: start; }
  .wheel-giant { top: 84%; left: -38vw; width: 112vw; }
  .wheel-copy { grid-column: 1; }
  .wheel-steps li:not(.is-active) { display: none; }
  .wheel-copy .display { font-size: clamp(34px, 9vw, 52px); }
  .wheel-steps li { padding: 10px 0; }
  .wheel-steps em { display: none; }
  .wheel-device { position: absolute; right: var(--gutter); bottom: 30px; }
  .wheel-device .phone { width: 36vw; }

  .rail-pin { height: auto; overflow: visible; }
  .rail-track { flex-direction: column; width: 100%; }
  .rail-intro { width: 100%; padding: 120px var(--gutter) 80px; }
  .rail-hint, .rail-progress { display: none; }
  .rail-panel, .rail-panel--more { grid-template-columns: 1fr; width: 100%; height: auto; padding: 90px var(--gutter); }
  .rail-panel__word { font-size: 48vw; }
  .route { inset: auto 0 10% auto; width: 100%; }
  .phone--tilt-left, .phone--tilt-right { width: 40vw; }
  .tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .themes-copy { width: calc(100% - 2 * var(--gutter)); }
  .themes-copy .lede { display: none; }
  .theme-carousel { --card-width: 21vw; top: 50%; left: 50%; perspective: 1100px; }
  .theme-word { top: 50%; font-size: 30vw; }
  .theme-now { right: auto; left: 50%; bottom: 92px; justify-items: center; text-align: center; translate: -50% 0; }
  .theme-now__name { font-size: 34px; }
  .theme-dock { left: var(--gutter); right: var(--gutter); bottom: 24px; justify-content: flex-start; gap: 10px; padding: 12px 14px 8px; max-width: none; overflow-x: auto; translate: 0 0; scrollbar-width: none; }
  .theme-dock::-webkit-scrollbar { display: none; }
  .theme-dock button { flex: 0 0 30px; width: 30px; }
  .theme-dock button.is-active { transform: translateY(-2px) scale(1.2); }

  .odometers { gap: 30px 16px; }
  .reuse-layout { grid-template-columns: 1fr; justify-items: center; }
  .compare { width: 68vw; }
  .scene-faq { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  /* No pinned horizontal travel: the rail stacks so every panel stays reachable. */
  .rail-pin { height: auto; overflow: visible; }
  .rail-track { flex-direction: column; width: 100%; }
  .rail-intro { width: 100%; padding: 120px var(--gutter) 80px; }
  .rail-hint, .rail-progress { display: none; }
  .rail-panel, .rail-panel--more { width: 100%; height: auto; min-height: 100svh; }

  .grain, .price-card--featured { animation: none; }
  .route path { stroke-dashoffset: 0; }
  .cursor { display: none !important; }
}

.typewriter .caret {
  display: inline-block;
  width: 2px;
  height: 1.05em;
  margin: 0 1px -0.15em;
  background: currentColor;
  animation: caretBlink 900ms steps(1) infinite;
}

@keyframes caretBlink { 50% { opacity: 0; } }

/* Scene index (web-src/home/director.js) */
.scene-index {
  position: fixed;
  top: 50%;
  right: 18px;
  z-index: 110;
  display: grid;
  gap: 2px;
  opacity: 0;
  pointer-events: none;
  transform: translate(12px, -50%);
  transition: opacity 500ms var(--ease-out), transform 500ms var(--ease-out);
  mix-blend-mode: difference;
}

.scene-index.is-visible { opacity: 1; pointer-events: auto; transform: translate(0, -50%); }

.scene-index button {
  display: grid;
  grid-template-columns: auto auto;
  gap: 2px 10px;
  justify-content: end;
  align-items: center;
  padding: 5px 4px;
  border: 0;
  color: #fff;
  background: transparent;
  cursor: pointer;
  opacity: 0.38;
  transition: opacity 300ms var(--ease-out);
}

.scene-index button:hover,
.scene-index button.is-active { opacity: 1; }
.scene-index__num { order: 2; font: 700 10px/1 var(--font-mono); letter-spacing: 0.1em; }
.scene-index__label {
  order: 1;
  max-width: 0;
  overflow: hidden;
  font: 600 11px/1 var(--font-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: max-width 500ms var(--ease-out);
}

.scene-index button.is-active .scene-index__label,
.scene-index:hover .scene-index__label { max-width: 160px; }
.scene-index__ticks { grid-column: 1 / -1; display: flex; gap: 3px; justify-content: flex-end; height: 0; overflow: hidden; transition: height 300ms var(--ease-out); }
.scene-index button.is-active .scene-index__ticks { height: 6px; margin-top: 4px; }
.scene-index__ticks i { width: 6px; height: 2px; background: rgba(255, 255, 255, 0.35); transition: background-color 300ms; }
.scene-index__ticks i.is-on { background: #fff; }

@media (max-width: 768px) {
  .scene-index { display: none; }
}

/* --------------------------------------------------------------------------
   Source emblems (web-src/home/emblems.js)
   -------------------------------------------------------------------------- */

.source-card__emblem {
  display: grid;
  place-items: center;
  height: 200px;
  margin: 8px -10px 12px;
  border-radius: 20px;
  background:
    radial-gradient(70% 90% at 50% 45%, color-mix(in srgb, var(--emblem-tint, var(--lime)) 16%, transparent), transparent 70%);
}

.source-card:nth-child(2) { --emblem-tint: #ff6a3d; }
.source-card:nth-child(3) { --emblem-tint: #8b5cff; }

.emblem { width: 100%; max-width: 280px; height: auto; overflow: visible; }

/* Vinyl */
.emblem-vinyl__disc { transform-origin: 120px 96px; transform-box: view-box; animation: spin 5.5s linear infinite; }
.emblem-vinyl__body { fill: #101211; stroke: rgba(255, 255, 255, 0.14); }
.emblem-vinyl__grooves circle { fill: none; stroke: rgba(255, 255, 255, 0.07); }
.emblem-vinyl__shine { fill: none; stroke: rgba(255, 255, 255, 0.35); stroke-width: 3; stroke-linecap: round; }
.emblem-vinyl__label { fill: var(--lime); }
.emblem-vinyl__hole { fill: #101211; }
.emblem-vinyl__note { fill: none; stroke: #101211; stroke-width: 2.2; stroke-linejoin: round; }
.emblem-vinyl__note-dot { fill: #101211; }
.emblem-vinyl__arm { fill: none; stroke: rgba(236, 231, 219, 0.8); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; transform-origin: 214px 26px; transform-box: view-box; animation: armDrop 5.5s var(--ease-out) infinite; }
.emblem-vinyl__arm circle, .emblem-vinyl__arm rect { fill: #2a2d2b; }
.emblem-notes { fill: var(--lime); stroke: var(--lime); stroke-width: 2; }
.emblem-notes > * { animation: noteRise 2.8s ease-in infinite; }
.emblem-notes > :nth-child(n + 4) { animation-delay: 0.9s; }
.emblem-notes > :nth-child(n + 6) { animation-delay: 1.8s; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes armDrop { 0%, 8% { transform: rotate(-14deg); } 22%, 88% { transform: rotate(0deg); } 100% { transform: rotate(-14deg); } }
@keyframes noteRise { 0% { opacity: 0; transform: translateY(18px); } 25% { opacity: 1; } 100% { opacity: 0; transform: translateY(-44px); } }

/* Files */
.emblem-file rect:first-child { fill: #1a1c1b; stroke: rgba(255, 255, 255, 0.16); }
.emblem-file__wave rect { fill: #ff6a3d; transform-origin: center; transform-box: fill-box; animation: bar 0.9s ease-in-out infinite alternate; }
.emblem-file__wave rect:nth-child(2n) { animation-delay: -0.3s; }
.emblem-file__wave rect:nth-child(3n) { animation-delay: -0.6s; }
.emblem-file__line { stroke: rgba(255, 255, 255, 0.3); stroke-width: 4; stroke-linecap: round; }
.emblem-file { transform-box: view-box; transform-origin: 120px 130px; transition: transform 600ms var(--ease-out); }
.emblem-file--3 { transform: translate(-18px, -18px) rotate(-8deg); opacity: 0.45; }
.emblem-file--2 { transform: translate(-9px, -9px) rotate(-4deg); opacity: 0.7; }
.emblem-file--3 .emblem-file__wave, .emblem-file--2 .emblem-file__wave { opacity: 0.4; }
.source-card:hover .emblem-file--3 { transform: translate(-48px, -26px) rotate(-16deg); }
.source-card:hover .emblem-file--2 { transform: translate(-24px, -14px) rotate(-8deg); }
.source-card:hover .emblem-file--1 { transform: translate(10px, 4px) rotate(3deg); }
.emblem-offline circle:first-child { fill: #ff6a3d; }
.emblem-offline path { fill: none; stroke: #101211; stroke-width: 2.6; stroke-linecap: round; }
.emblem-offline__dot { fill: #101211; }
.emblem-offline { transform-origin: 178px 142px; transform-box: view-box; animation: pop 2.6s var(--ease-out) infinite; }

@keyframes bar { from { transform: scaleY(0.35); } to { transform: scaleY(1); } }
@keyframes pop { 0%, 60%, 100% { transform: scale(1); } 70% { transform: scale(1.14); } 80% { transform: scale(0.96); } }

/* Server */
.emblem-rack__unit { fill: #181a19; stroke: rgba(255, 255, 255, 0.16); }
.emblem-rack__vent { stroke: rgba(255, 255, 255, 0.18); stroke-width: 2.4; stroke-linecap: round; }
.emblem-led { fill: #8b5cff; animation: led 1.2s steps(1) infinite; }
.emblem-led--2 { animation-delay: 0.3s; fill: var(--lime); }
.emblem-led--3 { animation-delay: 0.7s; }
.emblem-led--4 { animation-delay: 0.15s; fill: var(--lime); }
.emblem-led--5 { animation-delay: 0.55s; }
.emblem-led--6 { animation-delay: 0.9s; fill: var(--lime); }
.emblem-link { fill: none; stroke: rgba(139, 92, 255, 0.5); stroke-width: 2; stroke-dasharray: 4 6; animation: dash 0.8s linear infinite; }
.emblem-packet { fill: #b89cff; filter: drop-shadow(0 0 6px #8b5cff); }
.emblem-handset rect:first-child { fill: #111312; stroke: rgba(255, 255, 255, 0.3); stroke-width: 2; }
.emblem-handset circle { fill: none; stroke: rgba(255, 255, 255, 0.3); stroke-width: 2; }
.emblem-handset__screen { fill: #8b5cff; animation: glow 1.6s ease-in-out infinite; }

@keyframes led { 50% { opacity: 0.2; } }
@keyframes dash { to { stroke-dashoffset: -20; } }
@keyframes glow { 50% { fill: #c9b6ff; } }

@media (prefers-reduced-motion: reduce) {
  .emblem *, .emblem { animation: none !important; }
}

/* --------------------------------------------------------------------------
   Living widgets, pulse strip, tool glyphs, brand mark (web-src/home/graphics.js)
   -------------------------------------------------------------------------- */

.widget-deck { position: absolute; inset: -6% -4%; z-index: 3; pointer-events: none; }

.widget {
  position: absolute;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 26px;
  background: rgba(24, 20, 17, 0.82);
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  cursor: grab;
  pointer-events: auto;
  touch-action: none;
  user-select: none;
  will-change: transform;
}

.widget.is-dragging { z-index: 10; cursor: grabbing; box-shadow: 0 50px 90px -20px rgba(0, 0, 0, 0.8); }

.widget--clock { top: 4%; left: -6%; width: 150px; height: 150px; padding: 14px; background: #f3efe6; }
.clock-svg { width: 100%; height: 100%; }
.clock-face { fill: #f3efe6; }
.clock-ticks line { stroke: #1a1a18; stroke-width: 2.4; stroke-linecap: round; }
.clock-hand { stroke: #1a1a18; stroke-linecap: round; }
.clock-hand--hour { stroke-width: 5; }
.clock-hand--minute { stroke-width: 3.4; }
.clock-hand--second { stroke: #ff6a3d; stroke-width: 1.6; }
.clock-pin { fill: #ff6a3d; }

.widget--playing {
  top: 44%;
  right: -10%;
  grid-template-columns: 64px 1fr auto;
  gap: 14px;
  width: 290px;
  height: 96px;
  padding: 16px;
  text-align: left;
}

.widget-art {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  background: conic-gradient(from 0deg, #ff6a3d, #b400ff, #3a8bff, #c3ff6a, #ff6a3d);
  animation: spin 8s linear infinite;
}

.widget-meta { display: grid; gap: 4px; min-width: 0; }
.widget-meta strong { color: #fff; font-size: 16px; }
.widget-meta em { color: rgba(255, 255, 255, 0.55); font-size: 12px; font-style: normal; }
.widget-progress { display: block; height: 3px; margin-top: 6px; border-radius: 3px; background: rgba(255, 255, 255, 0.14); overflow: hidden; }
.widget-progress i { display: block; width: 100%; height: 100%; background: var(--lime); transform-origin: left; animation: progress 9s linear infinite; }
.widget-eq { display: flex; gap: 3px; align-items: flex-end; height: 34px; }
.widget-eq i { width: 4px; height: 100%; border-radius: 2px; background: var(--lime); transform-origin: bottom; animation: bar 0.55s ease-in-out infinite alternate; }
.widget-eq i:nth-child(2) { animation-delay: -0.2s; animation-duration: 0.7s; }
.widget-eq i:nth-child(3) { animation-delay: -0.4s; }
.widget-eq i:nth-child(4) { animation-delay: -0.1s; animation-duration: 0.45s; }
.widget-eq i:nth-child(5) { animation-delay: -0.3s; animation-duration: 0.62s; }

@keyframes progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.widget--calendar { bottom: 6%; left: -2%; width: 122px; height: 122px; align-content: center; gap: 2px; background: #fff; }
.widget--calendar em { color: #ff3b30; font: 700 13px/1 var(--font-sans, sans-serif); font-style: normal; letter-spacing: 0.1em; }
.widget--calendar strong { color: #111; font: 700 58px/1 var(--font-sans, sans-serif); letter-spacing: -0.04em; }

.widget--ring { top: -2%; right: 6%; width: 132px; height: 132px; padding: 12px; background: #0f1a0c; }
.ring-svg { position: absolute; inset: 12px; width: calc(100% - 24px); height: calc(100% - 24px); transform: rotate(-90deg); }
.ring-track { fill: none; stroke: rgba(195, 255, 106, 0.16); stroke-width: 10; }
.ring-fill { fill: none; stroke: var(--lime); stroke-width: 10; stroke-linecap: round; stroke-dasharray: 72 100; animation: ringFill 3.2s var(--ease-out) infinite alternate; }
.widget--ring span { position: relative; display: grid; justify-items: center; }
.widget--ring strong { color: #fff; font-size: 18px; }
.widget--ring em { color: rgba(255, 255, 255, 0.55); font-size: 11px; font-style: normal; }

@keyframes ringFill { from { stroke-dasharray: 8 100; } to { stroke-dasharray: 72 100; } }

.widget--sun { bottom: 2%; right: 4%; grid-template-columns: auto auto; gap: 10px; width: 150px; height: 84px; background: #ff6a3d; border-color: transparent; }
.sun-svg { width: 46px; height: 46px; }
.sun-rays { stroke: #fff; stroke-width: 3; stroke-linecap: round; transform-origin: 30px 30px; transform-box: view-box; animation: spin 9s linear infinite; }
.sun-core { fill: #fff; }
.widget--sun strong { color: #fff; font: 700 28px/1 var(--font-sans, sans-serif); }

.pulse-strip {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  align-items: center;
  margin-top: 34px;
  padding: 14px 18px;
  border: 1px solid rgba(195, 255, 106, 0.2);
  border-radius: 18px;
  background: rgba(195, 255, 106, 0.05);
}

.pulse-strip__bpm { display: grid; grid-template-columns: auto auto; gap: 0 8px; align-items: baseline; font-family: var(--font-mono); }
.pulse-strip__bpm i { grid-row: span 2; color: #ff4d6a; font-size: 22px; font-style: normal; animation: heart 0.42s ease-in-out infinite alternate; }
.pulse-strip__bpm strong { color: #fff; font-size: 26px; }
.pulse-strip__bpm em { color: var(--muted); font-size: 10px; font-style: normal; letter-spacing: 0.2em; }
.pulse-strip svg { width: 100%; height: 56px; overflow: hidden; }
.pulse-strip__trace { animation: trace 2.4s linear infinite; }
.pulse-strip__trace path { fill: none; stroke: var(--lime); stroke-width: 2.4; stroke-linejoin: round; vector-effect: non-scaling-stroke; filter: drop-shadow(0 0 4px rgba(195, 255, 106, 0.8)); }

@keyframes heart { from { transform: scale(0.85); } to { transform: scale(1.15); } }
@keyframes trace { from { transform: translateX(0); } to { transform: translateX(-492px); } }

.tool-icon { width: 36px; height: 36px; margin: 0 auto 4px; fill: none; stroke: var(--lime); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; overflow: visible; }
.tool-icon--aperture path { fill: rgba(195, 255, 106, 0.16); stroke-width: 1.4; transform-origin: 24px 24px; transform-box: view-box; animation: blade 3s var(--ease-out) infinite alternate; }
.tool-icon__iris { fill: #0a0b0a; }
.tool-icon--keys circle:not(:first-child) { fill: var(--lime); stroke: none; animation: key 1.2s steps(1) infinite; opacity: 0.25; }
.tool-icon__hand { transform-origin: 24px 24px; transform-box: view-box; animation: spin 4s linear infinite; stroke: #ff6a3d; }
.tool-icon__shackle { transform-origin: 33px 21px; transform-box: view-box; animation: shackle 2.2s var(--ease-out) infinite; }

@keyframes blade { from { transform: rotate(0deg) scale(1); } to { transform: rotate(40deg) scale(0.72); } }
@keyframes key { 0%, 16% { opacity: 1; } 17%, 100% { opacity: 0.25; } }
@keyframes shackle { 0%, 55%, 100% { transform: translateY(0); } 70% { transform: translateY(-6px) rotate(12deg); } }

.brand-mark { width: 88px; height: 88px; overflow: visible; }
.brand-mark :is(.brand-mark__ring, .brand-mark__stem, .brand-mark__hub) { fill: none; stroke: currentColor; stroke-width: 8; stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 100; }
.brand-mark__play { fill: currentColor; opacity: 0; transform-origin: 61px 62px; transform-box: view-box; }
.brand-mark.is-drawn :is(.brand-mark__ring, .brand-mark__stem, .brand-mark__hub) { stroke-dashoffset: 0; transition: stroke-dashoffset 1.4s var(--ease-out); }
.brand-mark.is-drawn .brand-mark__stem { transition-delay: 0.3s; }
.brand-mark.is-drawn .brand-mark__hub { transition-delay: 0.5s; }
.brand-mark.is-drawn .brand-mark__play { opacity: 1; transform: scale(1); transition: opacity 400ms 1s, transform 800ms cubic-bezier(0.34, 1.56, 0.64, 1) 1s; }
.brand-mark:not(.is-drawn) .brand-mark__play { transform: scale(0); }

.outro-field { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

@media (max-width: 768px) {
  .widget-deck { inset: -2%; }
  .widget { transform-origin: center; scale: 0.72; }
  .widget--playing { right: -18%; }
  .widget--clock { left: -10%; }
}

@media (prefers-reduced-motion: reduce) {
  .widget *, .pulse-strip *, .tool-icon * { animation: none !important; }
  .brand-mark :is(.brand-mark__ring, .brand-mark__stem, .brand-mark__hub) { stroke-dashoffset: 0; }
  .brand-mark__play { opacity: 1; }
}

.wheel-giant { cursor: grab; touch-action: pan-y; }
.wheel-giant:active { cursor: grabbing; }
.wheel-hub__dot { fill: var(--lime); }
.wheel-giant line { transition: stroke 300ms; }
.wheel-giant.is-spinning line { stroke: rgba(195, 255, 106, 0.8); }

.noise-pin { cursor: crosshair; }
.noise-burst {
  position: absolute;
  z-index: 65;
  width: 120px;
  height: 120px;
  margin: -60px 0 0 -60px;
  border: 2px solid #ff4d42;
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
}
