/* Homepage: the Cue story.
   Two rendering modes share one DOM:
   1. Static (default): the complete story reads top to bottom with the
      device shown once, on the lock screen with the cue landed. This
      is what no-JS visitors and prefers-reduced-motion visitors get.
   2. Live (html.story-live, added by js/home.js only when motion is
      allowed): a 660vh scroll-driven sequence with a sticky, pinned
      device. Scroll position drives every transition, so scrolling
      backward reverses naturally.
   The device screens are laid out against the design's 412px-wide
   display; every screen metric is expressed in cqw (1cqw = 4.12px at
   that width) so the same proportions hold at any device size. */

@keyframes wash-drift {
  0%   { transform: translate3d(-2%, -1%, 0) scale(1); }
  50%  { transform: translate3d(2%, 1.5%, 0) scale(1.04); }
  100% { transform: translate3d(-2%, -1%, 0) scale(1); }
}
@keyframes eq-pulse {
  0%   { transform: scaleY(0.4); }
  50%  { transform: scaleY(1); }
  100% { transform: scaleY(0.4); }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; }
}

/* ── Story section ───────────────────────────────────── */
.story { position: relative; }
.story-live .story { height: 660vh; }

.story-pin { position: relative; overflow: hidden; }
.story-live .story-pin {
  position: sticky; top: 0;
  height: 100vh; height: 100svh;
}

.story-wash {
  position: absolute; inset: -20%;
  pointer-events: none;
  background:
    radial-gradient(ellipse 60% 50% at 30% 20%, rgba(147,122,255,0.14), transparent 60%),
    radial-gradient(ellipse 50% 40% at 78% 70%, rgba(255,156,125,0.08), transparent 65%);
  animation: wash-drift 24s var(--ease-in-out) infinite;
}
.story-dim {
  position: absolute; inset: 0; z-index: 1;
  pointer-events: none;
  background: #0C0A15; opacity: 0;
}

.how-anchor { position: static; height: 0; }
.story-live .how-anchor { position: absolute; top: 100vh; }

.story-grid {
  position: relative;
  max-width: 1080px; margin: 0 auto;
  padding: 96px 20px 72px;
  display: flex; flex-wrap: wrap;
  align-items: center; justify-content: center;
  gap: clamp(28px, 5vw, 90px);
}
.story-live .story-grid {
  height: 100%;
  padding: 60px 20px 0;
}

/* Layers: static mode flattens the wrapper so hero and device share the
   first row, then each beat takes a full-width row of its own. */
.story-layers { display: contents; }
.story-live .story-layers {
  display: block;
  position: relative; z-index: 2;
  flex: 1 1 320px; min-width: 290px; max-width: 560px;
  height: clamp(290px, 44vh, 460px);
}

.layer { position: relative; }
.layer--hero { flex: 1 1 320px; min-width: 290px; max-width: 560px; order: 0; }
.story .device-col { order: 1; }
.layer--beat {
  flex: 1 1 100%; max-width: 620px;
  margin-left: auto; margin-right: auto;
  padding: clamp(36px, 6vw, 64px) 0;
  text-align: center;
}
.layer--beat:nth-of-type(2) { order: 2; }
.layer--beat:nth-of-type(3) { order: 3; }
.layer--beat:nth-of-type(4) { order: 4; }
.layer--beat:nth-of-type(5) { order: 5; }
.layer--beat:nth-of-type(6) { order: 6; }

.story-live .layer {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; justify-content: center;
  opacity: 0; pointer-events: none;
  margin: 0; padding: 0; max-width: none;
  text-align: left;
  will-change: opacity, transform;
}
.story-live .layer--hero { opacity: 1; pointer-events: auto; }

