/* kube-headroom landing — "Premium Broadcast" over a night-drive horizon.
   Design system: cyan = signal/limits, magenta = accent, amber = ceiling
   semantics ONLY. See docs/plan and the repo README for voice guidelines. */

:root {
  --ground: #05070c;
  --ground-2: #0a0d14;
  --panel: #10141d;
  --line: #1d2536;
  --text: #e8edf6;
  --body: #c3cede;
  --muted: #8b96ab;
  --faint: #5a6478;
  --cyan: #22e6ff;
  --magenta: #ff2d95;
  --amber: #ffd23f;
  --mono: "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
  --sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --display: "Arial Black", "Helvetica Neue", Arial, sans-serif;
  --impact: Impact, "Arial Black", sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--ground); scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--ground);
  color: var(--body);
  font-family: var(--sans);
  line-height: 1.6;
  font-size: 16px;
  overflow-x: hidden;
}

a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

.kicker {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 4px;
  color: var(--muted);
  text-transform: uppercase;
}

h2 {
  font-family: var(--display);
  color: var(--text);
  font-size: clamp(24px, 3.4vw, 34px);
  line-height: 1.1;
  letter-spacing: -0.3px;
  margin: 10px 0 18px;
  text-wrap: balance;
}

section { padding: 88px 0; }
section > .wrap > p { max-width: 68ch; }

code {
  font-family: var(--mono);
  font-size: .92em;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1px 6px;
}

/* ============ ANNOUNCE BANNER ============ */
/* Fixed single-line height so the absolutely-positioned nav below can offset
   by a known amount; long text truncates instead of wrapping. */
.announce {
  display: block;
  height: 36px;
  line-height: 36px;
  padding: 0 24px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 1px;
  color: var(--body);
}
.announce:hover { color: var(--cyan); text-decoration: none; }
.announce-tag {
  display: inline-block;
  margin-right: 10px;
  padding: 1px 7px;
  border-radius: 3px;
  background: var(--amber);
  color: var(--ground);
  font-size: 10px;
  letter-spacing: 2px;
  font-weight: 700;
}
.announce + .nav { top: 36px; }

/* ============ NAV ============ */
.nav {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  row-gap: 10px;
  align-items: center;
  gap: 24px;
  max-width: 1080px;
  margin: 0 auto;
  padding: 20px 24px;
  font-size: 14px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-size: 15px;
  letter-spacing: 1px;
  color: var(--text);
}
.brand:hover { text-decoration: none; }
.nav-links {
  margin-left: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 22px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 1.5px;
}
.nav-links a { color: var(--muted); }
.nav-links a:hover { color: var(--cyan); text-decoration: none; }
.gh-pill {
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 4px 14px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted) !important;
}
.gh-pill:hover { border-color: var(--cyan); text-decoration: none; }

/* ============ HERO ============ */
.hero {
  position: relative;
  overflow: hidden;
  background: radial-gradient(ellipse at 30% 10%, #0d1220 0%, var(--ground) 65%);
  padding: 104px 0 200px;
}
/* faint scanlines, hero only */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: repeating-linear-gradient(to bottom, rgba(0,0,0,.14) 0 1px, transparent 1px 4px);
}
.hero .wrap { position: relative; z-index: 3; }

.hero-cols {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 56px;
  align-items: center;
}
.hero-cols > div { min-width: 0; }
@media (max-width: 880px) {
  .hero-cols { grid-template-columns: 1fr; }
  .hero { padding-bottom: 240px; }
}
/* Narrow screens: the nav wraps to multiple rows, so an absolute overlay
   would run into the hero. Put it in flow and trim the hero's top padding. */
@media (max-width: 720px) {
  .nav { position: static; }
  .hero { padding-top: 40px; }
}

.wordmark {
  font-family: var(--impact);
  font-weight: 900;
  text-transform: uppercase;
  line-height: .95;
  letter-spacing: 1px;
  color: var(--text);
  font-size: clamp(46px, 7.5vw, 84px);
  margin: 14px 0 0;
  position: relative;
}
.wordmark .kube {
  display: block;
  font-family: var(--mono);
  font-weight: 400;
  font-size: 13px;
  letter-spacing: 8px;
  color: var(--muted);
  margin-bottom: 12px;
}
.wordmark .word {
  display: inline-block;
  position: relative;
  text-shadow: -3px 2px 0 rgba(255,45,149,.5), 3px -2px 0 rgba(34,230,255,.5);
}
/* interlacing: dark scan rows over the glyphs (near-invisible on the dark
   ground, visible through the letterforms) */
