/* Hadal shared foundation: tokens, reset, typography and primitives.
   Loaded by every page (landing and workspace). Components live in app.css / landing.css. */
:root {
  color-scheme: light;
  /* Surfaces */
  --exterior: #e6e7eb;
  --surface: #ffffff;
  --surface-2: #f7f7f9;
  --surface-3: #f0f1f4;
  --line: #e6e7ec;
  --line-strong: #d2d4dc;
  /* Ink — every text colour below meets WCAG AA (4.5:1) on --surface */
  --ink: #17191e;
  --ink-2: #3f434d;
  --muted: #5f636f;
  --faint: #8b8e99; /* decoration and disabled only; never body text */
  /* Routes */
  --beam: #ff692e;
  --beam-ink: #b3400f;
  --beam-soft: #fff1e9;
  --beam-line: #ffd3bd;
  --rpc: #8e96a4;
  --rpc-ink: #444b59;
  --rpc-soft: #f0f1f4;
  /* Status */
  --ok: #1d7a4b;
  --ok-soft: #e8f5ee;
  --ok-line: #cbe6d6;
  --warn: #8f5200;
  --warn-soft: #fff5e3;
  --warn-line: #f3dfb8;
  --bad: #b3261e;
  --bad-soft: #fdeceb;
  --bad-line: #f4c9c5;
  /* Geometry */
  --r-frame: 20px;
  --r-panel: 8px;
  --r-control: 6px;
  --r-chip: 5px;
  --gap: 12px;
  --shadow: 0 1px 2px #17191e0a, 0 4px 14px -6px #17191e10;
  --focus: 0 0 0 2px #fff, 0 0 0 4px #17191e;
  /* Type */
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --t: 180ms;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--exterior); color: var(--ink); font: 400 14px/1.55 var(--font); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; font-variant-numeric: tabular-nums; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
h1, h2, h3 { font-weight: 560; line-height: 1.2; letter-spacing: -.01em; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
button:disabled { cursor: not-allowed; }
::selection { background: #ffe1d1; color: #4b2210; }
:focus { outline: none; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: var(--r-chip); }
input:focus-visible, select:focus-visible { box-shadow: var(--focus); }
a, button, summary, input, select { transition: color var(--t) var(--ease), background-color var(--t) var(--ease), border-color var(--t) var(--ease), box-shadow var(--t) var(--ease), opacity var(--t) var(--ease); }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; left: 16px; top: -80px; z-index: 100; padding: 10px 14px; background: var(--ink); color: #fff; border-radius: var(--r-control); font-size: 13px; }
.skip-link:focus { top: 12px; }
.icon { width: 18px; height: 18px; display: inline-block; vertical-align: middle; flex-shrink: 0; }
.mono { font-family: var(--mono); font-size: .92em; letter-spacing: -.01em; }
.small-muted { font-size: 12px; color: var(--muted); line-height: 1.5; }

/* Brand */
.wordmark { display: inline-flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 600; letter-spacing: -.03em; line-height: 1; }
.brand-mark { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 7px; background: #101319; color: #fff; }
.brand-mark .icon { width: 22px; height: 22px; }

/* Typographic helpers */
.eyebrow { display: flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.text-link { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 550; color: var(--beam-ink); }
.text-link:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Buttons */
.primary-button, .secondary-button, .button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 36px; padding: 8px 14px; border-radius: var(--r-control); border: 1px solid transparent; font-size: 13px; font-weight: 550; line-height: 1.2; white-space: nowrap; }
.primary-button { background: var(--beam); border-color: var(--beam); color: #fff; }
.primary-button:hover { background: #e9561a; border-color: #e9561a; }
.secondary-button, .button { background: #fff; border-color: var(--line-strong); color: var(--ink); }
.secondary-button:hover, .button:hover { background: var(--surface-2); border-color: #bfc2cc; }
.button.dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.button.dark:hover { background: #2c3038; }
.button:disabled { background: var(--surface-2); color: var(--faint); border-color: var(--line); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
