/*
 * Design tokens for the Verkilo static site (Oatmeal theme).
 * A focused subset of the Rails app's token system: only what the Oatmeal
 * theme + composition primitives need. OKLCH throughout.
 */
@layer reset, base, composition, components, modules, utilities;

:root {
  /* Fonts (mapped to the Google Fonts CDN loaded in the layout head) */
  --font-sans: "Geist", system-ui, sans-serif;
  --font-display: "Newsreader", ui-serif, Georgia, serif;
  --font-serif: ui-serif, serif;
  --font-mono: ui-monospace, monospace;

  /* Type scale */
  --text-xx-small: 0.55rem;
  --text-x-small: 0.75rem;
  --text-small: 0.85rem;
  --text-normal: 1rem;
  --text-prose: 1.0625rem; /* long-form reading text (about, legal, docs) */
  --text-medium: 1.1rem;
  --text-large: 1.5rem;
  --text-x-large: 1.8rem;
  --text-xx-large: 2.5rem;

  /* Spacing */
  --inline-space: 1ch;
  --inline-space-half: calc(var(--inline-space) / 2);
  --block-space: 1rem;

  /* Radii */
  --radius-2: 5px;
  --radius-3: 1rem;

  /* Layout */
  --main-width: 1400px;
  --main-padding: clamp(1rem, 4vw, 2rem);

  /* Motion */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);

  /* Z-index */
  --z-nav: 30;

  /* Brand — "syo-ro" teal */
  --color-syo-ro-50: oklch(0.948 0.066 179.56);
  --color-syo-ro-100: oklch(0.896 0.142 179.34);
  --color-syo-ro-200: oklch(0.819 0.13 179.39);
  --color-syo-ro-300: oklch(0.735 0.116 179.27);
  --color-syo-ro-400: oklch(0.66 0.105 179.47);
  --color-syo-ro-500: oklch(0.577 0.091 179.5);
  --color-syo-ro-600: oklch(0.491 0.078 179.63);
  --color-syo-ro-700: oklch(0.398 0.063 179.53);
  --color-syo-ro-800: oklch(0.312 0.049 180.39);
  --color-syo-ro-900: oklch(0.22 0.035 179.11);
  --color-syo-ro-950: oklch(0.173 0.028 177.86);
  --color-brand: var(--color-syo-ro-600);

  /* Accent — Tailwind Olive (warm, from the Oatmeal template) */
  --color-olive-50: oklch(98.8% 0.003 106.5);
  --color-olive-100: oklch(96.6% 0.005 106.5);
  --color-olive-200: oklch(93% 0.007 106.5);
  --color-olive-300: oklch(88% 0.011 106.6);
  --color-olive-400: oklch(73.7% 0.021 106.9);
  --color-olive-500: oklch(58% 0.031 107.3);
  --color-olive-600: oklch(46.6% 0.025 107.3);
  --color-olive-700: oklch(39.4% 0.023 107.4);
  --color-olive-800: oklch(28.6% 0.016 107.4);
  --color-olive-900: oklch(22.8% 0.013 107.4);
  --color-olive-950: oklch(15.3% 0.006 107.1);

  /* Neutral — Tailwind Stone (warm gray) */
  --color-stone-50: oklch(0.985 0.001 106.423);
  --color-stone-100: oklch(0.97 0.001 106.424);
  --color-stone-200: oklch(0.923 0.003 48.717);
  --color-stone-300: oklch(0.869 0.005 56.366);
  --color-stone-400: oklch(0.709 0.01 56.259);
  --color-stone-500: oklch(0.553 0.013 58.071);
  --color-stone-600: oklch(0.444 0.011 73.639);
  --color-stone-700: oklch(0.374 0.01 67.558);
  --color-stone-800: oklch(0.268 0.007 34.298);
  --color-stone-900: oklch(0.216 0.006 56.043);
  --color-stone-950: oklch(0.147 0.004 49.25);

  /* Semantic status (comparison checks / crosses) — light mode (deep). */
  --color-positive: oklch(0.44 0.12 150);
  --color-negative: oklch(0.44 0.18 27);
}

@media (max-width: 639px) {
  :root {
    --text-xx-small: 0.65rem;
    --text-x-small: 0.85rem;
    --text-small: 0.95rem;
    --text-normal: 1.1rem;
    --text-medium: 1.2rem;
  }
}

/* Status colors brighten in dark mode for contrast on the dark canvas
   (explicit toggle + system preference). */
html[data-theme="dark"] {
  --color-positive: oklch(0.74 0.117 145);
  --color-negative: oklch(0.74 0.139 42);
}
@media (prefers-color-scheme: dark) {
  html:not([data-theme]) {
    --color-positive: oklch(0.74 0.117 145);
    --color-negative: oklch(0.74 0.139 42);
  }
}