.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  height: 28px; padding: 0 12px;
  border-radius: var(--radius-capsule);
  background: var(--cue-soft); color: var(--cue);
  font-size: var(--text-caption); font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-caps); text-transform: uppercase;
  margin-bottom: 20px;
  align-self: flex-start;
}
.layer h1 {
  margin: 0 0 18px;
  font-size: clamp(38px, 6vw, 68px);
  line-height: var(--leading-tight); letter-spacing: var(--tracking-tight);
  font-weight: var(--weight-bold);
}
.accent-serif {
  font-family: var(--font-display); font-style: italic; font-weight: 500;
  font-variation-settings: var(--display-opsz);
}
.hero-gradient {
  background: linear-gradient(100deg, #937AFF 10%, #FF9C7D 90%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: var(--cue);
}
.hero-sub {
  margin: 0 0 26px;
  font-size: clamp(16px, 1.8vw, 19px); line-height: var(--leading-body);
  color: var(--text-secondary); max-width: 42ch; text-wrap: pretty;
}
.hero-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.hero-actions .fine { font-size: var(--text-footnote); color: var(--text-tertiary); }

/* Groups an App Store badge with its intro-offer caption so the caption
   stays centered 8px above the badge regardless of the parent's own gap
   (used in the hero and the bottom CTA). */
.appstore-group { display: inline-flex; flex-direction: column; align-items: center; }
.trial-caption {
  margin: 0 0 8px;
  max-width: 230px;
  font-size: 13px;
  opacity: 0.7;
  text-align: center;
  text-wrap: pretty;
}

.layer--beat h2, .beat-title {
  margin: 0 0 14px;
  font-size: clamp(30px, 4.5vw, 50px);
  line-height: var(--leading-tight); letter-spacing: var(--tracking-tight);
  font-weight: var(--weight-bold);
}
.beat-copy {
  margin: 0;
  font-size: clamp(16px, 1.9vw, 19px); line-height: var(--leading-body);
  color: var(--text-secondary); max-width: 38ch; text-wrap: pretty;
}
.layer--beat .beat-copy { margin-left: auto; margin-right: auto; }
.story-live .beat-copy { margin-left: 0; margin-right: 0; }
.beat-copy + .beat-strong { margin-top: 12px; }
.beat-strong {
  margin: 0;
  font-size: clamp(16px, 1.9vw, 19px); line-height: var(--leading-body);
  font-weight: var(--weight-semibold); max-width: 38ch; text-wrap: pretty;
}
.layer--beat .beat-strong { margin-left: auto; margin-right: auto; }
.story-live .beat-strong { margin-left: 0; margin-right: 0; }
.beat-note {
  display: flex; align-items: center; gap: 9px;
  margin: 20px 0 0;
  font-size: var(--text-footnote); color: var(--text-tertiary);
}
.layer--beat .beat-note { justify-content: center; }
.story-live .beat-note { justify-content: flex-start; }
.beat-serif {
  margin: 0;
  font-family: var(--font-display); font-style: italic; font-weight: 500;
  font-variation-settings: var(--display-opsz);
  font-size: clamp(34px, 5vw, 56px);
  line-height: var(--leading-tight); letter-spacing: -0.01em;
}
.beat-kicker {
  margin: 0 0 10px;
  font-size: clamp(20px, 2.6vw, 28px);
  line-height: var(--leading-snug); letter-spacing: var(--tracking-tight);
  font-weight: var(--weight-semibold); color: var(--text-tertiary);
}
.beat-close {
  margin: 18px 0 0;
  font-family: var(--font-display); font-style: italic;
  font-variation-settings: var(--display-opsz);
  font-size: clamp(17px, 2vw, 21px); color: var(--text-secondary);
}

/* ── Device column ───────────────────────────────────── */
.device-col {
  position: relative; z-index: 2;
  flex: 0 0 auto;
  perspective: 1400px;
  display: flex; flex-direction: column; align-items: center;
}

.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 18px; }
.story-live .chips {
  position: absolute; inset: 0;
  display: block; margin: 0;
  pointer-events: none;
}
.chip-w { position: relative; }
.story-live .chip-w {
  position: absolute; left: 0; z-index: 5;
  opacity: 0;
  will-change: opacity, transform, filter;
}
.story-live #chip-1 { top: 16%; }
.story-live #chip-2 { top: 40%; }
.story-live #chip-3 { top: 63%; }
.chip {
  display: inline-flex; align-items: center; gap: 9px;
  height: 40px; padding: 0 18px;
  border-radius: var(--radius-capsule);
  background: var(--surface-card);
  box-shadow: var(--shadow-raised);
  font-size: var(--text-subhead); font-weight: var(--weight-medium);
  color: var(--text-secondary); white-space: nowrap;
}

.phone-tilt {
  position: relative; z-index: 2;
  transform-style: preserve-3d;
  will-change: transform;
}
.phone-glow {
  position: absolute; inset: -8% -18%; z-index: 0;
  pointer-events: none; opacity: 0.5;
  background: radial-gradient(ellipse 60% 50% at 50% 45%, rgba(147,122,255,0.4), transparent 70%);
  filter: blur(30px);
}
.story-live .phone-glow { opacity: 0.12; will-change: opacity; }

/* Frame: titanium-style rail with a specular sweep, then a black bezel
   ring, then the display. Proportions track a current 6.1-inch iPhone:
   display aspect ratio 0.46, continuous-curve corners approximated with
   generous radii. */
