/* ChampionsDex web, shared layer. Values from ios/ChampionsDex/Design/DesignTokens.swift via design-system.md */
@font-face { font-family: "Space Grotesk"; src: url("fonts/SpaceGrotesk.woff2") format("woff2"); font-weight: 300 700; font-display: swap; }
@font-face { font-family: "Hanken Grotesk"; src: url("fonts/HankenGrotesk.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Hanken Grotesk"; src: url("fonts/HankenGrotesk-Italic.woff2") format("woff2"); font-weight: 100 900; font-style: italic; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("fonts/IBMPlexMono-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }

:root {
  --canvas: #F4F4F7; --card: #FFFFFF; --inset: #FAFAFB; --line: #ECECF1;
  --ink: #17171D; --muted: #5C5C63; --gold: #C8941F; --gold-text: #8A6209;
  --stroke: rgba(23,23,29,.22); --gold-fill: rgba(200,148,31,.08); --gold-stroke: rgba(200,148,31,.55);
  --display: "Space Grotesk", ui-sans-serif, sans-serif;
  --body: "Hanken Grotesk", ui-sans-serif, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --r-btn: 12px; --r-chip: 10px; --r-util: 8px; --r-pill: 6px; --r-card: 16px;
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1280px;
  --ease: cubic-bezier(.22, 1, .36, 1);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scrollbar-color: #C9C9D2 var(--canvas); }
body { margin: 0; background: var(--canvas); color: var(--ink); font: 400 17px/1.55 var(--body);
  font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  min-height: 100dvh; display: flex; flex-direction: column; }
body > main { flex: 1 0 auto; width: 100%; }
::selection { background: rgba(200,148,31,.24); color: var(--ink); }
img, svg { display: block; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
.mono { font-family: var(--mono); font-weight: 400; letter-spacing: 0; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -48px; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 8px; z-index: 50; text-decoration: none; font-weight: 600; }
.skip:focus { top: 12px; }
main[tabindex="-1"]:focus { outline: none; }

/* Header: canvas 95% + blur, inner hairline (CanvasBlur.swift, HomeHeaderView) */
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(244,244,247,.95);
  -webkit-backdrop-filter: blur(16px) saturate(1.2); backdrop-filter: blur(16px) saturate(1.2); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 60px; gap: 16px; }
.site-nav { display: flex; gap: 4px; }
.site-nav a { display: inline-flex; align-items: center; min-height: 44px; font: 500 15px/1 var(--body); color: var(--muted); text-decoration: none; padding: 0 12px; border-radius: 8px; transition: color .15s var(--ease), background-color .15s var(--ease); }
.site-nav a:hover { color: var(--ink); background: rgba(23,23,29,.04); }
.site-nav a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--gold); border-radius: 0; }

/* Wordmark (HomeWordmark): Space Grotesk 700, -0.5 tracking at 24, O ≈ .82em dipping below baseline */
.wordmark { font: 700 24px/1 var(--display); letter-spacing: -0.02em; color: var(--ink); white-space: nowrap;
  display: inline-flex; flex: none; align-items: baseline; text-decoration: none; }
a.wordmark { padding: 12px 0; }
.wordmark .o { width: .8em; height: .8em; margin: 0 .01em; transform: translateY(.06em); align-self: baseline; flex: none; }
.wordmark .dex { color: var(--gold-text); }

/* Section overline (UtilityControlSurface.swift SectionOverline) */
.overline { font: 700 12px/1.2 var(--display); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 0; }
.overline .count { font: 400 12px var(--mono); letter-spacing: 0; margin-left: 6px; }

/* Type pill (TypePillView): body 12 semibold, tracking .4, 8x4, min-h 22, radius 6, 14% fill / 32% stroke, measured ink */
.pill { display: inline-flex; align-items: center; min-height: 22px; padding: 4px 8px; border-radius: var(--r-pill);
  font: 600 12px/1 var(--body); letter-spacing: .4px; text-transform: uppercase; border: 1px solid; white-space: nowrap; }
/* --tink = StageInkContrast.flatPillInk: the type colour mixed toward black by the least amount (floor 30%) that clears 4.5:1 on the darkest 14% fill it can sit on */
.t-bug { --t: #A6B91A; --tink: #59630E; } .t-dark { --t: #705746; --tink: #4E3D31; }
.t-dragon { --t: #6F35FC; --tink: #4E25B0; } .t-electric { --t: #F7D02C; --tink: #715F14; }
.t-fairy { --t: #D685AD; --tink: #7D4E65; } .t-fighting { --t: #C22E28; --tink: #88201C; }
.t-fire { --t: #EE8130; --tink: #8B4B1C; } .t-flying { --t: #A98FF3; --tink: #62538D; }
.t-ghost { --t: #735797; --tink: #503D6A; } .t-grass { --t: #7AC74C; --tink: #406828; }
.t-ground { --t: #E2BF65; --tink: #6F5E32; } .t-ice { --t: #96D9D6; --tink: #466665; }
.t-normal { --t: #A8A77A; --tink: #5F5E45; } .t-poison { --t: #A33EA1; --tink: #722B71; }
.t-psychic { --t: #F95587; --tink: #9B3554; } .t-rock { --t: #B6A136; --tink: #685C1F; }
.t-steel { --t: #B7B7CE; --tink: #5E5E6A; } .t-water { --t: #6390F0; --tink: #3D5995; }
.pill { color: var(--tink); background: color-mix(in srgb, var(--t) 14%, white); border-color: color-mix(in srgb, var(--t) 32%, transparent); }

/* Utility chip (RegulationChip / UtilityControl) */
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 12px; border-radius: var(--r-util);
  background: var(--card); border: 1px solid var(--stroke); font: 600 12.5px/1 var(--display); color: var(--ink); white-space: nowrap; }
.chip.is-active { background: var(--gold-fill); border-color: var(--gold-stroke); color: var(--gold-text); }

/* Lucide icons at 1.8 stroke */
.icon { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* App Store badge: Apple's official artwork, unaltered. 56px tall (min 40px); keep 1/4-height clear space around it. */
.appstore { display: inline-block; line-height: 0; border-radius: 9px; }
.appstore img { display: block; height: 56px; width: auto; }

/* Device: an uncaptioned app screen rendered from the App Store creative source, bezel included (1065 x 2269, 150px corner) */
.device { margin: 0; flex: none; width: 100%; max-width: 300px; }
.device img { display: block; width: 100%; height: auto; aspect-ratio: 1065 / 2269; border-radius: 14% / 6.6%;
  box-shadow: 0 28px 56px -20px rgba(23,23,29,.32), 0 2px 6px rgba(23,23,29,.10); }


/* Gold dotted prose links ("underlines are roads") */
.road { color: inherit; text-decoration: underline dotted var(--gold); text-decoration-thickness: 2px; text-underline-offset: 4px; }
a.road:hover { color: var(--gold-text); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: var(--card); margin-top: clamp(64px, 10vw, 128px); }
.site-footer .wrap { display: grid; grid-template-columns: 1.2fr 1fr; gap: 24px 48px; padding-top: 40px; padding-bottom: 40px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 4px 24px; justify-content: flex-end; align-content: start; }
.site-footer nav a { font: 500 15px/1 var(--body); color: var(--ink); text-decoration: none; min-height: 44px; display: inline-flex; gap: 4px; align-items: center; }
.site-footer nav a:hover { color: var(--gold-text); }
.site-footer nav .icon { width: 14px; height: 14px; color: var(--muted); }
.site-footer .wordmark { font-size: 20px; }
.site-footer .contact { font-size: 15px; color: var(--muted); margin: 12px 0 0; }
.site-footer .legal { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: 20px; font-size: 13px; line-height: 1.55; color: var(--muted); margin: 0; max-width: 68ch; text-wrap: pretty; }
@media (max-width: 960px) {
  .site-footer .wrap { grid-template-columns: 1fr; }
  .site-footer nav { justify-content: flex-start; }
}
@media (max-width: 720px) { .site-nav a { padding: 0 8px; } }
@media (max-width: 359px) { .site-header .wrap { gap: 8px; } .site-header .wordmark { font-size: 20px; } .site-nav a { padding: 0 6px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; scroll-behavior: auto !important; } }
