/* Afterglow design system: tokens. Source of truth; tokens.json mirrors these values.
   Aurora: polar night (dark, primary) and polar day (light). Healthy light is cold;
   the only warm colour in the product is trouble: --gold (degraded) and --ember (down). */
@font-face {
  font-family: 'Geologica';
  src: url('fonts/geologica-latin-wght-normal.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-display: block;
}

:root {
  /* ---------- type ---------- */
  --font: 'Geologica', 'Segoe UI', system-ui, sans-serif;
  --t-11: 11px; --t-12: 12px; --t-13: 13px; --t-15: 15px; --t-17: 17px; --t-22: 22px;
  --t-30: 30px; --t-44: 44px; --t-64: 64px; --t-120: 120px;
  --w-hair: 200;     /* readings 64 px and up: the light draws the figure */
  --w-thin: 250;     /* display headlines */
  --w-light: 300;    /* readings 17-44 px */
  --w-text: 350;     /* body */
  --w-medium: 500;   /* names, labels that lead */
  --w-strong: 600;   /* wordmark, counts in badges */
  --lh-tight: 1.08; --lh-snug: 1.25; --lh-text: 1.45; --lh-read: 1.55;
  --track-display: -.035em; --track-reading: -.02em; --track-name: -.005em;

  /* ---------- space: 4 px base ---------- */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 20px; --s-6: 28px; --s-7: 40px; --s-8: 64px; --s-9: 96px;

  /* ---------- radius: only glass and pills are round ---------- */
  --r-xs: 6px; --r-s: 10px; --r-c: 12px; --r-m: 18px; --r-l: 28px; --r-pill: 999px;

  /* ---------- sizes ---------- */
  --h-control-s: 32px; --h-control: 40px; --h-control-l: 46px; --h-touch: 44px;
  --icon-s: 16px; --icon: 20px; --icon-l: 24px; --icon-stroke: 1.6;
  --blur: 28px; --blur-strong: 40px;

  /* ---------- motion ---------- */
  --ease: cubic-bezier(.22, .8, .24, 1);          /* out: answers to a person's action */
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);    /* sheets, panels that travel */
  --ease-settle: cubic-bezier(.4, 0, .9, .6);      /* light going out: slow start, sinks */
  --d-instant: 100ms; --d-fast: 150ms; --d-base: 240ms; --d-slow: 600ms;
  --d-sheet: 420ms;
  --d-light-out: 900ms;   /* the signature moment: a curtain settles and goes out */
  --d-light-in: 2000ms;   /* recovery: the light comes back slower than it left */
  --d-sample: 400ms;      /* one live sample of the demo signal */
}

/* ---------- polar night (primary) ---------- */
:root, :root[data-theme='dark'] {
  color-scheme: dark;
  /* sky and surfaces */
  --sky: #06171F;            /* the page: deep blue-green, never black */
  --sky-2: #0C232D;          /* opaque raised surface: sheets, menus, toasts */
  --sky-3: #12303B;          /* opaque surface on a surface */
  --glass: rgba(190, 236, 255, .035);
  --glass-2: rgba(190, 236, 255, .06);
  --glass-top: rgba(214, 248, 255, .055);   /* the lit top of a slab, fades down */
  --glass-edge: rgba(214, 248, 255, .17);   /* the 1 px lit top edge */
  --line: rgba(214, 244, 255, .09);
  --line-strong: rgba(214, 244, 255, .18);
  --hover: rgba(190, 240, 255, .05);
  --press: rgba(190, 240, 255, .09);
  --scrim: rgba(3, 12, 16, .62);
  /* text */
  --text: #EEF6F5;
  --text-2: #A9BBBF;
  --text-3: #8398A0;
  --text-on-light: #06201F;  /* text on --btn and on lit pills */
  --accent-text: #8FE6CC;    /* links, the active word: aura that is readable as text */
  /* light: the data */
  --light: #F1FFFA;          /* the ice-white core of a ribbon */
  --aura: #72DDBE;           /* light near the line: sea green; focus, active state */
  --deep: #4A9BDB;           /* light far up the curtain: high blue; planned, informational */
  --deep-text: #8EC3EE;
  --muted: #5E7680;          /* held, no data, offline: light that is not live */
  --window-off: #06171F;     /* a dark window: a day or a slot whose light went out (history) */
  /* trouble: the only warm colours */
  --gold: #FFC46B;           /* degraded */
  --ember: #FF6A55;          /* down */
  --gold-text: #FFCB7D;
  --ember-text: #FF9482;
  --gold-tint: rgba(255, 196, 107, .1);
  --ember-tint: rgba(255, 106, 85, .1);
  --aura-tint: rgba(114, 221, 190, .1);
  --deep-tint: rgba(74, 155, 219, .12);
  /* the main button */
  --btn: #ECFFF8; --btn-text: #06201F;
  /* glow: light only on data and on the one main action */
  --glow-btn: 0 0 22px rgba(120, 226, 196, .3);
  --glow-btn-hover: 0 0 34px rgba(120, 226, 196, .5);
  --glow-aura: 0 0 14px rgba(114, 221, 190, .55);
  --glow-gold: 0 0 14px rgba(255, 196, 107, .5);
  --glow-ember: 0 0 16px rgba(255, 106, 85, .55);
  --glow-reading: 0 0 60px rgba(150, 240, 215, .32);   /* text-shadow of the big reading */
  --halo: rgba(114, 221, 190, .22);          /* aurora in the sky behind a hero */
  --halo-2: rgba(74, 155, 219, .2);
  --horizon: .95;            /* how strong the sky glow is; dims to a third in an outage */
  /* elevation: no card shadows; only things that float over the page have one */
  --float-shadow: 0 24px 60px -20px rgba(0, 6, 10, .7), 0 2px 0 0 rgba(214, 248, 255, .04) inset;
  --focus: #72DDBE;
}

