/* Every color and size the display uses. The three light modes (day, twilight, night) and the six
   skies are defined here only; js/daylight.js sets data-mode and data-sky on <html> from the time
   of day. A sky's tokens sit on [data-sky], not :root, so a layer of the sky can wear its own while
   it fades in. */
:root {
  --bg: #f5f0e6;
  --surface: #fbf8f2;
  --surface-sunk: #f0eadf;
  --ink: #2e2b26;
  --ink-soft: #57524a;
  --muted: #8b8478;
  --line: #e6dece;
  --accent-soft: color-mix(in oklab, var(--accent) 14%, var(--surface));
  --scrim: rgb(46 43 38 / 0.3);
  --shadow: 0 1px 2px rgb(80 60 30 / 0.05), 0 6px 18px rgb(80 60 30 / 0.05);
  --shadow-lift: 0 24px 64px rgb(60 40 20 / 0.2);
  --grain-opacity: 0.5;
  --grain-blend: multiply;
  --backdrop-opacity: 0.8;
  --still-opacity: 1;       /* a holiday's garland: it hangs in open sky, so it isn't dimmed like moments crossing the paper */
  --focus-dim: 0.32;        /* what isn't the routine, during a routine window with focus (R13-1) */
  --tile-off: 0.42;         /* a picture turned off in Setup's gallery (R14-1) */
  --focus-fade: 600ms;
  /* The screensaver's mat board: Paper 002's grain (web/art/paper-grain.jpg) over this color; the
     window bevels show the board's core. Night is a black-core board, so no edge glows. */
  --mat: #efe7d8;
  --mat-core: #fbf7ef;
  --mat-grain: 1;           /* contrast of the paper's grain */
  --mat-bevel: 10px;
  --mat-margin: 44px;       /* left and right of the windows: the photos take nearly the whole width */
  --mat-gap: 36px;          /* between two windows */
  --mat-edge: 56px;         /* above and below the windows */

  /* Calendar and children's colors: the pops against the paper */
  --cal-blue: #2f78d0;
  --cal-coral: #e8563f;
  --cal-green: #1f9d6b;
  --cal-violet: #8250d8;
  --cal-amber: #e99a0c;
  /* A holiday's own colors (R14-2), for its garland and the piece you tap: lantern red, gold, blossom pink, marigold, paper */
  --festive-red: #d4262c; --festive-gold: #e6b232; --festive-pink: #ec74a2; --festive-marigold: #f08a14; --festive-paper: #fbf3e2;
  --festive-brown: #8a5a33; /* baskets, acorns, the turkey */
  --festive-night: #1f2b5e; /* a patch of night sky (Matariki), a mask's eyes */
  /* A postcard from a phone (R15-A) is paper like a sticky note, the same in every light mode; a pairing stamp stays
     dark ink on light paper, which a phone's camera needs */
  --postcard-paper: #f8f0de; --postcard-ink: #2b2620; --postcard-mark: #8a5a33;
  --stamp-paper: #fffdf6; --stamp-ink: #1d1b18;
  --cheer: #e0487a;         /* a cheer's heart */
  /* Moonlight (R15-C): the veil over the night sky, as dark as the page goes, and its small clock. The same in every
     light mode: Moonlight brings its own night */
  --moonlight-veil: rgb(3 4 14 / 0.8);
  --moonlight-ink: rgb(244 236 220 / 0.42);
  --moonlight-in: 60s;      /* the calendar fades away over a minute */
  --moonlight-out: 2s;      /* and comes back on a tap in two seconds */
  --chip-mix: 34%;
  --all-day-mix: 58%;
  --chip-ink: 34%;

  --cloud: rgb(255 255 255 / 0.82);
  --font: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-story: "Fraunces", Georgia, serif;
  --gutter: 40px;
  --hill-room: 24px; /* sky between the cards and the dock, where the far hill and its riders show */
  --gap: 28px;
  --radius: 18px;
  --radius-sm: 12px;
  --tap-sm: 56px;
  --alarm: color-mix(in oklab, #dc1f1f 86%, var(--ink));
  /* Setup's seven sections, each its own color on its index tab (docs/harden/review-setup-design.md §6) */
  --sec-family: #c4573a;
  --sec-routines: #3f8a4f;
  --sec-rewards: #c08a12;
  --sec-calendars: #2f6fb8;
  --sec-screen: #6a55b4;
  --sec-sitter: #b2476e;
  --sec-phones: #2f8589;
  --tap: 64px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.4, 0.64, 1);
  color-scheme: light;
}

/* The six skies. --sky-0 and --sky-1 sit behind the clock, so --on-sky must read on both; the warm
   stops stay low, behind the cards and the dock. */
