/* =========================================================
   Memory SoundX — Premium Prototype
   ========================================================= */

:root {
  --bg: #000;
  --ink: #ffffff;
  --ink-2: rgba(255,255,255,0.72);
  --ink-3: rgba(255,255,255,0.55);
  --ink-4: rgba(255,255,255,0.36);
  --line: rgba(255,255,255,0.08);
  --line-2: rgba(255,255,255,0.16);
  --line-3: rgba(255,255,255,0.10);
  --glow-cyan: #2BD4D9;
  --glow-pink: #E94CA0;

  --c-orange:  #FF8A2A;
  --c-magenta: #FF3DA5;
  --c-cyan:    #28D4DE;
  --c-blue:    #2D7CF6;
  --c-red:     #FF3B3B;
  --c-white:   #FFFFFF;
  --c-green:   #3CD667;
  --c-purple:  #A14CFF;
  --c-yellow:  #FFD23B;

  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Optical sizing */
  --opsz-body: "opsz" 16;
  --opsz-display: "opsz" 32;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-variation-settings: var(--opsz-body);
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

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

/* =========================================================
   Ambient background — single radial gradient
   ========================================================= */
.ambient-bg {
  position: fixed; inset: 0;
  z-index: -2;
  background:
    radial-gradient(120% 90% at 12% 8%,  rgba(20, 120, 130, 0.55) 0%, transparent 55%),
    radial-gradient(95%  80% at 55% 48%, rgba(230, 150, 40, 0.40) 0%, transparent 60%),
    radial-gradient(100% 90% at 92% 95%, rgba(150, 30, 130, 0.55) 0%, transparent 60%),
    #050505;
  filter: saturate(1.05);
}
.grain {
  position: fixed; inset: 0;
  z-index: -1; pointer-events: none;
  opacity: 0.04;
  background-image:
    radial-gradient(rgba(255,255,255,0.6) 1px, transparent 1px);
  background-size: 3px 3px;
  mix-blend-mode: overlay;
}

/* =========================================================
   Typography helpers
   ========================================================= */
.eyebrow {
  font-size: 11px;
  letter-spacing: 0.18em;
  font-weight: 500;
  color: var(--ink-3);
  text-transform: uppercase;
  margin: 0;
}

.grad-text {
  background: linear-gradient(180deg, #2BD4D9 0%, #6CB2D8 45%, #E94CA0 100%);
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  font-variation-settings: var(--opsz-display);
}

/* =========================================================
   Top nav (floating glass pill)
   ========================================================= */
.topnav-wrap {
  position: fixed; top: 16px; left: 0; right: 0;
  z-index: 60;
  display: flex; justify-content: center;
  pointer-events: none;
}
.topnav {
  pointer-events: auto;
  display: flex; align-items: center; gap: 28px;
  padding: 10px 14px 10px 16px;
  background: rgba(10, 10, 12, 0.55);
  backdrop-filter: blur(18px) saturate(1.1);
  -webkit-backdrop-filter: blur(18px) saturate(1.1);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.04) inset,
    0 10px 30px rgba(0,0,0,0.45);
  max-width: calc(100vw - 24px);
}
.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand-tiles {
  display: inline-grid;
  grid-template-columns: repeat(3, 5px);
  grid-template-rows: repeat(3, 5px);
  gap: 2px;
  padding: 4px;
  border-radius: 6px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line);
}
.brand-tiles i { display: block; width: 5px; height: 5px; border-radius: 1.5px; }
.brand-tiles.sm { padding: 3px; gap: 1.5px; }
.brand-tiles.sm i { width: 4px; height: 4px; }
.brand-word {
  font-weight: 600; letter-spacing: -0.01em; font-size: 14px;
}
.topnav-links {
  display: flex; align-items: center; gap: 6px; list-style: none; padding: 0; margin: 0;
}
.topnav-links a {
  font-size: 13px; color: var(--ink-2); font-weight: 500;
  padding: 8px 12px; border-radius: 999px;
  transition: color .2s ease, background .2s ease;
}
.topnav-links a:hover { color: var(--ink); background: rgba(255,255,255,0.04); }
.pill-btn {
  background: rgba(255,255,255,0.10) !important;
  border: 1px solid var(--line-2);
  color: var(--ink) !important;
  padding: 8px 14px !important;
}
.pill-btn:hover { background: rgba(255,255,255,0.16) !important; }

