/* Glow Islands design tokens. Day lives in :root; night overrides it on body[data-time="night"],
   which app.mjs sets from the island's real light so the interface and the 3D scene change together. */
/* Fonts (fase 6, option B «juego cálido»): Baloo 2 for titles, Figtree for the interface. Both OFL 1.1, bundled for offline use. */
@font-face { font-family:"Baloo 2"; src:url("../vendor/fonts/baloo-2-latin-700-normal.woff2") format("woff2"); font-weight:500 800; font-style:normal; font-display:swap; }
@font-face { font-family:"Figtree"; src:url("../vendor/fonts/figtree-latin-400-normal.woff2") format("woff2"); font-weight:300 500; font-style:normal; font-display:swap; }
@font-face { font-family:"Figtree"; src:url("../vendor/fonts/figtree-latin-600-normal.woff2") format("woff2"); font-weight:600 700; font-style:normal; font-display:swap; }
@font-face { font-family:"Figtree"; src:url("../vendor/fonts/figtree-latin-800-normal.woff2") format("woff2"); font-weight:750 900; font-style:normal; font-display:swap; }

:root {
  color-scheme: light;
  --font-brand: "Baloo 2", "Figtree", system-ui, sans-serif;
  --font-ui: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* surfaces */
  --canvas: #ffffff;
  --surface: #ffffff;
  --surface-muted: #f5f8fc;
  --pill: #ebf1f8;
  --pill-hover: #dde8f5;
  --hud-surface: rgb(255 255 255 / .92);
  --scrim: rgb(255 255 255 / .36);

  /* text */
  --ink: #111c2d;
  --ink-2: #4b5e78;
  --ink-muted: #6c7f99;

  /* blues (--forest and --lime keep their names for compatibility) */
  --forest: #143d7a;
  --primary: #1d5fd6;
  --on-primary: #ffffff;
  --accent: #2268e6;
  --accent-soft: #e7f0ff;
  --accent-border: #bdd4fc;
  --lime: #5eb2ff;
  --lime-gradient: linear-gradient(135deg, #74bdff, #2268e6);
  --on-lime: #0f2447;

  /* rewards and states */
  --gold: #d89216;
  --gold-text: #8b5b00;
  --gold-bright: #f4b63d;
  --gold-soft: #fef5e3;
  --gem: #6a4bc4;
  --gem-soft: #efeafd;
  --danger: #c93b3b;
  --danger-soft: #fdeaea;
  --danger-border: #f5c2c2;

  /* lines and depth */
  --border: #e2e9f2;
  --border-strong: #c5d4e6;
  --shadow-card: 0 6px 20px rgb(15 35 66 / .06), 0 1px 3px rgb(15 35 66 / .04);
  --shadow-hud: 0 10px 28px rgb(15 35 66 / .12), 0 2px 6px rgb(15 35 66 / .06);
  --shadow-sheet: 0 -12px 42px rgb(12 28 54 / .18);
  --backdrop: rgb(15 28 48 / .32);

  /* focus launcher & active dial */
  --focus-surface: rgb(255 255 255 / .95);
  --focus-border: #d8e3f0;
  --focus-shadow: 0 14px 32px rgb(15 35 66 / .18), 0 2px 6px rgb(15 35 66 / .08);
  --focus-ring-track: rgb(17 28 45 / .09);
  --focus-ring-rest: #3b82f6;

  /* shape & motion («Brisa de Isla») */
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 24px;
  --radius-sheet: 32px;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-in: cubic-bezier(.4, 0, 1, 1);
  --ease-pop: cubic-bezier(.22, 1.28, .36, 1);
  --ease: var(--ease-out);
  --dur-tap: 140ms;
  --dur-fast: 180ms;
  --dur-exit: 220ms;
  --dur-enter: 300ms;
  --dur-celebrate: 360ms;
}

/* Night palette «Medianoche» (2026-11-15): blue graphite surfaces that follow the night sky,
   a moonlight-white primary and a soft blue accent; no green. Gold stays the only warm colour.
   --forest and --lime keep their names for compatibility but are not green at night. */
body[data-time="night"] {
  color-scheme: dark;
  --canvas: #0b1018;
  --surface: #141b26;
  --surface-muted: #1a2230;
  --pill: #222b3a;
  --pill-hover: #2a3446;
  --hud-surface: rgb(20 27 38 / .88);
  --scrim: rgb(8 12 24 / .46);

  --ink: #edf1f7;
  --ink-2: #b4bfcf;
  --ink-muted: #8794a8;

  --forest: #edf1f7;
  --primary: #e8edf6;
  --on-primary: #0e1420;
  --accent: #8ab4ff;
  --accent-soft: rgb(138 180 255 / .14);
  --accent-border: rgb(138 180 255 / .34);
  --lime: #8ab4ff;
  --lime-gradient: linear-gradient(135deg, #2b3b5a, #22304e);
  --on-lime: #edf1f7;

  --gold: #e8bc66;
  --gold-text: #e8bc66;
  --gold-bright: #f5cf7f;
  --gold-soft: rgb(232 188 102 / .15);
  --gem: #c2b4ff;
  --gem-soft: rgb(194 180 255 / .15);
  --danger: #ed8484;
  --danger-soft: rgb(237 132 132 / .15);
  --danger-border: rgb(237 132 132 / .32);

  --border: rgb(180 191 207 / .11);
  --border-strong: rgb(180 191 207 / .22);
  --shadow-card: 0 8px 24px rgb(2 5 12 / .45), 0 1px 3px rgb(2 5 12 / .30);
  --shadow-hud: 0 12px 32px rgb(2 5 12 / .50), 0 2px 8px rgb(2 5 12 / .30);
  --shadow-sheet: 0 -14px 48px rgb(2 5 12 / .70);
  --backdrop: rgb(4 7 14 / .62);

  --focus-surface: rgb(20 27 38 / .93);
  --focus-border: rgb(180 191 207 / .16);
  --focus-shadow: 0 16px 36px rgb(2 5 12 / .60);
  --focus-ring-track: rgb(255 255 255 / .12);
  --focus-ring-rest: #8ab4ff;
}
