/* ShakeFit landing — ONE TAKE
 *
 * One performer, one floor line, one stage. Scrolling changes the light, the
 * angle and the act, never the subject.
 *
 * Colour SSOT: apps/mobile/src/ui/theme.ts (mirrored below). The landing sits
 * next to real app screenshots, so its palette must be the app's palette.
 * Identity ramp SSOT: docs/design-system.md §1.4 gradient.identity.
 */

/* ── tokens ─────────────────────────────────────────────────────────────── */
:root {
  /* stage */
  --bg: #080b11;
  --bg-elev: #0e131b;
  --surface: #151c27;
  --surface-alt: #1c2532;
  --surface-hi: #26313f;
  --hairline: #28323f;
  --hairline-hi: rgba(243, 247, 255, 0.1);

  /* energy spectrum */
  --mint: #37e7b0;
  --mint-dim: #2bb88c;
  --mint-ink: #04241a;
  --cyan: #4ec3ff;
  --violet: #7a5cff;
  --pink: #ff5ca8;
  --coral: #ff5d6c;
  --amber: #ffb454;
  --lime: #b8e96a;
  --softmint: #5ce0c0;
  --gold: #ffd166;

  /* text — 대비는 WCAG 2.1 AA(본문 4.5:1) 기준으로 계산해 고정한다.
     이 세 값은 .mono(12px)·.note(13px)까지 쓰이고 그중엔 법적 고지·가격 고지가 있다.
     구 --text-faint #5b6c82 는 --bg 에서 3.67:1 로 AA 미달이었다(감사 지적).
     현재 값의 실측 대비:
       --text-faint #8a9ab1 → bg 6.88 · bg-elev 6.51 · surface 5.98 · surface-alt 5.40 · surface-hi 4.60
       --text-dim   #aebdd2 → bg 10.32 · bg-elev 9.76 · surface 8.97 · surface-alt 8.09 · surface-hi 6.91
       --text       #f3f7ff → bg 18.34
     즉 이 페이지에 존재하는 **모든** 배경 토큰 위에서 4.5:1 을 넘는다. 계층(faint < dim <
     text)을 유지하려고 dim 도 같이 올렸다 — faint 만 올리면 둘이 같은 밝기가 된다. */
  --text: #f3f7ff;
  --text-dim: #aebdd2;
  --text-faint: #8a9ab1;

  /* grades — apps/mobile theme game.judge */
  --g-perfect: #37e7b0;
  --g-great: #4ec3ff;
  --g-good: #aebfd8;
  --g-coach: #ffb454;

  /* the brand identity ramp: app icon, wordmark, display letterform, primary button */
  --ramp-display: linear-gradient(100deg, #ff9f0a, #ff2d55 46%, #c13bff);
  --ramp-heat: linear-gradient(100deg, var(--amber), var(--coral));

  /* motion — timings come from the product (theme.ts game.flash / game.judge) */
  --attack: 60ms;
  --decay: 380ms;
  --judge-hold: 120ms;
  --judge-fade: 500ms;
  --ease-acquire: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-impact: cubic-bezier(0.2, 0, 0, 1);
  --beat: 468.75ms; /* 128 BPM */

  /* layout */
  --margin: 72px;
  --floor: 80%; /* the page's ground line, reused by S1/S3/S5/S7 */
  --maxw: 1296px;
}

@media (max-width: 1199px) {
  :root { --margin: 24px; }
}
@media (max-width: 767px) {
  :root { --margin: 20px; }
}

/* ── reset ──────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
body {
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg, video { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input { font: inherit; }
a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--mint);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip {
  position: absolute;
  left: 8px;
  top: -60px;
  z-index: 99;
  padding: 10px 16px;
  background: var(--surface);
  border: 1px solid var(--hairline-hi);
  border-radius: 8px;
  font-size: 14px;
  transition: top 160ms var(--ease-acquire);
}
.skip:focus { top: 8px; }

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

/* ── type ───────────────────────────────────────────────────────────────── */
@font-face {
  font-family: Inter;
  src: url(/fonts/inter-var.woff2) format('woff2');
  font-weight: 100 900;
  font-style: oblique 0deg 10deg;
  font-display: swap;
}

h1, h2 {
  font-weight: 800;
  max-width: min(24ch, 100%);
  font-variation-settings: 'slnt' -10;
  letter-spacing: -0.022em;
  line-height: 1.06;
  text-wrap: balance;
}
h1 { font-size: clamp(32px, 3.9vw, 54px); }
h2 { font-size: clamp(30px, 3.6vw, 52px); }

.body {
  color: var(--text-dim);
  max-width: min(54ch, 100%);
  text-wrap: pretty;
}
.body--tight { max-width: min(46ch, 100%); }

/* the instrument layer: labels, counters, axis ticks. never prose. 0 bytes. */
.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
  color: var(--text-faint);
}
.mono--lit { color: var(--text-dim); }
.note { font-size: 13px; color: var(--text-faint); }
.nb { white-space: nowrap; }

