/* Santa's Helper. Copyright C Cliffe 2026. All rights reserved.

   Design tokens. DESIGN.md is the source of truth for every value in this file.
   If a value needs to change, change the document first. */

:root {
  /* surfaces */
  --night-0:      oklch(0.130 0.020 265);
  --night-1:      oklch(0.175 0.024 265);
  --night-2:      oklch(0.225 0.026 265);
  --night-3:      oklch(0.285 0.028 265);
  --line:         oklch(0.335 0.028 265);
  --line-strong:  oklch(0.440 0.030 265);

  /* text */
  --ink:          oklch(0.965 0.006 265);
  --ink-2:        oklch(0.790 0.012 265);
  --ink-3:        oklch(0.625 0.014 265);

  /* the one warm signal: the present, and the primary action */
  --lantern:      oklch(0.800 0.150 75);
  --lantern-lift: oklch(0.845 0.150 75);
  --lantern-dim:  oklch(0.660 0.130 75);
  --on-lantern:   oklch(0.190 0.040 75);

  /* instrument readings, kept nearly desaturated on purpose */
  --instrument:   oklch(0.860 0.055 215);

  /* a find */
  --found:        oklch(0.815 0.135 160);

  /* hours of the night spent, and the dawn horizon */
  --ember:        oklch(0.680 0.175 38);
  --ember-soft:   oklch(0.560 0.140 38);

  /* type */
  --family: ui-sans-serif, "Segoe UI Variable Text", "Segoe UI", system-ui,
            -apple-system, Roboto, sans-serif;
  --t-micro:   0.6875rem;
  --t-small:   0.8125rem;
  --t-body:    1rem;
  --t-lead:    1.1875rem;
  --t-h3:      1.4375rem;
  --t-h2:      1.75rem;
  --t-h1:      2.5rem;
  --t-display: 3.75rem;

  /* space, the 4pt scale and the whole of it */
  --s-1:  4px;
  --s-2:  8px;
  --s-3:  12px;
  --s-4:  16px;
  --s-5:  24px;
  --s-6:  32px;
  --s-7:  48px;
  --s-8:  64px;
  --s-9:  96px;

  /* radii */
  --r-cell:    2px;
  --r-control: 4px;
  --r-photo:   6px;
  --r-panel:   8px;
  --r-pill:    999px;

  /* motion */
  --ease:       cubic-bezier(0.165, 0.84, 0.44, 1);
  --dur-hover:  120ms;
  --dur-state:  180ms;
  --dur-exit:   135ms;
  --dur-screen: 220ms;
}

/* The console carries this as well, and it overrides only these. */
[data-theme="paper"] {
  --night-0:     oklch(0.985 0.004 265);
  --night-1:     oklch(0.955 0.006 265);
  --night-2:     oklch(0.915 0.008 265);
  --night-3:     oklch(0.875 0.010 265);
  --line:        oklch(0.820 0.010 265);
  --line-strong: oklch(0.700 0.014 265);
  --ink:         oklch(0.235 0.022 265);
  --ink-2:       oklch(0.400 0.020 265);
  --ink-3:       oklch(0.505 0.018 265);
  --lantern:     oklch(0.470 0.140 58);
  --on-lantern:  oklch(0.985 0.010 75);
  --found:       oklch(0.480 0.120 158);
  --ember:       oklch(0.500 0.165 35);
}

*, *::before, *::after { box-sizing: border-box; }

html { font-size: 16px; }

body {
  margin: 0;
  background: var(--night-0);
  color: var(--ink);
  font-family: var(--family);
  font-size: var(--t-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { text-wrap: balance; margin: 0; font-weight: 600; }

.num { font-variant-numeric: tabular-nums; }

.micro {
  font-size: var(--t-micro);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
