/* BeatLM.com: one dark, calm product page that moves in snapped scenes. */

:root {
  --bg: #000;
  --surface: #0f0f11;
  --surface-2: #161618;
  --text: #f5f5f7;
  --muted: #a1a1a6;
  --muted-2: #6e6e73;
  --hair: rgba(255, 255, 255, 0.1);
  --link: #2997ff;
  --btn: #0071e3;
  --btn-hover: #0077ed;
  --note-a: #f5f5f7;
  --note-b: #8ec5ff;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --gutter: max(22px, 6vw);
  color-scheme: dark;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
html.js-snap { scroll-behavior: auto; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.47059;
  letter-spacing: -0.022em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, canvas, video { display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 3px; border-radius: 6px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* Scene stops; assets/js/snap.js glides between them. */
.snap-stop { position: absolute; left: 0; width: 1px; height: 1px; pointer-events: none; }

/* ---------- Buttons and links ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 22px;
  border-radius: 980px; border: 0;
  background: var(--btn); color: #fff;
  font-size: 17px; font-weight: 400; letter-spacing: -0.022em;
  cursor: pointer;
  transition: background-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.btn:hover { background: var(--btn-hover); }
.btn:active { transform: scale(0.98); }
.btn--small { min-height: 28px; padding: 0 13px; font-size: 12px; letter-spacing: -0.01em; }
.btn--large { min-height: 52px; padding: 0 30px; font-size: 19px; }

.link { color: var(--link); font-size: 17px; white-space: nowrap; }
.link:hover { text-decoration: underline; }
.link .chev { display: inline-block; margin-left: 2px; transition: transform 0.2s var(--ease); }
.link:hover .chev { transform: translateX(2px); }

/* ---------- Navigation ---------- */

.nav {
  position: fixed; inset: 0 0 auto; z-index: 50;
  height: calc(52px + env(safe-area-inset-top, 0px)); padding-top: env(safe-area-inset-top, 0px);
  border-bottom: 1px solid transparent;
  transition: background-color 0.4s var(--ease), border-color 0.4s var(--ease);
}
.nav.is-solid { background: rgba(14, 14, 16, 0.86); border-bottom-color: var(--hair); }
@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
  .nav.is-solid { background: rgba(22, 22, 23, 0.72); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); }
}
.nav__inner { height: 100%; max-width: 1200px; margin: 0 auto; padding: 0 var(--gutter); display: flex; align-items: center; gap: 28px; }
.nav__brand { font-size: 21px; font-weight: 600; letter-spacing: 0.004em; margin-right: auto; }
.nav__links { display: flex; gap: 24px; font-size: 12px; letter-spacing: -0.01em; }
.nav__links a { color: rgba(245, 245, 247, 0.8); transition: color 0.2s var(--ease); }
.nav__links a:hover { color: var(--text); }
.nav__user { display: none; align-items: center; gap: 10px; font-size: 12px; color: rgba(245, 245, 247, 0.86); }
.nav__user img { width: 24px; height: 24px; border-radius: 50%; background: var(--surface-2); }
.is-authed .nav__user { display: inline-flex; }
@media (max-width: 760px) { .nav__links { display: none; } }

/* ---------- The stage ---------- */

.stage { position: relative; height: 900vh; background: #000; }
.stage__stops { position: absolute; inset: 0; pointer-events: none; }
.stage__anchor { position: absolute; top: 400vh; }
.stage__sticky { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }

.stage__lens {
  position: absolute; inset: 0;
  transform: scale(1.05); filter: blur(14px); opacity: 0;
  transition: transform 2.2s var(--ease-out), filter 1.6s var(--ease-out), opacity 1s var(--ease);
}
.is-ready .stage__lens { transform: none; filter: none; opacity: 1; }
.stage__media { position: absolute; will-change: transform; }
.layer { position: absolute; inset: 0; width: 100%; height: 100%; }
.layer--plate { object-fit: cover; }

/* The opening focus pull: the plaza starts sharp and Lisa soft, then focus racks onto her. */
.layer--sharp { object-fit: cover; opacity: 0; }
.focus-pull .layer--sharp { opacity: 1; }
.focus-pull .layer--idle { filter: blur(7px); }
.focus-pull.is-focused .layer--sharp { opacity: 0; filter: blur(16px); transition: opacity 2.1s cubic-bezier(0.45, 0, 0.25, 1) 0.15s, filter 2.1s cubic-bezier(0.45, 0, 0.25, 1) 0.15s; }
.focus-pull.is-focused .layer--idle { filter: blur(0); transition: filter 1.5s cubic-bezier(0.3, 0, 0.2, 1) 0.65s; }
.focus-pull .stage__lens { filter: none; transform: scale(1.045); transition: opacity 0.7s var(--ease), transform 3.2s var(--ease-out); }
.layer--idle { inset: auto; width: 0; height: 0; object-fit: fill; } /* placed over Lisa's box by stage.js */
.layer--frames, .layer--blur { opacity: 0; }
.layer--blur { transition: opacity 0.9s var(--ease); }
.layer--clip { right: auto; opacity: 0; object-fit: fill; transition: opacity 0.6s var(--ease); }
.layer--ambient { right: auto; opacity: 0; object-fit: fill; transition: opacity 1.4s var(--ease); } /* the living plaza */
.layer--ambient.is-on { opacity: 1; }

.stage__dim { position: absolute; inset: 0; background: #000; opacity: 0; pointer-events: none; }
.stage__shade {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.66) 0%, rgba(0, 0, 0, 0.3) 34%, rgba(0, 0, 0, 0) 58%),
    linear-gradient(0deg, rgba(0, 0, 0, 0.78) 0%, rgba(0, 0, 0, 0) 36%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.42) 0%, rgba(0, 0, 0, 0) 16%);
}
.stage__snow { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

.hero-copy { position: absolute; left: var(--gutter); bottom: max(56px, 11vh); max-width: 600px; z-index: 3; }
.hero-copy > * { opacity: 0; transform: translateY(18px); transition: opacity 1.1s var(--ease), transform 1.4s var(--ease-out); }
.is-loaded .hero-copy > * { opacity: 1; transform: none; }
.is-loaded .hero-copy > :nth-child(2) { transition-delay: 0.12s; }
.is-loaded .hero-copy > :nth-child(3) { transition-delay: 0.24s; }
.is-loaded .hero-copy > :nth-child(4) { transition-delay: 0.36s; }
.is-loaded .hero-copy > :nth-child(5) { transition-delay: 0.48s; }

.eyebrow { font-size: 19px; font-weight: 600; color: var(--muted); letter-spacing: 0.012em; margin-bottom: 6px; }
.hero-title { font-size: clamp(64px, 10.5vw, 144px); font-weight: 600; line-height: 1; letter-spacing: -0.025em; }
.hero-sub { margin-top: 10px; font-size: clamp(28px, 3.6vw, 48px); font-weight: 600; line-height: 1.08; letter-spacing: -0.012em; }
.hero-body { margin-top: 18px; max-width: 30em; font-size: clamp(17px, 1.5vw, 21px); line-height: 1.38; color: var(--muted); letter-spacing: 0.011em; }
.hero-cta { margin-top: 28px; display: flex; align-items: center; gap: 26px; flex-wrap: wrap; }

.caption {
  position: absolute; left: var(--gutter); top: 50%;
  max-width: min(520px, 40vw); z-index: 3;
  opacity: 0; transform: translate3d(0, calc(-50% + var(--y, 0px)), 0);
  pointer-events: none;
}
.caption h2 { font-size: clamp(36px, 4.8vw, 64px); font-weight: 600; line-height: 1.05; letter-spacing: -0.015em; }
.caption p { margin-top: 16px; font-size: clamp(17px, 1.5vw, 21px); line-height: 1.38; color: var(--muted); letter-spacing: 0.011em; }

.tour { position: absolute; left: 0; right: 0; top: max(72px, 8.5vh); z-index: 3; pointer-events: none; }
.tour-cap {
  position: absolute; left: 0; right: 0; padding: 0 var(--gutter); text-align: center; opacity: 0;
  transform: translate3d(0, var(--y, 0px), 0);
  font-size: clamp(19px, 2.2vw, 28px); line-height: 1.25; letter-spacing: -0.01em; color: var(--muted); text-wrap: balance;
}
.tour-cap strong { color: var(--text); font-weight: 600; }

.palm-glow {
  position: absolute; left: 0; top: 0; width: 420px; height: 420px; z-index: 3;
  margin: -210px 0 0 -210px; border-radius: 50%; pointer-events: none; opacity: 0;
  background:
    radial-gradient(closest-side, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0) 9%),
    radial-gradient(closest-side, rgba(255, 238, 220, 0.75), rgba(255, 214, 190, 0.28) 38%, rgba(255, 214, 190, 0) 100%);
  mix-blend-mode: screen;
}