/* =========================================================
   Sticky chapter bar
   ========================================================= */
.chapter-bar {
  position: fixed;
  top: 16px; left: 0; right: 0;
  z-index: 55;
  display: flex; justify-content: center;
  pointer-events: none;
  opacity: 0; transform: translateY(-8px);
  transition: opacity .35s ease, transform .35s ease;
}
.chapter-bar.is-visible {
  opacity: 1; transform: translateY(74px);
  pointer-events: auto;
}
.chapter-bar-inner {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 6px;
  background: rgba(10, 10, 12, 0.7);
  backdrop-filter: blur(18px) saturate(1.1);
  -webkit-backdrop-filter: blur(18px) saturate(1.1);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
.chapter-bar-inner a {
  position: relative;
  font-size: 12px; font-weight: 500;
  color: var(--ink-3);
  padding: 8px 14px; border-radius: 999px;
  transition: color .2s ease, background .2s ease;
}
.chapter-bar-inner a:hover { color: var(--ink); }
.chapter-bar-inner a.is-active {
  color: #06070A;
  background: linear-gradient(95deg, #2BD4D9 0%, #E94CA0 100%);
  font-weight: 600;
}

/* =========================================================
   HERO
   ========================================================= */
.hero {
  position: relative;
  padding: 140px 32px 80px;
  max-width: 1280px;
  margin: 0 auto;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 64px;
  align-items: center;
}
.hero-copy { max-width: 640px; }
.hero-headline { text-wrap: balance; }
.hero-copy .eyebrow { margin-bottom: 24px; }
.hero-headline {
  font-family: var(--font-sans);
  font-weight: 800;
  font-variation-settings: var(--opsz-display);
  font-size: clamp(44px, 5.6vw, 80px);
  /* Bump line-height so descenders (g, p, y) on the gradient line are never
     clipped by the background-clip: text bounding box. */
  line-height: 1.08;
  letter-spacing: -0.035em;
  margin: 0 0 28px;
  color: var(--ink);
  white-space: nowrap;
}
.hero-headline .grad-text {
  white-space: nowrap;
  display: inline-block;
  /* Tiny bottom padding gives the gradient mask room to render the descender
     without clipping. Negative margin keeps the visual rhythm intact. */
  padding-bottom: 0.08em;
  margin-bottom: -0.08em;
}
.hero-sub {
  font-size: clamp(16px, 1.2vw, 19px);
  line-height: 1.55;
  color: var(--ink-2);
  margin: 0 0 36px;
  max-width: 520px;
}
.hero-ctas {
  display: flex; align-items: center; gap: 28px; flex-wrap: wrap;
}
.appstore-badge { display: inline-flex; }
.appstore-badge.sm { transform-origin: left center; }
.text-link {
  font-size: 14px; font-weight: 500; color: var(--ink);
  border-bottom: 1px solid rgba(255,255,255,0.18);
  padding-bottom: 4px;
  transition: border-color .2s ease, color .2s ease;
}
.text-link:hover { border-color: var(--ink); }

.hero-stats {
  display: grid; grid-template-columns: repeat(3, max-content);
  gap: 36px;
  margin: 56px 0 0;
  padding: 20px 24px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255,255,255,0.02);
  backdrop-filter: blur(6px);
  width: fit-content;
}
.hero-stats div { display: flex; flex-direction: column; gap: 2px; }
.hero-stats dt {
  font-size: 28px; font-weight: 700; letter-spacing: -0.02em;
  margin: 0;
}
.hero-stats dt span { font-size: 12px; font-weight: 500; color: var(--ink-3); margin-left: 2px; }
.hero-stats dd {
  font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-3);
  margin: 0;
}

.hero-scroll-cue {
  position: absolute; left: 32px; bottom: 24px;
  display: flex; align-items: center; gap: 12px;
  font-size: 10px; letter-spacing: 0.24em; color: var(--ink-4);
}
.hero-scroll-cue .cue-line {
  display: inline-block; width: 48px; height: 1px; background: rgba(255,255,255,0.18);
}

