/* OSLOW tokens: the single source of truth. Re-skin here first. */

@font-face {
  font-family: "Instrument Serif";
  src: url("../fonts/instrument-serif-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("../fonts/instrument-serif-400-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Figtree";
  src: url("../fonts/figtree-var.woff2") format("woff2");
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* primitives. Some steps are intentionally unused on the demo pages;
     they are part of the scale so re-skins have room to move. */
  --ink: #101014;
  --ink-2: #1a1a20;
  --ink-3: #26262e;
  --porcelain: #fbfaf7;
  --porcelain-2: #f3f1ea;
  --porcelain-3: #eae7dd;
  --white: #ffffff;
  --stone: #7c7a72;
  --stone-2: #a8a69e;
  --cobalt: #4d6bff;      /* bright: for ink surfaces + large marks */
  --cobalt-ink: #1f3fb8;  /* deep: for porcelain surfaces, AA at label sizes */

  /* semantic (porcelain theme is the default) */
  --bg: var(--porcelain);
  --bg-2: var(--porcelain-2);
  --fg: var(--ink);
  --muted: #5d5b54;
  --line: rgba(16, 16, 20, 0.14);
  --line-strong: rgba(16, 16, 20, 0.5);
  --accent: var(--cobalt-ink);
  --accent-raw: var(--cobalt);
  --focus: var(--cobalt-ink);

  /* type: serif display wants generous bounds and tight leading */
  --font-serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --font-sans: "Figtree", "Helvetica Neue", Arial, sans-serif;
  --t-display: clamp(3.25rem, 13vw, 13rem);
  --t-h1: clamp(2.75rem, 7vw, 6.75rem);
  --t-h2: clamp(2.1rem, 4.8vw, 4.25rem);
  --t-h3: clamp(1.45rem, 2.6vw, 2.15rem);
  --t-lead: clamp(1.15rem, 1.8vw, 1.45rem);
  --t-body: 1.0625rem;
  --t-small: 0.875rem;
  --t-label: 0.75rem;
  --lh-tight: 0.94;
  --lh-heading: 1.05;
  --lh-body: 1.6;
  --track-label: 0.16em;

  /* space */
  --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: 9rem;
  --section-pad: clamp(5rem, 12vh, 9rem);
  --gutter: clamp(1rem, 2.5vw, 1.5rem);
  --edge: clamp(1.25rem, 4vw, 4rem);
  --measure: 40rem;
  --max-w: 92rem;

  /* shape + depth: editorial, low radius */
  --r-1: 2px;
  --r-2: 6px;
  --r-pill: 999px;
  --shadow-1: 0 1px 2px rgba(16, 16, 20, 0.05), 0 10px 28px rgba(16, 16, 20, 0.07);

  /* overlay tints: the scrim behind dialogs, the veil under floating controls */
  --scrim: rgba(16, 16, 20, 0.4);
  --veil: rgba(251, 250, 247, 0.9);

  /* rules: the thin baseline hairline under headings */
  --rule: 1px solid var(--line);
  --rule-strong: 1px solid var(--line-strong);

  /* motion */
  --dur-1: 150ms;
  --dur-2: 320ms;
  --dur-3: 650ms;
  --dur-4: 1000ms;
  --ease-out: cubic-bezier(0.19, 1, 0.22, 1);
  --ease-inout: cubic-bezier(0.83, 0, 0.17, 1);

  /* layers */
  --z-hud: 40;
  --z-menu: 50;
  --z-skip: 60;
}

/* ink theme: any element with data-theme="ink" flips the semantic set */
[data-theme="ink"] {
  --bg: var(--ink);
  --bg-2: var(--ink-2);
  --fg: var(--porcelain);
  --muted: #a3a19a;
  --line: rgba(251, 250, 247, 0.18);
  --line-strong: rgba(251, 250, 247, 0.6);
  --accent: var(--cobalt);
  --focus: #8fa3ff;
}
