/* Eso Es: tokens from Packages/DesignSystem (GameWorld.swift, Metrics.swift). No JavaScript.
   Glass is a translucent fill plus backdrop-filter. Text sits only on glass or a solid colour. */
:root {
  color-scheme: light dark;
  /* GameWorld.home palette */
  --bg: #f2f1f6;
  --ink: #111216;
  --ink-2: #5a5c66;
  --accent: #2b2fd6;
  --on-accent: #ffffff;
  --wash-1: rgb(255 215 160 / 0.7);
  --wash-2: rgb(201 214 255 / 0.7);
  --glass: rgb(255 255 255 / 0.66);
  --glass-edge: rgb(255 255 255 / 0.85);
  --glass-shadow: 0 8px 30px rgb(30 30 80 / 0.1);
  --focus: #2b2fd6;
  /* DSMetrics */
  --r-card: 30px;
  --r-tile: 24px;
  --r-bar: 26px;
  --pad: 20px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI", Roboto, sans-serif;
  --font-rounded: ui-rounded, "SF Pro Rounded", var(--font);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e0f1c;
    --ink: #ffffff;
    --ink-2: #c4c6d6;
    --accent: #9ea1ff;
    --on-accent: #0e0f1c;
    --wash-1: rgb(168 75 0 / 0.38);
    --wash-2: rgb(43 47 214 / 0.38);
    --glass: rgb(34 36 74 / 0.62);
    --glass-edge: rgb(255 255 255 / 0.16);
    --glass-shadow: 0 8px 30px rgb(0 0 0 / 0.35);
    --focus: #c4c6ff;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  font: 400 1.0625rem/1.55 var(--font);
  color: var(--ink);
  background:
    radial-gradient(circle at 18% 6%, var(--wash-1) 0 22rem, transparent 22.1rem),
    radial-gradient(circle at 96% 30%, var(--wash-2) 0 18rem, transparent 18.1rem),
    var(--bg);
  background-repeat: no-repeat;
  display: flex;
  flex-direction: column;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 0.2em; }
a:focus-visible, .btn:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 8px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--on-accent); padding: 10px 14px; border-radius: 12px; z-index: 10; }
.skip:focus { left: 8px; }

.wrap { width: 100%; max-width: 68rem; margin: 0 auto; padding: 0 var(--pad); }
main { flex: 1; }

/* Header: a floating glass bar, like the tab bar */
.bar {
  position: sticky; top: 10px; z-index: 5;
  margin: 10px auto 0; max-width: 68rem; width: calc(100% - 24px);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 8px 10px 8px 16px;
  border-radius: var(--r-bar);
  background: var(--glass);
  border: 1px solid var(--glass-edge);
  box-shadow: var(--glass-shadow);
  -webkit-backdrop-filter: blur(24px) saturate(1.6);
  backdrop-filter: blur(24px) saturate(1.6);
}
.brand { display: inline-flex; align-items: center; gap: 10px; font: 800 1.2rem/1 var(--font-rounded); color: var(--ink); text-decoration: none; min-height: 44px; letter-spacing: -0.02em; }
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.bar nav { display: flex; gap: 4px; }
.bar nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 999px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 0.95rem; }
.bar nav a:hover, .bar nav a[aria-current="page"] { background: rgb(127 127 160 / 0.18); }

/* Type */
h1, h2, h3 { font-family: var(--font); font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; margin: 0; }
h1 { font-size: clamp(2.3rem, 7vw, 4rem); }
h2 { font-size: clamp(1.6rem, 4.4vw, 2.3rem); }
h3 { font-size: 1.25rem; line-height: 1.25; }
.eyebrow { font-size: 0.8125rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); margin: 0 0 10px; }
.lead { font-size: clamp(1.15rem, 3vw, 1.4rem); color: var(--ink-2); max-width: 36rem; margin: 18px 0 0; }
p { margin: 0 0 1em; }
.muted { color: var(--ink-2); }
.nb { white-space: nowrap; }

/* Glass cards */
.glass {
  background: var(--glass);
  border: 1px solid var(--glass-edge);
  border-radius: var(--r-card);
  box-shadow: var(--glass-shadow);
  -webkit-backdrop-filter: blur(24px) saturate(1.6);
  backdrop-filter: blur(24px) saturate(1.6);
  padding: 24px;
}
.glass h3 { margin-bottom: 8px; }
.glass p:last-child { margin-bottom: 0; }