/* ----------------- Phone + orbital rings ----------------- */
.hero-phone-wrap {
  position: relative;
  width: 100%; min-height: 720px;
  display: flex; align-items: center; justify-content: center;
  overflow: visible;
}

.rings {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
}
.ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.06);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
}
.ring.r1 { width: 480px; height: 480px; animation: ring-rot 60s linear infinite; }
.ring.r2 { width: 640px; height: 640px; animation: ring-rot 90s linear infinite reverse; border-color: rgba(255,255,255,0.05); }
.ring.r3 { width: 820px; height: 820px; animation: ring-rot 140s linear infinite; border-color: rgba(255,255,255,0.04); }

/* Tick marks on the inner ring */
.ring.r1::before, .ring.r1::after {
  content: ""; position: absolute;
  width: 6px; height: 1px; background: rgba(255,255,255,0.18);
  top: 50%; transform: translateY(-50%);
}
.ring.r1::before { left: -3px; }
.ring.r1::after  { right: -3px; }

@keyframes ring-rot {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Diagram callouts — positioned at phone corners, label leaning OUTWARD */
.callouts {
  position: absolute;
  /* size = phone footprint + a bit, centered in the phone-wrap */
  width: 460px; height: 720px;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.callout {
  position: absolute;
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase;
  font-weight: 500;
  color: var(--ink-3);
  white-space: nowrap;
}
.callout i {
  display: inline-block; width: 14px; height: 14px; border-radius: 50%;
  border: 1px dashed rgba(255,255,255,0.45);
  position: relative;
  flex-shrink: 0;
}
.callout i::after {
  content: ""; position: absolute;
  width: 22px; height: 1px;
  background: rgba(255,255,255,0.25);
  top: 50%;
}
/* Top-left: dot near phone, label leans further left */
.callout.c-tl {
  top: 4%;
  right: calc(50% + 130px); /* dot sits 130px left of center = just outside phone */
  flex-direction: row-reverse;
}
.callout.c-tl i::after { left: -22px; }
/* Top-right */
.callout.c-tr {
  top: 4%;
  left: calc(50% + 130px);
}
.callout.c-tr i::after { right: -22px; }
/* Bottom-left */
.callout.c-bl {
  bottom: 6%;
  right: calc(50% + 130px);
  flex-direction: row-reverse;
}
.callout.c-bl i::after { left: -22px; }
/* Bottom-right */
.callout.c-br {
  bottom: 6%;
  left: calc(50% + 130px);
}
.callout.c-br i::after { right: -22px; }

/* ----------------- Phone ----------------- */
.phone {
  position: relative; z-index: 2;
  width: 300px; height: 620px;
  border-radius: 44px;
  background: linear-gradient(180deg, #0c0c10 0%, #07070a 100%);
  border: 1px solid rgba(255,255,255,0.10);
  box-shadow:
    0 0 0 1px rgba(0,0,0,0.6),
    0 30px 80px rgba(0,0,0,0.6),
    inset 0 1px 0 rgba(255,255,255,0.06);
  padding: 14px 18px;
  display: flex; flex-direction: column;
}
.phone-notch {
  position: absolute; top: 12px; left: 50%; transform: translateX(-50%);
  width: 96px; height: 26px;
  background: #000; border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04);
}
.phone-statusbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 22px 0;
  height: 38px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #fff;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1, "cv11" 1;
  position: relative;
  z-index: 3;
}
.phone-statusbar .time {
  /* pull the time toward the left edge to clear the Dynamic Island */
  padding-left: 4px;
  line-height: 1;
}
.phone-statusbar .status-glyphs {
  display: inline-flex; gap: 5px; align-items: center;
  color: #fff;
  padding-right: 2px;
  line-height: 0;
}
.phone-statusbar .status-glyphs svg { display: block; }
.phone-statusbar .sb-signal { margin-right: 1px; }
.phone-statusbar .sb-wifi { margin-right: 1px; }
.phone-separator {
  /* Quiet hairline that grounds the device without competing with the tiles */
  width: 28px; height: 1px;
  margin: 32px auto 22px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.18), transparent);
}
.tile-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 4px;
}
.tile {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 14px;
  background: var(--c);
  border: 1px solid rgba(255,255,255,0.06);
  cursor: pointer;
  transition: transform .15s ease, filter .25s ease;
  isolation: isolate;
}
.tile::after {
  /* sound-wave ring */
  content: "";
  position: absolute; inset: 0;
  border-radius: 14px;
  border: 1px solid var(--c);
  opacity: 0;
  pointer-events: none;
}
.tile.is-lit {
  filter: brightness(1.55) saturate(1.2);
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.18),
    0 0 24px 2px color-mix(in srgb, var(--c) 60%, transparent),
    0 0 64px 4px color-mix(in srgb, var(--c) 30%, transparent);
}
.tile.is-lit::after {
  animation: tile-wave 700ms ease-out forwards;
}
@keyframes tile-wave {
  0%   { opacity: 0.9; transform: scale(1);   border-width: 1px; }
  80%  { opacity: 0.15; }
  100% { opacity: 0;    transform: scale(1.9); border-width: 0.5px; }
}
.tile:active { transform: scale(0.96); }