.flight { position: absolute; inset: 0; perspective: 1700px; perspective-origin: 50% 46%; pointer-events: none; z-index: 4; }
.flight .editor { position: absolute; left: 50%; top: 56%; transform: translate(-50%, -50%); transform-origin: 50% 50%; opacity: 0; visibility: hidden; }
.flight.is-docked .editor { pointer-events: auto; }

@media (max-aspect-ratio: 9/10) {
  .stage__shade {
    background:
      linear-gradient(0deg, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.55) 34%, rgba(0, 0, 0, 0) 62%),
      linear-gradient(180deg, rgba(0, 0, 0, 0.45) 0%, rgba(0, 0, 0, 0) 16%);
  }
}
@media (max-width: 760px) {
  .caption { max-width: none; right: var(--gutter); top: auto; bottom: 14vh; transform: translate3d(0, var(--y, 0px), 0); }
}

/* Reduced motion: a still hero, the editor in the page. */
.reduce-motion .stage { height: auto; }
.reduce-motion .stage__sticky { position: relative; height: 100vh; height: 100svh; }
.reduce-motion .stage__lens { transform: none; filter: none; opacity: 1; transition: none; }
.reduce-motion .layer--clip, .reduce-motion .layer--ambient { display: none; }
.reduce-motion .stage__media { inset: 0; }
.reduce-motion .layer--plate { object-position: 60% 40%; }
.reduce-motion .hero-copy > * { opacity: 1; transform: none; transition: none; }
.reduce-motion .caption, .reduce-motion .tour, .reduce-motion .palm-glow, .reduce-motion .flight,
.reduce-motion .layer--idle, .reduce-motion .layer--frames, .reduce-motion .layer--blur { display: none; }
.editor-dock { display: none; }
.reduce-motion .editor-dock { display: flex; justify-content: center; padding: 64px var(--gutter) 0; }
.reduce-motion .editor-dock .editor { position: relative; }