:root, [data-sky="midday"] {
  --sky-0: #2f8fe3; --sky-1: #72c3f3; --sky-2: #cdeff6; --sky-3: #e9f8e8;
  --on-sky: #0c1a26; --sun: #fff1a8; --hill-far: #7cc48a; --hill-near: #46a268;
  --accent: #2160bd; --accent-ink: #ffffff;
}
[data-sky="dawn"] {
  --sky-0: #2a2c6e; --sky-1: #7b4a90; --sky-2: #f4956b; --sky-3: #ffd9a0;
  --on-sky: #fdf3e7; --sun: #ffd27a; --hill-far: #8a5a8f; --hill-near: #5b3d73;
  --accent: #b83c26; --accent-ink: #ffffff;
}
[data-sky="morning"] {
  --sky-0: #5fb4ee; --sky-1: #a6dcf6; --sky-2: #fdeec6; --sky-3: #ffe0a6;
  --on-sky: #14222e; --sun: #ffe08a; --hill-far: #8fc79a; --hill-near: #5fa877;
  --accent: #0b7a80; --accent-ink: #ffffff;
}
[data-sky="afternoon"] {
  --sky-0: #f7a53e; --sky-1: #fcc86e; --sky-2: #ffe3ad; --sky-3: #ffd08f;
  --on-sky: #2b1a0a; --sun: #fff3d0; --hill-far: #c9a24f; --hill-near: #97752f;
  --accent: #ad4f08; --accent-ink: #ffffff;
}
[data-sky="dusk"] {
  --sky-0: #231f5e; --sky-1: #7c2f80; --sky-2: #f0724e; --sky-3: #ffb56b;
  --on-sky: #fff3ea; --sun: #ffb07a; --hill-far: #6b3a7a; --hill-near: #3e2a5e;
  --accent: #ab2b77; --accent-ink: #ffffff;
}
[data-sky="night"] {
  --sky-0: #090d2b; --sky-1: #131a47; --sky-2: #242a66; --sky-3: #3a3a7a;
  --on-sky: #f4ecdc; --sun: #f4ecdc; --hill-far: #1c2050; --hill-near: #12153a;
  --accent: #ffc857; --accent-ink: #1a1c24;
}

/* Dawn and dusk: golden-hour paper, a little dimmer. */
:root[data-mode="twilight"] {
  --cloud: rgb(255 226 214 / 0.5);
  --bg: #f1e2d6;
  --surface: #f9efe6;
  --surface-sunk: #efe0d4;
  --ink: #3a2e2a;
  --ink-soft: #63544d;
  --muted: #937e73;
  --line: #e6d3c5;
  --scrim: rgb(58 46 42 / 0.32);
  --shadow: 0 1px 2px rgb(110 60 40 / 0.06), 0 6px 18px rgb(110 60 40 / 0.07);
  --mat: #ecdfd2;
  --mat-core: #f8efe7;
}

/* Night: ink-blue paper, glowing pastels, warm text. */
:root[data-mode="night"] {
  --cloud: rgb(58 64 112 / 0.5); /* stays dark, so the clock keeps its contrast */
  color-scheme: dark;
  --bg: #1a1c24;
  --surface: #23252f;
  --surface-sunk: #1e2029;
  --ink: #ece4d6;
  --ink-soft: #c9c0b1;
  --muted: #8f8a80;
  --line: #343644;
  --scrim: rgb(8 9 14 / 0.55);
  --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 6px 18px rgb(0 0 0 / 0.22);
  --shadow-lift: 0 24px 64px rgb(0 0 0 / 0.6);
  --grain-opacity: 0.35;
  --grain-blend: soft-light;
  --backdrop-opacity: 0.55;
  --still-opacity: 0.9;
  --focus-dim: 0.28;
  --mat: #262833;
  --mat-core: #3b3e4b;
  --mat-grain: 1.4;         /* overlay is gentler on a dark color; set by eye 2026-11-09 */
  --cal-blue: #7fb0f5;
  --cal-coral: #ff9583;
  --cal-green: #5fd6a4;
  --cal-violet: #b99bf7;
  --cal-amber: #ffc95c;
  --chip-mix: 26%;
  --sec-family: #f08c6c;
  --sec-routines: #7fcf8d;
  --sec-rewards: #f2c25a;
  --sec-calendars: #7fb0ec;
  --sec-screen: #ad9bf0;
  --sec-sitter: #ef8fb4;
  --sec-phones: #7fd0d3;
  --all-day-mix: 40%;
  --chip-ink: 80%;
}