/* ---------- polar day ---------- */
:root[data-theme='light'] {
  color-scheme: light;
  --sky: #EAF2F4;            /* ice under a white sun */
  --sky-2: #F8FBFC;
  --sky-3: #FFFFFF;
  --glass: rgba(255, 255, 255, .5);
  --glass-2: rgba(255, 255, 255, .72);
  --glass-top: rgba(255, 255, 255, .8);
  --glass-edge: rgba(255, 255, 255, .98);
  --line: rgba(12, 40, 50, .12);
  --line-strong: rgba(12, 40, 50, .22);
  --hover: rgba(255, 255, 255, .7);
  --press: rgba(12, 40, 50, .06);
  --scrim: rgba(18, 44, 54, .32);
  --text: #0C1C22;
  --text-2: #3F5158;
  --text-3: #53656D;
  --text-on-light: #FFFFFF;
  --accent-text: #0A6E66;
  --light: #075E63;          /* on ice the ribbon is deep teal ink */
  --aura: #19A898;
  --deep: #3D8FC4;
  --deep-text: #1F5F8C;
  --muted: #8A9CA3;
  --window-off: #0C1C22;
  --gold: #B87400;
  --ember: #CC2C1C;
  --gold-text: #8A5600;
  --ember-text: #B3261A;
  --gold-tint: rgba(184, 116, 0, .1);
  --ember-tint: rgba(204, 44, 28, .08);
  --aura-tint: rgba(25, 168, 152, .1);
  --deep-tint: rgba(61, 143, 196, .1);
  --btn: #0C1C22; --btn-text: #FFFFFF;
  --glow-btn: 0 8px 22px -10px rgba(7, 94, 99, .55);
  --glow-btn-hover: 0 10px 28px -10px rgba(7, 94, 99, .75);
  --glow-aura: 0 0 12px rgba(25, 168, 152, .45);
  --glow-gold: 0 0 12px rgba(184, 116, 0, .35);
  --glow-ember: 0 0 12px rgba(204, 44, 28, .35);
  --glow-reading: 0 0 50px rgba(25, 168, 152, .18);
  --halo: rgba(25, 168, 152, .2);
  --halo-2: rgba(95, 178, 226, .24);
  --horizon: 1;
  --float-shadow: 0 24px 60px -24px rgba(12, 60, 72, .35), 0 1px 0 0 rgba(255, 255, 255, .9) inset;
  --focus: #0F8C80;
}

@media (prefers-reduced-motion: reduce) {
  :root { --d-instant: 0ms; --d-fast: 0ms; --d-base: 0ms; --d-slow: 0ms; --d-sheet: 0ms; --d-light-out: 0ms; --d-light-in: 0ms; }
}
