/* Hirelight: shared tokens and components for the landing page and the app. */
:root {
  --canvas: #F6F7F9;
  --surface: #FFFFFF;
  --surface-2: #F1F3F6;
  --ink: #0E1726;
  --ink-2: #4B5568;
  --ink-3: #8790A3;
  --line: #E3E7ED;
  --line-strong: #CDD3DC;
  --hl: #FFD84D;
  --hl-quiet: #FFE998;  /* softer stroke for long runs of evidence */
  --hl-ink: #0E1726;
  --hl-soft: #FFF6D1;
  --ok: #0F7B55;
  --ok-soft: #E2F4EC;
  --risk: #C2321F;
  --risk-soft: #FCEBE8;
  --btn: #0E1726;
  --btn-ink: #FFFFFF;
  --btn-hover: #24324A;
  --focus: #3B5BDB;
  --band: #0E1726;
  --band-ink: #E9EDF3;
  --band-ink-2: #9AA5B8;
  --shadow: 0 1px 2px rgba(14, 23, 38, .06), 0 8px 24px -12px rgba(14, 23, 38, .18);
  --shadow-lg: 0 2px 4px rgba(14, 23, 38, .04), 0 24px 64px -24px rgba(14, 23, 38, .30);

  --display: "Schibsted Grotesk", "Segoe UI", system-ui, sans-serif;
  --body: "Hanken Grotesk", "Segoe UI", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;

  --r-sm: 8px;
  --r: 14px;
  --r-lg: 22px;
  --gutter: clamp(16px, 4vw, 32px);
  --max: 1180px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --canvas: #0B111C;
    --surface: #121A28;
    --surface-2: #182233;
    --ink: #E9EDF3;
    --ink-2: #A9B3C4;
    --ink-3: #6F7A8E;
    --line: #232E40;
    --line-strong: #33405A;
    --hl: rgba(255, 216, 77, .32);
    --hl-quiet: rgba(255, 216, 77, .22);
    --hl-ink: #FFF3C4;
    --hl-soft: rgba(255, 216, 77, .10);
    --ok: #4FD39C;
    --ok-soft: rgba(79, 211, 156, .13);
    --risk: #FF7F6E;
    --risk-soft: rgba(255, 127, 110, .13);
    --btn: #FFD84D;
    --btn-ink: #0E1726;
    --btn-hover: #FFE27A;
    --focus: #8EA6FF;
    --band: #070C15;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px -12px rgba(0, 0, 0, .6);
    --shadow-lg: 0 24px 64px -24px rgba(0, 0, 0, .7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --canvas: #0B111C;
  --surface: #121A28;
  --surface-2: #182233;
  --ink: #E9EDF3;
  --ink-2: #A9B3C4;
  --ink-3: #6F7A8E;
  --line: #232E40;
  --line-strong: #33405A;
  --hl: rgba(255, 216, 77, .32);
  --hl-quiet: rgba(255, 216, 77, .22);
  --hl-ink: #FFF3C4;
  --hl-soft: rgba(255, 216, 77, .10);
  --ok: #4FD39C;
  --ok-soft: rgba(79, 211, 156, .13);
  --risk: #FF7F6E;
  --risk-soft: rgba(255, 127, 110, .13);
  --btn: #FFD84D;
  --btn-ink: #0E1726;
  --btn-hover: #FFE27A;
  --focus: #8EA6FF;
  --band: #070C15;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px -12px rgba(0, 0, 0, .6);
  --shadow-lg: 0 24px 64px -24px rgba(0, 0, 0, .7);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font: 400 16.5px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: var(--display); font-weight: 700; letter-spacing: -0.025em; line-height: 1.12; margin: 0; }
p { margin: 0; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
img, svg { display: block; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
[tabindex="-1"]:focus { outline: none; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mono { font-family: var(--mono); font-feature-settings: "tnum"; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Logo ---------- */
.logo { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; color: var(--ink); }
.logo-mark { width: 26px; height: 26px; flex: none; }
.logo-word { font-family: var(--display); font-weight: 700; font-size: 1.22rem; letter-spacing: -0.03em; }

/* ---------- Highlighter: the signature ---------- */
.hl {
  color: var(--hl-ink);
  background-color: transparent;
  background-image: linear-gradient(100deg,
    transparent 0.15em, var(--hl) 0.3em, var(--hl) calc(100% - 0.3em), transparent calc(100% - 0.15em));
  background-repeat: no-repeat;
  background-size: 100% 80%;
  background-position: 0 60%;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  padding: 0 0.18em;
  margin: 0 -0.18em;
}
.hl.sweep { animation: sweep 850ms cubic-bezier(.65, 0, .25, 1) both; }
@keyframes sweep { from { background-size: 0% 80%; } to { background-size: 100% 80%; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 20px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 600; font-size: 0.97rem; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background 150ms, border-color 150ms, color 150ms, transform 150ms;
}
.btn-primary { background: var(--btn); color: var(--btn-ink); }
.btn-primary:hover:not(:disabled) { background: var(--btn-hover); }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover:not(:disabled) { border-color: var(--ink-3); }
.btn-text { background: none; color: var(--ink-2); padding-inline: 12px; }
.btn-text:hover { color: var(--ink); }
.btn-danger:hover:not(:disabled) { color: var(--risk); border-color: var(--risk); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn .arrow { transition: transform 150ms; }
.btn:hover .arrow { transform: translateX(3px); }
.btn.busy { cursor: progress; }
.btn.busy::after {
  content: ""; width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent;
  border-radius: 50%; animation: spin 700ms linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Small pieces ---------- */
.eyebrow {
  font-family: var(--mono); font-size: 0.74rem; font-weight: 500; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--ink-3);
}
.badge {
  display: inline-flex; align-items: center; gap: 5px; font-size: 0.76rem; font-weight: 600;
  padding: 2px 9px; border-radius: 999px; white-space: nowrap; line-height: 1.6;
}
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.no { background: var(--risk-soft); color: var(--risk); }
.badge.note { background: var(--hl-soft); color: var(--ink); }
.pips { display: inline-flex; gap: 3px; }
.pips i { width: 10px; height: 10px; border-radius: 3px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line-strong); }
.pips i.on { background: var(--ink); box-shadow: none; }
.pips.zero i { box-shadow: inset 0 0 0 1px var(--risk); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-delay: 0ms !important; transition: none !important; }
}
