.reuse-visuals .compact-intro {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-block: 42px;
  background:
    linear-gradient(90deg, rgba(10, 11, 14, 0.97), rgba(10, 11, 14, 0.76)),
    url("assets/section-relations-v1.webp") center / cover no-repeat;
}

.reuse-visuals .section-index {
  padding-top: 72px;
  background:
    linear-gradient(180deg, rgba(10, 11, 14, 0.76), var(--ink) 440px),
    url("assets/section-problem-v1.webp") top center / 100% auto no-repeat;
}

.reuse-visuals .boundary article:first-child {
  background:
    linear-gradient(90deg, rgba(23, 24, 29, 0.98), rgba(23, 24, 29, 0.86)),
    url("assets/section-boundary-v1.webp") center / cover no-repeat;
}

.function-colors {
  max-width: var(--max);
  margin: auto;
  padding: 54px clamp(18px, 4vw, 70px);
  border-bottom: 1px solid var(--line);
  background: #101115;
}

.function-colors header {
  display: grid;
  grid-template-columns: 0.48fr 1.12fr 1fr;
  gap: 28px;
  align-items: end;
  margin-bottom: 26px;
}

.function-colors header > * {
  margin: 0;
}
.function-colors h2 {
  font-size: clamp(30px, 4vw, 62px);
  line-height: 0.98;
}
.function-colors header > p:last-child,
.function-colors small {
  color: #aaa;
  line-height: 1.5;
}
.color-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.color-grid span {
  position: relative;
  padding: 18px 16px 18px 25px;
  border: 1px solid var(--line);
  background: #15161a;
}
.color-grid span::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 7px;
  background: var(--role);
}
.color-grid b,
.color-grid i {
  display: block;
}
.color-grid b {
  font-size: 12px;
  letter-spacing: 0.08em;
}
.color-grid i {
  margin-top: 7px;
  color: #aaa;
  font-size: 12px;
  font-style: normal;
}
.function-colors small {
  display: block;
  margin-top: 18px;
}
.geometry-rule {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 18px;
}
.geometry-rule b {
  display: block;
  color: #fff;
  font-size: 22px;
}
.geometry-rule i {
  display: block;
  margin-top: 4px;
  color: #999;
  font-size: 11px;
  line-height: 1.35;
  font-style: normal;
}
.geometry-rule > span {
  padding: 14px;
  border: 1px solid var(--line);
}
.observer-rule {
  display: grid;
  grid-template-columns: 0.7fr 1.3fr;
  gap: 18px;
  margin-top: 8px;
  padding: 18px;
  border: 1px solid var(--line);
  background: #0d0e12;
}
.observer-rule b {
  color: #f075aa;
  font-size: 13px;
  letter-spacing: 0.08em;
}
.observer-rule span {
  color: #aaa;
  font-size: 12px;
  line-height: 1.5;
}
.section-card {
  border-top: 4px solid var(--role, var(--accent));
}

