/* Design tokens: the whole look of the game comes from these values (see DESIGN.md).
   Stamped iron for the game itself, dust-beige paper for what characters hand you,
   teal neon only on the scrap-terminal screen. Contrast is checked by tools/design/contrast.js. */
:root {
  color-scheme: dark;

  /* Iron: worn plates, darkest to lightest */
  --iron-950: #100c09;
  --iron-900: #18130e;   /* page ground */
  --iron-850: #1f1913;
  --iron-800: #282018;   /* plate */
  --iron-700: #33291f;   /* raised or inset plate */
  --iron-600: #463829;   /* plate edges */
  --iron-500: #5e4c39;   /* rivets, strong edges */
  --iron-400: #8a735a;   /* scratches, decorative lines (3:1) */

  /* Text on iron */
  --dust: #eee2c8;
  --dust-dim: #cbbb9a;
  --dust-faint: #a8977a;
  --dust-bright: #fff6e4; /* strong words */

  /* Rust: the main action and plate headings */
  --rust: #a94a22;
  --rust-deep: #8a3a18;
  --rust-text: #e88a55;
  --on-rust: #fff3e2;

  /* Dusk sky: links and keyboard focus */
  --sky: #c5d05e;
  --sky-deep: #5d6623;
  --sky-mid: #b9b45a;     /* header gradient */
  --dusk: #8f6a36;        /* header gradient, near the horizon */
  --heap-far: #5a4630;    /* distant junk heaps */
  --link: #d9e27a;
  --focus: #d9e27a;
  --focus-on-paper: #2b1f13;

  /* Lamps, coins, warnings; failures */
  --amber: #f0b33f;
  --amber-deep: #6b4a10;
  --alarm: #ff7a5c;
  --alarm-wash: #ff7a5c14;
  --coin-light: #ffe08a;
  --coin-dark: #a8721a;

  /* Paper and ink */
  --paper: #e7d9b9;
  --paper-dark: #d6c49d;
  --paper-light: #f2e7cb;
  --tape: #c9b58a;
  --paper-edge: #9c8660;
  --ink: #2b1f13;
  --ink-dim: #5a4630;
  --ink-link: #7a2e0f;
  --ink-ok: #1d6158;
  --ink-bad: #9a2b10;

  /* Wooden sign over a stall */
  --wood: #7a4a24;
  --wood-dark: #6b3f1e;
  --wood-edge: #3a2410;
  --wood-ink: #fbe9c8;
  --wood-ink-dim: #f2d7a6;

  /* Scrap-terminal screen: the only place teal neon lives */
  --screen: #0c1714;
  --screen-edge: #24413b;
  --neon: #4fe3d2;
  --neon-dim: #2a9d90;

  /* Steel nameplate for real n8n terms */
  --steel: #bdb6a6;
  --steel-ink: #1d1a15;

  /* Type */
  --font-display: "Big Shoulders Stencil", "Bahnschrift Condensed", "Arial Narrow", sans-serif;
  --font-body: "Atkinson Hyperlegible Next", "Segoe UI", sans-serif;
  --font-mono: "Atkinson Hyperlegible Mono", "Cascadia Mono", Consolas, monospace;
  --text-xs: 0.8rem;
  --text-sm: 0.9rem;
  --text-md: 1rem;      /* 17 px body */
  --text-lg: 1.2rem;
  --text-xl: 1.5rem;
  --text-2xl: 2rem;
  --text-3xl: clamp(2.3rem, 6vw, 3.4rem);
  --leading: 1.6;
  --leading-tight: 1.1;
  --measure: 70ch;

  /* Space */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --page-max: 1140px;
  --gutter: 16px;

  /* Shape: radius by role */
  --radius-plate: 3px;
  --radius-paper: 1px;
  --radius-control: 3px;
  --radius-screen: 10px;
  --border-plate: 1px solid var(--iron-600);
  --border-strong: 2px solid var(--iron-500);
  --rivet: var(--iron-400);

  /* Depth: plates are bevelled, paper casts a short shadow, nothing floats */
  --shadow-plate: inset 0 1px 0 #ffffff12, inset 0 -2px 0 #00000059, 0 2px 0 #000000a6;
  --shadow-paper: 0 2px 0 #00000066, 0 10px 16px -12px #000000e6;
  --shadow-press: 0 3px 0 var(--iron-950);
  --glow-text: 0 0 6px #4fe3d266;

  /* Textures (CSS / inline SVG only) */
  --tex-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .17 0 0 0 0 .12 0 0 0 0 .06 0 0 0 .22 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --tex-brushed: repeating-linear-gradient(90deg, #ffffff05 0 1px, transparent 1px 4px);
  --tex-scanlines: repeating-linear-gradient(0deg, #4fe3d208 0 1px, transparent 1px 3px);
  --tex-hazard: repeating-linear-gradient(-45deg, var(--amber) 0 9px, var(--iron-950) 9px 18px);

  /* Motion */
  --dur-fast: 140ms;
  --dur-med: 240ms;
  --dur-slow: 520ms;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);

  /* Layers */
  --z-sticky: 10;
  --z-workshop: 30;      /* the big n8n frame, above the header (local builds) */
  --z-header: 20;
  --z-skip: 100;
}

@media (min-width: 720px) {
  :root { --gutter: 24px; }
}