.phone-caption {
  /* HUD-style meta line — reads as instrumentation, not marketing copy */
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  align-self: center;
  margin-top: auto;
  padding: 6px 12px;
  font-family: "SF Mono", "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 9.5px;
  letter-spacing: 0.18em;
  color: rgba(255,255,255,0.45);
  text-transform: uppercase;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 999px;
  background: rgba(255,255,255,0.02);
}
.phone-caption .hud-dot {
  width: 4px; height: 4px; border-radius: 50%;
  background: #3CD667;
  box-shadow: 0 0 6px rgba(60,214,103,0.65);
}
.phone-caption .hud-sep {
  color: rgba(255,255,255,0.22);
  font-weight: 400;
}
.phone-home {
  margin: 14px auto 4px;
  width: 100px; height: 4px;
  background: rgba(255,255,255,0.65);
  border-radius: 4px;
}

.mute-toggle {
  position: absolute; left: 50%; bottom: -22px; transform: translateX(-50%);
  z-index: 3;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-2); font-weight: 500;
  background: rgba(10,10,12,0.75);
  border: 1px solid var(--line-2);
  border-radius: 999px;
  backdrop-filter: blur(12px);
  transition: color .2s ease, border-color .2s ease, background .2s ease;
}
.mute-toggle:hover { color: var(--ink); border-color: rgba(255,255,255,0.32); }
.mute-toggle[aria-pressed="true"] {
  color: var(--ink);
  border-color: rgba(43,212,217,0.45);
  background: rgba(43,212,217,0.08);
}

/* =========================================================
   Section heads
   ========================================================= */
.section-head {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
  text-align: left;
}
.section-head.tight { padding-bottom: 16px; }
.section-head .eyebrow { margin-bottom: 18px; }
.section-headline {
  font-weight: 800;
  font-variation-settings: var(--opsz-display);
  font-size: clamp(36px, 4.5vw, 64px);
  line-height: 1.02;
  letter-spacing: -0.03em;
  margin: 0;
  max-width: 880px;
}
.section-headline.alt {
  font-size: clamp(32px, 3.6vw, 52px);
}

/* =========================================================
   EXERCISE — alternating timeline
   ========================================================= */
.exercise {
  position: relative;
  padding: 120px 0 100px;
}

.timeline {
  position: relative;
  max-width: 1180px;
  margin: 64px auto 0;
  padding: 0 32px;
}
.timeline::before {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  left: 50%;
  width: 1px;
  background: linear-gradient(180deg,
    rgba(255,255,255,0) 0%,
    rgba(255,255,255,0.10) 12%,
    rgba(255,255,255,0.10) 88%,
    rgba(255,255,255,0) 100%);
}

.tl-row {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 64px 0;
}
.tl-row .tl-card {
  position: relative;
  padding: 36px;
  border-radius: 24px;
  background: rgba(255,255,255,0.025);
  border: 1px solid var(--line);
  backdrop-filter: blur(6px);
  overflow: hidden;
  max-width: 460px;
}
.tl-row.left  .tl-card { grid-column: 1; justify-self: end; margin-right: 56px; }
.tl-row.right .tl-card { grid-column: 2; justify-self: start; margin-left: 56px; }

