/* Imagegen design tokens. Only tokens are used by components and pages; never raw colours. */

@font-face { font-family: Baskervville; src: url("../fonts/baskervville.ttf") format("truetype"); font-weight: 400 700; font-style: normal; font-display: swap; }
@font-face { font-family: Baskervville; src: url("../fonts/baskervville-italic.ttf") format("truetype"); font-weight: 400 700; font-style: italic; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("../fonts/dm-sans.ttf") format("truetype"); font-weight: 100 1000; font-style: normal; font-display: swap; }

:root {
  color-scheme: dark;

  /* Canvas: dark graphite so renders are the brightest thing on screen */
  --bg: #111213;
  --bg-raised: #17191b;
  --surface: #1b1d20;
  --surface-2: #222528;
  --surface-3: #2a2e32;
  --overlay: rgba(6, 7, 8, 0.72);

  /* Hairlines */
  --line: #2b2f33;
  --line-strong: #3d4247;

  /* Text (all AA on --bg and --surface) */
  --text: #ebe9e4;
  --text-2: #b0aea8;
  --text-3: #8f8d88;
  --text-on-accent: #ffffff;

  /* Accent: warm brick / terracotta */
  --accent: #dc7a52;          /* text, links, focus on dark */
  --accent-strong: #b0502f;   /* fills carrying white text */
  --accent-hover: #c45a38;
  --accent-active: #9a4527;
  --accent-soft: rgba(220, 122, 82, 0.12);
  --accent-line: rgba(220, 122, 82, 0.45);

  /* Status */
  --success: #82bb8b;
  --success-soft: rgba(130, 187, 139, 0.12);
  --warning: #dcab52;
  --warning-soft: rgba(220, 171, 82, 0.12);
  --danger: #ea7268;
  --danger-strong: #b43f36;
  --danger-hover: #c64a40;
  --danger-soft: rgba(234, 114, 104, 0.12);
  --info: #86aed0;
  --info-soft: rgba(134, 174, 208, 0.12);

  --focus-ring: #f0a47f;

  /* Type */
  --font-display: Baskervville, "Iowan Old Style", Georgia, "Times New Roman", serif;
  --font-ui: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, "Cascadia Mono", Consolas, "SF Mono", Menlo, monospace;

  --text-xs: 0.75rem;     /* 12 */
  --text-sm: 0.8125rem;   /* 13 */
  --text-base: 0.9375rem; /* 15 */
  --text-md: 1.0625rem;   /* 17 */
  --text-lg: 1.25rem;     /* 20 */
  --text-xl: 1.625rem;    /* 26 */
  --text-2xl: 2.125rem;   /* 34 */
  --text-3xl: 2.875rem;   /* 46 */

  --leading-tight: 1.2;
  --leading-snug: 1.4;
  --leading-body: 1.55;
  --tracking-caps: 0.09em;

  /* Spacing (4 px base) */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4.5rem;

  /* Radius: restrained */
  --radius-sm: 3px;
  --radius: 5px;
  --radius-lg: 8px;
  --radius-pill: 999px;

  /* Shadow */
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-2: 0 8px 24px rgba(0, 0, 0, 0.45), 0 1px 0 rgba(255, 255, 255, 0.02) inset;
  --shadow-3: 0 24px 64px rgba(0, 0, 0, 0.6);

  /* Motion */
  --ease: cubic-bezier(0.2, 0, 0, 1);
  --dur-fast: 120ms;
  --dur: 200ms;
  --dur-slow: 360ms;

  /* Layout */
  --topbar-h: 3.5rem;
  --content-max: 80rem;
  --content-narrow: 44rem;
  --touch: 2.75rem;       /* 44 px minimum touch target */
  --control-h: 2.5rem;
  --control-h-sm: 2rem;
  --control-h-lg: 3rem;

  /* z-index scale */
  --z-topbar: 50;
  --z-menu: 80;
  --z-modal: 100;
  --z-toast: 120;
}

@media (prefers-reduced-motion: reduce) {
  :root { --dur-fast: 0ms; --dur: 0ms; --dur-slow: 0ms; }
}
