body.homePage {
  --telemetry-surface-tint-top: rgba(255,255,255,0.44);
  --telemetry-surface-tint-mid: rgba(255,255,255,0.26);
  --telemetry-surface-tint-bot: rgba(255,255,255,0.10);
  --telemetry-grid-opacity: 0.9;
  --telemetry-grain-p0: 0.008;
  --telemetry-grain-p25: 0.012;
  --telemetry-grain-p50: 0.009;
  --telemetry-grain-p75: 0.011;
  --telemetry-grain-p100: 0.008;
  --telemetry-scan-opacity: 0.07;
  --telemetry-scan-opacity-mid: 0.042;
  --telemetry-scan-duration: 36s;
  --telemetry-grain-duration: 38s;
  --telemetry-accent-scan: rgba(182,149,78,0.22);

  --telemetry-dust-opacity-min: 0.08;
  --telemetry-dust-opacity-max: 0.22;
  --telemetry-dust-duration: 12s;
  --telemetry-haze-opacity-min: 0.20;
  --telemetry-haze-opacity-max: 0.46;
  --telemetry-haze-duration: 9s;
}

.telemetry-hero {
  position: relative;
  overflow: hidden;
  width: 100%;
  min-height: 580px;
  background: var(--surface-0);
}

.telemetry-hero::before,
.telemetry-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.telemetry-hero::before {
  z-index: 1;
  background:
    linear-gradient(
      to top,
      rgba(31,35,38,0.10) 0%,
      rgba(31,35,38,0.00) 28%
    ),
    linear-gradient(
      to bottom,
      rgba(255,255,255,0.90) 0%,
      rgba(255,255,255,0.78) 28%,
      rgba(255,255,255,0.42) 58%,
      rgba(255,255,255,0.12) 100%
    );
}

body.homePage .telemetry-hero::before {
  background:
    linear-gradient(
      to top,
      rgba(31,35,38,0.07) 0%,
      rgba(31,35,38,0.00) 44%
    ),
    linear-gradient(
      to bottom,
      var(--telemetry-surface-tint-top) 0%,
      var(--telemetry-surface-tint-mid) 34%,
      var(--telemetry-surface-tint-bot) 68%,
      rgba(255,255,255,0.00) 92%
    ),
    linear-gradient(
      to bottom,
      rgba(31,35,38,0.00) 62%,
      rgba(31,35,38,0.03) 84%,
      rgba(31,35,38,0.06) 100%
    );
}

.telemetry-hero::after {
  content: "";
  position: absolute;
  inset: -12%;
  z-index: 4;
  background-image: url("/assets/bg/noise-256.png");
  background-size: 320px 320px;
  background-repeat: repeat;
  opacity: 0.018;
  mix-blend-mode: multiply;
  will-change: auto;
  animation: none;
}

.telemetry-surface {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.telemetry-surface::before,
.telemetry-surface::after {
  content: "";
  position: absolute;
  inset: -18%;
  pointer-events: none;
  transform: translate3d(0, 0, 0);
}

.telemetry-surface::before {
  background:
    radial-gradient(980px 340px at 52% 72%, rgba(246,244,239,0.26) 0%, rgba(246,244,239,0.16) 38%, rgba(246,244,239,0) 70%),
    radial-gradient(560px 260px at 38% 74%, rgba(232,228,218,0.18) 0%, rgba(232,228,218,0) 70%),
    radial-gradient(620px 280px at 66% 78%, rgba(235,232,224,0.14) 0%, rgba(235,232,224,0) 72%),
    linear-gradient(to top, rgba(244,244,242,0.12) 0%, rgba(244,244,242,0) 56%);
  opacity: var(--telemetry-haze-opacity-min);
  filter: blur(16px);
  mix-blend-mode: screen;
  z-index: 2;
  mask-image: linear-gradient(to top, black 0 28%, rgba(0,0,0,0.88) 40%, transparent 72%);
  -webkit-mask-image: linear-gradient(to top, black 0 28%, rgba(0,0,0,0.88) 40%, transparent 72%);
  will-change: opacity, transform;
}

@media (prefers-reduced-motion: no-preference) {
  .telemetry-surface::before {
    animation: telemetryHazeBreath var(--telemetry-haze-duration) ease-in-out infinite;
  }
}

.telemetry-surface::after {
  background-image: url("/assets/bg/noise-256.png");
  background-size: 224px 224px;
  background-repeat: repeat;
  opacity: var(--telemetry-dust-opacity-min);
  mix-blend-mode: multiply;
  z-index: 1;
  mask-image: linear-gradient(to top, black 0 26%, rgba(0,0,0,0.92) 36%, transparent 68%);
  -webkit-mask-image: linear-gradient(to top, black 0 26%, rgba(0,0,0,0.92) 36%, transparent 68%);
  will-change: background-position, opacity;
}

@media (prefers-reduced-motion: no-preference) {
  .telemetry-surface::after {
    animation: telemetryDustDrift var(--telemetry-dust-duration) linear infinite;
  }
}

.telemetry-surface img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 88%;
  filter: saturate(0.88) contrast(1.08) brightness(0.99);
  position: relative;
  z-index: 0;
}

