/*
 * Scobly design tokens for scobly.com: type, color, space, shape and motion. docs/design/design-system.md
 * explains each token and the rules for using it. Since 2026-11-04 (S-541) the site wears the app's ink and
 * paper (S-531, apps/web/src/index.css): one face, Archivo, set wide and heavy for headlines; a deep ink
 * blue as the committed colour, which carries the masthead, the opening, the closing and the footer as the
 * app's rail carries its sidebar; neutrals tinted from that ink; hairline edges and corners just off square.
 * Orange is what you do, the octopus's blue is what the team does, yellow is the Head's highlighter, and ink
 * is a measurement.
 *
 * One look, light, whatever the visitor's system asks for (S-801), so every page and drawing is designed
 * and checked once. The app keeps its own dark mode (apps/web/src/index.css).
 *
 * Two layers: the palette (raw values, named for what they are) and the roles components use
 * (named for what they do). Components read roles only, so a region of ink only remaps them.
 */

@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo/archivo-latin.woff2?v=f7a4fde9") format("woff2");
  font-weight: 400 800;
  font-stretch: 75% 125%;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0020-007E, U+00A0-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+2190-2193, U+2212, U+2215, U+2248, U+2264-2265, U+FEFF, U+FFFD;
}

:root {
  /* "only": a browser that darkens pages on its own (Chrome's auto dark theme on Android, Samsung Internet)
     leaves these as drawn, as it did while they had a dark mode of their own. */
  color-scheme: only light;

  /* ── Palette: light, the app's ─────────────────────────────────────────────────── */
  /* Neutrals tinted from the ink blue (hue 266), so the ground, the paper and the text read as one family. */
  --paper: #ffffff;                       /* panels, cards and controls on the ground */
  --canvas: oklch(0.962 0.008 266);       /* the ground */
  --ink: oklch(0.215 0.03 266);           /* text and structure, 17.5:1 on paper */
  --ink-2: oklch(0.43 0.028 266);         /* secondary text, 8:1 */
  --slate: oklch(0.515 0.024 266);        /* tertiary text, 5:1 on the ground */
  --brand: oklch(0.555 0.178 38);         /* action: buttons, links, the selected option; white on it 5.2:1 */
  --brand-strong: oklch(0.475 0.16 37);   /* action, hovered or pressed */
  --on-brand: #ffffff;
  --octo: #4464fe;                        /* Scobly's octopus: the Head of Marketing and what the team does */
  --octo-ink: #3451e8;                    /* the octopus's blue as text, 5.5:1 on paper */
  --octo-wash: rgba(68, 100, 254, 0.1);
  --octo-soft: #c9d3ff;
  --marker: #ffd23f;                      /* the highlighter: what waits for you and what changed, nothing else */
  --marker-wash: rgba(255, 210, 63, 0.6);
  --mark-band: rgba(255, 210, 63, 0.6);   /* the highlighter's stroke behind words that keep their own colour */
  --on-marker: oklch(0.215 0.03 266);
  --haze: oklch(0.962 0.008 266);         /* a sunken surface on paper: the ground showing through */
  --haze-2: oklch(0.93 0.012 266);        /* a quiet band */
  --good: #157a4a;                        /* done and good: a status, never the brand */
  --good-wash: #e7f7ee;
  --danger: #c4362b;                      /* failing or stopped: never decoration */
  --danger-wash: rgba(196, 54, 43, 0.08);
  --pending: oklch(0.64 0.02 266);        /* not yet done; always drawn dashed */

  --hair: oklch(0.215 0.03 266 / 0.1);
  --hair-strong: oklch(0.215 0.03 266 / 0.19);
  --guide: oklch(0.215 0.03 266 / 0.45);
  --bar: oklch(0.885 0.014 266);
  --track-bg: oklch(0.935 0.01 266);
  --window: oklch(0.215 0.03 266 / 0.05);

  /* The ink: the one region of committed colour, as the app's rail. Text on it is paper, quieter text a
     blue-grey (8.4:1), and the Head's blue a light periwinkle (8.4:1). */
  --rail: oklch(0.255 0.06 268);
  --rail-hover: oklch(0.31 0.065 268);
  --rail-open: oklch(0.355 0.07 268);
  --on-rail: oklch(0.96 0.012 268);
  --on-rail-2: oklch(0.8 0.035 268);
  --on-rail-head: oklch(0.8 0.1 270);
  --rail-line: oklch(1 0 0 / 0.12);
  --rail-line-strong: oklch(1 0 0 / 0.24);

  /* The water (S-689): a light blue that deepens a little from the sunlit surface (0) to the deep (3), light
     enough that every screen on it keeps the paper's roles. The feature pages' dive runs through all four;
     the home page's screens stand on 0 and 1 only. */
  --dive-0: oklch(0.975 0.02 238);
  --dive-1: oklch(0.958 0.026 244);
  --dive-2: oklch(0.94 0.032 250);
  --dive-3: oklch(0.915 0.04 256);

  /* Depth: an edge for controls, a hairline for a panel on the ground with the thickness of paper under it,
     and a real shadow, offset and soft, only for what floats over the page. No coloured glows. */
  --shadow-edge: 0 0 0 1px var(--hair-strong);
  --shadow-card: 0 0 0 1px var(--hair), 0 1px 1px oklch(0.215 0.03 266 / 0.05);
  --shadow-raise: 0 0 0 1px var(--hair-strong), 0 6px 16px -8px oklch(0.215 0.03 266 / 0.3);
  --shadow-float: 0 10px 24px -14px oklch(0.2 0.04 268 / 0.55);
  --octo-shadow: oklch(0.215 0.03 266 / 0.16);

  /* ── Roles ──────────────────────────────────────────────────────────────────────── */
  --surface-page: var(--canvas);
  --surface-raised: var(--paper);
  --surface-sunken: var(--haze);
  --surface-band: var(--haze-2);
  --surface-inverse: var(--ink);
  --surface-ink: var(--rail);
  --surface-hover: var(--surface-sunken);

  --text-1: var(--ink);
  --text-2: var(--ink-2);
  --text-3: var(--slate);
  --text-on-action: var(--on-brand);
  --text-on-marker: var(--on-marker);
  --text-on-inverse: var(--paper);
  --text-link: var(--brand);

  --line-1: var(--hair);
  --line-2: var(--hair-strong);
  --line-guide: var(--guide);
  --line-ink: var(--ink);

  --action: var(--brand);
  --action-hover: var(--brand-strong);

  --head: var(--octo);
  --head-ink: var(--octo-ink);
  --head-wash: var(--octo-wash);
  --head-soft: var(--octo-soft);

  --state-pass: var(--good);
  --state-pass-wash: var(--good-wash);
  --state-fail: var(--danger);
  --state-fail-wash: var(--danger-wash);
  --state-pending: var(--pending);
  --evidence-wash: var(--marker-wash);

  --focus-outline: var(--ink);
  --focus-halo: var(--marker);

  /* ── Type ───────────────────────────────────────────────────────────────────────── */
  /* One face, Archivo, the wordmark's: normal width for everything a person reads or uses, set wide and
     heavy for headlines, and wider still for the figures that lead a block. */
  --font-display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-sans: "Archivo", ui-sans-serif, system-ui, "Helvetica Neue", Arial, sans-serif;
  --font-code: ui-monospace, "SFMono-Regular", "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --width-display: 116%;
  --width-title: 112%;
  --width-figure: 110%;

  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;
  --weight-heavy: 800;

  /* Steps in rem, so text follows the reader's default font size. */
  --size-12: 0.75rem;
  --size-13: 0.8125rem;
  --size-14: 0.875rem;
  --size-15: 0.9375rem;
  --size-16: 1rem;
  --size-17: 1.0625rem;
  --size-18: 1.125rem;
  --size-19: 1.1875rem;   /* the home page's item titles and questions */
  --size-20: 1.25rem;
  --size-24: 1.5rem;
  --size-28: 1.75rem;
  --size-36: 2.25rem;
  --size-40: 2.5rem;      /* the home page's figures that lead a block: "2 of 3 name you", the free month */

  --type-display: clamp(2.75rem, 1.55rem + 4.9vw, 5.5rem);   /* 44 → 88: the one H1 */
  --type-doc-title: clamp(2.5rem, 1.6rem + 3.4vw, 4rem);     /* 40 → 64: a document page's H1 */
  --type-title: clamp(2.125rem, 1.45rem + 2.7vw, 3.625rem);  /* 34 → 58: a screen's headline */
  --type-lead: clamp(1.125rem, 1.02rem + 0.42vw, 1.375rem);  /* 18 → 22 */
  --type-body: var(--size-17);
  --type-reading: var(--size-17);
  --type-small: var(--size-16);
  --type-ui: var(--size-15);
  --type-data: var(--size-14);

  --leading-display: 0.96;
  --leading-title: 1;
  --leading-text: 1.6;

  --tracking-display: -0.04em;
  --tracking-title: -0.032em;
  --tracking-figure: -0.03em;

  /* ── Space, layout, shape ───────────────────────────────────────────────────────── */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 32px;
  --space-8: 40px;
  --space-9: 48px;
  --space-10: 64px;
  --space-11: 80px;
  --space-12: 96px;
  --space-13: 128px;
  --space-section: clamp(88px, 11vw, 168px);

  --wrap: 1200px;
  --gutter: 24px;
  --measure: 34em;

  /* Corners just off square, as a tool's edges are, in a hierarchy; avatars and dots stay round, and
     nothing else is a pill. */
  --radius-chip: 4px;        /* tags, small marks, a key inside a row of keys */
  --radius-control: 6px;     /* buttons, fields, toggles, choice cards */
  --radius-tile: 8px;        /* rows and tiles */
  --radius-card: 10px;       /* cards: a stop's drawing, a guide's pictures, a post's card */
  --radius-panel: 12px;      /* the stages a screen's drawing stands on */

  --tap: 44px;
  --header-height: 72px;

  /* ── Motion ─────────────────────────────────────────────────────────────────────── */
  --dur-short: 160ms;        /* a control's state */
  --dur-medium: 300ms;       /* a label or tag changing */
  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-in-out: cubic-bezier(0.45, 0, 0.25, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);   /* the scenes' badges landing */
}
