/* Zero Float — site styles
   Palette lifted verbatim from App/Theme.swift so the site and the app are
   the same object. Light values first, dark swapped under the media query. */

:root {
  --film:   #F4F2EC;   /* the page */
  --sheet:  #FFFEFA;   /* cards */
  --ink:    #17223B;   /* primary text */
  --ink2:   #566171;   /* secondary text */
  --muted:  #9AA4B2;   /* tertiary text */
  --line:   #D9D8D1;   /* hairlines */
  --red:    #E44B3F;
  --green:  #4C8B72;
  --amber:  #E8B84A;
  --slab:   #17223B;   /* inverted blocks */
  --slab-ink: #F4F2EC;
  --shadow: 0 1px 0 rgba(23,34,59,.05), 0 10px 30px -18px rgba(23,34,59,.45);
  --maxw:   1080px;
  --display: "Saira Condensed", "Oswald", "Arial Narrow", system-ui, sans-serif;
  --body:    "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono:    "Spline Sans Mono", ui-monospace, "SF Mono", Menlo, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --film:   #121620;
    --sheet:  #1B2130;
    --ink:    #E9E7E0;
    --ink2:   #A7AEBE;
    --muted:  #737C8E;
    --line:   #303748;
    --red:    #F07C6E;
    --green:  #5FBE97;
    --amber:  #E7BA5C;
    --slab:   #2A3348;
    --slab-ink: #E9E7E0;
    --shadow: 0 1px 0 rgba(0,0,0,.30), 0 10px 30px -18px rgba(0,0,0,.85);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --film:#121620; --sheet:#1B2130; --ink:#E9E7E0; --ink2:#A7AEBE;
  --muted:#737C8E; --line:#303748; --red:#F07C6E; --green:#5FBE97;
  --amber:#E7BA5C; --slab:#2A3348; --slab-ink:#E9E7E0;
  --shadow: 0 1px 0 rgba(0,0,0,.30), 0 10px 30px -18px rgba(0,0,0,.85);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--film);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.62;
}
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }

/* ---------- masthead ---------- */

.masthead {
  border-bottom: 1px solid var(--line);
  background: var(--film);
  position: sticky; top: 0; z-index: 20;
}
.masthead .wrap {
  display: flex; align-items: center; gap: 16px;
  min-height: 66px; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; color: inherit; }
.brand img { width: 34px; height: 34px; border-radius: 8px; display: block; }
.brand b {
  font-family: var(--display); font-weight: 800; font-size: 23px;
  letter-spacing: .01em; text-transform: uppercase;
}
.tabs { display: flex; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.tabs a {
  font-family: var(--mono); font-size: 12.5px; letter-spacing: .06em;
  text-transform: uppercase; text-decoration: none;
  color: var(--ink2); padding: 8px 13px; border-radius: 999px;
  border: 1px solid transparent;
}
.tabs a:hover { color: var(--ink); border-color: var(--line); }
.tabs a[aria-current="page"] {
  color: var(--ink); border-color: var(--line); background: var(--sheet);
}

/* ---------- type ---------- */

.eyebrow {
  font-family: var(--mono); font-size: 11.5px; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase; color: var(--red);
  margin: 0 0 10px;
}
h1 {
  font-family: var(--display); font-weight: 800;
  font-size: clamp(38px, 7vw, 66px); line-height: 1.02;
  letter-spacing: -.005em; margin: 0 0 16px; text-transform: uppercase;
}
h2 {
  font-family: var(--display); font-weight: 800;
  font-size: clamp(26px, 4vw, 36px); line-height: 1.1;
  margin: 0 0 14px; text-transform: uppercase; letter-spacing: .002em;
}
h3 { font-size: 18px; font-weight: 700; margin: 0 0 6px; line-height: 1.3; }
p  { margin: 0 0 15px; }
.lede { font-size: clamp(18px, 2.2vw, 21px); color: var(--ink2); max-width: 62ch; }
a { color: var(--red); text-underline-offset: 3px; }
small, .fine { font-size: 14px; color: var(--muted); }

section { padding: 58px 0; border-top: 1px solid var(--line); }
section:first-of-type { border-top: 0; }
.hero { padding-top: 52px; }

/* ---------- buttons ---------- */

.cta { display: flex; gap: 12px; flex-wrap: wrap; margin: 26px 0 0; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 9px; min-height: 50px; padding: 0 22px;
  border-radius: 13px; border: 1px solid var(--slab);
  background: var(--slab); color: var(--slab-ink);
  font-family: var(--body); font-size: 16px; font-weight: 700;
  text-decoration: none; box-shadow: var(--shadow);
}
.btn:hover { filter: brightness(1.12); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); box-shadow: none; }
.btn.red { background: var(--red); border-color: var(--red); color: #fff; }

/* ---------- cards / grids ---------- */

.card {
  background: var(--sheet); border: 1px solid var(--line);
  border-radius: 16px; padding: 20px; box-shadow: var(--shadow);
}
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(316px, 1fr)); }