/* ---------- The editor: the real mapping editor's layout, in this site's style ---------- */

.editor {
  --ed-w: min(1160px, 94vw);
  --ed-h: min(660px, 70vh);
  position: relative;
  width: var(--ed-w); height: var(--ed-h);
  display: grid; grid-template-rows: 46px 64px 1fr 50px;
  background: rgba(16, 16, 18, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  box-shadow: 0 50px 140px rgba(0, 0, 0, 0.65), 0 12px 40px rgba(0, 0, 0, 0.4);
  overflow: hidden; color: var(--text);
  font-size: 13px; letter-spacing: -0.01em;
  user-select: none; -webkit-user-select: none;
  /* The beat grid's divisors in osu!'s colours (the editor's app/src/index.css --snap-*): the beat white, 1/2 red, 1/4
     blue, 1/8 yellow, 1/16 indigo. */
  --snap-1: #f5f5f7; --snap-2: #ff453a; --snap-4: #64d2ff; --snap-8: #ffd60a; --snap-16: #5e5ce6;
}
.editor h3 { font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted-2); }

.ed-head {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; padding: 0 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015));
}
.ed-song { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ed-song div { display: flex; align-items: baseline; gap: 8px; min-width: 0; white-space: nowrap; overflow: hidden; }
.ed-song strong { font-size: 13px; font-weight: 600; }
.ed-song span { color: var(--muted); }
.ed-back { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: rgba(255, 255, 255, 0.07); color: var(--muted); }
.ed-back svg { width: 12px; height: 12px; }
.ed-tabs { display: flex; padding: 3px; border-radius: 9px; background: rgba(255, 255, 255, 0.07); }
.ed-tabs span { padding: 4px 13px; border-radius: 7px; color: var(--muted); font-size: 12px; }
.ed-tabs .is-on { background: rgba(255, 255, 255, 0.16); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35); }
.ed-head__end { display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.ed-saved { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; }
.ed-saved i { width: 6px; height: 6px; border-radius: 50%; background: #30d158; }
.ed-export-btn {
  height: 26px; padding: 0 12px; border-radius: 980px; display: inline-flex; align-items: center;
  background: rgba(255, 255, 255, 0.1); color: rgba(245, 245, 247, 0.92); font-size: 12px; font-weight: 500;
  transition: background-color 0.35s var(--ease);
}
.editor.is-exporting .ed-export-btn { background: var(--btn); color: #fff; }

/* The timeline strip, as the editor's compose screen lays it out (app/src/components/editor/compose/ComposeScreen.tsx):
   the timeline, then the beat snap at its end. */
.ed-strip { display: flex; min-width: 0; border-bottom: 1px solid rgba(255, 255, 255, 0.07); }
.ed-timeline { position: relative; flex: 1; min-width: 0; background: rgba(0, 0, 0, 0.18); }
.ed-timeline canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
/* Beat snap, drawn as the editor draws it (app/src/components/editor/compose/BeatDivisorControl.tsx, docked): the sets
   as text tabs on the title row, then the divisors by name, each over a 2 px line in its grid colour, the chosen one
   raised like the screens' tabs. */
.ed-snap { flex: none; width: 252px; padding: 0 12px; display: flex; flex-direction: column; justify-content: center; gap: 4px; border-left: 1px solid rgba(255, 255, 255, 0.06); }
.ed-snap-head { display: flex; align-items: center; gap: 12px; }
.ed-snap-head h3 { white-space: nowrap; }
.ed-sets { margin-left: auto; display: flex; align-items: center; }
.ed-sets span { height: 24px; padding: 0 8px; display: inline-flex; align-items: center; border-radius: 980px; color: var(--muted-2); font-size: 11px; }
.ed-sets .is-on { background: rgba(255, 255, 255, 0.1); color: var(--text); }
.ed-snaps { display: flex; gap: 2px; padding: 3px; border-radius: 9px; background: rgba(255, 255, 255, 0.07); transition: box-shadow 0.35s var(--ease), background-color 0.35s var(--ease); }
.ed-snaps span { position: relative; flex: 1; min-width: 34px; height: 26px; padding: 0 4px; display: grid; place-items: center; border-radius: 7px; color: var(--muted); font-family: var(--mono); font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ed-snaps .is-on { background: rgba(255, 255, 255, 0.16); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35); }
.ed-snaps i { position: absolute; left: 10px; right: 10px; bottom: 3px; height: 2px; border-radius: 1px; opacity: 0.4; }
.ed-snaps .is-on i { opacity: 1; }
.ed-snaps .d1 i { background: var(--snap-1); }
.ed-snaps .d2 i { background: var(--snap-2); }
.ed-snaps .d4 i { background: var(--snap-4); }
.ed-snaps .d8 i { background: var(--snap-8); }
.ed-snaps .d16 i { background: var(--snap-16); }
.editor.is-grid .ed-snaps { background: rgba(41, 151, 255, 0.2); box-shadow: inset 0 0 0 1px rgba(41, 151, 255, 0.55); }

.ed-main { display: grid; grid-template-columns: 170px 1fr 250px; min-height: 0; }
.ed-left { padding: 16px 12px; border-right: 1px solid rgba(255, 255, 255, 0.06); display: flex; flex-direction: column; gap: 10px; }
.ed-toolbox { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.ed-toolbox li { display: grid; grid-template-columns: 18px 1fr auto; align-items: center; gap: 9px; padding: 7px 9px; border-radius: 9px; color: rgba(245, 245, 247, 0.72); transition: background-color 0.3s var(--ease); }
.ed-toolbox svg { width: 17px; height: 17px; }
.ed-toolbox kbd { font-family: var(--mono); font-size: 10px; color: var(--muted-2); }
.ed-toolbox .is-on { background: rgba(41, 151, 255, 0.18); color: var(--text); box-shadow: inset 0 0 0 1px rgba(41, 151, 255, 0.35); }

.ed-field { position: relative; min-width: 0; min-height: 0; overflow: hidden; }
.ed-field canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.ed-cursor {
  position: absolute; left: -4px; top: -2px; width: 22px; height: 22px; opacity: 0; pointer-events: none;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5)); transition: opacity 0.25s var(--ease);
}
.ed-cursor.is-on { opacity: 1; }
.ed-cursor.is-press path { fill: #d6ebff; }

.ed-right { border-left: 1px solid rgba(255, 255, 255, 0.06); padding: 16px 16px; display: flex; flex-direction: column; gap: 10px; overflow: hidden; }
.ed-stats { display: grid; grid-template-columns: 1fr auto; gap: 7px 12px; margin: 0; font-variant-numeric: tabular-nums; }
.ed-stats dt { color: var(--muted); }
.ed-stats dd { margin: 0; text-align: right; transition: color 0.35s var(--ease); }
.editor.is-holds .ed-stats .st-holds { color: var(--note-b); }
.editor.is-editing .ed-stats [data-stat="notes"] { color: var(--note-b); }

.ed-foot { display: grid; grid-template-columns: 96px 1fr auto auto; align-items: center; gap: 14px; padding: 0 14px; border-top: 1px solid rgba(255, 255, 255, 0.07); background: rgba(255, 255, 255, 0.02); }
.ed-time { font-family: var(--mono); font-size: 12px; color: rgba(245, 245, 247, 0.9); font-variant-numeric: tabular-nums; }
.ed-overview { position: relative; height: 30px; }
.ed-overview canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.ed-play { width: 30px; height: 30px; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-items: center; background: rgba(255, 255, 255, 0.1); transition: background-color 0.2s var(--ease); }
.ed-play:hover { background: rgba(255, 255, 255, 0.18); }
.ed-play svg { width: 12px; height: 12px; fill: currentColor; }
.ed-play svg[hidden] { display: none; }
.ed-speed { display: flex; padding: 3px; border-radius: 8px; background: rgba(255, 255, 255, 0.06); }
.ed-speed span { padding: 2px 7px; border-radius: 6px; color: var(--muted-2); font-size: 11px; font-variant-numeric: tabular-nums; }
.ed-speed .is-on { background: rgba(255, 255, 255, 0.14); color: var(--text); }

.ed-sheet {
  position: absolute; top: 52px; right: 14px; width: min(300px, calc(100% - 28px)); z-index: 2;
  padding: 16px; border-radius: 14px;
  background: rgba(30, 30, 33, 0.97); border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  opacity: 0; transform: translateY(-10px) scale(0.98); transform-origin: 90% 0;
  transition: opacity 0.35s var(--ease), transform 0.5s var(--ease-out);
}
.editor.is-exporting .ed-sheet { opacity: 1; transform: none; }
.ed-sheet__title { font-size: 13px; font-weight: 600; margin-bottom: 10px; }
.ed-sheet__row { display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; align-items: center; padding: 9px 11px; border-radius: 10px; margin-bottom: 6px; background: rgba(255, 255, 255, 0.04); }
.ed-sheet__row span { font-weight: 500; }
.ed-sheet__row small { grid-row: 2; color: var(--muted); font-size: 11px; }
.ed-sheet__row i { grid-row: 1 / 3; grid-column: 2; font-style: normal; color: var(--link); }
.ed-sheet__row.is-on { background: rgba(41, 151, 255, 0.14); box-shadow: inset 0 0 0 1px rgba(41, 151, 255, 0.45); }
.ed-sheet__actions { display: flex; justify-content: flex-end; margin-top: 10px; }
.ed-sheet__btn { height: 28px; padding: 0 14px; border-radius: 980px; display: inline-flex; align-items: center; background: var(--btn); color: #fff; font-size: 12px; }

@media (max-width: 1000px) {
  .ed-main { grid-template-columns: 1fr 220px; }
  .ed-left { display: none; }
}
@media (max-width: 760px) {
  .editor { grid-template-rows: 44px 48px 1fr 46px; }
  .ed-main { grid-template-columns: 1fr; }
  .ed-right, .ed-snap, .ed-tabs, .ed-speed, .ed-saved { display: none; } /* the editor's phone layout moves the beat snap under the playfield */
  .ed-head { grid-template-columns: 1fr auto; }
  .ed-foot { grid-template-columns: 84px 1fr auto; }
}

/* ---------- Sections ---------- */

.section { position: relative; min-height: 100vh; min-height: 100svh; padding: 120px var(--gutter); display: flex; flex-direction: column; justify-content: center; }
.wrap { max-width: 980px; width: 100%; margin: 0 auto; }
.wrap--wide { max-width: 1200px; width: 100%; margin: 0 auto; }

.kicker { font-size: 21px; font-weight: 600; color: var(--muted); letter-spacing: 0.011em; margin-bottom: 10px; }
.headline { font-size: clamp(40px, 6.2vw, 80px); font-weight: 600; line-height: 1.05; letter-spacing: -0.015em; text-wrap: balance; }
.intro { margin-top: 24px; max-width: 34em; font-size: clamp(19px, 1.75vw, 24px); font-weight: 600; line-height: 1.33; letter-spacing: 0.009em; color: var(--muted-2); }
.intro strong { color: var(--text); font-weight: 600; }

/* How it works: a sticky scene with three snapped steps */
.how { position: relative; height: 300vh; }
.how__stops { position: absolute; inset: 0; pointer-events: none; }
.how__sticky {
  position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden;
  display: grid; grid-template-rows: auto 1fr auto; gap: 28px;
  padding: max(88px, 12vh) var(--gutter) max(40px, 7vh); max-width: 1240px; margin: 0 auto;
}
.how__visual { position: relative; min-height: 0; }
.how__visual canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.how__steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.how__steps li { padding-top: 16px; border-top: 2px solid rgba(255, 255, 255, 0.12); opacity: 0.38; transition: opacity 0.5s var(--ease), border-color 0.5s var(--ease); }
.how__steps li.is-on { opacity: 1; border-top-color: var(--text); }
.how__n { font-family: var(--mono); font-size: 13px; color: var(--muted-2); }
.how__steps h3 { margin-top: 6px; font-size: clamp(22px, 2.2vw, 30px); font-weight: 600; letter-spacing: -0.005em; }
.how__steps p { margin-top: 6px; color: var(--muted); font-size: 17px; line-height: 1.42; }
@media (max-width: 760px) {
  .how__steps { grid-template-columns: 1fr; gap: 0; }
  .how__steps li { display: none; border-top: 0; padding-top: 0; }
  .how__steps li.is-on { display: block; }
}

/* Difficulty: copy and control on the left, a live playfield on the right */
.diffx__inner { max-width: 1200px; width: 100%; margin: 0 auto; display: grid; grid-template-columns: 1fr minmax(280px, 440px); gap: 64px; align-items: center; }
.diffx__control { margin-top: 40px; max-width: 460px; }
.diffx__labels { display: grid; grid-template-columns: repeat(3, 1fr); padding: 4px; border-radius: 12px; background: rgba(255, 255, 255, 0.07); }
.diffx__labels button { border: 0; background: transparent; height: 36px; border-radius: 9px; cursor: pointer; color: var(--muted); font-size: 15px; transition: background-color 0.3s var(--ease), color 0.3s var(--ease); }
.diffx__labels button.is-on { background: rgba(255, 255, 255, 0.16); color: var(--text); }
#diff-range { width: 100%; margin: 22px 0 0; -webkit-appearance: none; appearance: none; height: 28px; background: transparent; cursor: pointer; }
#diff-range::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: linear-gradient(90deg, var(--text) calc(var(--v, 0.5) * 100%), rgba(255, 255, 255, 0.16) calc(var(--v, 0.5) * 100%)); }
#diff-range::-moz-range-track { height: 4px; border-radius: 2px; background: rgba(255, 255, 255, 0.16); }
#diff-range::-moz-range-progress { height: 4px; border-radius: 2px; background: var(--text); }
#diff-range::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; margin-top: -10px; border-radius: 50%; background: #fff; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5); }
#diff-range::-moz-range-thumb { width: 24px; height: 24px; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5); }
.diffx__readout { margin-top: 14px; color: var(--muted); font-size: 15px; font-variant-numeric: tabular-nums; }
.diffx__readout b { color: var(--text); font-weight: 600; }
.diffx__field { height: min(68vh, 620px); border-radius: 28px; background: var(--surface); border: 1px solid rgba(255, 255, 255, 0.06); overflow: hidden; position: relative; }
.diffx__field canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
@media (max-width: 860px) {
  .diffx__inner { grid-template-columns: 1fr; gap: 32px; }
  .diffx__field { height: 46vh; }
  .diffx__control { margin-top: 28px; }
}

/* Games: one chart on one playfield that turns between osu!mania and RoBeats. The view is sized so the whole
   scene, heading to switch, fits the screen it snaps to. */
.games {
  padding-block: clamp(76px, 10vh, 120px) clamp(36px, 6vh, 80px);
  --arena-w: min(100%, 1120px, calc((100vh - 460px) * 16 / 9));
}
@supports (height: 100svh) { .games { --arena-w: min(100%, 1120px, calc((100svh - 460px) * 16 / 9)); } }
.arena {
  position: relative; width: var(--arena-w); min-width: min(100%, 600px); aspect-ratio: 16 / 9; margin: 40px auto 0;
  overflow: hidden; border-radius: 28px; background: #050506;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 40px 120px -30px rgba(41, 151, 255, 0.18), 0 30px 80px rgba(0, 0, 0, 0.55);
}
.arena canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.arena video { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; } /* drawn into the canvas */
.arena::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent 26%);
}
.games .wrap { text-align: center; }
.games .intro { margin-inline: auto; text-wrap: balance; }
.arena__bar {
  display: flex; align-items: center; justify-content: center; gap: 22px;
  width: var(--arena-w); min-width: min(100%, 600px); margin: 24px auto 0;
}
.arena__switch {
  position: relative; display: flex; flex: none; padding: 4px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.07); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}
.arena__switch button {
  position: relative; padding: 9px 22px; border: 0; border-radius: 999px; background: none; cursor: pointer;
  font: inherit; font-size: 15px; font-weight: 500; letter-spacing: -0.01em; color: var(--muted);
  transition: color 0.4s var(--ease);
}
.arena__switch button:hover { color: var(--text); }
.arena__switch button[aria-pressed="true"] { color: #000; }
.arena__thumb {
  position: absolute; top: 4px; bottom: 4px; left: 4px; width: 0; border-radius: 999px; background: var(--text);
  transition: transform 0.5s var(--ease-out), width 0.5s var(--ease-out);
}
.arena__notes { display: grid; min-width: 0; text-align: left; } /* both lines share one cell, so the row never shifts */
.arena__notes p {
  grid-area: 1 / 1; margin: 0; font-size: 17px; line-height: 1.35; color: var(--muted);
  opacity: 0; transform: translateY(6px); transition: opacity 0.45s var(--ease), transform 0.45s var(--ease);
}
.arena__notes p.is-on { opacity: 1; transform: none; }
@media (max-width: 700px) {
  .arena { aspect-ratio: 4 / 5; border-radius: 22px; }
  .arena__bar { flex-direction: column; gap: 16px; }
  .arena__notes { text-align: center; }
}

/* Closing scene */
.cta { position: relative; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; justify-content: center; text-align: center; overflow: hidden; }
.cta__bg { position: absolute; inset: 0; background: #000 url("../media/end-blur-wide.jpg?v=256558c") 60% 40% / cover no-repeat; opacity: 0.38; transform: scale(1.08); }
.cta__bg::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 45%, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.75) 70%); }
.cta__inner { position: relative; padding: 120px var(--gutter) 80px; }
.cta .headline { max-width: 14em; margin: 0 auto; }
.cta .intro { margin: 22px auto 0; color: var(--muted); }
.cta__actions { margin-top: 40px; display: flex; justify-content: center; align-items: center; gap: 26px; flex-wrap: wrap; }
.footer { position: relative; margin-top: auto; padding: 22px var(--gutter) calc(28px + env(safe-area-inset-bottom, 0px)); color: var(--muted-2); font-size: 12px; line-height: 1.6; border-top: 1px solid var(--hair); text-align: left; }
.footer p { max-width: 1200px; margin: 0 auto; }