@media (max-width: 600px) {
  .reuse-visuals .compact-intro {
    padding-block: 30px;
  }
  .reuse-visuals .section-index {
    padding-top: 48px;
  }
  .function-colors {
    padding: 38px 16px;
  }
  .function-colors header,
  .color-grid {
    grid-template-columns: 1fr;
  }
  .geometry-rule {
    grid-template-columns: 1fr 1fr;
  }
  .observer-rule {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) and (min-width: 601px) {
  .function-colors header {
    grid-template-columns: 1fr;
  }
  .color-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* V0.3 editorial composition */
.project-route {
  max-width: var(--max);
  margin: auto;
  padding: 64px clamp(18px, 4vw, 70px);
  border-bottom: 1px solid var(--line);
  background: #0d0e12;
}
.project-route header {
  display: grid;
  grid-template-columns: 0.48fr 1.52fr;
  gap: 28px;
  align-items: end;
  margin-bottom: 28px;
}
.project-route header > * {
  margin: 0;
}
.project-route h2 {
  font-size: clamp(34px, 4.8vw, 74px);
  line-height: 0.95;
  letter-spacing: -0.04em;
}
.route-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.route-grid a {
  min-height: 168px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: #121318;
  text-decoration: none;
  transition: background 0.25s;
}
.route-grid a:hover {
  background: #21101a;
}
.route-grid b {
  font-size: 13px;
  letter-spacing: 0.1em;
}
.route-grid span {
  color: #aaa;
  font-size: 12px;
  line-height: 1.45;
}

.section-grid {
  grid-template-columns: repeat(12, 1fr);
  grid-auto-flow: dense;
}
.section-card {
  grid-column: span 3;
}
.section-card:nth-child(1),
.section-card:nth-child(6),
.section-card:nth-child(11),
.section-card:nth-child(12) {
  grid-column: span 6;
}
.section-card:nth-child(1) {
  min-height: 560px;
}
.section-card:nth-child(6),
.section-card:nth-child(11),
.section-card:nth-child(12) {
  min-height: 460px;
}
.section-card:nth-child(12) > img {
  width: 58%;
  right: auto;
  object-position: 56% center !important;
}
.card-return-biome {
  position: absolute;
  z-index: 0;
  inset: 0 0 0 48%;
  background: url("assets/biocycle-team-universal-green-v2.webp") center / cover no-repeat;
  mask-image: linear-gradient(90deg, transparent, #000 24%);
}
.card-meta {
  position: absolute;
  z-index: 2;
  top: 15px;
  right: 15px;
  padding: 7px 9px;
  background: rgba(5, 5, 8, 0.72);
  border: 1px solid var(--line);
  font-size: 10px;
  letter-spacing: 0.12em;
}
.section-card:nth-child(1) .card-copy h3,
.section-card:nth-child(6) .card-copy h3,
.section-card:nth-child(11) .card-copy h3,
.section-card:nth-child(12) .card-copy h3 {
  font-size: clamp(30px, 3.4vw, 58px);
}

.gallery-heading {
  max-width: var(--max);
  margin: auto;
  padding: 52px clamp(18px, 5vw, 80px) 10px;
  display: grid;
  grid-template-columns: 0.45fr 1.55fr;
  gap: 30px;
  align-items: end;
}
.gallery-heading > * {
  margin: 0;
}
.gallery-heading h2 {
  font-size: clamp(31px, 4vw, 64px);
  line-height: 0.98;
  max-width: 1050px;
}
.chapter-position {
  position: absolute;
  z-index: 4;
  right: clamp(18px, 4vw, 64px);
  bottom: 36px;
  display: flex;
  align-items: end;
  gap: 10px;
  padding: 12px 15px;
  border: 1px solid var(--line);
  background: rgba(5, 5, 8, 0.75);
}
.chapter-position b {
  font-size: 34px;
  color: #f075aa;
  line-height: 0.8;
}
.chapter-position span {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #bbb;
}
.visual-gallery figcaption {
  display: flex;
  align-items: center;
  gap: 10px;
}
.visual-gallery figcaption b {
  color: #f075aa;
}
.chapter-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  margin: 0 clamp(18px, 5vw, 80px) 60px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--line);
}
.chapter-nav a {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 26px;
  background: var(--ink);
  text-decoration: none;
}
.chapter-nav a:last-child {
  text-align: right;
}
.chapter-nav span {
  color: #f075aa;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.chapter-nav b {
  font-size: clamp(20px, 2.4vw, 38px);
}

@media (max-width: 980px) {
  .project-route header,
  .gallery-heading {
    grid-template-columns: 1fr;
  }
  .route-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .section-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .section-card,
  .section-card:nth-child(n) {
    grid-column: span 1;
    min-height: 380px;
  }
  .section-card:nth-child(1),
  .section-card:nth-child(6),
  .section-card:nth-child(11),
  .section-card:nth-child(12) {
    grid-column: span 2;
  }
}

@media (max-width: 600px) {
  .project-route {
    padding: 42px 16px;
  }
  .route-grid {
    grid-template-columns: 1fr 1fr;
  }
  .route-grid a {
    min-height: 140px;
    padding: 16px;
  }
  .section-grid {
    grid-template-columns: 1fr;
  }
  .section-card,
  .section-card:nth-child(n) {
    grid-column: auto;
    min-height: 74vw;
  }
  .section-card:nth-child(1),
  .section-card:nth-child(6),
  .section-card:nth-child(11),
  .section-card:nth-child(12) {
    min-height: 98vw;
  }
  .section-card:nth-child(12) > img { width: 100%; }
  .card-return-biome { inset: 48% 0 0; mask-image: linear-gradient(180deg, transparent, #000 30%); }
  .gallery-heading {
    padding: 38px 18px 8px;
  }
  .chapter-position {
    left: 18px;
    right: auto;
    bottom: 24px;
  }
  .chapter-nav {
    grid-template-columns: 1fr;
    margin: 28px 18px;
  }
  .chapter-nav a:last-child {
    text-align: left;
  }
}

/* V0.4 luminous image layers and restrained parallax */
.project-route {
  background:
    linear-gradient(90deg, rgba(9, 10, 13, 0.88), rgba(9, 10, 13, 0.62)),
    url("assets/atlas/section-03-collage-v1.jpg") fixed center / cover no-repeat;
}
.function-colors {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(10, 11, 14, 0.9), rgba(10, 11, 14, 0.62)),
    url("assets/atlas/section-02-collage-v1.jpg") fixed center / cover no-repeat;
}
.function-colors .color-grid span,
.geometry-rule > span,
.observer-rule {
  background: rgba(12, 13, 17, 0.74);
  backdrop-filter: blur(6px);
}
.reuse-visuals .section-index {
  background:
    linear-gradient(180deg, rgba(10, 11, 14, 0.6), rgba(10, 11, 14, 0.92)),
    url("assets/atlas/section-08-collage-v1.jpg") fixed center / cover no-repeat;
}
.detail-intro {
  max-width: none;
  padding-inline: max(
    clamp(18px, 5vw, 80px),
    calc((100vw - var(--max)) / 2 + 80px)
  );
  background:
    linear-gradient(90deg, rgba(10, 11, 14, 0.91), rgba(10, 11, 14, 0.6)),
    var(--chapter-bg) fixed center / cover no-repeat;
}
.detail-intro > * {
  position: relative;
  z-index: 1;
}
.gallery-heading {
  max-width: none;
  padding-inline: max(
    clamp(18px, 5vw, 80px),
    calc((100vw - var(--max)) / 2 + 80px)
  );
  background:
    linear-gradient(90deg, rgba(10, 11, 14, 0.84), rgba(10, 11, 14, 0.45)),
    var(--chapter-bg) fixed center 38% / cover no-repeat;
}
.visual-atlas {
  padding: 68px clamp(18px, 4vw, 70px);
  overflow: hidden;
  background: #08090c;
}
.visual-atlas header {
  max-width: var(--max);
  margin: 0 auto 28px;
  display: grid;
  grid-template-columns: 0.42fr 1fr 0.72fr;
  gap: 28px;
  align-items: end;
}
.visual-atlas header > * {
  margin: 0;
}
.visual-atlas h2 {
  font-size: clamp(34px, 4.6vw, 72px);
  line-height: 0.95;
  letter-spacing: -0.04em;
}
.visual-atlas header > p:last-child {
  color: #c8c4be;
  line-height: 1.5;
}
.atlas-track {
  max-width: var(--max);
  margin: auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-flow: dense;
  grid-auto-rows: clamp(210px, 20vw, 330px);
  gap: 8px;
}
.atlas-track figure {
  position: relative;
  margin: 0;
  overflow: hidden;
  grid-column: span 1;
  background: #111;
}
.atlas-track figure:nth-child(1),
.atlas-track figure:nth-child(6),
.atlas-track figure:nth-child(13) {
  grid-column: span 2;
}
.atlas-track img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.2) contrast(1.04);
  transition: transform 0.7s ease;
}
.atlas-track figure:hover img {
  transform: scale(1.035);
}
.atlas-track figure::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(3, 4, 7, 0.76), transparent 58%);
}
.atlas-track figcaption {
  position: absolute;
  z-index: 2;
  left: 14px;
  right: 14px;
  bottom: 12px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

@media (max-width: 980px) {
  .visual-atlas header {
    grid-template-columns: 1fr;
  }
  .atlas-track {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 260px;
  }
  .atlas-track figure,
  .atlas-track figure:nth-child(n) {
    grid-column: span 1;
    grid-row: span 1;
  }
  .atlas-track figure:nth-child(1) {
    grid-column: span 2;
  }
}
@media (max-width: 760px), (prefers-reduced-motion: reduce) {
  .project-route,
  .function-colors,
  .reuse-visuals .section-index,
  .detail-intro,
  .gallery-heading {
    background-attachment: scroll;
  }
}
@media (max-width: 600px) {
  .visual-atlas {
    padding: 44px 10px;
  }
  .visual-atlas header {
    padding-inline: 8px;
  }
  .atlas-track {
    grid-template-columns: 1fr;
    grid-auto-rows: 62vw;
  }
  .atlas-track figure,
  .atlas-track figure:nth-child(n) {
    grid-column: auto;
  }
}

/* V0.5 image windows inside graphite cells */
.route-grid a {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: rgba(12, 13, 17, 0.82);
}
.route-grid a::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0 0 0 42%;
  background:
    linear-gradient(90deg, rgba(12, 13, 17, 0.97), rgba(12, 13, 17, 0.12)),
    var(--thumb) center/cover no-repeat;
  filter: saturate(1.25);
  transition: transform 0.45s ease;
}
.route-grid a > * {
  position: relative;
  z-index: 1;
}
.route-grid a:hover::before {
  transform: scale(1.035);
}
.color-grid span,
.geometry-rule > span,
.principles span {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.color-grid span::after,
.geometry-rule > span::after,
.principles span::after {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0 0 0 56%;
  background:
    linear-gradient(90deg, rgba(12, 13, 17, 0.96), rgba(12, 13, 17, 0.15)),
    var(--thumb) center/cover no-repeat;
  filter: saturate(1.25) contrast(1.04);
}
.color-grid span > *,
.geometry-rule > span > *,
.principles span > * {
  position: relative;
  z-index: 1;
}
.principles span::after {
  z-index: 0;
}
.color-grid span {
  min-height: 94px;
  padding-right: 44%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.geometry-rule > span {
  min-height: 108px;
  padding-right: 42%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.observer-rule {
  background:
    linear-gradient(
      90deg,
      rgba(12, 13, 17, 0.94),
      rgba(12, 13, 17, 0.7) 60%,
      rgba(12, 13, 17, 0.12)
    ),
    url("assets/engineering-team-universal-blue-v2.webp") right 44% / 44% auto
      no-repeat;
}
.principles span {
  min-height: 88px;
  padding-right: 38%;
  display: flex;
  align-items: flex-end;
  background: rgba(12, 13, 17, 0.78);
}
.principles span::after {
  inset: 0 0 0 58%;
}

@media (max-width: 600px) {
  .route-grid a::before {
    inset: 0 0 0 54%;
  }
  .color-grid span {
    min-height: 106px;
  }
  .geometry-rule > span {
    min-height: 118px;
    padding-right: 34%;
  }
  .color-grid span::after,
  .geometry-rule > span::after {
    inset: 0 0 0 62%;
  }
  .observer-rule {
    background-size: auto 100%;
  }
}

/* V0.6 six panoramas immediately after chapter opening */
.detail-hero {
  min-height: 62svh;
}
.immediate-visuals {
  background: #07080b;
  border-bottom: 1px solid var(--line);
}
.immediate-visuals header {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
  padding: 24px clamp(18px, 3vw, 48px) 16px;
}
.immediate-visuals header > * {
  margin: 0;
}
.immediate-visuals h2 {
  font-size: clamp(26px, 3vw, 48px);
  line-height: 0.95;
}
.immediate-visuals .visual-gallery {
  max-width: none;
  padding: 0 8px 10px;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  grid-auto-rows: clamp(190px, 18vw, 310px);
  gap: 6px;
}
.immediate-visuals .visual-gallery figure:nth-child(n) {
  grid-column: auto;
}
.immediate-visuals .visual-gallery figure:first-child {
  grid-column: span 2;
}
.immediate-visuals .visual-gallery figure:last-child {
  grid-column: span 2;
}
.immediate-visuals .visual-gallery figcaption {
  left: 8px;
  right: 8px;
  bottom: 8px;
  padding: 7px 8px;
  background: rgba(4, 5, 8, 0.76);
}
.immediate-visuals + .detail-intro {
  margin-top: 0;
}

@media (max-width: 980px) {
  .immediate-visuals .visual-gallery {
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 250px;
  }
  .immediate-visuals .visual-gallery figure:first-child,
  .immediate-visuals .visual-gallery figure:last-child {
    grid-column: auto;
  }
}
@media (max-width: 600px) {
  .detail-hero {
    min-height: 72svh;
  }
  .immediate-visuals header {
    padding: 20px 16px 14px;
  }
  .immediate-visuals .visual-gallery {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 0 8px 10px;
    gap: 6px;
  }
  .immediate-visuals .visual-gallery figure:nth-child(n) {
    flex: 0 0 84vw;
    height: 58vw;
    scroll-snap-align: center;
  }
}

/* V0.7 continuous image-to-image depth */
.depth-sequence {
  background: #07080a;
}
.depth-sequence article {
  position: relative;
  min-height: 56svh;
  display: flex;
  align-items: flex-end;
  padding: clamp(28px, 6vw, 92px);
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(4, 5, 8, 0.86), rgba(4, 5, 8, 0.18) 64%),
    linear-gradient(0deg, rgba(4, 5, 8, 0.88), transparent 54%),
    var(--depth-image) fixed center / cover no-repeat;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.depth-sequence article:nth-child(even) {
  justify-content: flex-end;
  text-align: right;
  background-position: center 42%;
}
.depth-sequence article > div {
  position: relative;
  z-index: 1;
  max-width: 720px;
}
.depth-sequence small {
  color: #f075aa;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
}
.depth-sequence h2 {
  margin: 10px 0 8px;
  font-size: clamp(38px, 6vw, 92px);
  line-height: 0.9;
  letter-spacing: -0.045em;
}
.depth-sequence p {
  margin: 0;
  color: #d2cfca;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.chapter-nav a {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: rgba(8, 9, 12, 0.82);
}
.chapter-nav a::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  opacity: 0.34;
  background: var(--chapter-bg) center/cover no-repeat;
  filter: saturate(1.2);
}
.chapter-nav a:first-child::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(8, 9, 12, 0.45),
    rgba(8, 9, 12, 0.94)
  );
}
.chapter-nav a:last-child::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(8, 9, 12, 0.94),
    rgba(8, 9, 12, 0.45)
  );
}

@media (max-width: 760px), (prefers-reduced-motion: reduce) {
  .depth-sequence article {
    background-attachment: scroll;
  }
}
@media (max-width: 600px) {
  .depth-sequence article {
    min-height: 68svh;
    padding: 32px 18px;
  }
  .depth-sequence article:nth-child(even) {
    justify-content: flex-start;
    text-align: left;
  }
}
