/* 1111001 — Black Hole Landing Page — HUD stylesheet
   Palette: tinted near-black #020409 base · desaturated amber · cyan accents
   Type: system mono stack (zero webfont cost) */

:root {
  --bg: #020409;
  --ink: #e8f1f7;
  --ink-dim: rgba(232, 241, 247, 0.62);
  --amber: #ffb35c;
  --amber-soft: rgba(255, 179, 92, 0.85);
  --cyan: rgba(127, 220, 255, 0.55);
  --cyan-hair: rgba(127, 220, 255, 0.22);
  --hair: rgba(232, 241, 247, 0.14);
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html {
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--mono);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ------------------------------------------------------------- canvas ---- */

#view {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 1;
  /* pan-y: vertical swipes scroll the page (mobile), horizontal drags orbit */
  touch-action: pan-y;
  cursor: grab;
}
#view:active { cursor: grabbing; }

/* scanlines + vignette overlay
   REMOVED from CSS: grain/scanlines/vignette are baked into the shader composite
   pass. A second full-screen blended layer caused GPU memory pressure and
   context loss on integrated graphics (black-canvas bug). */
#fx { display: none; }

/* ------------------------------------------------------------ corners ---- */

.corner {
  position: fixed;
  width: 30px;
  height: 30px;
  border: 1px solid var(--cyan-hair);
  z-index: 10;
  pointer-events: none;
}
.corner.tl { top: 20px; left: 20px;  border-right: 0; border-bottom: 0; }
.corner.tr { top: 20px; right: 20px; border-left: 0;  border-bottom: 0; }
.corner.bl { bottom: 20px; left: 20px;  border-right: 0; border-top: 0; }
.corner.br { bottom: 20px; right: 20px; border-left: 0;  border-top: 0; }

/* --------------------------------------------------------------- bar ----- */

.bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 44px;
  z-index: 20;
  pointer-events: none;
}
.wordmark {
  pointer-events: auto;
  color: var(--ink);
  text-decoration: none;
  font-size: 15px;
  letter-spacing: 0.34em;
  font-weight: 600;
}
.liveline {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  letter-spacing: 0.28em;
  color: var(--ink-dim);
}
.dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--amber);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }

/* ------------------------------------------------------------- layout ---- */

/* Chapters are pass-through layers: the canvas beneath receives drag/orbit.
   Only real controls opt back in. */
.chapter, footer.chapter {
  position: relative;
  z-index: 10;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 96px 24px;
  pointer-events: none;
}
.chapter .cta,
.manifesto-inner {
  pointer-events: auto;
}

/* --------------------------------------------------------------- hero ---- */

.hero-stack {
  text-align: center;
  transform: translateY(6vh);
}

.kicker {
  margin: 0 0 18px;
  font-size: 11px;
  letter-spacing: 0.42em;
  color: var(--cyan);
  text-transform: uppercase;
}

.brand {
  margin: 0;
  font-size: clamp(64px, 14vw, 168px);
  line-height: 1;
  letter-spacing: 0.06em;
  font-weight: 700;
  /* white vertical gradient — silver fade toward the baseline */
  background: linear-gradient(180deg, #ffffff 0%, #eef4fa 52%, #b9c8d8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  /* NOTE: filter drop-shadow, not text-shadow — text-shadow bleeds through
     background-clipped transparent glyphs; drop-shadow wraps the rendered
     pixels and fades more gently per request */
  filter:
    drop-shadow(0 3px 10px rgba(2, 4, 9, 0.5))
    drop-shadow(0 12px 44px rgba(2, 4, 9, 0.38));
}
/* safety net: if any agent (Safari data detector) injects an anchor into the
   wordmark, strip link styling so the gradient survives */
.brand a,
.brand a:link,
.brand a:visited {
  all: unset;
  background: inherit;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.tagline {
  margin: 26px auto 34px;
  max-width: 28ch;
  font-size: clamp(12px, 1.6vw, 16px);
  letter-spacing: 0.3em;
  color: #ffcf96;
  text-shadow: 0 2px 18px rgba(2, 4, 9, 0.9), 0 0 6px rgba(2, 4, 9, 0.7);
}

.cta {
  appearance: none;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.32em;
  color: var(--ink);
  background: rgba(8, 14, 22, 0.55);
  border: 1px solid var(--cyan-hair);
  padding: 15px 38px;
  transition: border-color 180ms ease-out, background-color 180ms ease-out, transform 180ms ease-out;
}
.cta:hover { border-color: var(--cyan); background: rgba(12, 22, 34, 0.75); }
.cta:active { transform: scale(0.985); }
.cta:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }

/* ---------------------------------------------------------- manifesto ---- */

.manifesto-inner {
  max-width: 62ch;
  text-align: left;
}
.manifesto h2 {
  font-size: clamp(22px, 3vw, 30px);
  letter-spacing: 0.18em;
  margin: 0 0 40px;
  color: var(--ink);
  text-transform: uppercase;
}
.manifesto p {
  font-size: clamp(17px, 2.4vw, 24px);
  line-height: 1.55;
  color: var(--ink-dim);
  margin: 0 0 30px;
  max-width: 56ch;
}
.manifesto .line-3 { color: var(--amber-soft); }

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 640ms ease-out, transform 640ms ease-out;
}
.reveal.revealed { opacity: 1; transform: translateY(0); }
.line-2.reveal { transition-delay: 140ms; }
.line-3.reveal { transition-delay: 280ms; }

