.hero-image-layer {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.hero-image-layer img,
.hero-image-layer video {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 58%;
}

.hero-image-layer::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2,5,11,.96) 0, rgba(2,5,11,.82) 34%, rgba(2,5,11,.24) 68%, rgba(2,5,11,.08)),
    linear-gradient(180deg, rgba(2,5,11,.12) 42%, rgba(2,5,11,.78) 100%);
}

.home-page .hero::before,
.home-page .hero::after { z-index: 4; }

.sector-visual {
  --visual-ratio: 16 / 9;
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(260px, .65fr);
  gap: 1px;
  margin: 0;
  padding: 0 7vw 88px;
  color: var(--contrast-text, #edf0e9);
  background: var(--contrast-bg, #07101e);
}

.sector-visual-life,
.sector-visual-dossier { --visual-ratio: 4 / 3; }

.sector-visual-frame {
  position: relative;
  min-height: 390px;
  aspect-ratio: var(--visual-ratio);
  overflow: hidden;
  border: 1px solid rgba(220,245,250,.2);
  background: #02050b;
}

.sector-visual-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 70px rgba(2,5,11,.42);
  pointer-events: none;
}

.sector-visual-frame img,
.sector-visual-frame video {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.sector-visual figcaption {
  display: flex;
  min-width: 0;
  padding: clamp(24px, 3vw, 46px);
  flex-direction: column;
  justify-content: flex-end;
  border: 1px solid rgba(220,245,250,.2);
  background: rgba(8,20,31,.94);
}

.sector-visual figcaption span {
  color: var(--acid, #c9ff6a);
  font: 10px/1.6 "DM Mono", monospace;
  letter-spacing: .18em;
}

.sector-visual figcaption p {
  margin: 22px 0 0;
  color: #e4edf0;
  font-size: clamp(14px, 1.2vw, 18px);
  line-height: 2;
}


.hero-image-layer img,
.sector-visual-frame img { z-index: 0; }

.ambient-video { z-index: 1; }

.hero-image-layer::after,
.sector-visual-frame::after { z-index: 2; }

@media (max-width: 800px) {
  .hero-image-layer img,
.hero-image-layer video { object-position: 64% center; }
  .hero-image-layer::after {
    background: linear-gradient(90deg, rgba(2,5,11,.94), rgba(2,5,11,.68) 72%, rgba(2,5,11,.38));
  }
  .sector-visual {
    grid-template-columns: 1fr;
    padding: 0 7vw 58px;
  }
  .sector-visual-frame { min-height: 0; aspect-ratio: var(--visual-ratio); }
  .sector-visual figcaption { padding: 24px; }
}

/* Chapter-scale visual notes used throughout the long-form content. */
.content-visual {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(220px, .55fr);
  gap: 1px;
  width: min(1180px, calc(100% - 48px));
  margin: clamp(32px, 6vw, 74px) auto;
  border: 1px solid rgba(214, 231, 244, .25);
  background: rgba(103, 239, 255, .2);
  color: #edf4f7;
}

.content-visual > div {
  position: relative;
  min-width: 0;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #02050b;
}

.content-visual > div::after {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 68px rgba(2, 5, 11, .34);
  pointer-events: none;
}

.content-visual img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .8s cubic-bezier(.2, .7, .2, 1), filter .4s ease;
}

.content-visual:hover img { transform: scale(1.025); filter: brightness(1.05); }

.content-visual figcaption {
  display: flex;
  min-width: 0;
  padding: clamp(22px, 3vw, 40px);
  flex-direction: column;
  justify-content: flex-end;
  background: #0b1928;
}

.content-visual figcaption span {
  color: var(--acid, #c9ff6a);
  font: 700 10px/1.6 "DM Mono", monospace;
  letter-spacing: .16em;
}

.content-visual figcaption p {
  margin: 18px 0 0;
  color: #e3edf2;
  font-size: clamp(14px, 1.15vw, 17px);
  font-weight: 600;
  line-height: 1.8;
}

.life-story-body > .content-visual,
.sector-depth-chapters > .content-visual {
  width: 100%;
}

.deep-dive-list > .content-visual { width: 100%; }

@media (max-width: 700px) {
  .content-visual {
    grid-template-columns: 1fr;
    width: min(100% - 30px, 1180px);
  }
  .content-visual figcaption { min-height: 120px; }
}

/* Photographic replacements for the original CSS-drawn sector diagrams. */
.chapter-visual img,
.diagram-image,
.system-card-visual img,
.build-stage-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.chapter-visual img {
  position: absolute;
  inset: 0;
  transition: transform .7s cubic-bezier(.2,.7,.2,1), filter .4s ease;
}

.chapter-card:hover .chapter-visual img {
  transform: scale(1.035);
  filter: brightness(1.08);
}

.chapter-visual i { display: none !important; }

.city-map > .diagram-image,
.cutaway-image > .diagram-image,
.route-image > .diagram-image {
  position: absolute;
  inset: 0;
}

.city-map::after,
.cutaway-image::after,
.route-image::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.city-map::after {
  z-index: 1;
  background: linear-gradient(180deg, rgba(2,5,11,.04), rgba(2,5,11,.3));
}

.city-map .map-label,
.city-map .map-legend {
  z-index: 2;
  padding: 7px 9px;
  color: #edf7f4;
  background: rgba(3,9,16,.76);
  backdrop-filter: blur(7px);
}

.city-map .map-legend {
  display: grid;
  grid-template-columns: auto auto;
}

.cutaway-image::after {
  z-index: 1;
  background: linear-gradient(180deg, rgba(2,5,11,.02) 38%, rgba(2,5,11,.72));
}

.cutaway-image .service,
.cutaway-image .cut-label {
  z-index: 2;
}

.cutaway-image .cut-label {
  padding: 6px 8px;
  background: rgba(3,9,16,.68);
  backdrop-filter: blur(6px);
}

.system-card::before {
  content: "";
  position: absolute;
  z-index: 2;
  inset: 0;
  background: linear-gradient(180deg, rgba(5,12,22,.88) 0%, rgba(5,12,22,.38) 42%, rgba(5,12,22,.92) 100%);
  pointer-events: none;
}

.system-card-visual {
  position: absolute;
  z-index: 1;
  inset: 0;
}

.system-card-visual img {
  transition: transform .7s cubic-bezier(.2,.7,.2,1), filter .4s ease;
}

.system-card:hover .system-card-visual img {
  transform: scale(1.045);
  filter: brightness(1.08);
}

.system-card > p,
.system-card > h3,
.system-card > small,
.system-card > b {
  position: relative;
  z-index: 3;
}

.system-card::after { z-index: 4; }

.route-image {
  height: clamp(320px, 42vw, 560px);
  border: 1px solid rgba(15,45,75,.24);
  background: #02050b;
}

.route-image::after {
  z-index: 1;
  background: linear-gradient(180deg, transparent 55%, rgba(2,5,11,.76));
}

.route-node {
  position: absolute;
  z-index: 2;
  padding: 8px 10px;
  border: 1px solid rgba(201,255,106,.7);
  color: #edf7f4;
  background: rgba(3,9,16,.78);
  font: 10px/1.5 "DM Mono", monospace;
  letter-spacing: .08em;
  text-align: center;
  backdrop-filter: blur(7px);
}

.route-earth { left: 3%; top: 12%; }
.route-orbital { left: 47%; top: 45%; transform: translate(-50%,-50%); }
.route-lunar { right: 3%; top: 12%; }
.route-image .route-note {
  z-index: 2;
  right: 18px;
  bottom: 16px;
  left: auto;
  padding: 7px 9px;
  color: #d7e6ee;
  background: rgba(3,9,16,.72);
}

.build-stage::after {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  background: linear-gradient(180deg, rgba(3,8,16,.78), rgba(3,8,16,.1) 48%, rgba(3,8,16,.62));
  pointer-events: none;
}

.build-stage-image {
  position: absolute;
  z-index: 0;
  inset: 0;
  transition: transform .7s cubic-bezier(.2,.7,.2,1), filter .4s ease;
}

.build-stage:hover .build-stage-image {
  transform: scale(1.045);
  filter: brightness(1.08);
}

.build-stage > b,
.build-stage > span {
  position: relative;
  z-index: 2;
  text-shadow: 0 2px 16px rgba(0,0,0,.7);
}

@media (max-width: 800px) {
  .route-image { height: 330px; }
  .route-earth { left: 10px; top: 10px; }
  .route-orbital { left: 50%; top: 46%; }
  .route-lunar { right: 10px; top: 10px; }
  .route-node { font-size: 8px; }
  .city-map .map-label { font-size: 8px; }
  .city-map .map-legend { right: 10px; bottom: 10px; font-size: 8px; }
}