.tl-spine {
  position: absolute; top: 50%; transform: translateY(-50%);
  left: 50%; margin-left: -6px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: rgba(10,10,12,1);
  border: 1px solid rgba(255,255,255,0.25);
  z-index: 2;
}
.tl-spine::before {
  content: ""; position: absolute; inset: 3px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2BD4D9, #E94CA0);
}

.bg-numeral {
  position: absolute; right: 12px; bottom: -16px;
  font-weight: 800;
  font-variation-settings: var(--opsz-display);
  font-size: 180px; line-height: 1;
  color: rgba(255,255,255,0.04);
  letter-spacing: -0.05em;
  pointer-events: none;
  user-select: none;
}

.pill-cluster {
  display: inline-flex; align-items: center; gap: 6px;
  margin-bottom: 22px;
}
.step-pill {
  display: inline-flex; align-items: center;
  padding: 6px 12px; border-radius: 999px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line-2);
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  font-weight: 600; color: var(--ink-2);
}
.tag-pill {
  position: relative;
  padding: 6px 12px 6px 16px;
  border-radius: 999px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line-2);
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  font-weight: 600; color: var(--ink-2);
}
.tag-pill.tag-notch::before {
  content: "";
  position: absolute; left: -5px; top: 50%;
  transform: translateY(-50%) rotate(45deg);
  width: 9px; height: 9px;
  background: inherit;
  background: rgba(255,255,255,0.04);
  border-left: 1px solid var(--line-2);
  border-bottom: 1px solid var(--line-2);
}
.tag-pill[data-tag="visual"]   { color: #28D4DE; }
.tag-pill[data-tag="auditory"] { color: #FF8A2A; }
.tag-pill[data-tag="motor"]    { color: #FFD23B; }

.step-title {
  font-weight: 800; font-variation-settings: var(--opsz-display);
  font-size: 36px; letter-spacing: -0.02em; line-height: 1;
  margin: 0 0 14px;
}
.step-body {
  font-size: 15.5px; line-height: 1.6; color: var(--ink-2);
  margin: 0 0 22px;
  max-width: 360px;
}
.learn-more {
  font-size: 13px; font-weight: 500; color: var(--ink);
  border-bottom: 1px solid rgba(255,255,255,0.18);
  padding-bottom: 3px;
  transition: border-color .2s ease;
}
.learn-more:hover { border-color: var(--ink); }

/* Diagram visuals inside steps */
.mini-board {
  display: inline-grid;
  grid-template-columns: repeat(3, 22px);
  gap: 4px; padding: 6px;
  background: rgba(0,0,0,0.4);
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 22px;
}
.mini-board span {
  width: 22px; height: 22px; border-radius: 5px;
  filter: brightness(1.2);
  box-shadow: 0 0 12px color-mix(in srgb, currentColor 50%, transparent);
}
.waveform {
  position: relative;
  display: block;
  width: 220px; height: 40px;
  margin: 0 0 22px;
  opacity: 0.85;
  overflow: hidden;
  /* Soft fade at both ends so the loop point is invisible. */
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 12%, #000 88%, transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0%, #000 12%, #000 88%, transparent 100%);
}
.waveform .wf-svg {
  display: block;
  /* SVG is 440px wide drawn into a 220px window; we translate it from 0 to -50%
     (=  -220px) so the waveform appears to flow continuously to the left. */
  width: 440px; height: 100%;
  will-change: transform;
  animation: wf-flow 6.5s linear infinite;
}
/* Pulse opacity gently so it feels alive without being noisy. */
.waveform::after {
  content: "";
  position: absolute; inset: 0;
  pointer-events: none;
  background: radial-gradient(60% 100% at 50% 50%, rgba(255,255,255,0.04), transparent 70%);
  animation: wf-pulse 4s ease-in-out infinite;
}
@keyframes wf-flow {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@keyframes wf-pulse {
  0%, 100% { opacity: 0.4; }
  50%      { opacity: 0.9; }
}
@media (prefers-reduced-motion: reduce) {
  .waveform .wf-svg,
  .waveform .wf-back,
  .waveform::after { animation: none; }
  /* Static state: pull the SVG to a frozen position that fills the window cleanly. */
  .waveform .wf-svg { transform: translateX(-25%); }
}
.rank-pill {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 14px;
  background: rgba(0,0,0,0.4);
  border: 1px solid var(--line-2);
  border-radius: 999px;
  margin-bottom: 22px;
}
.rank-pill .rank {
  font-weight: 800; font-size: 14px;
  background: linear-gradient(95deg, #FFD23B, #FF8A2A);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.rank-divider { width: 1px; height: 12px; background: rgba(255,255,255,0.18); }
.rank-pill .pts { font-size: 12px; color: var(--ink-2); }

/* =========================================================
   PALETTE OF TONES
   ========================================================= */
.tone-strip {
  position: relative;
  padding: 80px 0 100px;
  margin-top: 40px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,0.015);
}
.d-only { display: inline; }
.tone-row-wrap {
  position: relative;
  max-width: 1180px;
  margin: 48px auto 0;
  padding: 56px 32px;
}
.tone-axis {
  position: absolute;
  left: 32px; right: 32px;
  top: 50%; height: 1px;
  background: linear-gradient(90deg,
    rgba(255,255,255,0) 0%,
    rgba(255,255,255,0.18) 10%,
    rgba(255,255,255,0.18) 90%,
    rgba(255,255,255,0) 100%);
}
.tone-row {
  position: relative; z-index: 2;
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  gap: 12px;
  align-items: center; justify-items: center;
}
.tone-dot {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--c);
  border: 1px solid rgba(255,255,255,0.10);
  transition: transform .2s ease, box-shadow .25s ease;
  position: relative;
  cursor: pointer;
}
.tone-dot::before {
  content: "";
  position: absolute; inset: -8px;
  border: 1px dashed rgba(255,255,255,0.10);
  border-radius: 50%;
  opacity: 0;
  transition: opacity .25s ease;
}
.tone-dot:hover, .tone-dot:focus-visible {
  transform: scale(1.12);
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.18),
    0 0 24px 2px color-mix(in srgb, var(--c) 60%, transparent);
}
.tone-dot:hover::before, .tone-dot:focus-visible::before { opacity: 1; }
.tone-dot.is-playing {
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.3),
    0 0 32px 4px color-mix(in srgb, var(--c) 70%, transparent);
}

.tone-tip {
  position: fixed;
  pointer-events: none;
  background: rgba(10,10,12,0.92);
  border: 1px solid var(--line-2);
  border-radius: 10px;
  padding: 8px 12px;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  opacity: 0; transform: translate(-50%, -120%) translateY(8px);
  transition: opacity .15s ease, transform .15s ease;
  z-index: 80;
  backdrop-filter: blur(10px);
  min-width: 78px;
}
.tone-tip.is-visible { opacity: 1; transform: translate(-50%, -120%); }
.tone-tip #toneTipNote {
  font-weight: 700; font-size: 16px; letter-spacing: -0.01em;
  background: linear-gradient(95deg, #2BD4D9, #E94CA0);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.tone-tip #toneTipHz {
  font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ink-3);
}
.tone-hint {
  text-align: center;
  font-size: 12px; color: var(--ink-3);
  margin: 24px 0 0;
  letter-spacing: 0.02em;
}

/* =========================================================
   METHOD / closing copy
   ========================================================= */
.method {
  max-width: 980px;
  margin: 100px auto 0;
  padding: 0 32px;
  text-align: center;
}
.closing-copy {
  font-weight: 600;
  font-variation-settings: var(--opsz-display);
  font-size: clamp(22px, 2.4vw, 32px);
  line-height: 1.35;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0;
}

/* =========================================================
   CTA cards
   ========================================================= */
.cta-row {
  max-width: 1280px;
  margin: 100px auto 0;
  padding: 0 32px;
}
.cta-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.cta-card {
  position: relative;
  display: flex; flex-direction: column; justify-content: space-between;
  min-height: 280px;
  padding: 28px;
  border-radius: 20px;
  background: rgba(255,255,255,0.025);
  border: 1px solid var(--line);
  backdrop-filter: blur(8px);
  transition: border-color .25s ease, background .25s ease, transform .25s ease;
  overflow: hidden;
  isolation: isolate;
}
.cta-card::after {
  content: "";
  position: absolute; inset: -1px;
  border-radius: 20px;
  padding: 1px;
  background: linear-gradient(135deg, rgba(43,212,217,0.5), rgba(233,76,160,0.5));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
          mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  opacity: 0;
  transition: opacity .3s ease;
  pointer-events: none;
}
.cta-card:hover {
  border-color: rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.04);
  transform: translateY(-2px);
}
.cta-card:hover::after { opacity: 1; }
.cta-card .eyebrow { margin-bottom: 16px; }
.cta-card h3 {
  font-weight: 800;
  font-variation-settings: var(--opsz-display);
  font-size: 28px;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
}
.cta-body {
  font-size: 14.5px; line-height: 1.5; color: var(--ink-2);
  margin: 0;
}
.cta-foot { margin-top: 24px; }

