/* Landing page, sign-in, connecting Tidal, setting up a speaker. */

/* ---------- onboarding ---------- */
.boot { height: 100%; display: grid; place-items: center; animation: fade .4s; }
.onboard { position: relative; min-height: 100%; display: grid; place-items: center; padding: 24px; overflow: auto; isolation: isolate; }
.onboard-glow { position: fixed; inset: 0; z-index: -1; background:
  radial-gradient(600px 400px at 15% 10%, rgba(255,107,74,.28), transparent 70%),
  radial-gradient(500px 400px at 90% 90%, rgba(45,212,191,.14), transparent 70%), var(--bg); }
.onboard-card { width: min(460px, 100%); padding: 40px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.onboard-card .brand { margin-bottom: 32px; }
.hero-title { font-size: 44px; line-height: 1.05; letter-spacing: -.035em; font-weight: 850; margin: 0 0 14px; }
.hero-sub { color: var(--text-2); font-size: 17px; margin: 0 0 32px; }
.title { font-size: 26px; font-weight: 800; letter-spacing: -.02em; margin: 0 0 8px; }
.signin { display: grid; gap: 16px; justify-items: start; }
.gbtn { min-height: 44px; color-scheme: light; }
/* Google's button is an iframe with a light colour scheme; on our dark page the browser
   would paint an opaque white backdrop behind it unless the iframe is light too. */
.gbtn iframe { color-scheme: light; }
.dev-login { display: flex; gap: 8px; width: 100%; }
.steps { display: flex; gap: 6px; margin: -16px 0 24px; }
.step { height: 4px; flex: 1; border-radius: 2px; background: var(--line); }
.step.done { background: var(--accent); }
.tidal-mark { display: inline-block; font-weight: 900; letter-spacing: .3em; font-size: 13px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 6px; margin-bottom: 16px; }
.waiting { display: flex; gap: 16px; align-items: center; padding: 16px; border-radius: 12px; background: var(--raised); }
.waiting p { margin: 0; }
.skip { position: fixed; bottom: 24px; left: 0; right: 0; display: flex; justify-content: center; }

/* ---------- landing ----------
   Quiet on purpose: type, space, real screenshots of the app and plain words. No decoration.
   The page scrolls inside .landing (the body never scrolls, the app shell needs that). */
.landing { height: 100%; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; overscroll-behavior-y: contain; background: var(--bg); }
.landing-wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 clamp(20px, 5vw, 48px); }

.landing-title { font-size: clamp(36px, 5.2vw, 66px); line-height: 1.05; font-weight: 600; letter-spacing: -.04em; margin: 0 0 24px; text-wrap: balance; }
.landing-sub { font-size: clamp(16px, 1.4vw, 19px); line-height: 1.55; color: var(--text-2); max-width: 34em; margin: 0 0 36px; text-wrap: pretty; }
.landing-signin { display: grid; gap: 14px; justify-items: start; }
.landing .dev-login { max-width: 400px; }
.landing-note { margin: 0; font-size: 13px; color: var(--text-3); }

/* screenshots of the real app (static/img/landing/) */
.lp-shot { display: block; max-width: 100%; height: auto; }
/* No device frames and no borders: the screen itself floats, with rounded corners, a soft shadow
   and a slow drift up and down. */
.lp-float { border-radius: 14px; background: var(--surface);
  box-shadow: 0 40px 80px -24px rgba(0,0,0,.9), 0 0 120px -40px rgba(255,138,91,.18);
  animation: lp-drift 7s ease-in-out infinite alternate; }
.lp-phone { border-radius: 30px; }
.lp-wide { border-radius: 18px; }
.lp-crop { border-radius: 14px; animation-duration: 5.5s; animation-delay: -2s; }
.lp-over { animation-delay: -3.5s; }
@keyframes lp-drift { from { transform: translateY(0); } to { transform: translateY(-10px); } }

/* hero: text on top, the app below it, cut off by the bottom of the screen */
/* hero: text on the left, the app on the right, both within one screen */
/* hero: the title and the sign-in, straight on a full-width picture of the app, darkened so they read */
.lp-hero { position: relative; display: grid; place-items: center; min-height: 100svh; overflow: hidden; isolation: isolate; }
.lp-hero-bg { position: absolute; inset: 0; z-index: -1; }
.lp-hero-bg img { width: 100%; height: 100%; object-fit: cover; }
.lp-hero-wide { object-position: center 30%; transform: scale(1.04); }
.lp-hero-tall { display: none; object-position: center 18%; }
.lp-hero-bg::after { content: ""; position: absolute; inset: 0;
  background: radial-gradient(70% 60% at 50% 50%, rgba(10,10,12,.82) 0%, rgba(10,10,12,.6) 55%, rgba(10,10,12,.45) 100%),
    linear-gradient(to bottom, var(--bg) 4%, rgba(10,10,12,.55) 16%, rgba(10,10,12,.2) 34%, rgba(10,10,12,.35) 70%, var(--bg)); }