.telemetry-grid {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.telemetry-grid::before {
  content: "";
  position: absolute;
  inset: -20%;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(95,88,70,.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(95,88,70,.04) 1px, transparent 1px),
    linear-gradient(to right, rgba(95,88,70,.018) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(95,88,70,.018) 1px, transparent 1px);
  background-size:
    96px 96px, 96px 96px,
    24px 24px, 24px 24px;
  background-position:
    0 0, 0 0,
    12px 8px, 12px 8px;
  opacity: var(--telemetry-grid-opacity);
  mix-blend-mode: multiply;
  mask-image: radial-gradient(1200px 720px at 30% 25%, black 34%, rgba(0,0,0,.82) 72%, transparent 96%);
  -webkit-mask-image: radial-gradient(1200px 720px at 30% 25%, black 34%, rgba(0,0,0,.82) 72%, transparent 96%);
  animation: none;
  transform: translate3d(0, 0, 0);
}

.telemetry-markers {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}

.telemetry-markers::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(97,90,71,.20), rgba(97,90,71,.20)) 18% 26% / 16px 1px no-repeat,
    linear-gradient(rgba(97,90,71,.20), rgba(97,90,71,.20)) 18% 26% / 1px 16px no-repeat,
    linear-gradient(rgba(97,90,71,.16), rgba(97,90,71,.16)) 74% 61% / 14px 1px no-repeat,
    linear-gradient(rgba(97,90,71,.16), rgba(97,90,71,.16)) 74% 61% / 1px 14px no-repeat,
    radial-gradient(circle at 18% 26%, rgba(182,149,78,.34) 0 1px, transparent 2px),
    radial-gradient(circle at 74% 61%, rgba(182,149,78,.26) 0 1px, transparent 2px),
    radial-gradient(circle at 61% 18%, rgba(182,149,78,.18) 0 1px, transparent 2px);
  opacity: 0.32;
  mix-blend-mode: multiply;
}

.markerLabel {
  position: absolute;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(95,88,70,0.14);
  text-shadow: 0 1px 0 rgba(255,255,255,0.28);
  mix-blend-mode: multiply;
}

.markerLabelA {
  left: 19%;
  top: 28.4%;
}

.markerLabelB {
  left: 72%;
  top: 63%;
}

.telemetry-scan {
  position: absolute;
  inset: -20%;
  z-index: 5;
  opacity: 1;
  pointer-events: none;
}

.telemetry-scan::before {
  content: "";
  position: absolute;
  left: -20%;
  right: -20%;
  top: 0;
  height: 28%;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0) 0%,
    rgba(31,35,38,0.06) 40%,
    var(--telemetry-accent-scan) 50%,
    rgba(31,35,38,0.05) 60%,
    rgba(0,0,0,0) 100%
  );
  filter: blur(9px);
  mix-blend-mode: multiply;
  opacity: 0;
  will-change: transform, opacity;
  animation: telemetryScan var(--telemetry-scan-duration) ease-in-out infinite;
}

.telemetry-content {
  position: relative;
  z-index: 6;
  max-width: var(--max);
  margin: 0 auto;
  padding: var(--space-xl) var(--pad) var(--space-xxl);
}

.heroIndex {
  position: absolute;
  top: 18px;
  left: 0;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: rgba(31,35,38,0.22);
  text-transform: uppercase;
  pointer-events: none;
  text-shadow: 0 1px 0 rgba(255,255,255,0.35);
  mix-blend-mode: multiply;
}

body.homePage .telemetry-hero .heroIndexPart { opacity: 0.6; }

body.homePage .telemetry-hero .heroText {
  padding-top: 4px;
}

body.homePage .telemetry-hero .heroText h1 {
  font-size: clamp(44px, 5.2vw, 74px);
  line-height: 1.03;
  letter-spacing: -0.028em;
  max-width: 19ch;
  margin-bottom: 20px;
}

body.homePage .telemetry-hero .heroText .sub {
  margin-bottom: 0;
  max-width: 58ch;
  color: rgba(31,35,38,0.88);
  font-size: 18px;
  line-height: 1.58;
}

body.homePage .telemetry-hero .snapshotWrap {
  position: relative;
  padding: 0;
  width: min(100%, 390px);
  justify-self: end;
  align-self: start;
  margin-top: 10px;
}

body.homePage .telemetry-hero .snapshotRule {
  height: 2px;
  border-radius: 2px;
  margin-bottom: 16px;
  background: rgba(31,35,38,0.24);
}

