/* base.css — owned by the orchestrator (shared tokens, layers, reduced-motion reset). */
/* Kracked Devs — KD brand palette (krackeddevs.com/press) on a night-time dot world. */
:root {
  --bg: #0a0d0b;
  --panel: #0e1511;
  --panel-2: #132019;
  --line: #2b3d31;
  --dot: #cfd6d0;
  --mint: #afe6b8;
  --green: #7be36b;
  --forest-950: #102a1d;
  --forest-800: #214e36;
  --forest-700: #236b3f;
  --paper: #f7f8f2;
  --paper-2: #e2e8dc;
  --muted: #8d978f;
  --ink: #19291f;
  --orange: #f08a24;
  --fire: #e8743b;
  --water: #4aa3e8;
  --earth: #8fcf5f;
  --f-pixel: 'Pixelify Sans', ui-monospace, monospace;
  --f-display: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --f-body: Inter, system-ui, sans-serif;
  --f-mono: 'JetBrains Mono', ui-monospace, monospace;
  --p: 4px;
  --ground: 80%;
  --scene-lift: 0vh;
  --scene-scale: 1;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--bg); scroll-behavior: auto; }
body { margin: 0; background: var(--bg); color: var(--paper); font: 400 16px/1.5 var(--f-body); overflow-x: hidden; }
a { color: inherit; }
button { font: inherit; color: inherit; }
.px { image-rendering: pixelated; image-rendering: crisp-edges; display: block; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }

#sky { position: fixed; inset: 0; z-index: 0; opacity: .44; }
#world { position: fixed; inset: 0; z-index: 1; overflow: visible; }
/* Keep the sky full width. The long scenery strip can paint beyond the scaled
   foreground frame, so shrinking a reading scene never exposes side gutters. */
#sky { translate: 0 calc(-1 * var(--scene-lift)); }
#world { translate: 0 calc(-1 * var(--scene-lift)); scale: var(--scene-scale); transform-origin: 50% var(--ground); }
#player { translate: 0 calc(-1 * var(--scene-lift)); scale: var(--scene-scale); transform-origin: left bottom; }
#strip { position: absolute; top: 0; left: 0; height: 100%; will-change: transform; }
.world-scenery { opacity: var(--title-scenery-opacity, 1); }
/* The ground (environment lane): a dotted soil tile drawn by src/zones/scenery.js (--soil-bg, --soil-lift); the
   gradients are the fallback until the tile is ready. */
#strip::before {
  content: ''; position: absolute; left: 0; right: 0; top: calc(var(--ground) - var(--soil-lift, 0px)); bottom: 0;
  pointer-events: none;
  background: var(--soil-bg,
    radial-gradient(circle, rgba(232, 236, 232, .9) 2.4px, transparent 2.9px) 0 0 / 7px 7px repeat-x,
    radial-gradient(circle, rgba(222, 228, 222, .5) 2.1px, transparent 2.6px) 0 7px / 7px 7px repeat-x,
    radial-gradient(circle, rgba(222, 228, 222, .3) 2px, transparent 2.5px) 0 14px / 7px 7px repeat-x,
    radial-gradient(circle, rgba(222, 228, 222, .1) 1.6px, transparent 2.1px) 0 21px / 7px 7px);
}
#story { position: relative; z-index: 3; pointer-events: none; }
#hud { position: fixed; inset: 0; z-index: 5; pointer-events: none; }


.noscript { position: relative; z-index: 9; padding: 40px; }
body.failed::after { content: 'Kracked Devs could not load its data. Serve this folder over http (python3 -m http.server).'; position: fixed; inset: auto 16px 16px; z-index: 9; padding: 14px; background: var(--paper); color: var(--ink); font: 600 14px var(--f-mono); }


@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
