/* Skootr brand tokens, 2026.
   Single source for the guidelines and the site. No component rules here.
   Colors marked "sampled" are exact pixel values from
   logos/logo-sheet-2026-11-24.png. Everything else is derived from them.
   Contrast ratios for every permitted pairing are in guidelines.html. */

/* ---------- Fonts (self-hosted, SIL OFL 1.1, licenses in fonts/) ---------- */
@font-face {
  font-family: "Recursive Casual";
  src: url("fonts/recursive-casual-wght.woff2") format("woff2");
  font-weight: 500 1000;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Recursive Mono Casual";
  src: url("fonts/recursive-mono-casual-wght.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url("fonts/atkinson-hyperlegible-next-wght.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url("fonts/atkinson-hyperlegible-next-italic-wght.woff2") format("woff2");
  font-weight: 200 800;
  font-style: italic;
  font-display: swap;
}
/* Metric-matched fallbacks so text does not jump when the web fonts arrive.
   Ratios measured from the font files against Arial. */
@font-face {
  font-family: "Skootr Display Fallback";
  src: local("Arial Bold"), local("Arial-BoldMT"), local("Helvetica Neue Bold"), local("Arial");
  size-adjust: 105.9%;
  ascent-override: 90%;
  descent-override: 24%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Skootr Text Fallback";
  src: local("Arial"), local("ArialMT"), local("Helvetica Neue");
  size-adjust: 100.4%;
  ascent-override: 98%;
  descent-override: 31.5%;
  line-gap-override: 0%;
}


:root {
  /* ---------- Core color: sampled from the logo sheet ---------- */
  --teal: #20a3a1;        /* scooter body and wordmark */
  --ink: #19191a;         /* tires */
  --exhaust: #afa39a;     /* puff and seat */
  --headlight: #f99f33;   /* headlight */
  --white: #ffffff;       /* sheet ground */

  /* ---------- Teal family: derived ---------- */
  --teal-deep: #0f6f6d;   /* links and small teal text on light grounds */
  --teal-ink: #0b4f4e;    /* headings */
  --teal-night: #10302f;  /* code blocks, the one dark surface */
  --teal-soft: #9fd6d4;   /* quiet text on teal-night */
  --teal-wash: #c4e6e4;   /* fills, illustration */
  --teal-mist: #e8f5f4;   /* soft bands */

  /* ---------- Exhaust neutrals: derived from the puff ---------- */
  --gravel: #645b54;      /* muted text, control borders */
  --dust: #e2dcd6;        /* rules, the road, ghost shapes */
  --puff: #f4f1ee;        /* soft panels */

  /* ---------- Cardboard: parcels only ---------- */
  --kraft: #c4a27e;
  --kraft-light: #d9c1a3;
  --kraft-dark: #a98661;
  --carton: #c9c0b7;      /* gray board */
  --puff-outline: transparent;

  /* ---------- Headlight family ---------- */
  --glow: #fde6c8;        /* highlight fill behind the one thing that differs */

  /* ---------- Status ---------- */
  --stop: #a8321e;        /* errors only */

  /* ---------- Roles ----------
     Components use these names, never the palette names above, for anything
     that must change between light and dark. The palette itself stays fixed
     in both modes: teal panels, stickers, parcels and the headlight are the
     same colors day and night. Dark values are repeated in the two blocks at
     the end of this file; change them in both. */
  --bg: #ffffff;
  --surface: #ffffff;
  --band: #f4f1ee;
  --tint: #e8f5f4;
  --tint-strong: #c4e6e4;
  --rule: #e2dcd6;
  --text: #19191a;
  --text-muted: #645b54;
  --heading: #0b4f4e;
  --link: #0f6f6d;
  --on-tint: #0b4f4e;
  --border: #645b54;
  --border-strong: #19191a;
  --solid: #19191a;
  --on-solid: #ffffff;
  --solid-hover: #2c2c2e;
  --select: #0b4f4e;
  --on-select: #ffffff;
  --action: #f99f33;
  --action-hover: #ffad4d;
  --action-text: #19191a;
  --focus: #19191a;
  --focus-gap: #ffffff;
  --error: #a8321e;
  --error-bg: #fff6f3;
  --on-error: #ffffff;
  --highlight: #fde6c8;
  --on-highlight: #19191a;
  --code-bg: #10302f;
  --code-btn: #1d4644;
  --code-btn-hover: #275a58;
  --road: #e2dcd6;
  --ghost: #afa39a;
  --select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 12'%3E%3Cpath d='M2 2l8 8 8-8' fill='none' stroke='%2319191a' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --show-light: block;
  --show-dark: none;
  color-scheme: light;

  /* ---------- Type ---------- */
  --font-display: "Recursive Casual", "Skootr Display Fallback", "Arial Rounded MT Bold", system-ui, sans-serif;
  --font-text: "Atkinson Hyperlegible Next", "Skootr Text Fallback", system-ui, sans-serif;
  --font-code: "Recursive Mono Casual", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --step-hero: clamp(2.75rem, 1.35rem + 6.2vw, 6.5rem);
  --step-5: clamp(2.25rem, 1.5rem + 3.3vw, 4rem);
  --step-4: clamp(1.75rem, 1.4rem + 1.6vw, 2.5rem);
  --step-3: clamp(1.375rem, 1.25rem + 0.6vw, 1.75rem);
  --step-2: 1.25rem;
  --step-1: 1.125rem;     /* body */
  --step-0: 1rem;
  --step--1: 0.9375rem;   /* smallest text allowed */

  --lh-tight: 0.98;
  --lh-snug: 1.15;
  --lh-body: 1.6;
  --measure: 64ch;

  /* ---------- Space: 4px base ---------- */
  --s-1: 0.25rem;
  --s-2: 0.5rem;
  --s-3: 0.75rem;
  --s-4: 1rem;
  --s-5: 1.5rem;
  --s-6: 2rem;
  --s-7: 3rem;
  --s-8: 4rem;
  --s-9: 6rem;
  --s-10: 8rem;
  --gutter: clamp(1.25rem, 5vw, 4rem);
  --section: clamp(4rem, 9vw, 8rem);
  --page: 78rem;

  /* ---------- Shape ---------- */
  --r-s: 0.75rem;
  --r-m: 1.375rem;
  --r-l: 2.25rem;
  --r-pill: 999px;
  /* The egg: the uneven oval of the roundel, never a perfect circle */
  --r-egg: 58% 42% 55% 45% / 48% 56% 44% 52%;
  --r-egg-b: 46% 54% 42% 58% / 55% 45% 55% 45%;
  --stroke: 3px;          /* icon and control stroke */
  --target: 2.75rem;      /* 44px minimum hit area */

  /* ---------- Motion ---------- */
  --ease-putt: cubic-bezier(0.3, 1.4, 0.5, 1);   /* small overshoot, like a scooter settling */
  --ease-roll: cubic-bezier(0.2, 0.7, 0.2, 1);
  --t-quick: 140ms;
  --t-move: 320ms;
}

/* ---------- Dark: the street at night ----------
   Follows the system setting unless the visitor picked a mode with the
   header toggle, which sets data-theme on the root element. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0c2322;
    --surface: #163a38;
    --band: #112e2d;
    --tint: #1a4543;
    --tint-strong: #24605d;
    --rule: #2b5452;
    --text: #f1f6f5;
    --text-muted: #a7c6c3;
    --heading: #b5ece8;
    --link: #84dbd6;
    --on-tint: #c9f1ee;
    --border: #8fb3b0;
    --border-strong: #f1f6f5;
    --solid: #f1f6f5;
    --on-solid: #19191a;
    --solid-hover: #ffffff;
    --select: #b5ece8;
    --on-select: #0c2322;
    --action: #f99f33;
    --action-hover: #ffad4d;
    --action-text: #19191a;
    --focus: #ffffff;
    --focus-gap: #0c2322;
    --error: #ffb3a1;
    --error-bg: #3b1d17;
    --on-error: #19191a;
    --highlight: #fde6c8;
    --on-highlight: #19191a;
    --code-bg: #071716;
    --code-btn: #163a38;
    --code-btn-hover: #24605d;
    --road: #2f5957;
    --ghost: #6f918e;
    --select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 12'%3E%3Cpath d='M2 2l8 8 8-8' fill='none' stroke='%23f1f6f5' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    --show-light: none;
    --show-dark: block;
    --puff-outline: #ffffff;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0c2322;
  --surface: #163a38;
  --band: #112e2d;
  --tint: #1a4543;
  --tint-strong: #24605d;
  --rule: #2b5452;
  --text: #f1f6f5;
  --text-muted: #a7c6c3;
  --heading: #b5ece8;
  --link: #84dbd6;
  --on-tint: #c9f1ee;
  --border: #8fb3b0;
  --border-strong: #f1f6f5;
  --solid: #f1f6f5;
  --on-solid: #19191a;
  --solid-hover: #ffffff;
  --select: #b5ece8;
  --on-select: #0c2322;
  --action: #f99f33;
  --action-hover: #ffad4d;
  --action-text: #19191a;
  --focus: #ffffff;
  --focus-gap: #0c2322;
  --error: #ffb3a1;
  --error-bg: #3b1d17;
  --on-error: #19191a;
  --highlight: #fde6c8;
  --on-highlight: #19191a;
  --code-bg: #071716;
  --code-btn: #163a38;
  --code-btn-hover: #24605d;
  --road: #2f5957;
  --ghost: #6f918e;
  --select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 12'%3E%3Cpath d='M2 2l8 8 8-8' fill='none' stroke='%23f1f6f5' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --show-light: none;
  --show-dark: block;
  --puff-outline: #ffffff;
  color-scheme: dark;
}

/* Print always uses the light roles, whatever the screen shows. */
@media print {
  :root, :root[data-theme="dark"], :root:not([data-theme="light"]) {
    --bg: #ffffff;
    --surface: #ffffff;
    --band: #f4f1ee;
    --tint: #e8f5f4;
    --tint-strong: #c4e6e4;
    --rule: #e2dcd6;
    --text: #19191a;
    --text-muted: #645b54;
    --heading: #0b4f4e;
    --link: #0f6f6d;
    --on-tint: #0b4f4e;
    --border: #645b54;
    --border-strong: #19191a;
    --solid: #19191a;
    --on-solid: #ffffff;
    --solid-hover: #2c2c2e;
    --select: #0b4f4e;
    --on-select: #ffffff;
    --action: #f99f33;
    --action-hover: #ffad4d;
    --action-text: #19191a;
    --focus: #19191a;
    --focus-gap: #ffffff;
    --error: #a8321e;
    --error-bg: #fff6f3;
    --on-error: #ffffff;
    --highlight: #fde6c8;
    --on-highlight: #19191a;
    --code-bg: #10302f;
    --code-btn: #1d4644;
    --code-btn-hover: #275a58;
    --road: #e2dcd6;
    --ghost: #afa39a;
    --select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 12'%3E%3Cpath d='M2 2l8 8 8-8' fill='none' stroke='%2319191a' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    --show-light: block;
    --show-dark: none;
    --puff-outline: transparent;
    color-scheme: light;
  }
}
