/* AFIADO site: shared system (fonts, tokens, header, footer, editorial legal pages, 404 / link fallback).
   Palette and type come from the app (apps/mobile/src/ui/tokens.ts): night navy, acid lime, brand cream and ink, Sora. */
@font-face { font-family: "Sora"; font-weight: 400; font-style: normal; font-display: swap; src: url("/assets/fonts/Sora-400.ttf") format("truetype"); }
@font-face { font-family: "Sora"; font-weight: 600; font-style: normal; font-display: swap; src: url("/assets/fonts/Sora-600.ttf") format("truetype"); }
@font-face { font-family: "Sora"; font-weight: 800; font-style: normal; font-display: swap; src: url("/assets/fonts/Sora-800.ttf") format("truetype"); }

:root {
  --night: #0b1022;
  --night-2: #151c36;
  --night-3: #1d2646;
  --line: #2a3560;
  --lime: #dfff32;
  --lime-deep: #9db814;
  --paper: #f7f0e3;
  --paper-2: #ece3d0;
  --ink: #172033;
  --ink-soft: #3f4960;
  --mist: #a7b0c0;
  --purple: #8b5cf6;
  --pink: #ff7ab6;
  --yellow: #ffc83d;
  --orange: #ff9a3d;
  --coral: #ff6b5e;
  --blue: #3b82f6;
  --font: "Sora", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --gut: clamp(20px, 5vw, 72px);
  --max: 1320px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1.0625rem/1.7 var(--font); text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; overflow-x: clip; }
img { max-width: 100%; height: auto; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--purple); outline-offset: 3px; border-radius: 4px; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.skip { position: absolute; left: 12px; top: -64px; z-index: 100; background: var(--lime); color: var(--ink); font-weight: 800; padding: 10px 16px; border-radius: 8px; text-decoration: none; }
.skip:focus { top: 12px; }

/* ---------- header (all pages but the landing, which draws its own) ---------- */
.bar { position: relative; z-index: 5; border-bottom: 3px solid var(--ink); background: var(--paper); }
.bar .in { display: flex; align-items: center; justify-content: space-between; gap: 16px; max-width: var(--max); margin: 0 auto; padding: 14px var(--gut); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; font-size: 1.4rem; letter-spacing: -0.05em; line-height: 1; }
.brand img { width: 36px; height: 36px; border-radius: 10px; display: block; }
.brand span { display: inline-block; transform: skewX(-8deg); }
.bar nav { display: flex; flex-wrap: wrap; gap: 4px 6px; }
.bar nav a { font-size: 0.8125rem; font-weight: 600; text-decoration: none; padding: 6px 10px; border-radius: 6px; }
.bar nav a:hover { background: var(--lime); }

/* ---------- footer (minimal, all pages) ---------- */
.foot { background: var(--night); color: var(--mist); padding: 26px var(--gut); font-size: 0.8125rem; line-height: 1.5; }
.foot .in { max-width: var(--max); margin: 0 auto; display: flex; flex-wrap: wrap; gap: 14px 32px; align-items: center; justify-content: space-between; }
.foot p { margin: 0; color: var(--paper); font-weight: 800; letter-spacing: 0.02em; }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.foot a { color: var(--paper); text-decoration: none; border-bottom: 1px solid var(--line); padding-bottom: 1px; }
.foot a:hover { color: var(--lime); border-color: var(--lime); }
.foot .mail { color: var(--mist); }

/* ---------- editorial legal pages (the approved text is untouched; only its presentation) ---------- */
body:not(.home) main { display: block; position: relative; overflow: hidden; }
body:not(.home) main::before { content: ""; position: absolute; top: -10%; right: clamp(-60px, -2vw, -10px); width: clamp(14px, 2.2vw, 30px); height: 130%; background: var(--lime); border-inline: 3px solid var(--ink); transform: rotate(9deg); transform-origin: top; pointer-events: none; }
body:not(.home) main .wrap { position: relative; max-width: var(--max); margin: 0 auto; padding: clamp(40px, 7vw, 96px) var(--gut) clamp(64px, 9vw, 130px); display: grid; grid-template-columns: minmax(0, 1fr); }
body:not(.home) main .wrap > * { min-width: 0; }
@media (min-width: 960px) {
  body:not(.home) main .wrap { grid-template-columns: minmax(0, 0.26fr) minmax(0, 74ch) minmax(0, 0.74fr); }
  body:not(.home) main .wrap > * { grid-column: 2; }
  body:not(.home) main .wrap > h1 { grid-column: 1 / 4; }
}
body:not(.home) main h1 { margin: 0 0 0.12em; font-weight: 800; font-size: clamp(2.35rem, 8.4vw, 7.4rem); line-height: 0.9; letter-spacing: -0.05em; text-transform: uppercase; text-wrap: balance; }
body:not(.home) main h1::after { content: ""; display: block; width: clamp(80px, 13vw, 180px); height: clamp(12px, 1.7vw, 20px); margin-top: 0.32em; background: var(--lime); border: 3px solid var(--ink); transform: skewX(-24deg); }
.muted { margin: 1.4rem 0 1.4rem; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-soft); }
.lead { margin: 0 0 1.2rem; font-size: clamp(1.15rem, 2.1vw, 1.45rem); line-height: 1.5; font-weight: 600; max-width: 56ch; }
body:not(.home) main h2 { position: relative; margin: 3.2rem 0 0.9rem; padding-top: 1.2rem; border-top: 3px solid var(--ink); font-weight: 800; font-size: clamp(1.3rem, 2.5vw, 1.85rem); line-height: 1.12; letter-spacing: -0.03em; scroll-margin-top: 24px; }
body:not(.home) main h2::before { content: ""; position: absolute; left: 0; top: -9px; width: 64px; height: 15px; background: var(--lime); border: 3px solid var(--ink); transform: skewX(-24deg); }
body:not(.home) main p { margin: 0 0 1.05rem; }
body:not(.home) main ul, body:not(.home) main ol { margin: 0 0 1.2rem; padding-left: 1.3rem; }
body:not(.home) main li { margin: 0.5rem 0; padding-left: 0.2rem; }
body:not(.home) main li::marker { color: var(--ink); font-weight: 800; }
body:not(.home) main strong { font-weight: 800; }
body:not(.home) main a { text-decoration-thickness: 2px; text-underline-offset: 3px; }
body:not(.home) main a:hover { background: var(--lime); }