/* Buttons and the App Store call to action */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 26px; border-radius: 999px;
  background: var(--accent); color: var(--on-accent);
  font: 800 1.05rem/1 var(--font); text-decoration: none; border: 0;
}
.btn.soon { background: var(--glass); color: var(--ink); border: 1px solid var(--glass-edge); cursor: default; -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px); }
.btn small { display: block; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em; opacity: 0.85; }
.btn .glyph { width: 22px; height: 22px; flex: none; fill: currentColor; }

/* Hero */
.hero { padding: 56px 0 24px; display: grid; gap: 32px; align-items: center; }
.hero .cta { margin-top: 28px; }
.phone { width: 100%; border-radius: 36px; border: 1px solid var(--glass-edge); box-shadow: 0 20px 60px rgb(20 20 90 / 0.28); background: var(--bg); overflow: hidden; }
.phone img { width: 100%; }
.hero .phone { max-width: 300px; margin: 0 auto; }
.badges { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 20px 0 0; list-style: none; }
.badges li { padding: 8px 14px; border-radius: 999px; background: var(--glass); border: 1px solid var(--glass-edge); font-weight: 700; font-size: 0.9rem; -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px); }

/* Sections */
section.block { padding: 48px 0; }
section.block > .wrap > h2 { margin-bottom: 8px; }
section.block > .wrap > .intro { color: var(--ink-2); max-width: 40rem; margin: 0 0 28px; }
.split { display: grid; gap: 28px; align-items: center; }
.split .phone { max-width: 280px; margin: 0 auto; }
.split h2 + p { margin-top: 14px; }
.grid { display: grid; gap: 14px; }
.tv { border-radius: 22px; border: 1px solid var(--glass-edge); box-shadow: 0 20px 60px rgb(20 20 90 / 0.28); overflow: hidden; }
.pair { display: grid; gap: 20px; align-items: end; }
.pair .phone { max-width: 220px; margin: 0 auto; }
ol.steps { list-style: none; counter-reset: s; padding: 0; margin: 0; display: grid; gap: 10px; }
ol.steps li { counter-increment: s; display: flex; gap: 12px; align-items: baseline; }
ol.steps li::before { content: counter(s); flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: var(--on-accent); font-weight: 800; display: grid; place-items: center; font-size: 0.9rem; }
.note { font-size: 0.9rem; color: var(--ink-2); }

/* Prose pages (privacy, support, 404) */
.prose { padding-block: 48px 56px; max-width: 46rem; }
.prose h1 { font-size: clamp(2rem, 6vw, 3rem); margin-bottom: 8px; }
.prose h2 { font-size: 1.5rem; margin: 40px 0 10px; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: 0.5em; }
.prose code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 0.88em; overflow-wrap: anywhere; }
.prose h3 { font-size: 1.15rem; margin: 24px 0 8px; }
.prose .lead { margin: 12px 0 0; max-width: none; }
.prose details { margin: 0 0 12px; padding: 4px 18px; border-radius: 20px; background: var(--glass); border: 1px solid var(--glass-edge); -webkit-backdrop-filter: blur(18px) saturate(1.4); backdrop-filter: blur(18px) saturate(1.4); }
.prose summary { cursor: pointer; font-weight: 800; min-height: 44px; display: flex; align-items: center; }
.prose details p { margin: 0 0 14px; }
.prose :target { scroll-margin-top: 72px; }
.notfound { text-align: center; padding-block: 96px; }
.notfound .lead { margin-inline: auto; }
.notfound .btn { margin-top: 24px; }

footer { padding: 28px 0 40px; color: var(--ink-2); font-size: 0.9rem; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: center; justify-content: space-between; }
footer nav { display: flex; flex-wrap: wrap; gap: 4px 18px; }
footer nav a { display: inline-flex; align-items: center; min-height: 44px; }

@media (min-width: 52rem) {
  .hero { grid-template-columns: 1.2fr 0.8fr; padding: 88px 0 40px; }
  .split { grid-template-columns: 1fr 1fr; gap: 56px; }
  .split.flip > :first-child { order: 2; }
  .grid.three { grid-template-columns: repeat(3, 1fr); }
  .grid.two { grid-template-columns: repeat(2, 1fr); }
  .pair { grid-template-columns: 1fr 1fr; }
}
@media (prefers-reduced-transparency: reduce) {
  .glass, .bar, .badges li, .btn.soon, .prose details { background: var(--bg); -webkit-backdrop-filter: none; backdrop-filter: none; border-color: var(--ink-2); }
}
@media (forced-colors: active) {
  .btn, .glass, .bar { border: 1px solid CanvasText; }
}