/* judgment vocabulary — English in every locale, it is a brand asset */
.judge-word {
  font-weight: 900;
  font-variation-settings: 'slnt' -10;
  text-transform: uppercase;
  letter-spacing: 0.005em;
  line-height: 1;
}
.g-perfect { color: var(--g-perfect); }
.g-great { color: var(--g-great); }
.g-good { color: var(--g-good); }
.g-coach { color: var(--g-coach); }

/* ── section shell ──────────────────────────────────────────────────────── */
section { position: relative; }
.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-inline: var(--margin);
}
.sec-pad { padding-block: clamp(64px, 7.5vh, 104px); }
.sec-head { margin-bottom: 40px; }
.sec-head .mono { margin-bottom: 14px; }
.sec-head .body { margin-top: 16px; }

/* ── chrome ─────────────────────────────────────────────────────────────── */
.hdr {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 24px;
  padding-inline: var(--margin);
  /* tint + hairline only. backdrop-filter breaks mix-blend-mode subtrees in
     Safari, and must never appear on an ancestor of the blended performer. */
  transition: background 240ms linear, border-color 240ms linear;
  border-bottom: 1px solid transparent;
}
.hdr.is-stuck {
  background: rgba(14, 19, 27, 0.88);
  border-bottom-color: var(--hairline-hi);
}
.hdr__mark { width: 104px; height: auto; flex: none; }
.hdr__right { margin-left: auto; display: flex; align-items: center; gap: 18px; }
.beat { display: flex; gap: 7px; align-items: center; }
.beat i {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--mint);
  opacity: 0.22;
  transition: opacity 120ms linear;
}
.beat i.is-on { opacity: 1; }
.hdr__cta {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--mint);
  padding-bottom: 2px;
}
@media (max-width: 767px) {
  .hdr { gap: 12px; }
  .hdr__right { gap: 12px; }
  .hdr__right .mono { display: none; }
  .hdr__mark { width: 88px; }
  .hdr__cta { font-size: 13px; }
}