/* phones: the lime slash becomes a thin edge stripe so it never crosses the text; the menu drops under the brand */
@media (max-width: 959px) {
  body:not(.home) main::before { right: -14px; width: 22px; top: 0; height: 100%; transform: none; opacity: 0.9; }
  .bar .in { flex-wrap: wrap; row-gap: 6px; }
  .bar nav { width: 100%; margin-left: -10px; }
}

/* data table -> stacked "keycap" cards */
body:not(.home) main table, body:not(.home) main tbody, body:not(.home) main tr, body:not(.home) main td { display: block; width: 100%; }
body:not(.home) main thead { display: none; }
body:not(.home) main table { margin: 1rem 0 1.6rem; }
body:not(.home) main tr { margin: 0 0 18px; background: #fff; border: 3px solid var(--ink); box-shadow: 7px 7px 0 var(--ink); }
body:not(.home) main td:first-child { background: var(--ink); color: var(--paper); font-weight: 800; letter-spacing: 0.01em; padding: 9px 16px; }
body:not(.home) main td:last-child { padding: 14px 16px 16px; font-size: 0.97rem; line-height: 1.62; }

/* steps */
.steps { list-style: none; padding: 0 !important; counter-reset: s; }
.steps li { counter-increment: s; position: relative; padding: 4px 0 14px 58px; margin: 0; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 42px; height: 42px; display: grid; place-items: center; background: var(--lime); color: var(--ink); border: 3px solid var(--ink); font-weight: 800; font-size: 1.15rem; transform: skewX(-8deg); }

/* in-page navigation (built by site.js from the h2 headings) */
.toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 0.4rem 0 1.4rem; padding: 0; list-style: none; }
.toc a { display: inline-block; font-size: 0.8rem; font-weight: 600; text-decoration: none; padding: 7px 12px; border: 2px solid var(--ink); border-radius: 999px; background: transparent; }
.toc a:hover { background: var(--lime); }
.toc li { margin: 0; padding: 0; }
body:not(.home) main .toc { padding-left: 0; margin-left: 0; }

/* ---------- keycap, soon-stamp, 404 / link fallback ---------- */
.keycap { display: inline-block; background: var(--lime); color: var(--ink); font-weight: 800; font-size: 1.1rem; padding: 16px 34px; border-radius: 16px; text-decoration: none; box-shadow: 0 6px 0 var(--lime-deep); border: 0; cursor: pointer; transition: transform 0.12s, box-shadow 0.12s; }
.keycap:hover { background: var(--lime); transform: translateY(2px); box-shadow: 0 4px 0 var(--lime-deep); }
.keycap:active { transform: translateY(6px); box-shadow: 0 0 0 var(--lime-deep); }
.soon { display: inline-flex; align-items: center; gap: 12px; border: 2px dashed currentColor; padding: 10px 18px; font-weight: 800; font-size: 0.8rem; letter-spacing: 0.16em; text-transform: uppercase; transform: rotate(-2deg); }
.soon::before { content: ""; flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 2px var(--ink); animation: blink 2.2s ease-in-out infinite; }
.store { display: inline-block; background: var(--lime); color: var(--ink); font-weight: 800; padding: 14px 28px; border-radius: 14px; text-decoration: none; box-shadow: 0 6px 0 var(--lime-deep); }
@keyframes blink { 50% { opacity: 0.25; } }
@media (prefers-reduced-motion: reduce) { .soon::before { animation: none; } .keycap { transition: none; } }

.stage-page { max-width: var(--max); margin: 0 auto; padding: clamp(56px, 10vw, 140px) var(--gut) clamp(72px, 11vw, 160px); position: relative; }
.stage-page h1 { margin: 0; font-weight: 800; font-size: clamp(2.6rem, 10.5vw, 9rem); line-height: 0.88; letter-spacing: -0.055em; text-transform: uppercase; text-wrap: balance; }
.stage-page h1 em { font-style: normal; display: inline-block; background: var(--lime); border: 3px solid var(--ink); padding: 0 0.12em; transform: skewX(-8deg); }
.stage-page p { font-size: clamp(1.05rem, 2vw, 1.3rem); font-weight: 600; max-width: 38ch; margin: 1.4rem 0 1.8rem; }
.stage-page .actions { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 28px; }
.stage-page .note { font-size: 0.9rem; font-weight: 400; color: var(--ink-soft); margin-top: 1.6rem; }

.banner { background: #ffd34d; color: #3a2a00; border-bottom: 3px solid var(--ink); padding: 8px 20px; text-align: center; font-size: 14px; font-weight: 800; }
