/* Strategic Intell: what every page shares (site DESIGN.md).
   Each page sets its own colours as the custom properties listed under :root in its own stylesheet;
   the values here are fallbacks only. */

:root {
  --font-head: 'Inter Tight', 'Helvetica Neue', Arial, sans-serif;
  --font-body: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  --text-main: #eaf4ff;
  --text-run: #dce8f8;
  --text-detail: #9fb4d8;
  --accent: #F4AC4F;
  --ground: #050a1e;
  --field: #132048;
  --window-fill: rgba(12, 20, 52, 0.84);
  --window-edge: rgba(90, 210, 255, 0.55);
  --window-glow: 0 0 18px rgba(80, 160, 255, 0.35), 0 0 60px rgba(60, 110, 255, 0.18),
    inset 0 1px 0 rgba(160, 220, 255, 0.18);
  --rule: rgba(200, 225, 255, 0.12);
  --grid-line: rgba(200, 225, 255, 0.045);
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
}

* { box-sizing: border-box; }
/* scroll position drives every section, so the browser must never shift it when content changes size */
html { background: var(--ground); overflow-anchor: none; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--text-run);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--text-run); text-decoration: none; }
a:hover { color: var(--accent); }
button, select, input { font-family: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
input[type='range'], input[type='checkbox'] { accent-color: var(--accent); }

.si-visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* floating window: one 3D material for windows, play bars and panels */
.si-window {
  background: var(--window-fill);
  border: 1px solid var(--window-edge);
  box-shadow: var(--window-glow);
  color: var(--text-main);
}

/* the three layers: base (fixed background), moving (per section), content (windows) */
.si-base {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
}
.si-base canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.si-base .si-grid {
  position: absolute; top: 0; bottom: 0; left: 64px; right: 64px;
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px;
}
.si-base .si-grid > div {
  border-left: 1px solid var(--grid-line); border-right: 1px solid var(--grid-line);
  transform-origin: top; transform: scaleY(0);
}
.si-base .si-grain { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.16; mix-blend-mode: overlay; }

/* sections: a sticky stage inside a taller track; scrolling the track drives the section */
.si-section { position: relative; z-index: 1; }
.si-stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }

/* buttons and fields shared by every page */
.si-play {
  flex: none; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--accent); background: rgba(244, 172, 79, 0.12);
  color: var(--text-main); font-size: 14px; cursor: pointer;
}
.si-select {
  min-height: 34px; padding: 0 8px; font-size: 13.5px;
  background: var(--field); color: var(--text-run); border: 1px solid rgba(200, 225, 255, 0.22);
}
.si-label { font-size: 13.5px; color: var(--text-detail); }
.si-num { font-family: var(--font-head); font-weight: 700; font-variant-numeric: tabular-nums; }

@keyframes si-caret { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }

@media (max-width: 720px) {
  body { font-size: 14.5px; }
  .si-base .si-grid { left: 16px; right: 16px; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: 12px; }
  .si-select { min-height: 36px; font-size: 13px; }
  .si-label { font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; scroll-behavior: auto !important; }
}