.seed-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  font-size: 12px; color: var(--ink-2);
  background: rgba(0,0,0,0.3);
}
.seed-pill b {
  font-weight: 600; color: var(--ink);
  letter-spacing: 0.02em;
}
.seed-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #3CD667;
  box-shadow: 0 0 12px rgba(60,214,103,0.8);
  animation: pulse 2.2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 0.8; transform: scale(1); }
  50%      { opacity: 1;   transform: scale(1.2); }
}

/* =========================================================
   Footer
   ========================================================= */
.site-foot {
  margin-top: 120px;
  padding: 80px 32px 40px;
  border-top: 1px solid var(--line);
  background:
    radial-gradient(60% 80% at 50% 0%, rgba(255,255,255,0.04), transparent 70%);
}
.foot-grid {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 64px;
}
.foot-head .eyebrow { margin-bottom: 14px; }
.foot-body p {
  font-size: 16px; line-height: 1.65; color: var(--ink-2);
  margin: 0 0 28px;
  max-width: 520px;
}
.foot-links { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.foot-links a {
  font-size: 14px; color: var(--ink); font-weight: 500;
  border-bottom: 1px solid rgba(255,255,255,0.16);
  padding-bottom: 3px;
  display: inline-block;
  transition: border-color .2s ease;
}
.foot-links a:hover { border-color: var(--ink); }
.foot-credit {
  max-width: 1180px; margin: 64px auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12px; color: var(--ink-3);
}
.brand-mini {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 600; color: var(--ink-2);
}
.foot-credit-right {
  display: inline-flex; align-items: center; gap: 24px;
}
.social-links {
  list-style: none; padding: 0; margin: 0;
  display: inline-flex; align-items: center; gap: 10px;
}
.social-links a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.10);
  color: rgba(255,255,255,0.62);
  background: rgba(255,255,255,0.02);
  transition: color .2s ease, border-color .2s ease, background .2s ease, transform .2s ease;
}
.social-links a:hover {
  color: #fff;
  border-color: rgba(255,255,255,0.22);
  background: rgba(255,255,255,0.05);
  transform: translateY(-1px);
}
.social-links svg { width: 15px; height: 15px; display: block; }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; gap: 24px; }
  .hero-phone-wrap { min-height: 700px; }
  .callout.c-tl, .callout.c-tr { top: 6%; }
  .callout.c-bl, .callout.c-br { bottom: 6%; }
}

