/* Hallmark · genre: editorial · macrostructure: Long Document (sisältösivut) + Workbench (sovellus)
 * theme: custom · vibe: "keittiön käsikirja, mustikkamuste paperilla"
 * paper oklch(98.4% 0.007 85) · accent oklch(45% 0.14 285) mustikka · Young Serif + Atkinson Hyperlegible Next
 * axes: light / roman-serif / cool · nav: N9 edge-aligned · footer: Ft4 dense colophon · enrichment: none (typografia)
 */

@font-face { font-family: 'Young Serif'; src: url('/public/fonts/young-serif-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Atkinson Hyperlegible Next'; src: url('/public/fonts/atkinson-next-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Atkinson Hyperlegible Next'; src: url('/public/fonts/atkinson-next-400-italic.woff2') format('woff2'); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: 'Atkinson Hyperlegible Next'; src: url('/public/fonts/atkinson-next-600.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Atkinson Hyperlegible Next'; src: url('/public/fonts/atkinson-next-700.woff2') format('woff2'); font-weight: 700; font-display: swap; }

:root {
  /* Paperi lämmin (85), muste ja korostus mustikka (285) */
  --color-paper: oklch(98.4% 0.007 85);
  --color-paper-2: oklch(96% 0.011 85);
  --color-paper-3: oklch(93% 0.015 85);
  --color-ink: oklch(23% 0.03 285);
  --color-ink-2: oklch(43% 0.025 285);
  --color-rule: oklch(87% 0.014 85);
  --color-rule-soft: oklch(91% 0.012 85);
  /* Lomakekentän reuna: vähintään 3:1 paperia vasten (WCAG 1.4.11) */
  --color-field: oklch(62% 0.02 285);
  --color-accent: oklch(45% 0.14 285);
  --color-accent-hover: oklch(39% 0.14 285);
  --color-accent-soft: oklch(94.5% 0.025 285);
  --color-accent-ink: oklch(98.4% 0.007 85);
  --color-focus: oklch(55% 0.19 285);

  /* Makrojen datavärit: proteiini = korostus, rasva = okra, hiilihydraatit = terrakotta */
  --color-protein: var(--color-accent);
  --color-fat: oklch(72% 0.13 75);
  --color-carb: oklch(58% 0.12 40);

  --color-warn-bg: oklch(95.5% 0.04 85);
  --color-warn-rule: oklch(83% 0.08 80);
  --color-error: oklch(47% 0.16 27);
  --color-scrim: oklch(23% 0.03 285 / 0.45);
  --color-shadow: oklch(23% 0.03 285 / 0.1);

  --font-display: 'Young Serif', 'Iowan Old Style', Georgia, serif;
  --font-body: 'Atkinson Hyperlegible Next', 'Segoe UI', system-ui, sans-serif;

  /* Asteikko 1.25 (major third), leipäteksti 17 px */
  --text-xs: 0.875rem;
  --text-sm: 0.9375rem;
  --text-md: 1.0625rem;
  --text-lg: 1.3125rem;
  --text-xl: 1.625rem;
  --text-2xl: 2.0625rem;
  --text-display: clamp(2.0625rem, 1.55rem + 2.2vw, 3.125rem);
  --text-display-s: clamp(1.75rem, 1.4rem + 1.5vw, 2.5rem);
  --text-figure: clamp(2.5rem, 2rem + 2.4vw, 3.5rem);

  --space-3xs: 0.25rem;
  --space-2xs: 0.5rem;
  --space-xs: 0.75rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: 4rem;
  --space-3xl: 6rem;

  --measure: 38rem; /* noin 65–70 merkkiä Atkinson-fontilla; ch-yksikkö olisi liian leveä */
  --measure-small: 28rem; /* pieni teksti: sama noin 70 merkin rivi */
  --page: 54rem;
  --radius-sm: 4px;
  --radius-md: 6px;
  --rule-thin: 1px;
  --rule-strong: 2px;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in: cubic-bezier(0.64, 0, 0.78, 0);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-short: 140ms;
  --dur-med: 220ms;
}
