/* tokens.css: fonts, design tokens and the base reset. Loaded first on every page.
   Colours are the app's own dark tokens (AppColors.dark) plus a slightly darker page.
   Do not invent new colours: add a token here and use it. */

/* ---------- fonts (self-hosted, see README "Fonts and icons") ---------- */
/* Plus Jakarta Sans is a variable font: one file per subset covers weights 400-800. */
@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("/assets/fonts/plus-jakarta-sans-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("/assets/fonts/plus-jakarta-sans-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* DM Mono: orbit pills only (they contain š, ž, đ, so it needs latin-ext too). */
@font-face {
  font-family: "DM Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/dm-mono-500-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "DM Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/dm-mono-500-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Caveat: the two hand-drawn hint notes only (plain ASCII text). */
@font-face {
  font-family: "Caveat";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fonts/caveat-600-latin.woff2") format("woff2");
}
/* Material Symbols Rounded: a subset holding only the icons the page uses, with the FILL axis
   (outlined to filled). If an icon is added, rebuild the subset (README). `block` = no flash of
   the icon's name while the font loads. */
@font-face {
  font-family: "Material Symbols Rounded";
  font-style: normal;
  font-weight: 500;
  font-display: block;
  src: url("/assets/fonts/material-symbols-rounded.woff2") format("woff2");
}

/* ---------- tokens ---------- */
:root {
  color-scheme: dark;

  --page: #1c1d1c;        /* a step under the app's #242424 page, so phones read as objects */
  --band: #222322;        /* alternate section band */
  --app-bg: #242424;      /* inside phones */
  --surface: #383838;     /* app card */
  --floating: #292d32;    /* app nav bar, popups, pills */
  --fill: #454545;        /* chips, fields */
  --line: #333533;
  --ink: #f5f5f5;
  --ink2: #b3b3b3;
  --ink3: #8a8d8a;        /* small legal text only */
  --green: #54775f;       /* brand green: fills, outline icons */
  --green-hi: #9cc5a8;    /* green text and icons on dark */
  --green-soft: #34433a;
  --green-deep: #2d4b38;
  --warn: #f2c27f;        /* "deadline soon" text (chip background #4a3a22) */
  --map: #2b2b2b;

  --font: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --step-hero: clamp(2.5rem, 1.6rem + 3.6vw, 4.4rem);
  --step-h2: clamp(1.9rem, 1.4rem + 1.8vw, 2.8rem);
  --step-h3: 1.2rem;
  --radius: 22px;

  --header-h: 68px;       /* sticky header height; also drives scroll-margin-top */
  --wrap: 1160px;         /* content max width */
  --gutter: max(20px, env(safe-area-inset-left, 0px));

  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 400 16px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; height: auto; }

a { color: inherit; }
h1, h2, h3, h4, h5, p, ul, ol, figure { margin: 0; }
button { font: inherit; color: inherit; }
h1, h2, h3 { text-wrap: balance; letter-spacing: -0.02em; }

/* The mockup relied on the viewer for this one; without it `hidden` stops working on grids. */
[hidden] { display: none !important; }

/* Anchors land below the sticky header. */
section[id], main[id] {
  scroll-margin-top: calc(var(--header-h) + env(safe-area-inset-top, 0px));
}

:focus-visible { outline: 2px solid var(--green-hi); outline-offset: 3px; border-radius: 8px; }

/* Skip link: the first focusable element. */
.skip-link {
  position: absolute; left: 12px; top: -64px; z-index: 100;
  padding: 10px 16px; border-radius: 999px;
  background: var(--green); color: #fff; font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: calc(12px + env(safe-area-inset-top, 0px)); }

/* All animation is decorative (README). */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