body.homePage .telemetry-hero .snapshot {
  border: 1px solid rgba(31,35,38,0.14);
  border-radius: 14px;
  background: rgba(255,255,255,0.56);
  box-shadow: 0 8px 24px rgba(31,35,38,0.12);
  backdrop-filter: blur(6px);
  overflow: hidden;
}

body.homePage .telemetry-hero .snapshotHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 18px 12px;
  border-bottom: 1px solid rgba(31,35,38,0.10);
}

body.homePage .telemetry-hero .snapshotTitle {
  margin: 0;
  font-size: 11px;
  font-family: var(--mono);
  letter-spacing: 0.16em;
  font-weight: 600;
  color: rgba(31,35,38,0.64);
  text-transform: uppercase;
}

body.homePage .telemetry-hero .snapshotDot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(31,35,38,0.28);
  box-shadow: 0 0 0 4px rgba(31,35,38,0.08);
}

body.homePage .telemetry-hero .snapshotRows {
  display: grid;
  gap: 0;
}

body.homePage .telemetry-hero .snapshotRow {
  display: grid;
  grid-template-columns: minmax(108px, 36%) 1fr;
  align-items: start;
  gap: 14px;
  padding: 11px 18px;
  border-bottom: 1px solid rgba(31,35,38,0.08);
}

body.homePage .telemetry-hero .snapshotRow:last-child {
  border-bottom: none;
}

