/* TerraKK / RUINA / PCB Black Edition
   Reference canvas: 1440 x 900. Three static plates follow the original layout.
   No script, bitmap, animation, filter or extra stacking context on the sphere. */
.hero {
  --pcb-substrate: #010201;
  background: var(--pcb-substrate);
}

/* Upper bus: native geometry, centered with the existing 1300 px container. */
.hero::before {
  inset: 20px 0 auto;
  height: 100px;
  opacity: 1;
  z-index: -1;
  background: url('./pcb-top.svg') top center / 1440px 100px no-repeat;
  mask-image: linear-gradient(90deg, transparent calc(50% - 240px), #000 calc(50% - 210px));
}

/* Left rail: continuous lanes alongside the directory, cropped by the hero. */
.hero::after {
  inset: 30px auto auto max(-26px, calc((100% - 1440px) / 2));
  width: 64px;
  height: 830px;
  opacity: 1;
  background: url('./pcb-left.svg') top left / 64px 830px no-repeat;
}

/* The old raster/noise overlays belong to the previous substrate. */
.hero-grain { display: none; }

/* Tie the bay to the real sphere box: preserves alignment at every breakpoint.
   SVG clearance is wider than Terra's complete swept area, including the halo.
   Negative stacking places only the PCB behind the unmodified sphere and UI. */
.hero-art::before {
  content: '';
  position: absolute;
  inset: -8.333333% -20%;
  z-index: -1;
  pointer-events: none;
  background: url('./pcb-orbit.svg') center / 100% 100% no-repeat;
}

/* Solid substrate behind translucent existing panels prevents trace bleed.
   Original gradients, borders, typography, positions and dimensions are kept. */
.project-index {
  background: linear-gradient(135deg, #0b1111e0, #111b14d9), var(--pcb-substrate);
}
.orbit-readout { background: linear-gradient(#0a1110cf, #0a1110cf), var(--pcb-substrate); }

@media (max-width: 1000px) and (min-width: 901px) {
  .hero::after { left: -46px; }
}
@media (max-width: 900px) {
  .hero::before { height: 28px; background-position: 35% top; mask-image: linear-gradient(#000, transparent); opacity: .5; }
  .hero::after { display: none; }
  .hero-art::before { opacity: .8; }
}
@media (min-width: 1450px) {
  /* Fade exposed plate ends on wide monitors; native 1440 px crop stays crisp. */
  .hero::before {
    mask-image: linear-gradient(90deg, transparent calc(50% - 240px), #000 calc(50% - 210px), #000 calc(50% + 600px), transparent calc(50% + 720px));
  }
  .hero::after { mask-image: linear-gradient(#000 85%, transparent 100%); }
  .hero-art::before { mask-image: linear-gradient(90deg, #000 92%, transparent 100%); }
}
@media (max-width: 720px) {
  .hero::before { height: 30px; opacity: .4; }
  .hero-art::before { opacity: .65; }
}