/* Small status message (login not reachable yet) */
.toast {
  position: fixed; left: 50%; bottom: calc(28px + env(safe-area-inset-bottom, 0px)); z-index: 60;
  transform: translate(-50%, 12px); opacity: 0; pointer-events: none;
  padding: 12px 18px; border-radius: 14px; background: rgba(40, 40, 44, 0.94); color: var(--text);
  font-size: 15px; box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
  transition: opacity 0.3s var(--ease), transform 0.4s var(--ease-out);
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* Short screens (phones held sideways, small windows): keep the hero copy clear of the nav. */
@media (max-height: 620px) {
  .hero-copy { bottom: 22px; }
  .eyebrow, .hero-body { display: none; }
  .hero-title { font-size: clamp(40px, 15vh, 96px); }
  .hero-sub { margin-top: 2px; font-size: clamp(20px, 6.5vh, 36px); }
  .hero-cta { margin-top: 14px; }
  .caption h2 { font-size: clamp(26px, 8.5vh, 48px); }
  .caption p { display: none; }
  .tour { top: 58px; }
  .tour-cap { font-size: clamp(15px, 4.2vh, 22px); }
  .flight .editor { top: 59%; }
  .editor { --ed-h: min(620px, 72vh); grid-template-rows: 40px 42px 1fr 42px; }
  .ed-snap-head { display: none; } /* the 42 px strip holds the divisors only */
}
