/* ═══════════════════════════════════════════════════════════════
   Porchlight — Dusk Slate v2 · tokens.css
   Implements audit №2 (dusk theme), №4 (slate shadows), №9 (tokens).
   Laws: amber is the only light; slate is the only shadow;
   dusk happens — it isn't a palette.
   ═══════════════════════════════════════════════════════════════ */

:root, [data-theme="day"] {
  color-scheme: light;
  /* surfaces */
  --paper:#F7F4ED; --sand:#EFEBE0; --card:#FDFBF5;
  /* ink */
  --ink:#1A1D26; --ink-2:#2E3038; --muted:#807E72;
  /* the light — day: lamp OFF, amber is a pigment */
  --amber:#E08908; --amber-bright:#F49B16; --amber-deep:#A05412;
  --amber-core:#FFC77A; --on-amber:#2E2000;
  --lamp:0; /* 0 = off (no glow), 1 = on. Multiplied into glow alphas. */
  /* status — desaturated earth, status only, never decoration */
  --success:#3F6B4A; --warning:#A65B38; --danger:#8A4A2C;
  /* hairlines */
  --hairline:rgba(38,40,52,.08); --hairline-strong:rgba(38,40,52,.14);
  /* №4 — slate shadows: warm light casts cool shadow (#1B2333 base) */
  --shadow-rest:0 1px 2px rgba(27,35,51,.10), 0 6px 18px rgba(27,35,51,.08);
  --shadow-raised:0 2px 4px rgba(27,35,51,.10), 0 10px 28px rgba(27,35,51,.10), 0 24px 56px rgba(27,35,51,.06);
  /* №1 — the glow ring (wordmark + key CTA ONLY) and the pool */
  --glow:0 0 1px rgba(244,155,22,.55), 0 0 10px rgba(255,178,64,.38), 0 0 26px rgba(255,169,40,.16);
  --glow-strong:0 0 1px rgba(244,155,22,.7), 0 0 16px rgba(255,178,64,.55), 0 0 40px rgba(255,169,40,.28);
  --pool:radial-gradient(ellipse 65% 60% at 40% 40%, rgba(255,199,122,.30), rgba(255,178,64,.10) 45%, transparent 72%);
  --ink-warmed:#2B2114; /* ink inside a light pool */
  /* type — №3: --font-voice is Porchlight speaking; grotesk is the interface */
  --font-display:"Neue Haas Grotesk Display Pro","Helvetica Neue",-apple-system,sans-serif;
  --font-text:"Neue Haas Grotesk Text Pro","Helvetica Neue",-apple-system,BlinkMacSystemFont,sans-serif;
  --font-voice:Georgia,"Times New Roman",serif;
  /* motion — the timing family, written down once */
  --ease-arrive:cubic-bezier(.16,1,.3,1);
  --t-fast:140ms; --t-slow:220ms; --t-press:70ms; --t-breathe:8s;
  /* spacing */
  --s1:4px; --s2:8px; --s3:12px; --s4:20px; --s5:32px; --s6:52px;
  /* radii — №5: the lit sill is ceremony, max one per screen */
  --r-card:12px; --r-panel:16px; --r-pill:999px;
  --r-sill:24px;
}

/* ── Night: its own palette, not an inversion. Volume up. Lamp ON. ── */
[data-theme="night"] {
  color-scheme: dark;
  --paper:#1B2333; --sand:#12161F; --card:#202A3D;
  --ink:#EDEBE2; --ink-2:#D2CFC5; --muted:rgba(237,235,226,.55);
  --amber:#FFA928; --amber-bright:#FFA928; --amber-deep:#F0A55A;
  --amber-core:#FFD08A; --on-amber:#2A1B06;
  --lamp:1;
  --success:#8FA79C; --warning:#F0A55A; --danger:#E0B4A6;
  --hairline:rgba(237,235,226,.08); --hairline-strong:rgba(237,235,226,.14);
  /* night depth comes from the glow, not shadow */
  --shadow-rest:0 1px 2px rgba(0,0,0,.3);
  --shadow-raised:0 2px 6px rgba(0,0,0,.35);
  --glow:0 0 1px rgba(255,169,40,.7), 0 0 14px rgba(255,178,64,.5), 0 0 34px rgba(255,169,40,.28);
  --glow-strong:0 0 2px rgba(255,169,40,.85), 0 0 20px rgba(255,178,64,.65), 0 0 52px rgba(255,169,40,.4);
  --pool:radial-gradient(ellipse 65% 60% at 40% 40%, rgba(255,208,138,.16), rgba(255,178,64,.06) 45%, transparent 72%);
  --ink-warmed:#F5E9D3;
}

/* ── Dusk: exists ONLY during the timed lamplighting (~90s at local
   sunset, run by dusk.js). Never a static UI theme. №2. ── */
[data-theme="dusk"] {
  color-scheme: dark;
  --paper:#3A4258; --sand:#2E3446; --card:#434A5E;
  --ink:#EDEBE2; --ink-2:#D9D6CB; --muted:rgba(237,235,226,.62);
  --amber:#FFA928; --amber-bright:#FFA928; --amber-deep:#F0A55A;
  --amber-core:#FFD08A; --on-amber:#2A1B06;
  --lamp:1;
  --success:#8FA79C; --warning:#F0A55A; --danger:#E0B4A6;
  --hairline:rgba(237,235,226,.10); --hairline-strong:rgba(237,235,226,.16);
  --shadow-rest:0 1px 2px rgba(0,0,0,.25);
  --shadow-raised:0 2px 6px rgba(0,0,0,.3);
  --glow:0 0 2px rgba(255,169,40,.8), 0 0 16px rgba(255,178,64,.6), 0 0 40px rgba(255,169,40,.35);
  --glow-strong:0 0 2px rgba(255,169,40,.9), 0 0 22px rgba(255,178,64,.7), 0 0 56px rgba(255,169,40,.45);
  --pool:radial-gradient(ellipse 65% 60% at 40% 40%, rgba(255,208,138,.2), rgba(255,178,64,.08) 45%, transparent 72%);
  --ink-warmed:#F5E9D3;
}