.phone {
  position: relative;
  height: clamp(430px, 58vh, 640px);
  aspect-ratio: 0.46;
  border-radius: 46px;
  padding: 2.5px;
  background: linear-gradient(160deg, #5a5470 0%, #211d31 24%, #0c0a14 58%, #3d3756 100%);
  box-shadow:
    0 60px 120px rgba(0,0,0,0.55),
    0 24px 48px rgba(23,21,34,0.45),
    0 2px 6px rgba(0,0,0,0.4);
}
.pbtn { position: absolute; background: linear-gradient(90deg, #5a5470, #221e33); }
.pbtn--action { left: -2px;   top: 13.5%; width: 2.5px; height: 3.2%; border-radius: 2px 0 0 2px; }
.pbtn--volup  { left: -2.5px; top: 19.5%; width: 3px;   height: 6.1%; border-radius: 2px 0 0 2px; }
.pbtn--voldn  { left: -2.5px; top: 27%;   width: 3px;   height: 6.1%; border-radius: 2px 0 0 2px; }
.pbtn--side {
  right: -2.5px; top: 25.5%; width: 3px; height: 8.8%;
  border-radius: 0 2px 2px 0;
  background: linear-gradient(90deg, #221e33, #5a5470);
}
.pbtn--camera {
  right: -2px; top: 68.3%; width: 2.5px; height: 3.9%;
  border-radius: 0 2px 2px 0;
  background: linear-gradient(90deg, #221e33, #4a4462);
}
.phone-bezel {
  position: relative; height: 100%;
  border-radius: 43.5px;
  background: #000; padding: 4px;
}
.phone-screen {
  position: relative; height: 100%;
  border-radius: 39px; overflow: hidden;
  background: #0F0D19;
  font-family: var(--font-ui);
  color: #F2F0F7;
}

/* Screens. Static default shows the lock screen, notification landed:
   the notification is the product. */
.scr { position: absolute; inset: 0; }
.scr-a { z-index: 10; opacity: 0; }
.scr-l { z-index: 11; opacity: 1; }
.scr-b { z-index: 12; opacity: 0; }
.scr-c { z-index: 14; opacity: 0; }
.story-live .scr { will-change: opacity; }
.story-live .scr-a { opacity: 1; }
.story-live .scr-l { opacity: 0; }
.story-live .scr-b { opacity: 0; }
.story-live .scr-c { opacity: 0; }

/* Shared: the cue tick and its label */
.cue-tick {
  display: inline-block; flex-shrink: 0;
  width: 2.2px; height: 10px; border-radius: 99px; background: #937AFF;
}
.cue-tick--mint { background: #5ED6C1; }
.cue-tick-label {
  font-size: 9.4px; font-weight: 590; letter-spacing: 0.07em;
  text-transform: uppercase; color: rgba(242,240,247,0.45);
}
.scr-kicker {
  font-size: 10.8px; font-weight: 590; letter-spacing: 0.06em;
  text-transform: uppercase; color: rgba(242,240,247,0.4);
}

/* Screen A: listening. A ring of the senses around the mark. */
.scr-a__inner {
  padding: 59px 20px 0; height: 100%;
  display: flex; flex-direction: column; align-items: center; text-align: center;
}
.scr-a__brand {
  align-self: flex-start;
  font-size: 9.4px; font-weight: 590; letter-spacing: 0.14em;
  text-transform: uppercase; color: rgba(242,240,247,0.4);
}
.scr-a__ring { position: relative; width: 56%; aspect-ratio: 1; margin-top: 16%; }
.ring__line { position: absolute; inset: 0; border-radius: 50%; border: 1px solid rgba(242,240,247,0.09); }
.ring__dot { position: absolute; border-radius: 50%; width: 8.6px; height: 8.6px; }
.ring__dot--mint-r {
  top: 50%; right: -5px; width: 10px; height: 10px; margin-top: -5px;
  background: #5ED6C1; box-shadow: 0 0 0 5.8px rgba(94,214,193,0.12);
}
.ring__dot--violet { top: 9%; right: 8%; background: #937AFF; box-shadow: 0 0 0 5px rgba(147,122,255,0.14); }
.ring__dot--mint-b { bottom: -3.6px; left: 47%; background: #5ED6C1; }
.ring__dot--peach  { left: 2%; bottom: 22%; background: #FF8A65; box-shadow: 0 0 0 5px rgba(255,138,101,0.12); }
.ring__dot--faint  { top: -2px; left: 50%; width: 5px; height: 5px; margin-left: -2.5px; background: rgba(242,240,247,0.28); }
.ring__mark { position: absolute; inset: 15%; width: 70%; height: 70%; }
.scr-a__line {
  font-family: var(--font-display); font-style: italic;
  font-variation-settings: var(--display-opsz);
  font-size: 15.8px; line-height: 1.3; color: rgba(242,240,247,0.85);
  margin-top: 14%;
}
.scr-a__status { position: relative; width: 100%; height: 17px; margin-top: 10px; }
.scr-a__stat {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center; gap: 5px;
  font-size: 10.8px; font-weight: 510; color: rgba(242,240,247,0.55);
  white-space: nowrap;
}
.scr-a__stat--next { opacity: 0; }
.story-live .scr-a__stat { will-change: opacity; }
.scr-a__foot {
  margin-top: auto; padding-bottom: 24px;
  font-size: 11.5px; color: rgba(242,240,247,0.3);
}

/* Screen L: the lock screen. The notification lands here. */
.scr-l__bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(90% 55% at 78% -6%, #3E3960 0%, transparent 55%),
    radial-gradient(110% 70% at -12% 108%, #2B2645 0%, transparent 60%),
    #12101C;
}
.scr-l__orb { position: absolute; aspect-ratio: 1; border-radius: 50%; }
.scr-l__orb--far {
  width: 150%; left: -58%; top: 36%;
  border: 1.5px solid rgba(185,175,225,0.13);
  box-shadow: inset 0 -40px 90px rgba(64,56,105,0.35);
}
.scr-l__orb--near {
  width: 175%; left: -24%; top: 54%;
  border: 1.5px solid rgba(185,175,225,0.10);
  background: linear-gradient(180deg, rgba(40,36,62,0.85), rgba(18,16,28,0.95));
}
.scr-l__inner {
  position: relative; height: 100%;
  padding: 53px 16px 16px;
  display: flex; flex-direction: column; align-items: center;
}
.scr-l__lock { width: 10.8px; height: 13px; }
.scr-l__date { font-size: 12.2px; font-weight: 590; color: rgba(220,214,240,0.75); margin-top: 8.6px; }
.scr-l__time {
  font-size: 62px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.05;
  color: rgba(216,210,240,0.92);
}
.scr-l__notif { margin-top: auto; width: 100%; }
.story-live .scr-l__notif { opacity: 0; will-change: opacity, transform; }
.notif {
  display: flex; gap: 8.6px; align-items: flex-start;
  width: 100%;
  background: rgba(150,142,190,0.16);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-radius: 17px; padding: 10px;
  box-shadow: 0 10px 28px rgba(0,0,0,0.28);
}
.notif__icon { width: 34.5px; height: 34.5px; border-radius: 8px; flex-shrink: 0; display: block; }
.notif__body { min-width: 0; flex: 1; text-align: left; }
.notif__title { font-size: 10.8px; font-weight: 590; color: #F2F0F7; line-height: 1.3; }
.notif__line {
  font-family: var(--font-display); font-style: italic;
  font-variation-settings: var(--display-opsz);
  font-size: 10.4px; line-height: 1.35; color: rgba(242,240,247,0.78);
  margin-top: 1.5px;
}
.notif__side { display: flex; flex-direction: column; align-items: flex-end; gap: 4.3px; flex-shrink: 0; }
.notif__when { font-size: 9.4px; color: rgba(242,240,247,0.5); }
.notif__art {
  display: block; width: 26px; height: 26px; border-radius: 5.8px;
  background: radial-gradient(circle at 32% 28%, rgba(255,255,255,0.18), rgba(0,0,0,0.15)), #5A4E7A;
}
.scr-l__quick {
  margin-top: 14.4px; width: 100%;
  display: flex; justify-content: space-between; padding: 0 10px;
}
.scr-l__qbtn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 37.4px; height: 37.4px; border-radius: 50%;
  background: rgba(150,142,190,0.16);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.scr-l__qbtn svg { width: 15.8px; height: 15.8px; }

/* Screen B: the cue, opened */
.scr-b__bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 130% 55% at 50% 6%, rgba(96,80,146,0.38), transparent 62%),
    #131120;
}
.scr-b__inner {
  position: relative; height: 100%;
  padding: 56px 22px 22px;
  display: flex; flex-direction: column; align-items: center; text-align: center;
}
.scr-b__time { font-size: 10.8px; font-weight: 510; letter-spacing: 0.05em; color: rgba(242,240,247,0.4); }
.scr-b__art {
  width: 66%; aspect-ratio: 1; border-radius: 20px; margin-top: 14.4px;
  background:
    radial-gradient(circle at 32% 28%, rgba(255,255,255,0.18), rgba(0,0,0,0.15)),
    #5A4E7A;
  box-shadow: 0 18px 44px rgba(0,0,0,0.5);
}
.scr-b__row { display: flex; align-items: center; gap: 5.8px; margin-top: 20px; }
.scr-b__row .cue-tick { height: 10.8px; }
.scr-b__cueline {
  font-family: var(--font-display); font-style: italic;
  font-variation-settings: var(--display-opsz);
  font-size: 14.4px; line-height: 1.4; color: rgba(242,240,247,0.8);
  margin-top: 8.6px; max-width: 26ch;
}
.scr-b__song { font-size: 18.7px; font-weight: 700; letter-spacing: -0.01em; color: #F2F0F7; margin-top: 8.6px; }
.scr-b__artist { font-size: 13px; color: rgba(242,240,247,0.55); margin-top: 2px; }
.scr-b__bottom { margin-top: auto; width: 100%; }
.scr-b__progress { margin-bottom: 14.4px; }
.scr-b__bar { width: 100%; height: 3.2px; border-radius: 99px; background: rgba(242,240,247,0.15); }
.scr-b__bar-fill { width: 34%; height: 100%; border-radius: 99px; background: rgba(242,240,247,0.75); }
.scr-b__times {
  display: flex; justify-content: space-between; margin-top: 5px;
  font-size: 9.7px; font-weight: 510; color: rgba(242,240,247,0.4);
}
.scr-b__ctl { display: flex; gap: 7.2px; }
.story-live .scr-b__ctl { opacity: 0; will-change: opacity, transform; }
.pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  height: 37.4px; border-radius: 99px;
  background: rgba(242,240,247,0.1); color: #F2F0F7;
  font-size: 12.2px; font-weight: 590; flex: 1;
}
.pill svg { width: 11.5px; height: 11.5px; }
.pill--play { flex: 1.4; background: #937AFF; color: #14102A; }
.scr-b__saved {
  display: flex; align-items: center; justify-content: center; gap: 5px;
  margin-top: 11.5px; min-height: 15.8px;
  font-family: var(--font-display); font-style: italic;
  font-size: 11.5px; color: rgba(242,240,247,0.6);
}
.scr-b__saved svg { width: 11.5px; height: 11.5px; flex-shrink: 0; }
.story-live .scr-b__saved { opacity: 0; will-change: opacity; }

/* Screen C: the week */
.scr-c__inner { padding: 60px 19px 0; height: 100%; display: flex; flex-direction: column; }
.scr-c__title { font-size: 24.5px; font-weight: 700; letter-spacing: -0.02em; color: #F2F0F7; margin-top: 4.3px; }
.scr-c__list { margin-top: 20px; display: flex; flex-direction: column; gap: 13px; }
.scr-c__rowitem { display: flex; align-items: center; gap: 10px; }
.scr-c__art { width: 40px; height: 40px; border-radius: 8.6px; flex-shrink: 0; }
.scr-c__art--violet { background: radial-gradient(circle at 32% 28%, rgba(255,255,255,0.16), rgba(0,0,0,0.12)), #5A4E7A; }
.scr-c__art--rust   { background: radial-gradient(circle at 32% 28%, rgba(255,255,255,0.16), rgba(0,0,0,0.12)), #8A5A4E; }
.scr-c__art--blue   { background: radial-gradient(circle at 32% 28%, rgba(255,255,255,0.16), rgba(0,0,0,0.12)), #4E6A8A; }
.scr-c__meta { min-width: 0; text-align: left; }
.scr-c__song {
  font-size: 12.2px; font-weight: 590; color: #F2F0F7;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.scr-c__why {
  font-family: var(--font-display); font-style: italic;
  font-size: 10.8px; color: rgba(242,240,247,0.5);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.scr-c__day { margin-left: auto; font-size: 10px; color: rgba(242,240,247,0.35); }
.scr-c__foot {
  margin-top: auto; padding-bottom: 24px; text-align: center;
  font-family: var(--font-display); font-style: italic;
  font-size: 11.5px; color: rgba(242,240,247,0.4);
}

/* Status bar, island, glare, home indicator. The status bar splits into
   two halves centred either side of the island, as iOS lays it out. */
.scr-status {
  position: absolute; top: 0; left: 0; right: 0; z-index: 35;
  display: flex; align-items: center;
  padding: 15px 17px 0;
  color: rgba(242,240,247,0.95);
}
.scr-status__half { flex: 1; display: flex; justify-content: center; align-items: center; }
.scr-status__time { font-size: 12.2px; font-weight: 590; letter-spacing: -0.02em; }
.scr-status__icons { gap: 5px; }
.ico-signal  { width: 13.7px; height: 8.6px; }
.ico-wifi    { width: 12.2px; height: 8.6px; }
.ico-battery { width: 19.4px; height: 9.4px; }
.island {
  position: absolute; top: 8.6px; left: 50%; transform: translateX(-50%);
  z-index: 40; width: 68px; height: 24px; border-radius: 12px;
  background: #000;
  box-shadow: inset 0 0 2px rgba(255,255,255,0.06);
  display: flex; align-items: center; justify-content: center; gap: 4.3px;
}
.island__cam {
  position: absolute; right: 7.2px; width: 8px; height: 8px; border-radius: 50%;
  background: radial-gradient(circle at 36% 32%, #1d2a3a 0%, #0a0d14 55%, #000 100%);
  box-shadow: inset 0 0 2px rgba(90,130,200,0.35);
}
/* Hidden until the cue is playing (screen B); the static lock screen
   has the cue landed, not yet played. */
.eq { display: flex; align-items: center; gap: 4.3px; opacity: 0; }
.story-live .eq { will-change: opacity; }
.eq span {
  width: 2.2px; height: 10px; border-radius: 99px; background: #6FE0CC;
  animation: eq-pulse 1.1s var(--ease-in-out) infinite;
  transform-origin: center;
}
.eq span:nth-child(2) { animation-delay: 180ms; }
.eq span:nth-child(3) { animation-delay: 360ms; }
.screen-glare {
  position: absolute; inset: 0; z-index: 45; pointer-events: none;
  border-radius: 39px;
  background: linear-gradient(115deg, rgba(255,255,255,0.09) 0%, rgba(255,255,255,0.02) 16%, transparent 30%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.05);
}
.home-indicator {
  position: absolute; bottom: 5.8px; left: 50%; transform: translateX(-50%);
  z-index: 45; width: 111px; height: 3.6px; border-radius: 99px;
  background: rgba(242,240,247,0.4);
}

.scroll-hint {
  display: none;
  position: absolute; bottom: 22px; left: 0; right: 0;
  align-items: center; justify-content: center; gap: 6px;
  font-size: 13px; color: var(--text-tertiary);
  pointer-events: none;
}
.story-live .scroll-hint { display: flex; }

/* ── Narrow viewports (live story) ───────────────────── */
@media (max-width: 700px) {
  .story-live .story-grid {
    flex-direction: column; flex-wrap: nowrap;
    justify-content: flex-start;
    padding-top: 74px; gap: 10px;
  }
  .story-live .story-layers {
    flex: 0 0 auto; width: 100%; min-width: 0; max-width: 560px;
    height: min(33svh, 300px);
  }
  .story-live .layer { text-align: center; align-items: center; }
  .story-live .hero-badge { align-self: center; }
  .story-live .hero-actions { justify-content: center; }
  .story-live .layer h1 { font-size: clamp(30px, 9vw, 38px); margin-bottom: 12px; }
  .story-live .hero-sub { font-size: 15px; margin-bottom: 18px; }
  .story-live .layer--beat h2, .story-live .beat-title { font-size: clamp(25px, 7.5vw, 30px); margin-bottom: 10px; }
  .story-live .beat-copy, .story-live .beat-strong { font-size: 15px; }
  .story-live .beat-serif { font-size: clamp(28px, 8.5vw, 34px); }
  .story-live .beat-kicker { font-size: 17px; }
  .story-live .beat-close { font-size: 15px; margin-top: 12px; }
  .story-live .device-col { flex: 1 1 auto; align-self: center; min-height: 0; }
  .story-live .phone { height: min(50svh, 470px); }
  .story-live .beat-note { font-size: 12px; margin-top: 12px; }
  .chip { height: 34px; padding: 0 14px; font-size: 13px; gap: 7px; }
  .layer--beat { padding: 28px 0; }
}

/* Portrait phones only: .story-pin sticks behind the nav mid-scroll, so
   .story-layers' svh-sized box must actually contain the hero (not just
   overflow tidily) or the heading ends up under the nav. Taller box,
   tighter rhythm, and a smaller phone below reclaim that room. Landscape
   keeps the pre-fix rules untouched; see the provenance record. */
@media (max-width: 700px) and (orientation: portrait) {
  .story-live .story-layers { height: min(43svh, 304px); }
  .story-live .hero-badge { margin-bottom: 4px; }
  .story-live .hero-actions { gap: 8px; }
  .story-live .hero-actions .availability-note { margin-top: 4px; }
  .story-live .layer h1 { margin-bottom: 6px; }
  .story-live .hero-sub { margin-bottom: 10px; }
  .story-live .layer--hero { justify-content: flex-end; padding-bottom: 6px; }
  .story-live .device-col { margin-top: 14px; }
  .story-live .phone { height: min(46svh, 470px); }
}

/* Proportional device screen.
   The screen contents are designed against a 412px-wide display
   (1cqw = 4.12px there). cqw units scale every screen metric with the
   actual display width so the device stays credible at any size (a
   46svh phone on an iPhone SE, a 640px showpiece on desktop). The px
   rules above are the fallback for browsers without container queries,
   tuned for a display about 300px wide. */
.phone-screen { container-type: inline-size; }
@supports (width: 1cqw) {
  .scr-status { padding: 5.1cqw 5.8cqw 0; }
  .scr-status__time { font-size: 4.1cqw; }
  .scr-status__icons { gap: 1.7cqw; }
  .ico-signal  { width: 4.6cqw; height: 2.9cqw; }
  .ico-wifi    { width: 4.1cqw; height: 2.9cqw; }
  .ico-battery { width: 6.55cqw; height: 3.15cqw; }
  .island { width: 22.8cqw; height: 8cqw; top: 2.9cqw; border-radius: 4.1cqw; gap: 1.46cqw; }
  .island__cam { width: 2.67cqw; height: 2.67cqw; right: 2.43cqw; }
  .eq { gap: 1.46cqw; }
  .eq span { width: 0.73cqw; height: 3.4cqw; }
  .home-indicator { width: 37.4cqw; height: 1.2cqw; bottom: 1.94cqw; }
  .cue-tick { width: 0.73cqw; height: 3.4cqw; }
  .cue-tick-label { font-size: 3.16cqw; }
  .scr-kicker { font-size: 3.64cqw; }

  .scr-a__inner { padding: 19.9cqw 6.8cqw 0; }
  .scr-a__brand { font-size: 3.16cqw; }
  .ring__dot { width: 2.9cqw; height: 2.9cqw; }
  .ring__dot--mint-r { width: 3.4cqw; height: 3.4cqw; right: -1.7cqw; margin-top: -1.7cqw; box-shadow: 0 0 0 1.94cqw rgba(94,214,193,0.12); }
  .ring__dot--violet { box-shadow: 0 0 0 1.7cqw rgba(147,122,255,0.14); }
  .ring__dot--mint-b { bottom: -1.2cqw; }
  .ring__dot--peach { box-shadow: 0 0 0 1.7cqw rgba(255,138,101,0.12); }
  .ring__dot--faint { width: 1.7cqw; height: 1.7cqw; top: -0.73cqw; margin-left: -0.85cqw; }
  .scr-a__line { font-size: 5.34cqw; }
  .scr-a__status { height: 5.83cqw; margin-top: 3.4cqw; }
  .scr-a__stat { font-size: 3.64cqw; gap: 1.7cqw; }
  .scr-a__foot { font-size: 3.88cqw; padding-bottom: 8.25cqw; }

  .scr-l__inner { padding: 18cqw 5.34cqw 5.34cqw; }
  .scr-l__lock { width: 3.64cqw; height: 4.37cqw; }
  .scr-l__date { font-size: 4.1cqw; margin-top: 2.9cqw; }
  .scr-l__time { font-size: 20.9cqw; }
  .notif { gap: 2.9cqw; border-radius: 5.83cqw; padding: 3.4cqw; box-shadow: 0 2.43cqw 6.8cqw rgba(0,0,0,0.28); }
  .notif__icon { width: 11.65cqw; height: 11.65cqw; border-radius: 2.67cqw; }
  .notif__title { font-size: 3.64cqw; }
  .notif__line { font-size: 3.52cqw; margin-top: 0.49cqw; }
  .notif__side { gap: 1.46cqw; }
  .notif__when { font-size: 3.16cqw; }
  .notif__art { width: 8.74cqw; height: 8.74cqw; border-radius: 1.94cqw; }
  .scr-l__quick { margin-top: 4.85cqw; padding: 0 3.4cqw; }
  .scr-l__qbtn { width: 12.6cqw; height: 12.6cqw; }
  .scr-l__qbtn svg { width: 5.34cqw; height: 5.34cqw; }

  .scr-b__inner { padding: 18.9cqw 7.28cqw 7.28cqw; }
  .scr-b__time { font-size: 3.64cqw; }
  .scr-b__art { border-radius: 6.8cqw; margin-top: 4.85cqw; box-shadow: 0 4.4cqw 10.7cqw rgba(0,0,0,0.5); }
  .scr-b__row { gap: 1.94cqw; margin-top: 6.8cqw; }
  .scr-b__row .cue-tick { height: 3.64cqw; }
  .scr-b__cueline { font-size: 4.85cqw; margin-top: 2.9cqw; }
  .scr-b__song { font-size: 6.3cqw; margin-top: 2.9cqw; }
  .scr-b__artist { font-size: 4.37cqw; margin-top: 0.73cqw; }
  .scr-b__progress { margin-bottom: 4.85cqw; }
  .scr-b__bar { height: 1.09cqw; }
  .scr-b__times { font-size: 3.28cqw; margin-top: 1.7cqw; }
  .scr-b__ctl { gap: 2.43cqw; }
  .pill { height: 12.6cqw; font-size: 4.1cqw; gap: 1.7cqw; }
  .pill svg { width: 3.88cqw; height: 3.88cqw; }
  .scr-b__saved { font-size: 3.88cqw; margin-top: 3.88cqw; min-height: 5.34cqw; gap: 1.7cqw; }
  .scr-b__saved svg { width: 3.88cqw; height: 3.88cqw; }

  .scr-c__inner { padding: 20.4cqw 6.3cqw 0; }
  .scr-c__title { font-size: 8.25cqw; margin-top: 1.46cqw; }
  .scr-c__list { margin-top: 6.8cqw; gap: 4.37cqw; }
  .scr-c__rowitem { gap: 3.4cqw; }
  .scr-c__art { width: 13.6cqw; height: 13.6cqw; border-radius: 2.9cqw; }
  .scr-c__song { font-size: 4.1cqw; }
  .scr-c__why { font-size: 3.64cqw; }
  .scr-c__day { font-size: 3.4cqw; }
  .scr-c__foot { font-size: 3.88cqw; padding-bottom: 8.25cqw; }
}

/* Short phones: tighten the hero so the pinned scene never collides. The
   intro-offer caption stays next to the badge (never hidden) but shrinks
   here so the badge stays above the fold at heights like 375x667. */
@media (max-width: 700px) and (max-height: 780px) {
  .story-live .hero-badge { display: none; }
  .story-live .layer h1 { font-size: 27px; margin-bottom: 10px; }
  .story-live .hero-sub { font-size: 14px; margin-bottom: 14px; }
  .story-live .appstore-badge { height: 40px; }
  .story-live .trial-caption { font-size: 12px; margin-bottom: 4px; }
  .story-live .phone { height: min(46svh, 470px); }
}

/* Portrait short phones: content here is flat (the badge is hidden
   above), so a flatter box fits it with less excess above the nav. The
   phone is sized from whatever height that box leaves in the 100svh
   pinned scene, not a fixed svh fraction, so it stays close to main's
   size on phones that have the room instead of going needlessly small. */
@media (max-width: 700px) and (max-height: 780px) and (orientation: portrait) {
  .story-live .layer h1 { margin-bottom: 6px; }
  .story-live .hero-sub { margin-bottom: 8px; }
  .story-live .story-layers { height: min(42svh, 233px); }
  .story-live .phone { height: min(60svh, calc(100svh - 118px - min(42svh, 233px))); }
}

/* ── Sections below the story ────────────────────────── */
.section { border-top: 1px solid var(--hairline); position: relative; background: var(--bg-canvas); z-index: 3; }
.section__inner { max-width: 1080px; margin: 0 auto; padding: clamp(72px, 10vw, 130px) 20px; }
.section-title {
  margin: 0 0 16px;
  font-size: clamp(30px, 4.5vw, 46px);
  line-height: var(--leading-tight); letter-spacing: var(--tracking-tight);
  font-weight: var(--weight-bold);
}
.section-copy {
  margin: 0 0 14px;
  font-size: var(--text-body-size); line-height: var(--leading-body);
  color: var(--text-secondary); text-wrap: pretty;
}
.section-copy:last-child { margin-bottom: 0; }

.ctx__intro { max-width: 560px; margin-bottom: clamp(40px, 5vw, 60px); }
.ctx__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}
.ctx-card {
  background: var(--surface-card); border-radius: 20px; padding: 20px;
  box-shadow: var(--shadow-card);
}
.ctx-card h3 {
  font-size: var(--text-body-size); font-weight: var(--weight-semibold);
  margin: 12px 0 4px;
}
.ctx-card p {
  margin: 0;
  font-size: var(--text-footnote); color: var(--text-tertiary);
  line-height: var(--leading-snug);
}

.rhythm__inner {
  max-width: 1080px; margin: 0 auto;
  padding: clamp(72px, 10vw, 130px) 20px;
  display: flex; flex-wrap: wrap; align-items: center;
  gap: clamp(40px, 6vw, 90px); justify-content: center;
}
.rhythm__stack { flex: 0 1 380px; min-width: 280px; display: flex; flex-direction: column; gap: 12px; }
.cue-card {
  display: flex; align-items: center; gap: 14px;
  background: var(--surface-card); border-radius: 16px;
  padding: 12px 14px; box-shadow: var(--shadow-card);
}
.cue-card:nth-child(1) { transform: rotate(0.9deg) translateX(-8px); }
.cue-card:nth-child(2) { transform: rotate(-1.2deg); }
.cue-card:nth-child(3) { transform: rotate(0.8deg) translateX(14px); }
.cue-card:nth-child(4) { transform: rotate(-0.6deg); }
.cue-card__art {
  width: 48px; height: 48px; border-radius: var(--radius-artwork-sm);
  flex-shrink: 0; box-shadow: var(--shadow-artwork);
}
.cue-card__art--slate  { background: radial-gradient(circle at 32% 28%, rgba(255,255,255,0.14), rgba(0,0,0,0.10)), #4E5A7A; }
.cue-card__art--rust   { background: radial-gradient(circle at 32% 28%, rgba(255,255,255,0.14), rgba(0,0,0,0.10)), #8A5A4E; }
.cue-card__art--blue   { background: radial-gradient(circle at 32% 28%, rgba(255,255,255,0.14), rgba(0,0,0,0.10)), #4E6A8A; }
.cue-card__art--violet { background: radial-gradient(circle at 32% 28%, rgba(255,255,255,0.14), rgba(0,0,0,0.10)), #6A4E8A; }
.cue-card__meta { min-width: 0; }
.cue-card__why {
  font-family: var(--font-display); font-style: italic;
  font-variation-settings: var(--display-opsz);
  font-size: 14px; color: var(--text-secondary);
}
.cue-card__song { font-size: var(--text-subhead); font-weight: var(--weight-semibold); }
.rhythm__copy { flex: 1 1 340px; min-width: 280px; max-width: 480px; }
.rhythm__strong {
  margin: 0;
  font-size: var(--text-body-size); line-height: var(--leading-body);
  color: var(--text-body); font-weight: var(--weight-semibold);
}
.works-with {
  display: flex; align-items: center; gap: 8px; margin-top: 24px;
  color: var(--text-tertiary); font-size: var(--text-footnote);
}

.intel { overflow: hidden; }
.intel__wash {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 60% 45% at 50% 0%, rgba(147,122,255,0.09), transparent 65%);
}
.intel__inner {
  position: relative;
  max-width: 1080px; margin: 0 auto;
  padding: clamp(72px, 10vw, 130px) 20px;
}
.intel__intro {
  max-width: 640px; margin: 0 auto clamp(44px, 5vw, 64px);
  text-align: center;
}
.intel__intro .hero-badge { margin-bottom: 18px; }
.intel__intro .section-title { margin-bottom: 14px; }
.intel__intro .section-copy { max-width: 56ch; margin-left: auto; margin-right: auto; }
.intel__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}
.intel-card {
  background: var(--surface-card); border-radius: 20px; padding: 26px 24px;
  box-shadow: var(--shadow-card);
}
.intel-card h3 {
  font-size: var(--text-body-size); font-weight: var(--weight-semibold);
  margin: 14px 0 6px;
}
.intel-card p {
  margin: 0;
  font-size: var(--text-subhead); color: var(--text-secondary);
  line-height: var(--leading-body); text-wrap: pretty;
}
.intel__close {
  margin: clamp(36px, 4vw, 52px) auto 0;
  text-align: center;
  font-family: var(--font-display); font-style: italic;
  font-variation-settings: var(--display-opsz);
  font-size: clamp(17px, 2vw, 21px); color: var(--text-secondary);
  max-width: 44ch; text-wrap: pretty;
}

.privacy-blurb__inner {
  max-width: 720px; margin: 0 auto;
  padding: clamp(64px, 8vw, 100px) 20px;
  text-align: center;
}
.privacy-blurb__icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 52px; height: 52px; border-radius: 16px;
  background: var(--mint-soft); margin-bottom: 20px;
}
.privacy-blurb h2 {
  margin: 0 0 14px;
  font-size: clamp(28px, 4vw, 40px);
  line-height: var(--leading-tight); letter-spacing: var(--tracking-tight);
  font-weight: var(--weight-bold);
}
.privacy-blurb p {
  margin: 0 auto 14px;
  font-size: var(--text-body-size); line-height: var(--leading-body);
  color: var(--text-secondary); max-width: 52ch; text-wrap: pretty;
}
.privacy-blurb .link-more {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 22px; padding: 8px 0;
  color: var(--cue);
  font-size: var(--text-subhead); font-weight: var(--weight-medium);
}
.privacy-blurb .link-more:hover { color: var(--cue-strong); }

.cta { border-top: 1px solid var(--hairline); position: relative; overflow: hidden; }
.cta__wash {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 70% 60% at 50% 100%, rgba(147,122,255,0.14), transparent 70%);
}
.cta__inner {
  position: relative;
  max-width: 720px; margin: 0 auto;
  padding: clamp(88px, 12vw, 150px) 20px;
  text-align: center;
}
.cta__logo { display: flex; justify-content: center; margin-bottom: 26px; }
.cta__logo img { width: 44px; height: 41px; }
.cta h2 {
  margin: 0 0 30px;
  font-size: clamp(32px, 5vw, 52px);
  line-height: var(--leading-tight); letter-spacing: var(--tracking-tight);
  font-weight: var(--weight-bold);
}
.cta__actions { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.cta__actions .fine { font-size: var(--text-footnote); color: var(--text-tertiary); }