/* the nineteen */
.disc { margin-bottom: 26px; }
.disc > h3 {
  font-family: var(--mono); font-size: 12px; letter-spacing: .13em;
  text-transform: uppercase; color: var(--ink2);
  border-bottom: 1px solid var(--line); padding-bottom: 8px; margin-bottom: 14px;
}
.games { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(238px, 1fr)); }
.game {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--sheet); border: 1px solid var(--line);
  border-radius: 14px; padding: 13px 14px;
}
.game .gicon { width: 34px; height: 34px; flex: 0 0 34px; margin-top: 2px; display: block; }
.game .code {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .09em;
  color: var(--muted); display: block;
}
.game b { font-size: 16px; display: block; line-height: 1.25; }
.game span.blurb { font-size: 13.5px; color: var(--ink2); line-height: 1.45; display: block; margin-top: 3px; }

/* screenshots */
.shots {
  display: grid; gap: 18px; max-width: 840px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
@media (max-width: 820px) { .shots { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 470px) { .shots { grid-template-columns: 1fr; max-width: 300px; } }
.shots figure { margin: 0; }
.shots img {
  width: 100%; height: auto; display: block;
  border-radius: 16px; border: 1px solid var(--line); box-shadow: var(--shadow);
}
.shots figcaption { font-size: 13.5px; color: var(--ink2); margin-top: 9px; }

/* facts strip */
.facts { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.fact { border-left: 3px solid var(--red); padding: 2px 0 2px 13px; }
.fact b { font-family: var(--display); font-weight: 800; font-size: 34px; display: block; line-height: 1; }
.fact span { font-size: 14px; color: var(--ink2); }

/* ---------- FAQ ---------- */

.faq { max-width: 78ch; }
.faq details {
  border: 1px solid var(--line); border-radius: 14px;
  background: var(--sheet); margin-bottom: 10px; overflow: hidden;
}
.faq summary {
  cursor: pointer; list-style: none; padding: 15px 46px 15px 17px;
  font-weight: 700; font-size: 16.5px; position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 18px; top: 50%;
  transform: translateY(-50%); font-family: var(--mono);
  font-size: 20px; color: var(--red); line-height: 1;
}
.faq details[open] summary::after { content: "\2013"; }
.faq details > div { padding: 0 17px 16px; color: var(--ink2); }
.faq details > div > p:last-child { margin-bottom: 0; }

/* ---------- prose (privacy / support body) ---------- */

.prose { max-width: 74ch; }
.prose h2 { font-size: clamp(22px, 3vw, 27px); margin-top: 38px; }
.prose h2:first-child { margin-top: 0; }
.prose ul { padding-left: 20px; margin: 0 0 16px; }
.prose li { margin-bottom: 7px; }
.prose code {
  font-family: var(--mono); font-size: .9em;
  background: var(--sheet); border: 1px solid var(--line);
  border-radius: 6px; padding: 1px 5px;
}
.callout {
  border-left: 3px solid var(--green); background: var(--sheet);
  border-radius: 0 12px 12px 0; padding: 15px 17px; margin: 0 0 18px;
}

/* ---------- footer ---------- */

footer {
  border-top: 1px solid var(--line); padding: 30px 0 46px;
  color: var(--muted); font-size: 14px;
}
footer .wrap { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; }
footer a { color: var(--ink2); text-decoration: none; }
footer a:hover { color: var(--ink); text-decoration: underline; }
footer .spacer { margin-left: auto; }

@media (max-width: 560px) {
  .masthead .wrap { min-height: 0; padding-top: 12px; padding-bottom: 12px; }
  .tabs { margin-left: 0; width: 100%; }
  section { padding: 42px 0; }
}

/* ---------- game icons in dark ----------
   The catalog SVGs carry the app's light-mode colours as presentation
   attributes. CSS beats a presentation attribute, so the two values that
   would otherwise disappear against a dark card are repointed at the
   tokens. Red, amber, green and the #9AA4B2 hairline read fine on both. */

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .gicon [stroke="#17223B"] { stroke: var(--ink); }
  :root:not([data-theme="light"]) .gicon [fill="#F7F5EF"],
  :root:not([data-theme="light"]) .gicon [fill="#F4F2EC"] { fill: var(--sheet); }
}
:root[data-theme="dark"] .gicon [stroke="#17223B"] { stroke: var(--ink); }
:root[data-theme="dark"] .gicon [fill="#F7F5EF"],
:root[data-theme="dark"] .gicon [fill="#F4F2EC"] { fill: var(--sheet); }
