/*
 * Goblin Software: theme. Every colour, font, space and size the site uses is
 * defined here as a custom property; site.css only refers to them with var().
 * To restyle the site, change values in this file. Dark "Forge Night" is the
 * default; light (cream paper) follows the system unless html[data-theme="dark"];
 * html[data-theme="light"] forces light. Cast voice accents live at the bottom.
 */

:root {
  --bg: #0e1012;
  --surface: #171a1d;
  --border: #2b3035;
  --text: #e8dfcf;
  --muted: #a4adb3;
  --ember: #e0782a;
  --eye: #6dbb8a;
  --link: #6dbb8a;
  --on-ember: #0e1012;
  --st-planned: #8fb4d8;
  --paper: #29251f;
  --paper-tint: rgba(0, 0, 0, 0.64);
  --paper-edge: #625441;
  --paper-rim: #393127;
  --paper-ink: #e3d5b7;
  --paper-accent: #e3bc83;
  --paper-link: #a4c4a0;
  --paper-muted: #b8aa94;
  --paper-tag-planned: #acc3d9;
  --focus: #e0782a;
  --hero-fade: rgba(14, 16, 18, 0.82);
  --world-veil: rgba(14, 16, 18, 0.82);
  --world-opacity: 0.3;
  --world-text-surface: transparent;
  --world-text-padding: 0;
  --paper-texture-size: cover;
  --paper-texture-repeat: no-repeat;
  --hero-panel-bg: rgba(0, 0, 0, 0.3);
  --hero-panel-ink: var(--text);
  --hero-panel-link: var(--link);

  --font-serif: "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --font-sans: system-ui, sans-serif;
  --font-mono: ui-monospace, monospace;

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 1rem;
  --space-4: 1.5rem;
  --space-5: 2.5rem;
  --space-6: 4rem;
  --radius: 10px;
  --measure: 40rem;
  --page: 80rem;
  --text-size: 17px;
  --footer-h: 3rem;
  --story-step: 55vh;
  --story-drift: 18px;
  --tour-hint-width: 14rem;
  --tour-hint-tail: 0.75rem;
  --goblin-size: 125px;
  --goblin-compact: 2.5rem;

  --goblin-square: #000;
  --shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
  --avatar-wash: rgba(42, 33, 24, 0.08);
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #eee3ca;
    --surface: #fbf6e8;
    --border: #d4c7a6;
    --text: #2a2118;
    --muted: #4b4238;
    --ember: #8c2f1b;
    --eye: #2e6b45;
    --link: #1e4f30;
    --on-ember: #fbf6e8;
    --st-planned: #2d5a85;
    --paper: #f9efd8;
    --paper-tint: rgba(255, 244, 220, 0.72);
    --paper-edge: #b7a681;
    --paper-rim: #e4d3af;
    --paper-ink: #2a2118;
    --paper-accent: #662314;
    --paper-link: #193f26;
    --paper-muted: #4a4236;
    --paper-tag-planned: #1b3854;
    --focus: #8c2f1b;
    --hero-panel-bg: rgba(251, 246, 232, 0.9);
    --hero-panel-ink: var(--text);
    --hero-panel-link: var(--link);
    --hero-fade: rgba(244, 236, 216, 0.45);
    --world-veil: rgba(225, 185, 155, 0.2);
    --world-opacity: 1;
    --world-text-surface: rgba(249, 239, 216, 0.96);
    --world-text-padding: var(--space-3);
    --paper-texture-size: auto, max(100%, 60rem) auto;
    --paper-texture-repeat: no-repeat, repeat;
  }
}

html[data-theme="light"] {
  --bg: #eee3ca;
  --surface: #fbf6e8;
  --border: #d4c7a6;
  --text: #2a2118;
  --muted: #4b4238;
  --ember: #8c2f1b;
  --eye: #2e6b45;
  --link: #1e4f30;
  --on-ember: #fbf6e8;
  --st-planned: #2d5a85;
  --paper: #f9efd8;
  --paper-tint: rgba(255, 244, 220, 0.72);
  --paper-edge: #b7a681;
  --paper-rim: #e4d3af;
  --paper-ink: #2a2118;
  --paper-accent: #662314;
  --paper-link: #193f26;
  --paper-muted: #4a4236;
  --paper-tag-planned: #1b3854;
  --focus: #8c2f1b;
  --hero-panel-bg: rgba(251, 246, 232, 0.9);
  --hero-panel-ink: var(--text);
  --hero-panel-link: var(--link);
  --hero-fade: rgba(244, 236, 216, 0.45);
  --world-veil: rgba(225, 185, 155, 0.2);
  --world-opacity: 1;
  --world-text-surface: rgba(249, 239, 216, 0.96);
  --world-text-padding: var(--space-3);
  --paper-texture-size: auto, max(100%, 60rem) auto;
  --paper-texture-repeat: no-repeat, repeat;
}

/* Cast voices: bright accents in dark mode; --voice-paper supplies light mode. */
.voice-sable { --voice: #b79cff; --voice-paper: #422d79; }
.voice-brannoch { --voice: #e0782a; --voice-paper: #63300c; }
.voice-pip { --voice: #e6c35c; --voice-paper: #513c06; }
.voice-corvin { --voice: #8fb4d9; --voice-paper: #204160; }
.voice-cinder { --voice: #ff7a5c; --voice-paper: #742313; }
.voice-hroda { --voice: #e0707a; --voice-paper: #6f1e26; }
.voice-wren { --voice: #e8b05a; --voice-paper: #563a0c; }
.voice-bigeye { --voice: #6dbb8a; --voice-paper: #1a4127; }
/* on the light page the paper accent is the one with enough contrast */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .voiced { --voice: var(--voice-paper); }
}
html[data-theme="light"] .voiced { --voice: var(--voice-paper); }