.wordmark .word::after {
  content: "";
  position: absolute;
  inset: 2px -6px;
  pointer-events: none;
  background: repeating-linear-gradient(to bottom,
    rgba(5, 7, 12, .5) 0 2px, transparent 2px 5px);
}
/* one glitch moment on first paint, then calm */
@media (prefers-reduced-motion: no-preference) {
  .wordmark .word { animation: settle 1.1s steps(1) 1; }
  @keyframes settle {
    0%  { text-shadow: -10px 3px 0 rgba(255,45,149,.8), 10px -3px 0 rgba(34,230,255,.8); }
    20% { text-shadow: 7px 2px 0 rgba(255,45,149,.7), -7px -2px 0 rgba(34,230,255,.7); }
    45% { text-shadow: -5px -2px 0 rgba(255,45,149,.6), 5px 2px 0 rgba(34,230,255,.6); }
    70% { text-shadow: 4px 2px 0 rgba(255,45,149,.55), -4px -2px 0 rgba(34,230,255,.55); }
  }
}

.tagline {
  font-size: 19px;
  color: #cdd8ea;
  max-width: 46ch;
  margin: 22px 0 0;
  text-wrap: balance;
}
.subline {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 1.5px;
  color: var(--faint);
  margin-top: 14px;
}

.install {
  margin-top: 30px;
  background: #05070c;
  border: 1px solid #223;
  border-radius: 8px;
  padding: 14px 16px;
  font-family: var(--mono);
  font-size: 12.5px;
  max-width: 620px;
}
.install-step + .install-step { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); }
.step-lbl {
  display: block;
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--muted);
  margin-bottom: 6px;
}
.step-lbl em { font-style: normal; color: var(--faint); letter-spacing: 1px; }
.install-row { display: flex; align-items: flex-start; gap: 10px; }
.install .ps1 { color: var(--magenta); user-select: none; }
.install .cmd {
  color: var(--text);
  background: none;
  border: 0;
  padding: 0;
  font-size: inherit;
  /* explicit backslash-newline continuation in the markup; COPY yields the
     same two-line command, which pastes and runs as-is */
  white-space: pre-wrap;
  min-width: 0;
}
.install .copy {
  margin-left: auto;
  flex-shrink: 0;
  background: none;
  color: var(--faint);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 3px 10px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 1px;
  cursor: pointer;
}
.install .copy:hover { color: var(--cyan); border-color: var(--cyan); }

.dryrun {
  display: flex;
  max-width: 100%;
  align-items: baseline;
  gap: 9px;
  margin: 18px 0 0 2px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 1.5px;
  line-height: 1.8;
  color: var(--amber);
}
.dryrun .dot { flex-shrink: 0; width: 8px; height: 8px; border-radius: 50%; background: var(--amber); }
@media (prefers-reduced-motion: no-preference) {
  .dryrun .dot { animation: blink 2.2s infinite; }
  @keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
}

/* ============ NIGHT-DRIVE HORIZON ============ */
.horizon {
  position: absolute;
  inset: auto 0 0 0;
  width: 100%;
  height: 300px;
  z-index: 1;
  pointer-events: none;
  /* own compositor layer: the scene never re-rasterizes during scroll, and
     the animating pulses invalidate only this layer */
  will-change: transform;
  transform: translateZ(0);
  contain: strict;
}
/* progressive glow: html.fx is set by main.js only on machines with hardware
   WebGL (no software rasterizer) and enough cores/memory. The blur applies to
   the static scene only — it rasterizes once into the horizon's cached layer,
   never per-frame. Everyone else keeps the layered-halo fake. */
html.fx .horizon .glow-t { filter: url(#glow); }
html.fx .horizon .halo { display: none; }

/* pulses travel the straight trails via composited transforms; coordinates
   are SVG user units (593,152)→(376,298) and (607,152)→(824,298) */
.pulse-a { animation: pulse-a 2.6s linear -0.6s infinite; }
.pulse-b { animation: pulse-b 3.4s linear -2.2s infinite; }
@keyframes pulse-a {
  from { transform: translate(593px, 152px); }
  to   { transform: translate(376px, 298px); }
}
@keyframes pulse-b {
  from { transform: translate(607px, 152px); }
  to   { transform: translate(824px, 298px); }
}
@media (prefers-reduced-motion: reduce) { .pulse { display: none; } }

/* ============ LIVE WIDGET ============ */
.widget {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(10, 13, 20, .82);
  padding: 22px 22px 18px;
}
.widget-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--muted);
}
.widget-head .live { color: var(--magenta); }

.chart {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  height: 230px;
  position: relative;
  margin-top: 30px;
  padding-top: 14px;
}
.chart .ceiling {
  position: absolute;
  top: 14px; left: 0; right: 0;
  border-top: 2px dashed var(--amber);
}
.chart .ceiling em {
  position: absolute;
  right: 0; top: -20px;
  font-style: normal;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--amber);
}
.bar { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; height: 100%; min-width: 0; }
.bar .head {
  background: linear-gradient(to bottom, rgba(34,230,255,.32), rgba(34,230,255,.04));
  border-bottom: 0;
}
.bar .req { background: var(--cyan); box-shadow: 0 0 16px rgba(34,230,255,.4); }
@media (prefers-reduced-motion: no-preference) {
  .bar .head, .bar .req { transition: height .45s cubic-bezier(.2, .8, .25, 1); }
}
.bar .tag {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--faint);
  text-align: center;
  margin-top: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bar .tag b { color: var(--body); font-weight: 400; }

