/* theme-clay: presented target (theme spec §3 contract, §1 tokens).
   The warm-neutral AI register: a light theme in the Anthropic key, built for
   decks about models and research. Warm off-white paper, warm near-black ink,
   and one terracotta accent that does all the pointing. Forked from
   theme-daylight, so it keeps that theme's colour-blind-safe chart ramp and code
   palette and changes only the accent, the surface and ink families, and the
   fonts. Fraunces for display (a soft-serif with warmth at large sizes), Inter
   for prose, JetBrains Mono for code, all SIL Open Font License and self-hosted
   (no external font CDNs: decks present offline). Licences ship beside the files
   in fonts/. Fraunces is a variable font, so one file covers the display weight
   range; Inter is variable too; JetBrains Mono is a single static 400. */

@font-face {
  font-family: 'Fraunces';
  font-weight: 500 700;
  font-style: normal;
  font-display: swap;
  src: url('fonts/fraunces-var.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
  src: url('fonts/inter-var.woff2') format('woff2');
}
@font-face {
  font-family: 'JetBrains Mono';
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url('fonts/jetbrains-mono-var.woff2') format('woff2');
}

:root[data-theme] {
  /* colour. Warm paper: an off-white surface warmed toward clay, warm near-black
     ink, and one terracotta accent. The signal-err red and the keyword sit near
     the accent hue on purpose; each is a single token, so neither reads as a
     second accent. */
  --surface: #f5f2ec;
  --surface-raised: #fbf9f4;
  --surface-sunken: #eae5db;
  --ink: #221e1a;
  --ink-muted: #6b6257;
  --ink-faint: #d8d2c6;
  --accent: #a8432a;
  --accent-ink: #ffffff;
  --signal-ok: #2f7d3a;
  --signal-warn: #b3781a;
  --signal-err: #a52a1f;
  /* Series ramp. --series-1 is the accent (spec §1.1). The rest are inherited
     from daylight, which spreads by hue AND lightness so no non-accent hue
     accumulates a rival cluster and the ramp survives deuteranopia and
     protanopia (series-ramp-cvd lint): terracotta, blue, teal-green, olive,
     violet, warm graphite. The olive, violet and graphite are deliberately
     low-saturation so the warm accent stays the only saturated family. */
  --series-1: #a8432a;
  --series-2: #2f6ea8;
  --series-3: #1f7d6b;
  --series-4: #a68a3e;
  --series-5: #9b7cc8;
  --series-6: #4a4a44;

  /* code syntax colours. The highlighter paints every scope as var(--code-*),
     so these six are the whole vocabulary of code colour. Legible on the warm
     raised surface, keyword kept in the terracotta family so it does not form a
     rival cluster, the rest separated by hue: terracotta keywords, green
     strings, warm grey comments, blue calls, amber numerals, teal types. */
  --code-keyword: #a5432e;
  --code-string: #2f7d3a;
  --code-comment: #9a9384;
  --code-function: #2f6ea8;
  --code-constant: #b3781a;
  --code-type: #1f7d6b;

  /* typography: Fraunces for display, Inter for prose, JetBrains Mono for code.
     A warm, editorial pairing: the soft-serif display carries headings and big
     numbers, the grotesque body keeps prose crisp. A gentle scale and a generous
     measure. */
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
  --type-scale: 1.25;
  --size-base: 24px;
  --leading-tight: 1.08;
  --leading-body: 1.5;
  --tracking-display: -0.01em;
  --measure: 64ch;

  /* space / shape / elevation. One soft, warm-tinted elevation. */
  --space-unit: 8px;
  --slide-pad: 72px;
  --radius: 8px;
  --radius-lg: 14px;
  --border-w: 1px;
  --shadow-raised: 0 6px 22px rgba(60, 40, 28, 0.1);

  /* motion. Inherited from the calm, retuned signal profile: unhurried reveals
     and transitions, a morph that leaves fast then lands soft like a camera
     settling. --dur-morph stays under 600ms (the slow-morph lint). */
  --dur-reveal: 220ms;
  --dur-transition: 380ms;
  --dur-morph: 560ms;
  --ease-standard: cubic-bezier(0.2, 0, 0, 1);
  --ease-morph: cubic-bezier(0.16, 1, 0.3, 1);
  --count-up: on;

  /* optional stage tokens (theme spec §1.6). A very faint terracotta radial,
     thrown from behind the top of the stage, warms the paper without touching
     any text contrast; --stage-bg keeps the base flat. Article and print reset
     the glow to none. */
  --stage-bg: #f5f2ec;
  --stage-glow: radial-gradient(
    90% 65% at 50% -10%,
    color-mix(in srgb, var(--accent) 4%, transparent),
    transparent 70%
  );

  /* optional token (theme spec §1.6, letterbox amendment V2.4). The engine
     paints the area AROUND the 16:9 stage with --letterbox; it defaults to a
     near-black frame, so a light theme must lift it or the bars read as black. A
     warm light bar keeps the frame quiet and of a piece with the paper. */
  --letterbox: #ece7dd;

  /* branding (spec §3.9): the event logo + footer sit in a quiet band at the
     foot of the stage. Warm grey on paper, so it never competes with the slide. */
  --branding-inset: 24px;
  --branding-gap: 16px;
  --branding-logo-height: 28px;
  --branding-font-size: 14px;
  --branding-color: #6b6257;

  /* theme-private tokens, consumed by layouts/*.css. Layout refinements may not
     carry raw literals (theme spec §2), so every value they need is a token. The
     display step is a unitless MULTIPLIER, not a size: the engine derives
     --size-5 on the stage, not on :root, so a token declared here cannot
     reference it. The multiplication happens at the point of use. */
  --clay-title-scale: 1.12;
  --clay-kicker-tracking: 0.16em;

  /* Crafted-layout tokens (consumed by layouts/grid.css and layouts/split.css).
     The engine derives --space-N and --size-N on the STAGE, not on :root, so a
     token declared here cannot reference them (it would compute empty before it
     inherits down). These therefore build only on --space-unit (a :root token)
     and literals, which tokens.css is the sanctioned home for (theme spec §2).
     Scale tokens are unitless multipliers applied at the point of use, where the
     stage-derived --size-N is in scope. */
  --clay-card-lead-scale: 1.06; /* lead-in phrase, relative to card body */
  --clay-card-body-color: var(--ink-muted);
  --clay-card-pad: calc(var(--space-unit) * 4); /* 32px */
  --clay-card-gap: calc(var(--space-unit) * 1.5); /* 12px */
  --clay-card-edge: 3px; /* accent top-hairline thickness */
  --clay-measure-tight: 52ch;
  --clay-para-gap: calc(var(--space-unit) * 3); /* 24px */
  --clay-bullet-size: calc(var(--space-unit) * 0.85); /* ~7px accent dot */
  --clay-bullet-offset: 0.62em; /* marker vertical offset onto the first line */
}
