@font-face {
  font-family: Bricolage Grotesque;
  src: url('/assets/fonts/bricolage-grotesque-latin.woff2') format('woff2');
  font-style: normal;
  font-weight: 500 800;
  font-display: swap;
}
@font-face {
  font-family: Outfit;
  src: url('/assets/fonts/outfit-latin.woff2') format('woff2');
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
}

/* Gunmetal hangar palette, lifted from the game's own tokens (src/styles/app.css, refresh/convex.css). */
:root {
  color-scheme: dark;
  --midnight: #141c24;
  --steel: #28313b;
  --steel-deep: #1b222a;
  --steel-edge: #7c858a;
  --ink-edge: #0a0f15;
  --ivory: #f3ecd8;
  --receipt: #fbf4e4;
  --receipt-ink: #1b1a17;
  --receipt-muted: #5d574b;
  --text: #eaf0f4;
  --text-dim: #9aa6af;
  --amber: #f3ae26;
  --amber-deep: #b87410;
  --amber-ink: #2a1b03;
  --banana: #ffe066;
  --focus: #ffe09a;
  --convex-fill: linear-gradient(180deg, #4a5c73 0%, #2f3d4f 46%, #1d2733 100%);
  --convex-shadow: inset 0 1px 0 rgb(255 255 255 / 26%), inset 0 -3px 0 rgb(0 0 0 / 28%), 0 2px 0 #05080c, 0 3px 6px rgb(0 0 0 / 36%);
  --amber-fill: linear-gradient(180deg, #ffdc7e 0%, #f6b73a 48%, #d98d14 100%);
  --amber-shadow: inset 0 1px 0 rgb(255 247 214 / 75%), 0 2px 0 #3a2504, 0 6px 16px rgb(0 0 0 / 40%);
  --display: 'Bricolage Grotesque', system-ui, sans-serif;
  --body: 'Outfit', system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  background: var(--midnight);
  color: var(--text);
  font: 17px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-underline-offset: 4px; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 999px;
}

.sr-only, .skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.skip-link:focus {
  position: fixed;
  z-index: 50;
  top: 12px;
  left: 12px;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--amber-fill);
  color: var(--amber-ink);
  font-weight: 800;
  text-decoration: none;
}

/* ------------------------------------------------------------ buried fine print (every page) */

.fine-print {
  position: relative;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 4px 14px;
  padding: 18px 16px calc(14px + env(safe-area-inset-bottom));
  color: rgb(234 240 244 / 38%);
  font-size: 11px;
  letter-spacing: .02em;
}
.fine-print nav { display: flex; gap: 12px; }
.fine-print a {
  color: inherit;
  text-decoration: none;
  transition: color .2s ease;
}
.fine-print a:hover { color: rgb(234 240 244 / 75%); text-decoration: underline; }

/* ------------------------------------------------------------ document pages (privacy, terms, support, credits, 404) */

.doc-page {
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(80% 50% at 50% 0%, rgb(243 174 38 / 10%), transparent 70%),
    repeating-linear-gradient(90deg, rgb(255 255 255 / 1.6%) 0 2px, transparent 2px 7px),
    linear-gradient(180deg, var(--steel) 0%, var(--steel-deep) 55%, var(--midnight) 100%);
}

.doc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: min(820px, 100%);
  margin: 0 auto;
  padding: calc(18px + env(safe-area-inset-top)) 16px 10px;
}
.doc-brand img { width: 128px; }
.back-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 18px;
  border: 1px solid var(--ink-edge);
  border-radius: 999px;
  background: var(--convex-fill);
  box-shadow: var(--convex-shadow);
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: transform .15s ease;
}
.back-pill:hover { transform: translateY(-1px); }
.back-pill:active { transform: translateY(1px); }