@media (max-width: 768px) {
  .topnav { gap: 16px; padding: 8px 8px 8px 12px; }
  .topnav-links { gap: 2px; }
  .topnav-links a { padding: 6px 8px; font-size: 12px; }
  .topnav-links li:first-child { display: none; }
  .brand-word { font-size: 13px; }

  .hero { padding: 110px 20px 96px; }
  .hero-headline { font-size: clamp(36px, 9.2vw, 52px); white-space: normal; }
  .hero-stats { grid-template-columns: repeat(3, 1fr); gap: 18px; padding: 16px; width: 100%; }
  .hero-stats dt { font-size: 22px; }

  /* Mobile phone wrap: give the mute toggle real room below, and DON'T clip —
     overflow:hidden was eating the toggle and the callouts. The rings are already
     sized to fit (520px max) so they don't need clipping. */
  .hero-phone-wrap {
    min-height: 0;
    overflow: visible;
    padding: 28px 0 64px;
    flex-direction: column;
    gap: 16px;
  }
  .phone { width: 248px; height: 520px; padding: 12px 14px; border-radius: 36px; }
  .phone-separator { margin: 24px auto 16px; }
  .ring.r1 { width: 300px; height: 300px; }
  .ring.r2 { width: 400px; height: 400px; }
  .ring.r3 { width: 520px; height: 520px; }

  /* On mobile, convert the 4 absolute-positioned callouts into a single inline
     horizontal row of metadata pills that sits above the phone. This is the
     cinematic equivalent of the desktop callouts — same content, same diagram
     intent, but it can never overlap the phone, the status bar, or the floating
     nav, and it never gets clipped. */
  .callouts {
    position: static;
    width: auto; height: auto;
    transform: none;
    display: flex; flex-wrap: wrap;
    align-items: center; justify-content: center;
    gap: 8px 14px;
    padding: 0 16px;
    margin-bottom: 4px;
    pointer-events: none;
  }
  .callout,
  .callout.c-tl,
  .callout.c-tr,
  .callout.c-bl,
  .callout.c-br {
    position: static;
    top: auto; left: auto; right: auto; bottom: auto;
    font-size: 9px; gap: 0; letter-spacing: 0.16em;
    flex-direction: row !important; align-items: center;
    padding: 5px 11px 5px 9px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 999px;
    background: rgba(255,255,255,0.02);
    color: rgba(255,255,255,0.55);
    display: inline-flex;
  }
  .callout i {
    width: 4px; height: 4px;
    border-radius: 50%;
    border: 0;
    background: rgba(255,255,255,0.55);
    margin-right: 7px;
    flex-shrink: 0;
    position: static;
  }
  /* Kill the dotted-line connector on mobile — it doesn't make sense in a pill row */
  .callout i::after,
  .callout.c-tl i::after,
  .callout.c-tr i::after,
  .callout.c-bl i::after,
  .callout.c-br i::after { display: none; content: none; }

  /* Hide the SCROLL cue entirely on mobile — touch users don't need it and it
     tangles with the phone artwork on narrow viewports. */
  .hero-scroll-cue { display: none; }

  .section-head { padding: 0 20px; }
  .section-headline { font-size: clamp(32px, 8vw, 44px); }

  /* Timeline collapses */
  .timeline { padding: 0 20px; max-width: 100%; }
  .timeline::before { left: 12px; }
  .tl-row { grid-template-columns: 1fr; padding: 28px 0; }
  .tl-row.left  .tl-card,
  .tl-row.right .tl-card {
    grid-column: 1;
    justify-self: stretch;
    margin: 0 0 0 32px;
    max-width: 100%;
  }
  .tl-spine { left: 12px; margin-left: -6px; }
  .tl-card { padding: 24px; }
  .step-title { font-size: 28px; }
  .bg-numeral { font-size: 120px; bottom: -8px; right: 8px; }

  /* Tone strip — horizontally scrollable on mobile */
  .tone-strip { overflow: hidden; }
  .tone-row-wrap {
    padding: 40px 20px;
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .tone-row-wrap::-webkit-scrollbar { display: none; }
  .tone-row {
    grid-template-columns: repeat(9, 56px);
    gap: 18px;
    justify-items: center;
    width: max-content;
  }
  .tone-axis { left: 20px; right: 20px; }

  .cta-row { padding: 0 20px; }
  .cta-grid { grid-template-columns: 1fr; gap: 16px; }
  .cta-card { min-height: 220px; padding: 24px; }
  .cta-card h3 { font-size: 24px; }

  .site-foot { padding: 64px 20px 32px; }
  .foot-grid { grid-template-columns: 1fr; gap: 32px; }
  .foot-credit { flex-direction: column; gap: 18px; text-align: center; }
  .foot-credit-right { flex-direction: column; gap: 14px; }

  .chapter-bar.is-visible { transform: translateY(64px); }
  .chapter-bar-inner a { padding: 6px 10px; font-size: 11px; }
}

@media (max-width: 480px) {
  .hero { padding: 100px 16px 50px; }
  .topnav-links li:nth-child(2) { display: none; }
}

/* =========================================================
   Reduced motion
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  .ring { animation: none !important; }
  .tile.is-lit::after { animation: none !important; }
  .seed-dot { animation: none !important; }
  html { scroll-behavior: auto; }
}
