/* Cart to Rocket public pages: the landing page (the game framed at the top), How to play and Privacy.
   Same world as the game (DESIGN.md): ink outlines, sticker panels, Lilita One for display type only.
   Body copy is Nunito (self-hosted, SIL OFL), rounded like the game's
   stickers but built for reading. */
@font-face { font-family: 'Lilita One'; src: url('/cart-to-rocket/assets/lilita-one.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'Nunito'; src: url('/cart-to-rocket/assets/nunito.woff2') format('woff2'); font-weight: 200 1000; font-display: swap; }

:root {
  --ink: #1E2235; --ink-soft: #454B63; --panel: #FFFDF7; --cta: #FF5A36; --cta-dark: #D63E1E;
  --teal: #2EC4B6; --teal-ink: #14706A; --coin: #FFD23F; --coin-edge: #C98A00; --sky: #4FB6F5; --sky-pale: #CFF1FF;
  --grass: #6CCB4E; --glass: #A7ECFF; --glass-edge: #3A8FB7; --jelly: #FF4FA0; --jelly-edge: #B0236A;
  --crate: #D9A066; --planks: #B97A45; --link: #B3311A; --rule: #C9CED6; --sun: #FFD84D;
  --display: 'Lilita One', 'Trebuchet MS', sans-serif;
  --body: 'Nunito', 'Trebuchet MS', system-ui, sans-serif;
  --line: 3px; --radius: 16px; --bar: 64px; --measure: 62ch;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--sky-pale); color: var(--ink); font: 18px/1.6 var(--body); }
img, svg { display: block; max-width: 100%; }
a { color: var(--link); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus { outline: none; }
:focus-visible { outline: 3px solid var(--teal-ink); outline-offset: 3px; border-radius: 5px; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.12; letter-spacing: 0.01em; margin: 0 0 0.4em; text-wrap: balance; }
h1 { font-size: 40px; }
h2 { font-size: 26px; margin-top: 0; }
p { margin: 0 0 1em; max-width: var(--measure); text-wrap: pretty; }
ul, ol { margin: 0 0 1em; padding-left: 1.3em; max-width: var(--measure); }
li { margin-bottom: 0.35em; }
strong { font-weight: 700; }
kbd {
  font: 600 0.86em/1 var(--body); display: inline-block; min-width: 1.9em; padding: 0.28em 0.45em; text-align: center;
  background: var(--panel); border: 2px solid var(--ink); border-bottom-width: 4px; border-radius: 8px; white-space: nowrap;
}

.skip { position: absolute; left: 12px; top: -80px; z-index: 10; padding: 12px 16px; background: var(--panel); border: var(--line) solid var(--ink); border-radius: 12px; font-weight: 700; color: var(--ink); }
.skip:focus { top: 12px; }

/* buttons: the game's pressed-block look */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 8px 18px;
  font: 400 18px/1 var(--display); letter-spacing: 0.02em; color: var(--ink); text-decoration: none; white-space: nowrap;
  background: var(--panel); border: var(--line) solid var(--ink); border-radius: 14px;
  box-shadow: inset 0 -5px 0 rgba(30, 34, 53, 0.18);
}
.btn:hover { color: var(--ink); background: #fff; }
.btn:active { transform: translateY(2px); box-shadow: inset 0 -2px 0 rgba(30, 34, 53, 0.18); }
.btn.coin { background: var(--coin); box-shadow: inset 0 -5px 0 var(--coin-edge); }
.btn.coin:hover { background: var(--sun); }
.btn svg { width: 22px; height: 22px; flex: none; }
.ico { stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; fill: none; }

/* ---------- landing: the game first ---------- */
.stage { height: calc(100vh - var(--bar)); height: calc(100svh - var(--bar)); min-height: 300px; background: var(--sky); }
.stage iframe { display: block; width: 100%; height: 100%; border: 0; }
.bar {
  height: var(--bar); display: flex; align-items: center; gap: 12px; padding: 0 max(12px, env(safe-area-inset-right)) 0 max(12px, env(safe-area-inset-left));
  background: var(--ink); color: var(--panel); border-top: var(--line) solid var(--ink);
}
.bar .name { font: 400 26px/1 var(--display); letter-spacing: 0.02em; margin: 0; white-space: nowrap; }
.bar .tag { margin: 0; font-size: 14px; line-height: 1.3; color: var(--panel); min-width: 0; }
.bar .rotate { display: none; align-items: center; gap: 8px; margin: 0; font-size: 14px; line-height: 1.25; color: var(--panel); min-width: 0; }
.bar .rotate svg { width: 26px; height: 26px; flex: none; }
.bar .actions { margin-left: auto; display: flex; gap: 8px; flex: none; }
.bar .btn { min-height: 44px; font-size: 18px; padding: 6px 14px; }
.bar .more { color: var(--panel); background: transparent; border-color: var(--rule); box-shadow: none; }
.bar .more:hover { background: rgba(255, 255, 255, 0.08); color: var(--panel); }
@media (max-width: 760px) {
  .bar .tag { display: none; }
}
@media (max-width: 760px) and (orientation: portrait) {
  .bar .name { display: none; }
  .bar .rotate { display: inline-flex; }
}
@media (max-width: 420px) {
  .bar .more span { display: none; }
  .bar .more { padding: 6px 10px; min-width: 48px; }
}

/* ---------- content ---------- */
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.intro { padding: 48px 0 28px; }
.intro .lede { font-size: 18px; line-height: 1.55; color: var(--ink-soft); max-width: 60ch; }
.facts { display: flex; flex-wrap: wrap; gap: 8px 10px; list-style: none; padding: 0; margin: 18px 0 0; max-width: none; }
.facts li { margin: 0; padding: 6px 12px; background: var(--panel); border: 2px solid var(--ink); border-radius: 999px; font-size: 14px; font-weight: 600; }

.sections { display: grid; gap: 20px; padding-bottom: 56px; }
.sheet { background: var(--panel); border: var(--line) solid var(--ink); border-radius: var(--radius); padding: 26px 26px 10px; box-shadow: 0 5px 0 rgba(30, 34, 53, 0.12); }
.sheet.wide { grid-column: 1 / -1; }
@media (min-width: 860px) {
  .sections { grid-template-columns: 1fr 1fr; gap: 24px; }
  .sheet { padding: 30px 32px 14px; }
}
.sheet h2 { display: flex; align-items: center; gap: 12px; }
.sheet h2 svg { width: 34px; height: 34px; flex: none; }

.controls { width: 100%; border-collapse: collapse; margin: 0 0 1.2em; font-size: 18px; }
.controls th, .controls td { text-align: left; vertical-align: top; padding: 10px 10px 10px 0; border-bottom: 2px solid var(--rule); }
.controls thead th { font: 400 18px/1.2 var(--display); letter-spacing: 0.02em; color: var(--ink-soft); }
.controls tbody th { font-weight: 700; width: 26%; }
.controls tr:last-child td, .controls tr:last-child th { border-bottom: 0; }
@media (max-width: 560px) {
  .controls thead { display: none; }
  .controls tr { display: block; padding: 10px 0; border-bottom: 2px solid var(--rule); }
  .controls tr:last-child { border-bottom: 0; }
  .controls th, .controls td { display: block; width: auto; border: 0; padding: 2px 0; }
  .controls tbody th { width: auto; }
  .controls td[data-l]::before { content: attr(data-l) ': '; font-weight: 600; color: var(--ink-soft); }
}

.soon { display: inline-flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--sky-pale); border: 2px dashed var(--ink-soft); border-radius: 12px; font-weight: 600; }

.next-links { display: flex; flex-wrap: wrap; gap: 10px; margin: 6px 0 22px; }

/* ---------- article pages ---------- */
.site-head { background: var(--ink); color: var(--panel); }
.site-head .wrap { display: flex; align-items: center; gap: 12px; min-height: 64px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
.site-head .home { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; color: var(--panel); text-decoration: none; font: 400 26px/1 var(--display); letter-spacing: 0.02em; }
.site-head .home img { width: 34px; height: 34px; border-radius: 10px; }
.site-head nav { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.site-head nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; color: var(--panel); text-decoration: none; font-weight: 600; border-radius: 10px; }
.site-head nav a:hover { background: rgba(255, 255, 255, 0.1); }
.site-head nav a[aria-current='page'] { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 6px; text-decoration-color: var(--coin); }

.article { padding: 40px 0 56px; }
.article > .wrap > p.lede { font-size: 18px; color: var(--ink-soft); max-width: 62ch; }
.steps { display: grid; gap: 20px; margin-top: 28px; }
.step { display: grid; gap: 18px; background: var(--panel); border: var(--line) solid var(--ink); border-radius: var(--radius); padding: 22px; box-shadow: 0 5px 0 rgba(30, 34, 53, 0.12); }
.step figure { margin: 0; background: var(--sky-pale); border: 2px solid var(--ink); border-radius: 12px; padding: 14px; }
.step figure svg { width: 100%; max-width: 360px; height: auto; margin: 0 auto; }
.step figcaption { font-size: 14px; color: var(--ink-soft); margin-top: 8px; }
.step p:last-child, .step ul:last-child { margin-bottom: 0; }
@media (min-width: 820px) {
  .step { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); align-items: center; padding: 28px; gap: 30px; }
  .step.flip > figure { order: 2; }
}
.pay { list-style: none; padding: 0; display: grid; gap: 6px; }
.pay li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 2px solid var(--rule); margin: 0; }
.pay li:last-child { border-bottom: 0; }
.pay b { font-variant-numeric: tabular-nums; white-space: nowrap; }

.prose { max-width: 62ch; }
.prose h2 { margin-top: 1.6em; font-size: 26px; }
.prose .stamp { color: var(--ink-soft); }

.site-foot { background: var(--ink); color: var(--panel); padding: 26px 0 calc(26px + env(safe-area-inset-bottom)); font-size: 14px; }
.site-foot .wrap { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; }
.site-foot a { color: var(--panel); display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; }
.site-foot p { margin: 0; }
.site-foot .spacer { margin-left: auto; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
