/*! THE LOST WORLD 1.0.0 — css/theme.css
 *
 *  Overrides only.  css/game.css is the kit stylesheet and ships byte-identical
 *  with its SHA-256 recorded in docs/engine-purity.json, so every change to the
 *  look of the game lives in this file.
 *
 *  The skin is a field notebook by lamplight: warm ivory on a green-black
 *  ground, red-clay rules, brass highlights.
 */

:root {
  --primary: #e6dcc0;
  --bright: #fff7e2;
  --dim: #9c9076;
  --line: #4d3c24;
  --bg: #070906;
  --panel: #0d100b;
  --panel2: #11150e;
  --warn: #f2c14e;
  --danger: #e5795a;
  --clay: #a8552f;
  --leaf: #6e8f5a;
  --brass: #c9a227;
  --glow: 0.45;
}

html, body { background: #070906; }

.shell {
  background: radial-gradient(ellipse at 50% 0%, #16200f 0%, #0a0f08 45%, #050704 100%);
}

.topbar, .footerbar { background: linear-gradient(180deg, #12160d, #0a0d07); }
.logo { color: var(--brass); text-shadow: 0 0 calc(9px * var(--glow)) var(--brass); }
.product span { color: var(--clay); letter-spacing: .06em; }
.game-title strong { color: var(--bright); }

.terminal {
  background:
    repeating-linear-gradient(0deg, rgba(255, 246, 221, .014) 0, rgba(255, 246, 221, .014) 1px,
      transparent 1px, transparent 5px),
    linear-gradient(180deg, #0a0e07, #060803);
  text-shadow: 0 0 calc(4px * var(--glow)) rgba(230, 220, 192, .30);
}

.output { line-height: 1.62; }
.output.title { color: var(--brass); letter-spacing: .02em; }
.output.command { color: var(--leaf); }
.output.system { color: #bcae8d; }
.output.warning { color: var(--warn); }
.output.error { color: var(--danger); }

.panel {
  background: linear-gradient(180deg, rgba(17, 21, 14, .97), rgba(7, 9, 6, .97));
  box-shadow: inset 0 0 24px rgba(201, 162, 39, .035);
}
.panel h2 { color: var(--brass); border-bottom-color: var(--line); }
.panel p { color: #b3a888; }
.panel .row { border-bottom-color: #2c2415; }
.panel button.link { color: var(--bright); }
.progress { background: #241d10; }
.progress i { background: linear-gradient(90deg, var(--clay), var(--brass)); }
.complete { color: var(--brass); }
.locked { color: #6d654f; }

.command-entry { background: #0d110a; }
.command-entry span { color: var(--clay); }
.command-entry input { background: #050704; border-color: #4d3c24; color: var(--primary); }
.command-entry input::placeholder { color: #6d654f; }

.topbar button, .footerbar button, .command-entry button,
.button-row button, dialog button {
  background: #16190f;
  border-color: var(--line);
  color: var(--primary);
}
.topbar button:hover, .footerbar button:hover, .button-row button:hover {
  background: #2a2413;
  color: var(--bright);
  border-color: var(--brass);
}
.button-row button.selected { background: #4a2f18; color: var(--bright); border-color: var(--clay); }

/* Story verbs sit in the ACTIONS band, marked in clay so they read as this
   story's own vocabulary rather than the engine's. */
.button-row button.story-verb {
  border-color: var(--clay);
  color: var(--warn);
  background: #1c1208;
}
.button-row button.story-verb:hover {
  background: #3a2410;
  color: var(--bright);
  border-color: var(--brass);
}

/* The engine stylesheet relies on the browser default focus ring, which is
   invisible on this ground. */
:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 2px;
}

/* ------------------------------------------------------------------ chart */
.lw-chart { font-size: 11px; line-height: 1.45; }
.lw-region { margin: 0 0 9px; }
.lw-region-name {
  color: var(--clay);
  font-size: 9px;
  letter-spacing: .13em;
  text-transform: uppercase;
  margin-bottom: 3px;
  border-bottom: 1px solid #2c2415;
  padding-bottom: 2px;
}
.lw-region-dark .lw-region-name { color: #59503c; }
.lw-row { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; }
.lw-node { padding: 2px 5px; border: 1px solid #2c2415; color: #8f8468; }
.lw-seen { color: var(--primary); border-color: var(--line); background: #11150e; }
.lw-unseen { color: #4f4835; border-style: dotted; letter-spacing: .18em; }
.lw-here {
  color: #1a1206;
  background: var(--brass);
  border-color: var(--brass);
  font-weight: bold;
}
.lw-link { color: var(--line); }
.lw-link-dark { color: #221c11; }
.lw-legend {
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px solid #2c2415;
  color: var(--dim);
  font-size: 10px;
}
.lw-legend strong { color: var(--bright); }

/* --------------------------------------------------------------- dialogs */
dialog { background: #080b06; border-color: var(--brass); }
dialog header { border-bottom-color: var(--line); }
dialog h2 { color: var(--brass); }
.save-row { border-bottom-color: var(--line); }
.accessibility-grid select,
.accessibility-grid input[type="range"] {
  background: #16190f;
  border-color: var(--line);
  color: var(--primary);
}
.access-note { color: var(--dim); }
.caption-region { border-color: var(--brass); color: var(--bright); background: #070906; }

/* ----------------------------------------------------------------- cover */
.story-cover { background: #070906; }
.cover-art {
  background:
    radial-gradient(circle at 74% 16%, rgba(242, 193, 78, .22), transparent 16%),
    linear-gradient(180deg, #1d2a12 0%, #101707 46%, #070a04 100%);
  border-right-color: var(--line);
}
.cover-art:before {
  background: repeating-linear-gradient(0deg, rgba(255, 246, 221, .016) 0,
    rgba(255, 246, 221, .016) 1px, transparent 1px, transparent 5px);
}

/* the sun through haze */
.cover-moon {
  width: 130px; height: 130px; right: 16%; top: 11%;
  background: radial-gradient(circle at 42% 38%, #fff3cf, #e8b968 42%, #6b4a1c 66%, transparent 70%);
  box-shadow: 0 0 60px rgba(242, 193, 78, .28);
}

/* the wall of red rock: a flat-topped rampart rather than the kit's peaks */
.cover-ridge { height: 62%; }
.ridge-one {
  background: #6d2f19;
  opacity: .95;
  clip-path: polygon(0 46%, 100% 40%, 100% 100%, 0 100%);
}
.ridge-two {
  bottom: 0;
  height: 30%;
  background: #14200c;
  transform: none;
  clip-path: polygon(0 34%, 9% 24%, 21% 36%, 33% 20%, 47% 33%, 61% 18%, 74% 32%, 88% 22%, 100% 34%, 100% 100%, 0 100%);
}

/* the detached pinnacle, with the beech on its head */
.cover-cave {
  left: 20%;
  bottom: 30%;
  width: 8%;
  height: 40%;
  background:
    radial-gradient(ellipse at 50% 4%, #23300f 0 26%, transparent 27%),
    linear-gradient(180deg, #7c3a20 0%, #58270f 70%, #2b1207 100%);
  filter: drop-shadow(-6px 0 10px rgba(0, 0, 0, .55));
}

.cover-content {
  background: linear-gradient(135deg, rgba(20, 28, 12, .97), #070906);
  /* the kit centres this column with no overflow, so a longer blurb pushes the
     start button off the bottom of the screen where it cannot be clicked */
  overflow-y: auto;
  padding-top: clamp(22px, 3.4vw, 54px);
  padding-bottom: clamp(22px, 3.4vw, 54px);
}
.cover-content h1 { font-size: clamp(2.1rem, 4vw, 4.4rem); margin-bottom: 18px; }
.cover-content p { margin: 0 0 13px; font-size: .97rem; line-height: 1.6; }
.cover-option { margin: 6px 0; }
.start-story { max-width: none; width: 100%; margin-top: 16px; }
.cover-kicker { color: var(--clay); }
.cover-content h1 { color: var(--bright); text-shadow: 0 0 26px rgba(242, 193, 78, .22); }
.cover-content p { color: #c4b895; }
.cover-credit { border-top-color: var(--line); }
.cover-option { color: var(--warn); }
.start-story {
  background: #4a2a12;
  border-color: var(--brass);
  color: var(--bright);
  box-shadow: 0 0 20px rgba(201, 162, 39, .16);
}
.start-story:hover, .start-story:focus {
  background: #6a3c18;
  outline: 2px solid var(--brass);
}

/* High contrast must still win over everything above. */
body.high-contrast {
  --primary: #fff; --bright: #fff; --dim: #e8e8e8; --line: #fff;
  --clay: #fff; --brass: #fff; --leaf: #fff; --glow: 0;
}
body.high-contrast .terminal { background: #000; text-shadow: none; }
body.high-contrast .lw-here { background: #fff; color: #000; }
body.high-contrast .button-row button.story-verb { background: #000; color: #fff; }