body.homePage .telemetry-hero .snapshotKey {
  font-family: var(--mono);
  font-size: 11px;
  color: rgba(31,35,38,0.60);
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

body.homePage .telemetry-hero .snapshotValue {
  display: block;
  margin: 0;
  font-size: 12px;
  font-family: var(--mono);
  color: var(--text);
  line-height: 1.45;
}

body.homePage .telemetry-hero .snapshotSignal {
  color: #7a7640;
}

@media (max-width: 880px) {
  .heroIndex { display: none; }

  body.homePage .telemetry-hero .heroText h1 {
    font-size: clamp(38px, 9.2vw, 56px);
  }

  body.homePage .telemetry-hero .snapshotWrap {
    width: 100%;
    margin-top: 10px;
  }

  body.homePage .telemetry-hero .snapshotRule {
    width: 70%;
  }
}

@media (max-width: 520px) {
  body.homePage .telemetry-hero .snapshot {
    backdrop-filter: none;
  }

  body.homePage .telemetry-hero .snapshotRow {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

@keyframes telemetryScan {
  0% { transform: translate3d(0,-30%,0); opacity: 0; }
  10% { opacity: var(--telemetry-scan-opacity); }
  40% { opacity: var(--telemetry-scan-opacity-mid); }
  55% { opacity: 0; }
  100% { transform: translate3d(0,130%,0); opacity: 0; }
}

@keyframes telemetryDustDrift {
  0% {
    background-position: 0 0;
    opacity: var(--telemetry-dust-opacity-min);
  }
  50% {
    opacity: var(--telemetry-dust-opacity-max);
  }
  100% {
    background-position: 140px -32px;
    opacity: var(--telemetry-dust-opacity-min);
  }
}

@keyframes telemetryHazeBreath {
  0%,
  100% {
    opacity: var(--telemetry-haze-opacity-min);
    transform: translate3d(0, 0, 0);
  }
  50% {
    opacity: var(--telemetry-haze-opacity-max);
    transform: translate3d(0, -8px, 0);
  }
}

@keyframes telemetryGrainPulse {
  0% { opacity: var(--telemetry-grain-p0); }
  25% { opacity: var(--telemetry-grain-p25); }
  50% { opacity: var(--telemetry-grain-p50); }
  75% { opacity: var(--telemetry-grain-p75); }
  100% { opacity: var(--telemetry-grain-p100); }
}

html[data-motion="off"] .telemetry-grid,
html[data-motion="off"] .telemetry-hero::after,
html[data-motion="off"] .telemetry-scan::before,
html[data-motion="off"] .telemetry-surface::before,
html[data-motion="off"] .telemetry-surface::after {
  animation: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .telemetry-grid,
  .telemetry-hero::after,
  .telemetry-scan::before,
  .telemetry-surface::before,
  .telemetry-surface::after {
    animation: none !important;
  }
}

html[data-motion="force"] .telemetry-grid {
  animation: none !important;
}
html[data-motion="force"] .telemetry-hero::after {
  animation: telemetryGrainPulse 18s ease-in-out infinite !important;
}
html[data-motion="force"] .telemetry-scan::before {
  animation: telemetryScan var(--telemetry-scan-duration) ease-in-out infinite !important;
}

html[data-motion="debug"] {
  --telemetry-grid-opacity: 1;
  --telemetry-grain-p0: 0.06;
  --telemetry-grain-p25: 0.12;
  --telemetry-grain-p50: 0.07;
  --telemetry-grain-p75: 0.11;
  --telemetry-grain-p100: 0.06;
  --telemetry-scan-opacity: 0.22;
  --telemetry-scan-opacity-mid: 0.16;
  --telemetry-scan-duration: 6s;
  --telemetry-accent-scan: rgba(182,149,78,0.70);

  --telemetry-dust-opacity-min: 0.18;
  --telemetry-dust-opacity-max: 0.32;
  --telemetry-dust-duration: 4.5s;
  --telemetry-haze-opacity-min: 0.26;
  --telemetry-haze-opacity-max: 0.56;
  --telemetry-haze-duration: 3.6s;
}

html[data-motion="debug"] .telemetry-grid {
  animation: none !important;
}
html[data-motion="debug"] .telemetry-hero::after {
  animation: telemetryGrainPulse 3.2s ease-in-out infinite !important;
}
html[data-motion="debug"] .telemetry-scan::before {
  animation: telemetryScan var(--telemetry-scan-duration) ease-in-out infinite !important;
}

html[data-motion="debug"] .telemetry-scan::before {
  filter: blur(8px);
}

/* ============================
   TELEMETRY VISIBILITY PATCH
   - Adds grid pulse (it was disabled)
   - Increases scan legibility
   - Makes horizon fog readable across brighter images
   ============================ */

/* 1) Make grid actually animate (it was `animation: none;`) */
@keyframes telemetryGridPulse {
  0%, 100% {
    opacity: calc(var(--telemetry-grid-opacity) * 0.55);
    transform: translate3d(0,0,0);
    filter: blur(0px);
  }
  50% {
    opacity: var(--telemetry-grid-opacity);
    transform: translate3d(0,-1px,0);
    filter: blur(0.15px);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .telemetry-grid::before {
    /* keep the grid subtle but alive */
    animation: telemetryGridPulse 9.5s ease-in-out infinite;
  }
}

/* 2) Make scan band easier to see
   - Increase contrast a bit
   - Widen band slightly
   - Use soft-light instead of multiply (multiply can vanish on light areas)
*/
body.homePage {
  /* small bump; tune back down after you confirm visibility */
  --telemetry-scan-opacity: 0.11;
  --telemetry-scan-opacity-mid: 0.075;
  --telemetry-accent-scan: rgba(182,149,78,0.34);
}

.telemetry-scan::before {
  height: 32%;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0) 0%,
    rgba(31,35,38,0.075) 38%,
    var(--telemetry-accent-scan) 50%,
    rgba(31,35,38,0.065) 62%,
    rgba(0,0,0,0) 100%
  );
  filter: blur(11px);
  mix-blend-mode: soft-light; /* more consistently visible than multiply */
}

/* 3) Horizon breathing fog that can’t “disappear” on bright pixels
   - Add a second fog layer that uses soft-light
   - Reduce mask aggressiveness so you can actually see the breath
*/
.telemetry-surface::before {
  /* keep your existing gradients, but add a darker haze layer at horizon */
  background:
    radial-gradient(980px 340px at 52% 72%, rgba(246,244,239,0.30) 0%, rgba(246,244,239,0.18) 38%, rgba(246,244,239,0) 70%),
    radial-gradient(560px 260px at 38% 74%, rgba(232,228,218,0.20) 0%, rgba(232,228,218,0) 70%),
    radial-gradient(620px 280px at 66% 78%, rgba(235,232,224,0.16) 0%, rgba(235,232,224,0) 72%),

    /* NEW: a subtle darker “breathing horizon” veil */
    radial-gradient(1200px 420px at 50% 88%, rgba(31,35,38,0.12) 0%, rgba(31,35,38,0.00) 55%),

    linear-gradient(to top, rgba(244,244,242,0.14) 0%, rgba(244,244,242,0) 56%);

  /* screen can vanish on bright images; soft-light holds up better */
  mix-blend-mode: soft-light;

  /* slightly less aggressive fade so it’s visible */
  mask-image: linear-gradient(to top, black 0 34%, rgba(0,0,0,0.92) 48%, transparent 78%);
  -webkit-mask-image: linear-gradient(to top, black 0 34%, rgba(0,0,0,0.92) 48%, transparent 78%);
}

/* Optional: if you still want the fog more present, bump these a notch */
body.homePage {
  --telemetry-haze-opacity-min: 0.26;
  --telemetry-haze-opacity-max: 0.56;
}

/* 4) Debug helper: show layer boundaries quickly (comment out after)
html[data-motion="debug"] .telemetry-grid { outline: 2px dashed rgba(200,60,40,.35); }
html[data-motion="debug"] .telemetry-scan { outline: 2px dashed rgba(140,140,40,.35); }
html[data-motion="debug"] .telemetry-surface { outline: 2px dashed rgba(40,120,160,.25); }
*/