.lp-hero-text { display: flex; flex-direction: column; align-items: center; text-align: center; padding-top: 24px; padding-bottom: 48px; }
.lp-hero-text.landing-wrap { max-width: 1320px; } /* the title may use more of the width than the page text */
.lp-hero-text .landing-title { font-size: clamp(44px, 6.4vw, 92px); line-height: 1.02; margin: 0 0 36px; text-shadow: 0 2px 40px rgba(0,0,0,.6); }
.lp-hero-text .landing-signin { justify-items: center; }
.lp-hero-logo { margin-bottom: clamp(28px, 5vh, 48px); filter: drop-shadow(0 2px 24px rgba(0,0,0,.6)); }
.lp-hero-logo .wordmark { height: clamp(84px, 11vw, 120px); }

/* what anybeat is, in one sentence, before the steps */
.lp-intro { display: grid; justify-items: center; gap: 16px; text-align: center; padding-top: clamp(64px, 12vh, 120px); padding-bottom: clamp(24px, 6vh, 56px); }
.lp-intro-text { margin: 0; max-width: 30em; font-size: clamp(20px, 2vw, 28px); line-height: 1.4; font-weight: 500; letter-spacing: -.015em; color: var(--text); text-wrap: balance; }

/* the four steps: one screen tall per step; inside, the list and the picture stay put */
.lp-steps { position: relative; height: calc(var(--n) * 100svh); }
.lp-pin { position: sticky; top: 64px; height: calc(100svh - 64px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(40px, 6vw, 96px); align-content: center; }
.lp-list { list-style: none; margin: 0; padding: 0; counter-reset: none; }
.lp-step { border-top: 1px solid var(--line); }
.lp-step:last-child { border-bottom: 1px solid var(--line); }
.lp-step-head { display: flex; align-items: baseline; gap: 18px; width: 100%; padding: 20px 0; border: 0; background: none; color: var(--text-3); text-align: left; cursor: pointer; font: inherit; }
.lp-num { font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: .04em; }
.lp-step-title { font-size: 21px; font-weight: 600; letter-spacing: -.02em; transition: color .3s, font-size .3s; }
.lp-step-head:hover { color: var(--text-2); }
.lp-step.on .lp-step-head { color: var(--text); padding-bottom: 12px; }
.lp-step.on .lp-num { color: var(--accent); }
.lp-step.on .lp-step-title { font-size: clamp(26px, 2.6vw, 34px); letter-spacing: -.03em; }
.lp-step-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .4s var(--ease); }
.lp-step-body p { overflow: hidden; margin: 0; padding-left: 38px; font-size: 17px; line-height: 1.6; color: var(--text-2); max-width: 32em; }
.lp-step.on .lp-step-body { grid-template-rows: 1fr; }
.lp-step.on .lp-step-body p { padding-bottom: 24px; }
.lp-step-media { display: none; }

/* the picture: as tall as the list beside it, never taller; cards slide up as the scroll moves on */
.lp-stage { position: relative; align-self: stretch; margin: -40px 0; } /* about as tall as the list: the row is sized by the list alone */
.lp-card { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; opacity: 0; transform: translateY(48px) scale(.97); transition: opacity .5s var(--ease), transform .6s var(--ease); pointer-events: none; }
.lp-card.past { transform: translateY(-48px) scale(.97); }
.lp-card.on { opacity: 1; transform: none; }
/* the canvas: a soft tile tinted with the album's colours; screens sit on it with rounded corners and a
   shadow, a phone runs off its bottom edge (only the useful top part shows) */
