/* The playable page: the real game (site/play/, an iframe) in a phone beside the pitch on wide screens, the game
   alone on phones. The game always lays out at iPhone size (393 x 852) and the frame scales it (play.js sets --s).
   Same palette and type as the rest of the site (site.css, waitlist.css). */

.play-page { min-height: 100svh; }
/* taps act at once on iOS (no double-tap zoom wait) */
.play-page :is(a, button, input), .gate { touch-action: manipulation; }
.bar-links { display: flex; align-items: center; gap: 18px; font-size: 14px; font-weight: 560; color: var(--steel-2); }
.bar-links a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }
.bar-links a:hover { color: var(--steel); }
.bar-links .snd { margin: 0; }
.bar-links .snd[hidden] { display: none; }
/* the landing clips' closing label names both stores: two lines ("Coming soon to / iPhone and Android") */
.landing .end .hud h2 { max-width: 18ch; text-wrap: balance; }

.play {
  display: grid;
  grid-template-columns: minmax(0, 470px) auto;
  justify-content: center;
  align-items: center;
  column-gap: clamp(48px, 7vw, 112px);
  min-height: 100svh;
  padding: calc(env(safe-area-inset-top) + var(--bar-h) + 16px) var(--gut) 28px;
}

/* ------------------------------------------------------------------ the pitch */
.pitch { padding-bottom: 8px; }
.eyebrow { display: inline-flex; align-items: center; gap: 9px; color: var(--kiwi); font-size: 14px; font-weight: 680; letter-spacing: 0.01em; }
.eyebrow i { width: 8px; height: 8px; border-radius: 50%; background: var(--kiwi); box-shadow: 0 0 0 0 rgb(185 208 99 / 0.5); animation: live 2.4s ease-out infinite; }
@keyframes live { 0% { box-shadow: 0 0 0 0 rgb(185 208 99 / 0.45); } 70%, 100% { box-shadow: 0 0 0 9px rgb(185 208 99 / 0); } }
.pitch h1 { margin: 14px 0 18px; font-size: clamp(50px, 5.6vw, 78px); font-weight: 650; font-stretch: 94%; line-height: 1.02; letter-spacing: -0.052em; text-wrap: balance; }
html:lang(ko) .pitch h1 { font-size: clamp(44px, 4.8vw, 66px); line-height: 1.14; letter-spacing: -0.04em; }
/* CJK: Korean's size, no Latin tracking, Japanese broken at phrases (Chrome), never inside a word */
:is(html:lang(ja), html:lang(zh)) .pitch h1 { font-size: clamp(44px, 4.8vw, 66px); line-height: 1.18; letter-spacing: -0.01em; }
html:lang(ja) :is(h1, h2, .waitlist-title, .lede) { word-break: auto-phrase; }
/* Indic, Thai, Greek and Cyrillic come from the system font: their own tracking, room for marks above and below */
:is(html:lang(hi), html:lang(bn), html:lang(ta), html:lang(te), html:lang(mr), html:lang(th)) .pitch h1 { font-size: clamp(40px, 4.4vw, 60px); line-height: 1.32; letter-spacing: 0; }
:is(html:lang(el), html:lang(uk)) .pitch h1 { letter-spacing: -0.03em; line-height: 1.08; }
/* long compound words (German, Finnish, Hungarian, Dutch, Nordic, Slavic): hyphenate the big lines rather than overflow */
.pitch h1, .waitlist-title, .end .hud h2 { hyphens: auto; overflow-wrap: break-word; }
.lede { max-width: 30em; color: var(--steel-2); font-size: 19px; line-height: 1.5; text-wrap: pretty; }
.free { display: flex; align-items: flex-start; gap: 10px; margin-top: 22px; color: var(--steel-3); font-size: 14px; line-height: 1.5; }
.free svg { flex: none; width: 18px; height: 18px; margin-top: 1px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.soon { margin-top: 26px; color: var(--steel-3); font-size: 13px; }
.soon a { color: var(--steel-2); text-decoration: none; }
.soon a:hover { color: var(--steel); }

/* the side form: the waitlist field on the page, left aligned, same input as the rest of the site */
.waitlist-side { margin-top: 30px; padding-top: 26px; border-top: 1px solid var(--hair); }
.waitlist-side .waitlist-title { margin-bottom: 4px; font-size: 21px; font-weight: 700; }
.waitlist-side .waitlist-perk { margin-bottom: 14px; color: var(--steel-2); font-size: 15px; }
.waitlist-side .waitlist-input button { padding-inline: 16px; }

/* ------------------------------------------------------------------ the phone */
.device {
  --w: min(392px, calc((100svh - var(--bar-h) - env(safe-area-inset-top) - 60px) * 0.4735));
  display: flex;
  justify-content: center;
}
.device .phone { width: var(--w); flex: none; }
.device .screen { background: #000; }
.game {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 1;
  width: 393px;
  height: 852px;
  border: 0;
  background: var(--scene);
  transform-origin: 0 0;
  transform: scale(var(--s, 1));
  color-scheme: normal;
}
.device .status { z-index: 3; }
.home-bar { position: absolute; left: 50%; bottom: calc(var(--w) * 0.012); z-index: 3; width: 35%; height: calc(var(--w) * 0.012); min-height: 4px; border-radius: 99px; background: rgb(255 255 255 / 0.55); transform: translateX(-50%); pointer-events: none; mix-blend-mode: difference; }

/* ------------------------------------------------------------------ phones: the game is the page */
@media (max-width: 899px), (pointer: coarse) and (max-height: 600px) {
  html:has(body.play-page), body.play-page { height: 100%; overflow: hidden; overscroll-behavior: none; }
  body.play-page { background: var(--scene); }
  .play-page .bar, .play-page .fine, .pitch, .landing { display: none; }
  .play { display: block; min-height: 0; padding: 0; }
  .device { position: fixed; inset: 0; display: block; }
  .device .phone { width: 100%; height: 100%; padding: 0; aspect-ratio: auto; border-radius: 0; background: var(--scene); box-shadow: none; }
  .device .phone::before, .device .phone::after, .device .status, .home-bar { display: none; }
  .device .screen { border-radius: 0; }
  .game { width: 100%; height: 100%; transform: none; }
}

/* ------------------------------------------------------------------ the waitlist dialog */
.gate {
  width: min(440px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 30px 28px 20px;
  overflow: auto;
  border: 1px solid rgb(239 233 225 / 0.12);
  border-radius: 26px;
  background: #1a130e;
  color: var(--steel);
  box-shadow: 0 30px 80px -20px rgb(0 0 0 / 0.75);
  text-align: center;
  overscroll-behavior: contain;
}
.gate::backdrop { background: rgb(8 6 5 / 0.66); -webkit-backdrop-filter: blur(6px) saturate(0.8); backdrop-filter: blur(6px) saturate(0.8); }
.gate[open] { animation: gate-in 0.42s cubic-bezier(0.2, 0.9, 0.3, 1.08); }
.gate[open]::backdrop { animation: gate-fade 0.3s ease-out; }
@keyframes gate-in { from { opacity: 0; transform: translateY(18px) scale(0.96); } }
@keyframes gate-fade { from { opacity: 0; } }
.gate-x { position: absolute; top: 12px; right: 12px; display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; background: rgb(239 233 225 / 0.08); color: var(--steel-2); cursor: pointer; }
.gate-x:hover { background: rgb(239 233 225 / 0.14); color: var(--steel); }
.gate-x svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.gate-icon { width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 15px; box-shadow: 0 0 0 0.5px rgb(255 255 255 / 0.16), 0 10px 24px -10px rgb(0 0 0 / 0.8); }
.gate-chip { display: inline-flex; align-items: center; gap: 7px; max-width: 100%; margin: 0 auto 12px; padding: 6px 12px 6px 10px; border-radius: 99px; background: rgb(239 233 225 / 0.08); color: var(--steel-2); font-size: 13px; font-weight: 600; }
.gate-chip[hidden] { display: none; }
.gate-chip svg { flex: none; width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.gate-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gate h2 { font-size: 28px; font-weight: 700; font-stretch: 88%; line-height: 1.15; letter-spacing: -0.03em; text-wrap: balance; outline: none; }
.gate #gate-body { margin: 10px auto 0; max-width: 34ch; color: var(--steel-2); font-size: 16px; line-height: 1.5; text-wrap: pretty; }
.waitlist-gate { margin-top: 22px; text-align: left; }
.waitlist-gate[hidden] { display: none; }
.waitlist-gate .waitlist-note { text-align: center; }
.waitlist-gate .waitlist-success { min-height: 0; }
.gate-play { display: block; width: 100%; min-height: 50px; margin: 16px 0 0; padding: 12px 18px; border: 0; border-radius: 13px; background: var(--kiwi); color: var(--night); font-size: 16px; font-weight: 720; cursor: pointer; transition: background 0.18s, transform 0.18s; }
.gate-play:hover { background: #d0e483; }
.gate-play:active { transform: scale(0.98); }
.gate-play[hidden] { display: none; }
.gate-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 16px; margin-top: 14px; font-size: 12.5px; color: var(--steel-3); }
.gate-links a { display: inline-block; padding: 8px 0; text-decoration: none; }
.gate-links a:hover { color: var(--steel); }

/* on a phone the dialog is a sheet at the bottom, clear of the home indicator */
@media (max-width: 599px) {
  .gate { width: 100%; max-width: none; max-height: calc(100dvh - 24px); margin: auto 0 0; padding: 28px max(20px, env(safe-area-inset-left)) calc(14px + env(safe-area-inset-bottom)); border-width: 1px 0 0; border-radius: 26px 26px 0 0; }
  .gate[open] { animation-name: sheet-in; }
  @keyframes sheet-in { from { transform: translateY(40px); opacity: 0; } }
  .gate h2 { font-size: 25px; }
  .gate-icon { width: 56px; height: 56px; margin-bottom: 14px; border-radius: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  .eyebrow i, .gate[open], .gate[open]::backdrop { animation: none; }
}