/* ------------------------------------------------------------ telemetry -- */

.status-inner {
  width: min(560px, 90vw);
  text-align: center;
}
.telemetry {
  border: 1px solid var(--hair);
  padding: 26px 30px;
  text-align: left;
  /* solid translucent bg — backdrop-filter removed (GPU pressure / context loss) */
  background: rgba(4, 8, 14, 0.62);
  margin-bottom: 48px;
}
.trow {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 7px 0;
  border-bottom: 1px dashed rgba(232, 241, 247, 0.08);
  font-size: 12px;
  letter-spacing: 0.18em;
}
.trow:last-child { border-bottom: 0; }
.tlabel { color: var(--ink-dim); }
.tval { color: var(--amber-soft); font-variant-numeric: tabular-nums; }

.footer-line {
  font-size: 10px;
  letter-spacing: 0.3em;
  color: var(--ink-dim);
  margin: 0;
}

.hint {
  position: fixed;
  bottom: 18px; left: 50%;
  transform: translateX(-50%);
  font-size: 9px;
  letter-spacing: 0.3em;
  color: rgba(232, 241, 247, 0.34);
  z-index: 15;
  pointer-events: none;
  margin: 0;
}

/* -------------------------------------------------------------- fatal ---- */

#fatal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  background: rgba(2, 4, 9, 0.88);
}
#fatal[hidden] { display: none !important; }
.fatal-card { text-align: center; padding: 24px; }
.fatal-kicker { font-size: 10px; letter-spacing: 0.4em; color: #ff7a66; margin: 0 0 12px; }
.fatal-title { font-size: 26px; letter-spacing: 0.2em; margin: 0 0 10px; }
.fatal-msg { font-size: 12px; color: var(--ink-dim); letter-spacing: 0.1em; }

/* --------------------------------------------------- tuning panel (?params=1) --- */

#tuning {
  position: fixed;
  top: 76px; right: 20px;
  width: 300px;
  z-index: 70;
  background: rgba(3, 6, 11, 0.92);
  border: 1px solid var(--cyan-hair);
  padding: 14px 16px;
  font-size: 10px;
  letter-spacing: 0.14em;
}
.tp-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  color: var(--cyan);
  margin-bottom: 12px;
}
.tp-btn {
  appearance: none; cursor: pointer;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em;
  color: var(--ink); background: transparent;
  border: 1px solid var(--hair); padding: 4px 10px;
}
.tp-btn:hover { border-color: var(--cyan); }
.tp-row {
  display: grid;
  grid-template-columns: 118px 1fr 44px;
  align-items: center; gap: 8px;
  padding: 5px 0;
}
.tp-lab { color: var(--ink-dim); }
.tp-val { color: var(--amber-soft); text-align: right; font-variant-numeric: tabular-nums; }
.tp-row input[type="range"] { width: 100%; accent-color: #ffb35c; }
.tp-hint { margin-top: 10px; color: rgba(232,241,247,0.34); font-size: 9px; }

@media (max-width: 640px) {
  .bar { padding: 0 22px; height: 56px; }
  .corner { width: 20px; height: 20px; }
  .chapter { padding: 80px 18px; }
  .telemetry { padding: 18px 18px; }
  .trow { font-size: 11px; letter-spacing: 0.12em; }
  .hint { display: none; }
  .liveline span.dot { width: 5px; height: 5px; }
}

/* --------------------------------------------------- reduced motion ------ */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { transition-duration: 200ms; transform: none; }
  .dot { animation: none; }
  .cta { transition-duration: 120ms; }
}
