/* EarMatch — brand tokens taken from the app's screenshots */
:root {
  --bg: #0e0c14;
  --bg-2: #15121d;
  --surface: #1c1926;
  --surface-2: #26222f;
  --line: rgba(255, 255, 255, 0.09);
  --text: #f6f3fa;
  --muted: #b9b2c6;
  --pink: #ff4f72;
  --coral: #ff7a5c;
  --violet: #9a5cf6;
  --green: #2ee58f;
  --gold: #ffc83d;
  --blue: #3d7bff;
  --grad: linear-gradient(100deg, #ff4f72 0%, #d45bc4 50%, #9a5cf6 100%);
  --grad-deep: linear-gradient(100deg, #d42c52 0%, #a8389c 50%, #7b45dc 100%); /* white text stays readable (4.5:1+) */

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", system-ui, "Helvetica Neue", Arial, sans-serif;
  --font-round: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;

  --r-sm: 12px;
  --r-md: 20px;
  --r-lg: 32px;
  --wrap: 1160px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.05; letter-spacing: -0.035em; font-weight: 800; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; list-style: none; }

:focus-visible { outline: 3px solid var(--pink); outline-offset: 3px; border-radius: 6px; }
::selection { background: rgba(255, 79, 114, .4); color: #fff; }
html { scrollbar-color: #3a3446 var(--bg); }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
@media (max-width: 600px) { .wrap { padding: 0 16px; } }

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: var(--r-sm);
  font-weight: 700; text-decoration: none;
}
.skip:focus { top: 16px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: 999px;
  font: 700 16px/1 var(--font-round); text-decoration: none; cursor: pointer;
  border: 1px solid transparent; transition: transform .15s var(--ease), background-color .2s, border-color .2s;
}
.btn:active { transform: scale(0.97); }
.btn--small { min-height: 40px; padding: 0 18px; font-size: 15px; }
.btn--grad { background: var(--grad-deep); color: #fff; box-shadow: 0 8px 20px -10px rgba(0,0,0,.6); }

/* Official App Store badge: shown unaltered (no effects or animation),
   at least 40px high, with clear space of a quarter of its height around it. */
.store-badge { display: inline-block; padding: 14px; line-height: 0; border-radius: 12px; }
.store-badge img { display: block; height: 54px; width: auto; }
.store-badge:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(14, 12, 20, 0.72);
  backdrop-filter: saturate(160%) blur(16px); -webkit-backdrop-filter: saturate(160%) blur(16px);
  border-bottom: 1px solid var(--line);
}
.nav__inner { display: flex; align-items: center; gap: 24px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 800 20px/1 var(--font-round); letter-spacing: -0.02em; }
.brand img { border-radius: 9px; }
.nav nav { margin-left: auto; }
.nav__links { display: flex; gap: 4px; }
.nav__links a {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 999px;
  color: var(--muted); text-decoration: none; font-weight: 600; font-size: 15px; transition: color .2s, background-color .2s;
}
.nav__links a:hover { color: var(--text); background: rgba(255,255,255,.06); }
.nav__toggle { display: none; }
@media (max-width: 820px) {
  .nav nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0; margin: 0;
    padding: 8px 16px 16px; background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: 0 24px 40px -12px rgba(0,0,0,.7);
  }
  .nav.is-open nav { display: block; }
  .nav__links { flex-direction: column; }
  .nav__links a { min-height: 48px; font-size: 17px; color: var(--text); }
  .nav__toggle {
    display: grid; place-items: center; width: 44px; height: 44px; margin-left: auto; border-radius: 50%;
    border: 1px solid var(--line); background: transparent; color: var(--text); cursor: pointer;
  }
  .nav__toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
  .nav__inner { gap: 12px; }
}
/* Sections land below the sticky nav when jumped to */
section[id] { scroll-margin-top: 76px; }

/* ---------- Hero ---------- */
/* Animatable color stops so the background can fade between moods */
@property --a1 { syntax: "<color>"; inherits: true; initial-value: #ff5a36; }
@property --a2 { syntax: "<color>"; inherits: true; initial-value: #ff4f72; }
@property --a3 { syntax: "<color>"; inherits: true; initial-value: #9a5cf6; }
@property --a4 { syntax: "<color>"; inherits: true; initial-value: #ffc83d; }

.hero {
  --a1: #ff5a36; --a2: #ff4f72; --a3: #9a5cf6; --a4: #ffc83d;
  position: relative; isolation: isolate; overflow: hidden;
  padding: 28px 0 80px;
  transition: --a1 1.2s ease, --a2 1.2s ease, --a3 1.2s ease, --a4 1.2s ease;
}
.hero[data-mood="drive"] { --a1: #3d8bff; --a2: #22c3ee; --a3: #7b5cf6; --a4: #2ee58f; }
.hero[data-mood="study"] { --a1: #8b7cf6; --a2: #5b6bd6; --a3: #c084fc; --a4: #38bdf8; }
.hero[data-mood="party"] { --a1: #ee2f98; --a2: #a21cf0; --a3: #ff7a5c; --a4: #ffd23f; }

.aurora { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.aurora::after { /* fade into the page below */
  content: ""; position: absolute; inset: auto 0 0; height: 220px;
  background: linear-gradient(to bottom, transparent, var(--bg));
}
.aurora i {
  position: absolute; width: 58vmax; height: 58vmax; border-radius: 50%;
  filter: blur(70px); opacity: .55; mix-blend-mode: screen;
  animation: drift 22s ease-in-out infinite alternate;
}
.aurora i:nth-child(1) { background: radial-gradient(closest-side, var(--a1), transparent); left: -18vmax; top: -24vmax; }
.aurora i:nth-child(2) { background: radial-gradient(closest-side, var(--a2), transparent); right: -16vmax; top: -10vmax; animation-duration: 26s; animation-delay: -6s; }
.aurora i:nth-child(3) { background: radial-gradient(closest-side, var(--a3), transparent); left: 18%; bottom: -34vmax; animation-duration: 30s; animation-delay: -12s; }
.aurora i:nth-child(4) { background: radial-gradient(closest-side, var(--a4), transparent); right: 6%; bottom: -30vmax; width: 36vmax; height: 36vmax; opacity: .3; animation-duration: 24s; }
@keyframes drift {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(6vmax, 4vmax) scale(1.08); }
  100% { transform: translate(-4vmax, 7vmax) scale(.95); }
}

/* One centered column: headline, then buttons, then the player */
.hero__grid { display: grid; grid-template-columns: 1fr; gap: 36px; justify-items: center; }
.hero__copy { display: flex; flex-direction: column; align-items: center; text-align: center; }
.hero h1 { font-size: clamp(38px, 5.6vw, 80px); text-shadow: 0 2px 30px rgba(0,0,0,.25); }
.lede { margin-top: 18px; max-width: 46ch; text-wrap: balance; font-size: clamp(17px, 1.5vw, 20px); color: #e4ddeb; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 12px 28px; margin-top: 26px; align-items: center; justify-content: center; }
.hero__fine { margin-top: 16px; font: 600 14px/1.4 var(--font-round); color: #ddd5e6; }

/* The big call to action */
.btn-try {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; gap: 12px;
  min-height: 60px; padding: 0 32px 0 26px; border-radius: 999px;
  /* darkened mood colors so the white label stays readable in every mood */
  background: linear-gradient(100deg, color-mix(in oklab, var(--a2) 72%, #000), color-mix(in oklab, var(--a3) 72%, #000));
  color: #fff; text-decoration: none; font: 800 20px/1 var(--font-round); letter-spacing: -0.01em;
  box-shadow: 0 14px 30px -12px rgba(0,0,0,.7), inset 0 1px 0 rgba(255,255,255,.3);
  transition: transform .2s var(--ease), box-shadow .3s;
}
.btn-try svg { width: 24px; height: 24px; }
.btn-try:hover { transform: translateY(-2px); box-shadow: 0 20px 36px -12px rgba(0,0,0,.75), inset 0 1px 0 rgba(255,255,255,.3); }
.btn-try:active { transform: scale(.97); }
.hero__more { color: var(--text); font-weight: 700; text-decoration: none; padding: 12px 0; border-bottom: 2px solid rgba(255,255,255,.3); transition: border-color .2s; }
.hero__more:hover { border-color: var(--text); }

@media (max-width: 960px) {
  .hero { padding: 28px 0 56px; }
  .hero__grid { gap: 28px; }
}
@media (max-width: 480px) {
  .hero__ctas { gap: 4px 20px; margin-top: 22px; }
  .btn-try { min-height: 56px; font-size: 18px; padding: 0 24px 0 20px; }
  .hero__fine { margin-top: 12px; font-size: 13px; }
}


/* ---------- Swipe deck ---------- */
.deck {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  justify-self: center; width: min(100%, 420px); padding: 14px 18px 18px; border-radius: 36px;
  background: rgba(20, 17, 28, .55); border: 1px solid rgba(255,255,255,.1);
  backdrop-filter: blur(20px) saturate(140%); -webkit-backdrop-filter: blur(20px) saturate(140%);
  box-shadow: 0 40px 80px -30px rgba(0,0,0,.7);
}
.moodbar { display: flex; gap: 4px; padding: 4px; border-radius: 999px; background: rgba(0,0,0,.3); }
.mood-chip {
  min-height: 36px; padding: 0 15px; border: 0; border-radius: 999px; cursor: pointer;
  background: transparent; color: var(--muted); font: 700 14px/1 var(--font-round);
  transition: background-color .25s, color .25s;
}
.mood-chip:hover { color: var(--text); }
.mood-chip[aria-pressed="true"] { color: #fff; background: linear-gradient(100deg, color-mix(in oklab, var(--a1) 66%, #000), color-mix(in oklab, var(--a2) 66%, #000)); }

.deck__hint { font: 600 14px/1.4 var(--font-round); color: var(--muted); text-align: center; }
.hint--touch { display: none; }
@media (pointer: coarse) { .hint--touch { display: inline; } .hint--mouse { display: none; } }
.deck__stage { position: relative; width: 100%; max-width: 340px; aspect-ratio: 340 / 385; }
.deck__nojs { position: absolute; inset: 0; display: grid; place-items: center; padding: 28px; text-align: center; border-radius: 28px; background: var(--surface); border: 1px solid var(--line); color: var(--muted); }
.js .deck__nojs { display: none; }
html:not(.js) .deck__controls, html:not(.js) .deck__hint, html:not(.js) .mix, html:not(.js) .moodbar { display: none; }
/* Song previews are off on the website, so each card says so: a caption, not a button */
.card__note {
  position: absolute; z-index: 1; left: 0; right: 0; bottom: 0;
  display: flex; align-items: flex-start; gap: 7px; padding: 34px 14px 12px;
  background: linear-gradient(to bottom, transparent, rgba(8, 6, 12, .78));
  color: #fff; font: 600 13px/1.3 var(--font-round);
}
.card__note svg { width: 14px; height: 14px; margin-top: 2px; fill: currentColor; opacity: .85; flex: none; }
.card {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  padding: 14px; border-radius: 28px;
  background: var(--surface); border: 1px solid var(--line);
  box-shadow: 0 30px 60px -20px rgba(0,0,0,.6);
  touch-action: pan-y; user-select: none; -webkit-user-select: none;
  transition: transform .45s var(--ease), opacity .45s var(--ease);
}
.card--back { transform: translateY(12px) scale(.95); opacity: .55; pointer-events: none; }
.card--back .card__meta { visibility: hidden; } /* sits under the top card; only its edge shows */
.card--top { cursor: grab; z-index: 2; }
.card--top.dragging { cursor: grabbing; transition: none; }
.card.out-right { transform: translateX(130%) rotate(16deg); opacity: 0; }
.card.out-left { transform: translateX(-130%) rotate(-16deg); opacity: 0; }
.card.out-up { transform: translateY(-120%) scale(.9); opacity: 0; }
.card__art { position: relative; flex: 1; border-radius: 18px; overflow: hidden; }
.card__art::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 30% 20%, rgba(255,255,255,.22), transparent 55%); }
.card__eq { position: absolute; left: 14px; bottom: 14px; display: none; align-items: flex-end; gap: 3px; height: 18px; z-index: 1; }
.card__eq b { width: 4px; border-radius: 2px; background: #fff; animation: eq 0.9s ease-in-out infinite alternate; }
.card__eq b:nth-child(1) { height: 40%; }
.card__eq b:nth-child(2) { height: 100%; animation-delay: -.3s; }
.card__eq b:nth-child(3) { height: 60%; animation-delay: -.6s; }
.card__eq b:nth-child(4) { height: 85%; animation-delay: -.15s; }
.card--back .card__eq b { animation: none; }
.card.is-playing .card__eq { display: flex; }
.card__art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.card__art::after { z-index: 0; }
.card__eq { filter: drop-shadow(0 1px 3px rgba(0,0,0,.6)); }

/* Play / pause, like the app's button in the corner of the artwork */
.card__play {
  position: absolute; z-index: 3; left: 50%; top: 50%; transform: translate(-50%, -50%);
  display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 22px 0 18px;
  border: 0; border-radius: 999px; cursor: pointer; color: #fff;
  background: rgba(14, 12, 20, .62); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  font: 700 16px/1 var(--font-round); white-space: nowrap; box-shadow: 0 10px 30px -10px rgba(0,0,0,.7);
  transition: transform .2s var(--ease), background-color .2s;
}
.card__play svg { width: 22px; height: 22px; fill: currentColor; }
.card__play:hover { background: rgba(14, 12, 20, .8); }
.card__play--small { left: auto; top: auto; right: 12px; bottom: 12px; transform: none; width: 48px; height: 48px; min-height: 0; padding: 0; justify-content: center; }
.card__play--small .card__play-label { display: none; }
.deck__credit { font-size: 12px; color: var(--muted); text-align: center; }
@keyframes eq { from { transform: scaleY(.3); } to { transform: scaleY(1); } }
.card__eq b { transform-origin: bottom; }
.card__stamp {
  position: absolute; top: 18px; z-index: 1; padding: 6px 12px; border: 3px solid; border-radius: 10px;
  font: 800 22px/1 var(--font-round); letter-spacing: .02em; opacity: 0; transition: opacity .15s;
}
.card__stamp--like { left: 18px; color: var(--green); transform: rotate(-12deg); }
.card__stamp--nope { right: 18px; color: var(--pink); transform: rotate(12deg); }
.card__meta { padding: 14px 4px 2px; }
.card__genre { color: var(--pink); font: 700 13px/1 var(--font-round); letter-spacing: .06em; }
.card__title { margin-top: 7px; font: 800 25px/1.1 var(--font-round); letter-spacing: -0.02em; }
.card__artist { margin-top: 3px; color: var(--muted); font-size: 16px; }
.card__time { display: flex; align-items: center; gap: 10px; margin-top: 12px; font: 500 13px/1 var(--font-round); color: var(--muted); font-variant-numeric: tabular-nums; }
.card__bar { flex: 1; height: 4px; border-radius: 4px; background: rgba(255,255,255,.12); overflow: hidden; }
.card__bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--pink), var(--violet)); transform-origin: left; transform: scaleX(0); }

.deck__end {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  padding: 22px 18px 12px; text-align: center; border-radius: 28px; background: var(--surface); border: 1px solid var(--line);
}
/* The finished mix can grow taller than a card */
.deck__stage.is-end { aspect-ratio: auto; min-height: 260px; }
.deck__stage.is-end .deck__end { position: relative; inset: auto; min-height: 260px; }
.deck__end h3 { font-size: 26px; }
.deck__end p { color: var(--muted); font-size: 15px; line-height: 1.4; }
.end__list { width: 100%; display: grid; gap: 6px; margin: 4px 0 2px; text-align: left; }
.end__list li { display: flex; align-items: center; gap: 10px; padding: 6px 10px 6px 6px; border-radius: 12px; background: rgba(255,255,255,.05); }
.end__list i { flex: none; width: 34px; height: 34px; border-radius: 8px; }
.end__list span { min-width: 0; display: flex; flex-direction: column; color: var(--muted); font-size: 13px; line-height: 1.3; }
.end__list b { color: var(--text); font: 700 14px/1.3 var(--font-round); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.end__list svg { flex: none; width: 16px; height: 16px; margin-left: auto; fill: var(--gold); }
.store-badge--end { padding: 11px; } /* clear space: a quarter of the 44px badge */
.store-badge--end img { height: 44px; }
.deck__again { background: none; border: 0; color: var(--muted); font: 600 15px/1 var(--font-round); cursor: pointer; padding: 12px; text-decoration: underline; text-underline-offset: 4px; }
.deck__again:hover { color: var(--text); }

.deck__controls { display: flex; align-items: flex-start; gap: 14px; }
/* Every button sits in a 64px row so the labels underneath line up */
.ctl-wrap { display: grid; grid-template-rows: 64px auto; place-items: center; row-gap: 6px; font: 600 12px/1 var(--font-round); color: var(--muted); }
.ctl {
  display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--line); cursor: pointer; color: inherit;
  transition: transform .15s var(--ease), box-shadow .2s;
}
.ctl svg { width: 28px; height: 28px; }
.ctl:active { transform: scale(.92); }
.ctl--nope svg { fill: none; stroke: var(--pink); stroke-width: 2.6; stroke-linecap: round; }
.ctl--star { width: 54px; height: 54px; }
.ctl--star svg { width: 24px; height: 24px; fill: var(--gold); }
.ctl--like svg { fill: var(--green); }
.ctl { box-shadow: 0 8px 18px -8px rgba(0,0,0,.7); }
.ctl:hover:not(:disabled) { transform: translateY(-2px); border-color: rgba(255,255,255,.2); }
.ctl--nope:hover:not(:disabled) { border-color: color-mix(in srgb, var(--pink) 55%, transparent); }
.ctl--star:hover:not(:disabled) { border-color: color-mix(in srgb, var(--gold) 55%, transparent); }
.ctl--like:hover:not(:disabled) { border-color: color-mix(in srgb, var(--green) 55%, transparent); }
.ctl--undo { width: 44px; height: 44px; }
.ctl--undo svg { width: 20px; height: 20px; fill: none; stroke: var(--muted); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.ctl:disabled { opacity: .4; cursor: not-allowed; box-shadow: none; }
.ctl.pop { animation: pop .35s var(--ease); }
@keyframes pop { 40% { transform: scale(1.18); } }

/* Liked songs pile up here, like a playlist being built */
.mix { width: 100%; padding-top: 14px; border-top: 1px solid var(--line); }
.mix__label { font: 600 14px/1.3 var(--font-round); color: var(--muted); text-align: center; }
.mix__list { display: flex; justify-content: center; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.mix__list li { animation: drop .45s var(--ease); }
.mix__item {
  display: inline-flex; align-items: center; gap: 6px; max-width: 168px; min-height: 32px; padding: 3px 8px 3px 3px;
  border-radius: 999px; border: 1px solid var(--line); background: rgba(255,255,255,.05);
  color: var(--text); font: 600 13px/1 var(--font-round); cursor: pointer; transition: border-color .2s, background-color .2s;
}
.mix__item i { flex: none; width: 24px; height: 24px; border-radius: 50%; }
.mix__item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mix__item svg { flex: none; width: 12px; height: 12px; fill: var(--gold); }
.mix__item .mix__x { fill: none; stroke: var(--muted); stroke-width: 2.4; stroke-linecap: round; }
.mix__item:hover { border-color: rgba(255,255,255,.28); background: rgba(255,255,255,.08); }
.mix__item:hover .mix__x { stroke: var(--text); }
.mix__more { align-self: center; padding: 0 4px; color: var(--muted); font: 600 13px/1 var(--font-round); }
@keyframes drop { from { transform: translateY(-16px) scale(.6); opacity: 0; } }

/* little hearts that float up when you like a song */
.burst { position: absolute; z-index: 5; pointer-events: none; width: 22px; height: 22px; fill: var(--green); animation: float 1s var(--ease) forwards; }
@keyframes float { to { transform: translate(var(--dx), -120px) scale(1.4); opacity: 0; } }

/* ---------- Section heads ---------- */
.section-head { max-width: 720px; margin: 0 auto 48px; text-align: center; }
.section-head h2 { font-size: clamp(34px, 4.6vw, 56px); }
.section-head p { margin-top: 16px; color: var(--muted); font-size: 19px; }

/* ---------- Feature chapters (Apple-style stacked panels) ---------- */
.features { padding: 112px 0 40px; }
.chapter {
  --accent: var(--pink);
  position: relative; isolation: isolate; overflow: hidden;
  display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: end;
  margin-bottom: 24px; padding: 72px 72px 0;
  border-radius: 40px; border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
  background:
    linear-gradient(150deg, color-mix(in srgb, var(--accent) 20%, var(--surface)) 0%, var(--surface) 55%);
}
.chapter::before {
  content: ""; position: absolute; z-index: -1; width: 80%; height: 110%; right: -15%; bottom: -45%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 60%, transparent), transparent);
  filter: blur(50px);
}
.chapter--flip::before { right: auto; left: -15%; }
.chapter--flip .chapter__copy { order: 2; }
.chapter__copy { align-self: center; padding-bottom: 72px; }
.chapter__label { display: flex; align-items: center; gap: 10px; color: var(--accent); font: 700 19px/1 var(--font-round); }
.chapter h3 { margin-top: 18px; font-size: clamp(38px, 5vw, 68px); }
.chapter__copy > p:last-child { margin-top: 22px; color: var(--muted); font-size: 19px; max-width: 40ch; }

/* phone image: crop the screenshot down to just the iPhone (drops the baked-in headline and side background) */
.phone {
  --top: 29.9; /* where the phone starts in the screenshot, % of its height */
  margin: 0; justify-self: center; width: min(100%, 340px); aspect-ratio: 1 / 1.9; overflow: hidden;
  border-radius: 14% 14% 0 0 / 7.4% 7.4% 0 0;
}
.phone--high { --top: 26.4; }
.js .phone { transform: translateY(60px); opacity: .2; transition: transform .9s var(--ease), opacity .9s var(--ease); }
.js .phone.in { transform: none; opacity: 1; }
/* image is 126.3% of the frame wide and 2.173x as tall as wide, so 1% of its height = 2.745% of frame width */
.phone img { width: 126.3%; max-width: none; height: auto; margin-left: -13%; margin-top: calc(var(--top) * -2.745%); }

@media (max-width: 860px) {
  .features { padding: 80px 0 24px; }
  .chapter { grid-template-columns: 1fr; gap: 32px; padding: 40px 24px 0; border-radius: 28px; margin-bottom: 16px; }
  .chapter--flip .chapter__copy { order: 0; }
  .chapter__copy { padding-bottom: 0; }
  .phone { width: min(100%, 280px); }
}

/* ---------- Moods ---------- */
.moods { padding: 0 0 112px; }
.mood-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.mood { border-radius: 26px; overflow: hidden; }
.mood__btn {
  position: relative; display: flex; flex-direction: column; justify-content: flex-end; gap: 6px;
  width: 100%; min-height: 300px; padding: 26px; border: 0; border-radius: 26px; cursor: pointer;
  color: #fff; text-align: left; font: inherit;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.25);
  transition: transform .25s var(--ease), box-shadow .25s;
}
.mood__btn:hover { transform: translateY(-4px); box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 24px 40px -18px rgba(0,0,0,.7); }
.mood__btn:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.mood__btn svg { width: 44px; height: 44px; margin-bottom: auto; padding-bottom: 16px; box-sizing: content-box; fill: #fff; }
.mood--party svg { fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.mood__name { font: 800 30px/1 var(--font-round); letter-spacing: -0.02em; }
.mood__desc { color: #fff; font-size: 16px; }
.mood__go { margin-top: 10px; align-self: flex-start; padding: 8px 14px; border-radius: 999px; background: rgba(0,0,0,.22); font: 700 14px/1 var(--font-round); }
.mood--gym .mood__btn { background: linear-gradient(to top, rgba(0,0,0,.34), transparent 70%), linear-gradient(160deg, #d43f22, #9e1f12); }
.mood--drive .mood__btn { background: linear-gradient(to top, rgba(0,0,0,.34), transparent 70%), linear-gradient(160deg, #2f6fe0, #1b3f9a); }
.mood--study .mood__btn { background: linear-gradient(to top, rgba(0,0,0,.34), transparent 70%), linear-gradient(160deg, #6a5bc9, #352c6a); }
.mood--party .mood__btn { background: linear-gradient(to top, rgba(0,0,0,.34), transparent 70%), linear-gradient(160deg, #d6268a, #7a12c4); }
@media (max-width: 960px) { .mood-grid { grid-template-columns: repeat(2, 1fr); } .mood__btn { min-height: 230px; } }
@media (max-width: 480px) { .mood-grid { gap: 10px; } .mood__btn { min-height: 200px; padding: 18px; } .mood__btn svg { width: 34px; height: 34px; padding-bottom: 12px; } .mood__name { font-size: 24px; } .mood__desc { font-size: 14px; } }

/* ---------- Video ---------- */
.film { padding: 96px 0; background: var(--bg-2); border-block: 1px solid var(--line); overflow: hidden; }
.film__grid { display: grid; grid-template-columns: 1fr auto; gap: 64px; align-items: center; }
.film h2 { font-size: clamp(34px, 4.6vw, 56px); }
.film p { margin-top: 16px; color: var(--muted); font-size: 19px; max-width: 36ch; }
.film__frame {
  margin: 0; width: 320px; padding: 10px; border-radius: 48px;
  background: #1f1c27; border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .7);
}
.film__frame video { width: 100%; height: auto; aspect-ratio: 9 / 16; border-radius: 38px; background: #000; object-fit: cover; }
@media (max-width: 860px) {
  .film { padding: 72px 0; }
  .film__grid { grid-template-columns: 1fr; gap: 40px; justify-items: center; text-align: center; }
  .film p { margin-inline: auto; }
  .film__frame { width: min(100%, 300px); }
}

/* ---------- FAQ ---------- */
.faq { padding: 112px 0; }
.faq__wrap { display: grid; grid-template-columns: .8fr 1.2fr; gap: 56px; align-items: start; }
.faq h2 { font-size: clamp(34px, 4.6vw, 56px); position: sticky; top: 100px; }
.faq__list { display: grid; gap: 12px; }
.faq details { border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); }
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 64px; padding: 18px 22px; cursor: pointer; list-style: none;
  font: 700 18px/1.3 var(--font-round);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--surface-2)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 28 28'%3E%3Cpath d='M14 9v10M9 14h10' stroke='%23ff4f72' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E") center/100% no-repeat;
  transition: transform .25s var(--ease);
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq summary:focus-visible { outline-offset: -3px; border-radius: var(--r-md); }
.faq details p { padding: 0 22px 22px; color: var(--muted); max-width: 60ch; }
@media (max-width: 860px) { .faq { padding: 80px 0; } .faq__wrap { grid-template-columns: 1fr; gap: 32px; } .faq h2 { position: static; } }

/* ---------- Final CTA ---------- */
.cta { position: relative; padding: 120px 0; text-align: center; overflow: hidden; isolation: isolate; }
.cta::before {
  content: ""; position: absolute; inset: 10% 10% -30%; z-index: -1; filter: blur(80px);
  background: radial-gradient(closest-side at 25% 50%, rgba(255,90,54,.4), transparent), radial-gradient(closest-side at 50% 55%, rgba(255,79,114,.45), transparent), radial-gradient(closest-side at 75% 50%, rgba(154,92,246,.5), transparent);
}
.cta__inner { display: flex; flex-direction: column; align-items: center; gap: 28px; }
.cta__logo { border-radius: 24px; box-shadow: 0 20px 50px -10px rgba(0,0,0,.6); }
.cta h2 { font-size: clamp(36px, 5.6vw, 68px); max-width: 16ch; }
.cta__inner .store-badge { margin: -14px 0; } /* the badge's clear space shouldn't double the gap */
.cta__fine { font: 600 15px/1.4 var(--font-round); color: #ddd5e6; }

/* ---------- Footer ---------- */
.footer { padding: 32px 0 40px; border-top: 1px solid var(--line); }
.footer__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.footer .brand { font-size: 17px; }
.footer .brand img { border-radius: 7px; }
.footer p { color: var(--muted); font-size: 14px; }

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .card--top .card__bar i { animation: none; transform: scaleX(.55); }
  .aurora i, .card__eq b { animation: none !important; }
  .js .phone { transform: none; opacity: 1; }
}

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* A quick glow so people see where "Try the app" took them */
.deck--flash { animation: deckFlash 1.4s var(--ease); }
@keyframes deckFlash {
  0% { box-shadow: 0 40px 80px -30px rgba(0,0,0,.7), 0 0 0 0 color-mix(in srgb, var(--a2) 70%, transparent); }
  35% { box-shadow: 0 40px 80px -30px rgba(0,0,0,.7), 0 0 0 10px color-mix(in srgb, var(--a2) 45%, transparent); }
  100% { box-shadow: 0 40px 80px -30px rgba(0,0,0,.7), 0 0 0 24px transparent; }
}

/* Official Apple Music badge: shown exactly as Apple supplies it (no effects),
   with clear space of at least 1/10 of its height around it */
.am-badge { display: inline-block; padding: 6px; line-height: 0; border-radius: 10px; }
.am-badge[hidden] { display: none; }
.am-badge img { width: 141px; height: 41px; }
.deck__credit[hidden] { display: none; }

/* Short laptop screens: tighter hero and a smaller card, so the song card shows on load */
@media (min-width: 961px) and (max-height: 960px) {
  .hero { padding-top: 20px; }
  .hero__grid { gap: 18px; }
  .hero h1 { font-size: clamp(38px, 4.6vw, 64px); }
  .lede { margin-top: 12px; }
  .hero__ctas { margin-top: 16px; }
  .btn-try { min-height: 52px; }
  .hero__fine { margin-top: 10px; }
  .deck { gap: 10px; padding-top: 12px; }
  .deck__stage { max-width: 268px; }
}

/* Phones: keep the swipe buttons on the first screen */
@media (max-width: 480px) {
  .hero { padding-top: 16px; }
  .hero__grid { gap: 14px; }
  .hero h1 { font-size: 36px; }
  .lede { margin-top: 10px; font-size: 16px; }
  .hero__ctas { margin-top: 16px; }
  .hero__fine { margin-top: 8px; }
  .deck { padding: 10px 12px 16px; gap: 10px; border-radius: 30px; }
  .deck__stage:not(.is-end) { max-width: 290px; aspect-ratio: 1 / 1; }
  .card { padding: 10px; }
  .card__meta { padding-top: 10px; }
  .card__title { font-size: 22px; margin-top: 5px; }
}