.lp-shots { position: relative; overflow: hidden; aspect-ratio: 1.06; border-radius: 28px; isolation: isolate;
  background: radial-gradient(120% 90% at 25% 0%, var(--tint, #3a3a44) 0%, transparent 62%), linear-gradient(180deg, #19191f, #101014); }
.lp-shots > .lp-float { position: absolute; }
.lp-shots > .lp-float:first-child { animation: none; }
.lp-shots > .lp-phone { width: 60%; left: 20%; top: 8%; border-radius: 26px; box-shadow: 0 30px 80px -20px rgba(0,0,0,.8); }
.lp-shots > .lp-wide { width: 86%; left: 7%; top: 14%; }
.lp-shots > .lp-wide.lp-low-right { width: 54%; left: auto; right: 5%; top: 58%; }
.lp-shots > .lp-crop.lp-top-left { width: 34%; left: 4%; top: 36%; }
.lp-crop-trim { aspect-ratio: 1512 / 286; object-fit: cover; object-position: center 52%; }
.lp-shots > .lp-crop.lp-low-right { width: 64%; right: 4%; bottom: 7%; }
/* the extras: rows of names sliding sideways, in turn left and right, fading out at the edges */
.lp-chips { display: flex; flex-direction: column; justify-content: center; gap: 16px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent); mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent); }
.lp-chip-row { display: flex; width: max-content; animation: lp-slide 38s linear infinite; }
.lp-chip-row.rev { animation-direction: reverse; animation-duration: 44s; }
.lp-chip-row:nth-child(3) { animation-duration: 34s; }
.lp-chip-row:nth-child(5) { animation-duration: 40s; }
.lp-chip-track { display: flex; gap: 14px; padding-right: 14px; }
.lp-chip { display: inline-flex; align-items: center; gap: 9px; padding: 13px 20px; border-radius: 999px; white-space: nowrap;
  background: rgba(28,28,34,.82); color: var(--text); font-size: 16px; font-weight: 550; box-shadow: 0 10px 30px -12px rgba(0,0,0,.7); }
.lp-chip svg { color: var(--accent); flex: none; }
.lp-chip-row:nth-child(even) .lp-chip { background: rgba(36,36,44,.7); color: var(--text-2); }
@keyframes lp-slide { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.lp-stage .lp-shots { height: 100%; width: auto; max-width: 100%; margin-left: auto; }

/* section type */
.landing-kicker { margin: 0 0 14px; font-size: 14px; font-weight: 600; color: var(--accent); }

.landing-close { padding-top: clamp(72px, 14vh, 160px); padding-bottom: clamp(72px, 14vh, 160px); border-top: 1px solid var(--line); }
.landing-close { text-align: center; }
.landing-close p { margin: 0 auto; max-width: 17em; font-size: clamp(32px, 4.6vw, 60px); line-height: 1.1; font-weight: 600; letter-spacing: -.04em; text-wrap: balance; }
.landing-close span { color: var(--text-3); }
.landing-foot { border-top: 1px solid var(--line); color: var(--text-3); font-size: 13px; }
.landing-foot-in { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding-top: 24px; padding-bottom: calc(28px + env(safe-area-inset-bottom)); }
.landing-foot .brand { font-size: 14px; font-weight: 600; gap: 8px; color: var(--text-2); }

@media (prefers-reduced-motion: reduce) {
  .lp-card, .lp-step-body, .lp-step-title { transition: none; }
  .lp-card, .lp-card.past { transform: none; }
  .lp-float, .lp-chip-row { animation: none; }
}

/* phones, and screens too short to hold the list and a picture: a plain list, each step with its picture */
@media (max-width: 860px), (max-height: 600px) {
  .lp-hero { min-height: 100svh; }
  .lp-hero-wide { display: none; }
  .lp-hero-tall { display: block; filter: blur(6px); transform: scale(1.08); }
  .lp-hero-bg::after { background: radial-gradient(90% 50% at 50% 54%, rgba(10,10,12,.62) 0%, rgba(10,10,12,.35) 60%, rgba(10,10,12,.2) 100%),
    linear-gradient(to bottom, rgba(10,10,12,.4), rgba(10,10,12,.1) 30%, rgba(10,10,12,.4) 70%, var(--bg)); }
  .lp-hero-text .landing-title { font-size: clamp(34px, 9.6vw, 56px); margin-bottom: 28px; }
  .lp-intro-text { font-size: 19px; }
  .lp-steps { height: auto; }
  .lp-pin { position: static; height: auto; display: block; padding-top: 24px; padding-bottom: 24px; }
  .lp-stage { display: none; }
  .lp-step-head { cursor: default; color: var(--text); padding-bottom: 10px; }
  .lp-step .lp-num { color: var(--accent); }
  .lp-step .lp-step-title, .lp-step.on .lp-step-title { font-size: 24px; letter-spacing: -.02em; }
  .lp-step-body, .lp-step.on .lp-step-body { grid-template-rows: 1fr; }
  .lp-step-body p { padding-left: 0; padding-bottom: 20px; font-size: 16px; }
  .lp-step-media { display: block; padding-bottom: 36px; }
  .lp-step-media .lp-shots { width: 100%; max-width: 440px; margin: 0 auto; border-radius: 22px; }
  .lp-step-media .lp-shots > .lp-phone { border-radius: 20px; }
}

/* ---------- connect Tidal, speaker setup ---------- */
.connect { display: grid; gap: 14px; justify-items: start; }
.connect .title { margin: 0; }
.connect p { margin: 0; }
.connect.compact { gap: 10px; }
.narrow { max-width: 420px; margin-left: auto; margin-right: auto; }
.narrow-text { max-width: 440px; margin: 0 auto; }
.center-actions { justify-content: center; }
.dialog .mode-art { display: block; max-width: 240px; margin: 4px auto 8px; }
.input-inline { margin-top: 8px; height: 38px; }