.doc {
  position: relative;
  flex: 1 0 auto;
  width: min(820px, calc(100% - 32px));
  margin: 64px auto 24px;
  padding: clamp(28px, 6vw, 56px) clamp(22px, 6vw, 60px) clamp(32px, 6vw, 56px);
  border-radius: 30px;
  background:
    radial-gradient(120% 40% at 50% 0%, rgb(255 255 255 / 55%), transparent 70%),
    var(--receipt);
  color: var(--receipt-ink);
  box-shadow: inset 0 1px 0 #fff, inset 0 -4px 0 rgb(0 0 0 / 8%), 0 3px 0 #05080c, 0 24px 60px rgb(0 0 0 / 45%);
}
/* Boarding-pass notches on both sides of the document. */
.doc::before, .doc::after {
  content: '';
  position: absolute;
  top: 104px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--steel-deep);
  box-shadow: inset 0 2px 3px rgb(0 0 0 / 45%);
}
.doc::before { left: -13px; }
.doc::after { right: -13px; }

.doc-peek {
  position: absolute;
  top: -58px;
  right: clamp(10px, 4vw, 36px);
  width: clamp(84px, 14vw, 120px);
  rotate: 8deg;
  filter: drop-shadow(0 8px 10px rgb(0 0 0 / 35%));
  pointer-events: none;
}

.doc h1, .doc h2 {
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: -.035em;
  line-height: 1.04;
}
.doc h1 {
  margin: 0 0 18px;
  max-width: 14ch;
  font-size: clamp(36px, 6vw, 56px);
}
.doc h2 {
  margin: 38px 0 10px;
  font-size: clamp(22px, 3vw, 27px);
}
.doc p, .doc li { color: #2d2a24; }
.doc a { color: #8a4b05; font-weight: 600; }
.doc ul { padding-left: 1.2em; }
.doc li + li { margin-top: 6px; }

.doc .eyebrow {
  display: inline-block;
  margin-bottom: 14px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--amber-fill);
  box-shadow: inset 0 1px 0 rgb(255 247 214 / 75%);
  color: var(--amber-ink);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.doc .lead { font-size: 20px; color: var(--receipt-muted); }

.doc table {
  width: 100%;
  margin: 14px 0;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 18px;
  overflow: hidden;
  background: #f1e7d0;
  font-size: 15px;
}
.doc th, .doc td {
  padding: 11px 14px;
  text-align: left;
  vertical-align: top;
}
.doc th { background: #e4d6b6; font-weight: 800; }
.doc tr + tr td { border-top: 1px solid rgb(27 26 23 / 9%); }

.doc details {
  margin: 10px 0;
  border-radius: 20px;
  background: #f3ead5;
  box-shadow: inset 0 1px 0 #fffaf0, 0 1px 0 rgb(0 0 0 / 10%);
}
.doc summary {
  cursor: pointer;
  list-style: none;
  padding: 15px 52px 15px 20px;
  position: relative;
  font-weight: 700;
  border-radius: 20px;
}
.doc summary::-webkit-details-marker { display: none; }
.doc summary::after {
  content: '+';
  position: absolute;
  right: 14px;
  top: 50%;
  translate: 0 -50%;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--amber-fill);
  color: var(--amber-ink);
  font-weight: 800;
  transition: rotate .2s ease;
}
.doc details[open] summary::after { rotate: 45deg; }
.doc details p { margin: 0; padding: 0 20px 16px; }

.doc .support-banner {
  margin-top: 30px;
  padding: 16px 20px;
  border-radius: 20px;
  background: #e9dcbd;
}
.doc .support-banner p { margin: 0; }

.amber-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 50px;
  padding: 0 26px;
  border-radius: 999px;
  background: var(--amber-fill);
  box-shadow: var(--amber-shadow);
  color: var(--amber-ink) !important;
  font-weight: 800;
  text-decoration: none;
  transition: transform .15s ease;
}
.amber-button:hover { transform: translateY(-2px); }
.amber-button:active { transform: translateY(1px); }

.doc-page .fine-print { color: rgb(234 240 244 / 34%); }

@media (max-width: 560px) {
  body { font-size: 16px; }
  .doc-brand img { width: 104px; }
  .doc { border-radius: 24px; }
  .doc::before, .doc::after { top: 86px; }
  .doc table { font-size: 14px; }
  .doc th, .doc td { padding: 9px 10px; }
}

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