.ftr {
  border-top: 1px solid var(--hairline);
  padding: 22px var(--margin);
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  align-items: center;
}
.ftr__langs { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.ftr__langs b { width: 3px; height: 3px; border-radius: 50%; background: var(--mint-dim); }
.ftr__right { margin-left: auto; display: flex; gap: 16px; }
.ftr a { text-decoration: none; }
.ftr a:hover { color: var(--text-dim); }

/* ── S1 stage ───────────────────────────────────────────────────────────── */
.stage {
  position: relative;
  height: 100svh;
  min-height: 720px;
  isolation: isolate; /* load-bearing for the screen blend */
  overflow: hidden;
}
.stage__floor {
  position: absolute;
  inset: 0;
  /* no blurred blob anywhere: two pre-baked radials */
  background:
    radial-gradient(120% 46% at 62% 100%, rgba(55, 231, 176, 0.16), transparent 68%),
    radial-gradient(70% 30% at 30% 104%, rgba(255, 180, 84, 0.07), transparent 70%);
}
.stage__lip {
  position: absolute;
  left: 0; right: 0;
  top: var(--floor);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(243, 247, 255, 0.13) 22%,
    rgba(243, 247, 255, 0.13) 82%, transparent);
}
.cones {
  position: absolute;
  inset: 0;
  mix-blend-mode: screen;
  /* without this feather the cones read as flat gray slabs (the AI gradient
     failure mode). filter:blur is never used. */
  -webkit-mask-image: radial-gradient(78% 62% at 58% 4%, #000 8%, rgba(0, 0, 0, 0) 92%);
  mask-image: radial-gradient(78% 62% at 58% 4%, #000 8%, rgba(0, 0, 0, 0) 92%);
}
.cones polygon { animation: cone-breathe calc(var(--beat) * 4) ease-in-out infinite; }
.cones polygon:nth-child(2) { animation-delay: calc(var(--beat) * 1); }
.cones polygon:nth-child(3) { animation-delay: calc(var(--beat) * 2); }
@keyframes cone-breathe {
  0%, 100% { opacity: 0.72; }
  50% { opacity: 1; }
}

.perf {
  position: absolute;
  mix-blend-mode: screen;
  /* nudges the render's swampy green toward mint */
  filter: hue-rotate(-10deg) saturate(0.92);
  /* INTERSECT, not add: the ellipse must be able to cut the left and right
     edges, otherwise the clip's green floor plane shows as a hard rectangle. */
  /* 반경을 좁히고 하단 페이드를 발 위쪽에서 시작해야 바닥면 사각이 사라진다(실측 2차).
     바닥은 CSS floor glow가 이미 그리므로 클립의 바닥면은 버려도 된다. */
  -webkit-mask-image:
    radial-gradient(48% 52% at 50% 44%, #000 30%, rgba(0, 0, 0, 0) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, #000 12%, #000 70%, rgba(0, 0, 0, 0) 94%);
  -webkit-mask-composite: source-in;
  mask-image:
    radial-gradient(48% 52% at 50% 44%, #000 30%, rgba(0, 0, 0, 0) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, #000 12%, #000 70%, rgba(0, 0, 0, 0) 94%);
  mask-composite: intersect;
  /* geometry: feet land ON the floor line (measured bbox y 0.129 → 0.873) */
  --clip-h: 77.8svh;
  height: var(--clip-h);
  width: calc(var(--clip-h) * 0.5625);
  top: calc(var(--floor) - var(--clip-h) * 0.873);
  left: 68%;
  transform: translateX(-50%);
}
.perf > * { width: 100%; height: 100%; object-fit: cover; }
.perf__play {
  position: absolute;
  inset: auto 0 12% 0;
  margin: auto;
  width: 56px; height: 56px;
  border-radius: 50%;
  border: 1px solid var(--hairline-hi);
  background: rgba(14, 19, 27, 0.7);
  display: none;
  place-items: center;
}
.perf.is-blocked .perf__play { display: grid; }

.stage__type {
  position: absolute;
  left: var(--margin);
  top: 22.9%;
  width: min(648px, 46vw);
}
.stage__type svg { filter: drop-shadow(0 0 34px rgba(255, 45, 85, 0.2)); }

.stage__lang {
  position: absolute;
  left: var(--margin);
  top: calc(var(--floor) - 268px);
  width: min(620px, 46vw);
}
.stage__lang .body { margin-top: 18px; }
.stage__lang .signup { margin-top: 26px; }
.stage__lang .note { margin-top: 14px; }

.readout {
  position: absolute;
  right: var(--margin);
  top: 32%;
  text-align: right;
}
.readout__combo { color: var(--text); letter-spacing: 0.22em; }
.readout__word {
  font-size: clamp(34px, 3.6vw, 52px);
  margin-top: 6px;
  text-shadow: 0 0 28px rgba(55, 231, 176, 0.45);
  animation: judge-pop var(--judge-fade) var(--ease-impact);
}
.readout__lane { margin-top: 16px; margin-left: auto; width: 250px; }
@keyframes judge-pop {
  0% { transform: scale(0.86); opacity: 0.4; }
  22% { transform: scale(1); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

.grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.035;
  background-image: var(--grain);
  background-size: 128px 128px;
}

@media (max-width: 900px) {
  /* the performer becomes the background at the bottom right, the language sits
     over a top scrim. ⚠️ 절대배치 요소는 static 형제보다 위에 그려진다 — 데스크톱에선
     본문도 absolute라 문제가 없지만 모바일에서 static으로 바꾸면 스크림이 텍스트를
     덮는다(실측: 카피가 전부 흐려짐). 그래서 본문 블록에 z-index를 명시한다. */
  .stage { height: 100svh; min-height: 640px; padding-block: 84px 0; }
  .perf {
    --clip-h: 58svh;
    left: 72%;
    top: auto;
    bottom: 3%;
    opacity: 0.5;
    transform: translateX(-50%) scale(1.2);
    transform-origin: center bottom;
  }
  .stage__scrim {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(8, 11, 17, 0.92) 0%,
      rgba(8, 11, 17, 0.72) 46%, rgba(8, 11, 17, 0.1) 80%, transparent 100%);
  }
  .stage__type,
  .stage__lang,
  .readout {
    position: relative;
    z-index: 2;
    /* ⚠️ relative는 데스크톱의 top/right 오프셋을 그대로 적용한다 — 반드시 해제 */
    top: auto;
    right: auto;
    left: auto;
    bottom: auto;
  }
  .stage__type { width: auto; margin-inline: var(--margin); }
  .stage__lang { width: auto; margin: 26px var(--margin) 0; max-width: 100%; }
  .readout {
    margin: 22px var(--margin) 0;
    text-align: left;
    display: flex;
    align-items: baseline;
    gap: 12px;
  }
  .readout__word { font-size: 26px; margin: 0; }
  .readout__lane { display: none; }
  .cones polygon:nth-child(1), .cones polygon:nth-child(3) { display: none; }
  .stage__lip { display: none; }
}

/* ── signup ─────────────────────────────────────────────────────────────── */
.signup { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.signup__f { display: flex; flex-direction: column; gap: 6px; }
.signup label { font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-faint); }
.signup input {
  width: 268px;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--hairline-hi);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
}
.signup input::placeholder { color: var(--text-faint); }
.signup input:disabled { opacity: 0.55; cursor: not-allowed; }
.btn {
  min-height: 48px;
  padding: 0 22px;
  border-radius: 10px;
  background: var(--ramp-display);
  color: #1b0b14;
  font-weight: 800;
  font-size: 15px;
  font-variation-settings: 'slnt' -10;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.signup__msg { flex-basis: 100%; font-size: 13px; color: var(--mint); min-height: 18px; }
.signup__msg[data-state='error'] { color: var(--coral); }
/* Signup has no endpoint yet, so the field is honestly disabled rather than
   pretending to accept an address. See README (one config line to enable). */
.signup--soon { align-items: center; gap: 14px; }
.signup--soon .pill {
  border: 1px solid var(--hairline-hi);
  border-radius: 999px;
  padding: 9px 16px;
  background: var(--surface);
}
@media (max-width: 560px) {
  .signup input, .btn { width: 100%; }
  .signup__f { flex: 1 1 100%; }
}

/* ── S2 one rep, graded ─────────────────────────────────────────────────── */
.rep { height: 220vh; }
.rep__sticky {
  position: sticky;
  top: 0;
  height: 100svh;
  overflow: hidden;
}
.rep__grid {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 34% 1fr;
}
.rep__rail { position: relative; padding: 9vh 0 0 8%; }
.rep__spine {
  position: absolute;
  left: 30%;
  top: 20%;
  bottom: 24%;
  width: 1px;
  background: linear-gradient(180deg, transparent, var(--mint-dim) 12%, var(--mint-dim) 88%, transparent);
  opacity: 0.55;
}
.rep__dot {
  position: absolute;
  left: 30%;
  top: calc(20% + var(--p, 0) * 56%);
  width: 10px; height: 10px;
  margin-left: -4.5px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 18px rgba(55, 231, 176, 0.6);
}
.rep__ring {
  position: absolute;
  left: 30%;
  top: calc(20% + 0.55 * 56%);
  width: 44px; height: 44px;
  margin: -22px 0 0 -22px;
  border: 1.5px solid var(--mint);
  border-radius: 50%;
  opacity: 0;
  transform: scale(0.4);
}
.rep.is-impact .rep__ring {
  animation: ring-out var(--decay) var(--ease-impact) forwards;
}
@keyframes ring-out {
  0% { opacity: 0.9; transform: scale(0.4); }
  100% { opacity: 0; transform: scale(1); }
}
.rep__phases { position: absolute; left: 8%; top: 27%; display: grid; gap: 4.4vh; }
.rep__phases li { list-style: none; opacity: 0.22; transition: opacity 160ms linear; }
.rep__phases li b { display: block; font-size: 15px; font-weight: 700; color: var(--text); }
.rep__phases li.is-on { opacity: 1; }
.rep__judge {
  position: absolute;
  left: 8%;
  bottom: 26%;
  font-size: clamp(34px, 4.4vw, 64px);
  opacity: 0;
}
.rep.is-impact .rep__judge { animation: judge-pop var(--judge-fade) var(--ease-impact) forwards; opacity: 1; }

.rep__field { position: relative; }
.rep__charge {
  position: absolute;
  left: 62%;
  bottom: 24%;
  width: 120px;
  margin-left: -60px;
  height: calc(var(--p, 0) * 46%);
  background: linear-gradient(0deg, var(--mint), var(--cyan));
  opacity: 0.16;
  border-radius: 12px 12px 0 0;
}
.rep__canvas {
  position: absolute;
  left: 62%;
  bottom: 24%;
  height: 56vh;
  aspect-ratio: 264 / 468;
  width: auto;
  transform: translateX(-50%);
  mix-blend-mode: screen;
  filter: hue-rotate(-10deg) saturate(1.1) brightness(1.7);
  -webkit-mask-image: radial-gradient(52% 46% at 50% 38%, #000 34%, rgba(0, 0, 0, 0) 100%);
  mask-image: radial-gradient(52% 46% at 50% 38%, #000 34%, rgba(0, 0, 0, 0) 100%);
}
.rep__floorline {
  position: absolute;
  left: 0; right: 0; bottom: 24%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(243, 247, 255, 0.12) 30%, transparent);
}
/* three response lanes — ONE vertical line crosses all three staves. Three
   separate blinking bars do not prove synchronization; one crossing line does. */
.lanes { position: absolute; left: 8%; right: 6%; bottom: 9%; }
.lanes__row { display: grid; grid-template-columns: 88px 1fr; gap: 14px; align-items: center; height: 34px; }
.lanes__row svg { width: 100%; height: 26px; }
.lanes__cursor {
  position: absolute;
  top: 0; bottom: 0;
  left: calc(88px + 14px + (100% - 102px) * var(--p, 0));
  width: 1px;
  background: var(--mint);
  opacity: 0.75;
}
.rep__static { display: none; }
.rep__skip { position: absolute; right: var(--margin); top: 14vh; }

@media (max-width: 900px) {
  /* mobile gets the resolved triptych — the same path reduced-motion uses, so
     there is one alternate implementation on the page, not two. */
  .rep { height: auto; }
  .rep__sticky { position: static; height: auto; padding-block: 72px; }
  .rep__grid, .rep__skip { display: none; }
  .rep__static { display: block; }
}

.trip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.trip figure { border: 1px solid var(--hairline); border-radius: 14px; overflow: hidden; background: var(--bg-elev); }
.trip img {
  width: 100%; height: auto;
  /* 히어로·S3와 같은 처리 — 렌더의 초록 바닥면을 지운다 */
  mix-blend-mode: screen;
  filter: hue-rotate(-10deg) saturate(1.1) brightness(1.5);
  -webkit-mask-image: radial-gradient(58% 52% at 50% 40%, #000 40%, rgba(0, 0, 0, 0) 100%);
  mask-image: radial-gradient(58% 52% at 50% 40%, #000 40%, rgba(0, 0, 0, 0) 100%);
}
.trip figcaption { padding: 10px 12px; }

/* ── S3 guide grid ──────────────────────────────────────────────────────── */
.guide__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 2px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.guide__cell {
  margin: 0;
  padding: 0 0 12px;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
}
.guide__cell img {
  width: 100%;
  height: auto;
  display: block;
  /* 컷 가장자리를 배경으로 녹여 타일 경계가 사각형으로 도드라지지 않게 */
  mask-image: radial-gradient(58% 48% at 50% 42%, #000 42%, rgba(0, 0, 0, 0) 100%);
}
.guide__name {
  margin-top: -6px;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
  text-align: center;
  line-height: 1.25;
}
.guide__live { margin-top: 18px; }

/* ── S4 the setlist ─────────────────────────────────────────────────────── */
.setlist__panel + .setlist__panel { margin-top: 56px; }
.setlist__label { margin-bottom: 14px; display: flex; gap: 18px; flex-wrap: wrap; }

/* panel A — duration skyline. the tops form a skyline, and the skyline is the image */
.sky { display: flex; align-items: flex-end; gap: 0.6%; height: 300px; }
.sky__spine { flex: 1 1 0; position: relative; height: var(--h); min-width: 0; }
.sky__spine i {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, var(--c), rgba(255, 255, 255, 0.02) 82%);
  opacity: 0.5;
  border-radius: 2px 2px 0 0;
}
.sky__spine b { position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--c); }

.sky__groups { display: flex; gap: 0.6%; margin-top: 8px; }
.sky__group { flex-basis: 0; min-width: 0; }
.sky__group i { display: block; height: 2px; background: var(--c); opacity: 0.7; border-radius: 1px; }
.sky__group b { display: block; margin-top: 7px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sky__axis { display: flex; justify-content: space-between; margin-top: 18px; }

/* panel B — BPM scatter. lanes ordered by median BPM so the data itself climbs */
.scatter { position: relative; }
.scatter__lane {
  position: relative;
  height: 46px;
  border-top: 1px solid var(--hairline);
  display: flex;
  align-items: center;
}
.scatter__lane:last-child { border-bottom: 1px solid var(--hairline); }
.scatter__name { position: absolute; left: 0; font-size: 12px; color: var(--text-dim); }
.scatter__dots { position: absolute; left: 120px; right: 96px; height: 100%; }
.scatter__dot {
  position: absolute;
  top: 50%;
  left: calc(var(--x) * 100%);
  width: var(--d); height: var(--d);
  margin: calc(var(--d) / -2) 0 0 calc(var(--d) / -2);
  border-radius: 50%;
  background: var(--c);
  opacity: 0.85;
}
.scatter__count {
  position: absolute;
  right: 0;
  font-weight: 900;
  font-variation-settings: 'slnt' -10;
  font-size: 34px;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  opacity: 0.9;
}

/* panel C — the two ledgers */
.ledger { display: grid; gap: 32px; grid-template-columns: 1fr 1fr; }
.rot { display: flex; gap: 16px; align-items: flex-end; }
.rot__week { flex: 1; }
.rot__bars { display: flex; gap: 3px; height: 46px; }
.rot__bar { flex: 1; background: var(--c); border-radius: 2px; opacity: 0.9; }
.rot__wk { margin-top: 10px; }
.ladder { display: flex; gap: 4px; align-items: flex-end; height: 34px; }
.ladder i { flex: 1 1 0; height: 100%; border-radius: 2px; background: var(--c); opacity: var(--o); }
.split { margin-top: 14px; height: 26px; border-radius: 6px; overflow: hidden; display: flex; background: var(--surface); }
.split__open { background: var(--mint); opacity: 0.85; }
.split__locked { background: var(--surface-hi); }
@media (max-width: 900px) {
  .ledger { grid-template-columns: 1fr; }
  .sky { height: 200px; overflow-x: auto; }
  .sky__group b { font-size: 10px; letter-spacing: 0.06em; }
  .sky__spine { min-width: 18px; flex: none; }
  .scatter__dots { left: 96px; right: 64px; }
  .scatter__count { font-size: 22px; }
}

/* ── S5 what you keep ───────────────────────────────────────────────────── */
.keep { position: relative; }
.keep__wm {
  position: absolute;
  left: 6%; top: 26%;
  width: 30%;
  opacity: 0.035;
  color: var(--text);
  pointer-events: none;
}
.keep__row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: end;
  gap: 24px;
  margin-bottom: 12px;
}
.phone {
  position: relative;
  margin-inline: auto;
  width: 100%;
  max-width: 260px;
  border: 1px solid var(--hairline-hi);
  border-radius: 26px;
  padding: 7px;
  background: linear-gradient(180deg, var(--surface-alt), var(--bg-elev));
}
.phone--lead { max-width: 300px; transform: scale(1.02); z-index: 2; }
.phone img { width: 100%; height: auto; border-radius: 20px; }
.phone::after {
  /* floor pool: these are lit objects on a stage, not floating cards */
  content: '';
  position: absolute;
  left: 50%; bottom: -26px;
  width: 116%; height: 26px;
  transform: translateX(-50%);
  background: radial-gradient(50% 100% at 50% 0%, rgba(55, 231, 176, 0.16), transparent 70%);
  pointer-events: none;
}
.phone figcaption { position: absolute; left: 0; right: 0; bottom: -46px; text-align: center; }
.keep__floor { height: 1px; background: linear-gradient(90deg, transparent, rgba(243, 247, 255, 0.12) 20%, rgba(243, 247, 255, 0.12) 80%, transparent); margin-top: 64px; }
.board {
  margin-top: 40px;
  border: 1px solid var(--hairline);
  border-radius: 14px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.board div { padding: 18px 20px; border-left: 1px solid var(--hairline); }
.board div:first-child { border-left: 0; }
.board b {
  display: block;
  margin-top: 6px;
  font-size: 26px;
  font-weight: 900;
  font-variation-settings: 'slnt' -10;
  font-variant-numeric: tabular-nums;
}
.board--grades { margin-top: 12px; }
@media (max-width: 900px) {
  .keep__row { grid-template-columns: 1fr; gap: 72px; }
  .phone--lead { transform: none; }
  .board { grid-template-columns: 1fr 1fr; }
  .board div:nth-child(3) { border-left: 0; }
  .board div:nth-child(n + 3) { border-top: 1px solid var(--hairline); }
}

/* ── S6 backstage — the show stops, the lights come up ──────────────────── */
.backstage {
  background: #0c121c;
  min-height: 80vh;
  display: grid;
  place-items: center;
  text-align: center;
}
.backstage__inner { max-width: 54ch; padding-block: 15vh 11vh; }
.skel {
  position: relative;
  width: 180px;
  margin: 0 auto 44px;
  aspect-ratio: 9 / 17;
  border: 1px solid var(--hairline-hi);
  border-radius: 22px;
  padding: 10px;
}
.skel canvas { width: 100%; height: 100%; }
.skel__lead {
  position: absolute;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mint-dim);
  white-space: nowrap;
}
.skel__lead--head { left: calc(100% + 14px); top: 12%; }
.skel__lead--wrist { right: calc(100% + 14px); top: 44%; text-align: right; }
.skel__lead::before {
  content: '';
  position: absolute;
  top: 50%;
  width: 56px; height: 1px;
  background: var(--mint-dim);
  opacity: 0.5;
}
.skel__lead--head::before { left: -60px; }
.skel__lead--wrist::before { right: -60px; }
.backstage h2 { margin-inline: auto; }
.backstage ul { list-style: none; margin-top: 26px; display: grid; gap: 10px; }
.backstage li { color: var(--text-dim); }
.tag {
  display: inline-block;
  margin-top: 26px;
  border: 1px solid rgba(55, 231, 176, 0.4);
  border-radius: 999px;
  padding: 7px 14px;
  color: var(--mint);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
}
@media (max-width: 900px) {
  .skel__lead { position: static; display: block; margin-top: 8px; }
  .skel__lead::before { display: none; }
  .skel__lead--wrist { text-align: center; }
}

/* ── S7 curtain call ────────────────────────────────────────────────────── */
.curtain {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  display: grid;
  align-content: center;
  padding-block: 10vh 9vh;
}
.curtain__floor {
  position: absolute;
  inset: 0;
  background: radial-gradient(90% 34% at 50% 100%, rgba(255, 92, 168, 0.12), transparent 70%);
}
.curtain__trio { position: absolute; inset: 0; pointer-events: none; }
.curtain__trio figure {
  position: absolute;
  bottom: 26%;
  transform: translateX(-50%);
  mix-blend-mode: screen;
  filter: hue-rotate(-10deg) saturate(0.92);
  -webkit-mask-image: radial-gradient(60% 58% at 50% 52%, #000 46%, rgba(0, 0, 0, 0) 100%);
  mask-image: radial-gradient(60% 58% at 50% 52%, #000 46%, rgba(0, 0, 0, 0) 100%);
}
.curtain__trio figure:nth-child(1) { left: 28%; height: 38vh; opacity: 0.5; }
.curtain__trio figure:nth-child(2) { left: 50%; height: 44vh; }
.curtain__trio figure:nth-child(3) { left: 72%; height: 38vh; opacity: 0.5; }
.curtain__trio img { height: 100%; width: auto; }
.curtain__type { position: relative; width: min(860px, 82vw); margin: 0 auto 4vh; }
.curtain__type svg { width: 100%; height: auto; }
.curtain__ask { position: relative; text-align: center; }
.curtain__ask h2 { margin-inline: auto; }
.curtain__ask .body { margin: 16px auto 0; }
.curtain__ask .signup { justify-content: center; margin-top: 26px; }
.curtain__ask .note { margin-top: 16px; }
@media (max-width: 900px) {
  .curtain__trio figure:nth-child(1), .curtain__trio figure:nth-child(3) { display: none; }
  .curtain__trio figure:nth-child(2) { left: 50%; height: 34vh; opacity: 0.4; }
}

/* ── reduced motion: resolve to the meaningful final state, never blank ─── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .cones polygon { opacity: 0.86; }
  .beat i { opacity: 0.22; }
  .beat i:first-child { opacity: 1; }
  .readout__word { opacity: 1; transform: none; }
  /* the sticky scrub is released and replaced by the resolved triptych */
  .rep { height: auto; }
  .rep__sticky { position: static; height: auto; padding-block: 72px; }
  .rep__grid, .rep__skip { display: none; }
  .rep__static { display: block; }
}

/* ── 법무 문서 (/privacy · /terms) ───────────────────────────────────────
   본문은 docs/legal/*.md 를 tools/legaldoc.py 가 렌더한 것이다.
   ⚠️ 색은 **기존 토큰만** 쓴다. 새 색 조합을 만들면 대비 감사(:root 토큰 전조합)가 재지 않는
      쌍이 화면에 생긴다 — 게이트가 통과하는데 화면은 AA 미달인 상태가 된다.
   ⚠️ 전역 h1·h2 는 clamp(30~54px) 로 히어로용이다. 법무 문서엔 h2 가 17개 있어서 그대로
      쓰면 문서가 읽히지 않는다. 그래서 .legal 안에서만 크기를 되돌린다. */
.legal__lang { margin-top: 6px; }
.legal__lang a { color: var(--text-dim); }
.legal__lang a:hover { color: var(--text); }

.legal { margin-top: 28px; }
.legal h1 { font-size: clamp(28px, 3vw, 40px); margin-top: 0; }
.legal h2 {
  font-size: 22px;
  line-height: 1.3;
  margin-top: 44px;
  color: var(--text);
}
.legal h3 { font-size: 17px; margin-top: 28px; color: var(--text); }
.legal h4 { font-size: 15px; margin-top: 22px; color: var(--text); }
.legal p, .legal ul, .legal ol { margin-top: 14px; }
.legal ul, .legal ol { padding-left: 1.2em; }
.legal li { margin-top: 8px; }
.legal li::marker { color: var(--text-faint); }
.legal strong { color: var(--text); font-weight: 700; }
.legal code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.88em;
  color: var(--text);
  background: var(--surface);
  padding: 1px 5px;
  border-radius: 4px;
}
.legal hr {
  border: 0;
  border-top: 1px solid var(--hairline);
  margin-top: 40px;
}

/* 표는 자기 컨테이너 안에서만 가로 스크롤한다 — 페이지 본문이 밀리면 안 된다 */
.legal__scroll { margin-top: 18px; overflow-x: auto; }
.legal table {
  border-collapse: collapse;
  min-width: 100%;
  font-size: 14px;
}
.legal th, .legal td {
  border: 1px solid var(--hairline);
  padding: 8px 12px;
  text-align: left;
  vertical-align: top;
}
.legal th { color: var(--text); background: var(--bg-elev); font-weight: 600; white-space: nowrap; }
.legal td { color: var(--text-dim); }