.widget-controls {
  margin-top: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.pod-btn {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 1.5px;
  color: var(--cyan);
  background: none;
  border: 1px solid rgba(34, 230, 255, .45);
  border-radius: 6px;
  padding: 7px 16px;
  cursor: pointer;
}
.pod-btn:hover:not(:disabled) {
  background: rgba(34, 230, 255, .1);
  border-color: var(--cyan);
}
.pod-btn:disabled {
  color: var(--faint);
  border-color: var(--line);
  cursor: not-allowed;
}
.ctrl-hint {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 1px;
  color: var(--faint);
}
.ctrl-hint.full { color: var(--amber); }
.readouts {
  display: flex;
  gap: 20px;
  margin-top: 12px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 1px;
  color: var(--muted);
  flex-wrap: wrap;
}
.readouts b { color: var(--cyan); font-weight: 400; }
.readouts .amberv { color: var(--amber); }
.widget-note {
  margin-top: 14px;
  font-size: 12px;
  color: var(--faint);
  line-height: 1.5;
}

/* ============ PILLARS ============ */
.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 8px;
}
@media (max-width: 800px) { .pillars { grid-template-columns: 1fr; } }
.pillar {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--ground-2);
  padding: 22px;
}
.pillar h3 {
  font-family: var(--display);
  color: var(--text);
  font-size: 17px;
  margin: 0 0 8px;
  letter-spacing: .3px;
}
.pillar p { margin: 0; font-size: 14.5px; color: var(--muted); }
.pillar .accent { display: block; width: 34px; height: 3px; margin-bottom: 16px; }

/* ============ FIT (should you run it) ============ */
.fit-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 8px;
}
@media (max-width: 800px) { .fit-cols { grid-template-columns: 1fr; } }
.fit-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 24px;
  background: var(--ground-2);
}
.fit-card h3 {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 2.5px;
  margin: 0 0 14px;
}
.fit-card.yes h3 { color: var(--cyan); }
.fit-card.no h3 { color: var(--magenta); }
.fit-card ul { margin: 0; padding-left: 18px; }
.fit-card li { margin-bottom: 10px; font-size: 14.5px; color: var(--body); }
.fit-card li::marker { color: var(--faint); }
.fit-foot { margin-top: 20px; font-size: 14px; color: var(--muted); max-width: 72ch; }

/* ============ HOW IT WORKS ============ */
.how { background: var(--ground-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.formula {
  font-family: var(--mono);
  font-size: clamp(12px, 2vw, 15px);
  color: var(--text);
  background: var(--ground);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 22px 26px;
  margin: 26px 0;
  overflow-x: auto;
  white-space: pre;
  line-height: 1.9;
}
.formula .c { color: var(--cyan); }
.formula .a { color: var(--amber); }
.formula .m { color: var(--faint); }
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  counter-reset: step;
}
@media (max-width: 800px) { .steps { grid-template-columns: 1fr; } }
.step {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 20px;
  background: var(--ground);
}
.step::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--magenta);
}
.step h3 { font-family: var(--display); color: var(--text); font-size: 15.5px; margin: 8px 0 6px; }
.step p { margin: 0; font-size: 14px; color: var(--muted); }

/* ============ STATUS ============ */
.status { padding-top: 0; }
.status .card {
  border: 1px solid rgba(255,210,63,.3);
  border-radius: 12px;
  padding: 28px;
  background: linear-gradient(to bottom, rgba(255,210,63,.05), transparent 60%), var(--ground-2);
}
.status .card h3 {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--mono);
  color: var(--amber);
  font-size: 13px;
  letter-spacing: 3px;
  margin: 0 0 14px;
}
.status .card p { margin: 0 0 10px; font-size: 15px; max-width: 75ch; }
.status .card p:last-child { margin: 0; }

/* ============ FOOTER ============ */
footer {
  border-top: 1px solid var(--line);
  padding: 44px 0 60px;
  font-size: 13.5px;
  color: var(--muted);
}
.foot-cols { display: flex; gap: 60px; flex-wrap: wrap; }
.foot-cols h4 {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--faint);
  margin: 0 0 12px;
  text-transform: uppercase;
}
.foot-cols ul { list-style: none; margin: 0; padding: 0; }
.foot-cols li { margin-bottom: 8px; }
.foot-cols a { color: var(--muted); }
.foot-cols a:hover { color: var(--cyan); }
.foot-sig {
  margin-top: 40px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 1.5px;
  color: var(--faint);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.foot-legal {
  margin-top: 12px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 1.5px;
  color: var(--faint);
}
.foot-legal a { color: var(--faint); }
.foot-legal a:hover { color: var(--cyan); }
.fx-note { cursor: help; position: relative; }
html.fx .fx-note { color: var(--cyan); }
.fx-note:hover::after,
.fx-note:focus-visible::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 10px);
  right: 0;
  width: min(320px, 80vw);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 13px;
  color: var(--body);
  font-size: 11.5px;
  letter-spacing: 0.3px;
  line-height: 1.55;
  text-transform: none;
  white-space: normal;
  z-index: 20;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .5);
}

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