/* Chapter atlas: a compact, draggable index with reading panels. */
.index-intro-video {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 92px 22px 28px;
  background: #000;
}
.index-intro-video video {
  display: block;
  width: min(78vw, 980px);
  max-height: calc(100vh - 150px);
  object-fit: contain;
}
.saline-city-film-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: clamp(32px, 6vw, 96px) clamp(18px, 5vw, 78px);
  background: #050505;
}
.saline-city-film-page .salt-media { width: min(100%, 1280px); margin: 0; }
.saline-city-film-page video { display: block; width: 100%; max-height: min(78vh, 780px); background: #000; }

.chapter-atlas {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  padding: clamp(94px, 11vw, 150px) 22px 56px;
  border-top: 1px solid var(--line);
  background:
    linear-gradient(rgba(248,247,241,.075) 1px, transparent 1px),
    linear-gradient(90deg, rgba(248,247,241,.075) 1px, transparent 1px),
    #090909;
  background-size: 25% 25%, 25% 25%, auto;
}

.chapter-atlas-head { position: relative; z-index: 1; max-width: 760px; pointer-events: none; }
.chapter-atlas-kicker { margin: 0 0 12px; color: var(--accent); font-size: 12px; font-weight: 700; text-transform: uppercase; }
.chapter-atlas h3 { margin: 0; font-size: clamp(54px, 8vw, 122px); line-height: .82; letter-spacing: -.06em; }
.chapter-atlas-intro { max-width: 470px; margin: 24px 0 0; color: var(--muted); font-size: 16px; }

.chapter-atlas-canvas {
  position: absolute;
  inset: 0;
  min-height: 0;
  margin: 0;
  z-index: 2;
  pointer-events: none;
}
.chapter-link {
  position: absolute;
  z-index: 2;
  display: block;
  width: max-content;
  max-width: min(340px, calc(100vw - 44px));
  padding: 12px 15px;
  border: 1px solid rgba(248,247,241,.6);
  border-radius: 2px;
  background: rgba(9,9,9,.88);
  color: var(--ink);
  box-shadow: 7px 7px 0 rgba(168,199,185,.11);
  cursor: grab;
  touch-action: none;
  user-select: none;
  transition: background .16s ease, color .16s ease, box-shadow .16s ease;
  pointer-events: auto;
}
.chapter-link:hover, .chapter-link:focus-visible { background: var(--accent); color: #0a0a08; outline: 0; box-shadow: 10px 10px 0 rgba(248,247,241,.22); }
.chapter-link.is-dragging { cursor: grabbing; transition: none; box-shadow: 12px 12px 0 rgba(168,199,185,.42); }
.chapter-link-number {
  display: none;
  margin-right: 7px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: .04em;
}
.chapter-link-title {
  position: absolute;
  top: -18px;
  left: 50%;
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 4px);
  transition: opacity .16s ease, transform .16s ease, visibility 0s linear .16s;
}
.chapter-link:hover .chapter-link-title,
.chapter-link:focus-visible .chapter-link-title {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
  transition-delay: 0s;
}
.chapter-link:has(.chapter-link-icon) .chapter-link-icon { margin-top: 9px; }
.chapter-link-icon--flamingo {
  display: block;
  width: 172px;
  height: 104px;
  object-fit: contain;
  object-position: center;
  pointer-events: none;
}
.chapter-link-icon--salt-animation {
  display: block;
  width: 228px;
  height: 128px;
  object-fit: contain;
  object-position: center;
  pointer-events: none;
}
.chapter-link:has(.chapter-link-icon) {
  min-width: 204px;
  min-height: 142px;
  padding: 11px 15px;
  border: 0;
  background: transparent;
  box-shadow: none;
  transform-origin: center;
  transition: transform .18s ease;
}
.chapter-link:has(.chapter-link-icon):hover,
.chapter-link:has(.chapter-link-icon):focus-visible {
  background: transparent;
  color: var(--ink);
  box-shadow: none;
  transform: scale(1.07);
}
.chapter-link:has(.chapter-link-icon--salt-animation) { min-width: 260px; min-height: 164px; }
.chapter-link:has(.chapter-link-icon--salt-field) { min-width: 278px; min-height: 204px; }
.chapter-link-icon--salt-field { width: 260px; height: 176px; object-fit: contain; }
.chapter-link:has(.chapter-link-icon--salt-model) { min-width: 220px; min-height: 286px; }
.chapter-link-icon--salt-model { width: 202px; height: 256px; object-fit: contain; }
.chapter-link:has(.chapter-link-icon--helicopter) { min-width: 224px; min-height: 278px; }
.chapter-link-icon--helicopter { width: 206px; height: 248px; object-fit: contain; }
.chapter-link:has(.chapter-link-icon--crystal) { min-width: 218px; min-height: 194px; }
.chapter-link-icon--crystal { width: 200px; height: 170px; object-fit: contain; }
.chapter-link:has(.chapter-link-icon--wireform) { min-width: 278px; min-height: 190px; }
.chapter-link-icon--wireform { width: 260px; height: 164px; object-fit: contain; }
.chapter-link-icon { pointer-events: none; user-select: none; -webkit-user-drag: none; }
.chapter-panel-content .salt-helicopter-scene { min-height: 0 !important; padding: 28px clamp(22px, 5vw, 74px) 74px !important; color: #f3f2ec; background: #050505; }
.chapter-panel-content .salt-helicopter-scene > * { position: static !important; visibility: visible !important; opacity: 1 !important; transform: none !important; }
.fuller-intro { max-width: 900px; margin: 0 0 clamp(36px, 7vw, 94px); }
.fuller-kicker { margin: 0 0 14px; color: #bdc7ad; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.fuller-intro h3, .fuller-transition h3 { max-width: 800px; margin: 0; color: #f7f6ef; font-size: clamp(38px, 6.5vw, 84px); font-weight: 400; line-height: .95; letter-spacing: -.055em; }
.fuller-lead { max-width: 730px; margin: 28px 0 0; color: #d7d7cf; font-size: clamp(18px, 2vw, 27px); line-height: 1.2; }
.fuller-caption { margin: 16px 0 0; color: #90938d; font-size: 12px; line-height: 1.4; }
.fuller-reference-link { display: inline-block; margin-top: 30px; color: #eef1e8; border-bottom: 2px solid #bdc7ad; font-size: clamp(24px, 3.1vw, 42px); line-height: 1.05; letter-spacing: -.035em; text-decoration: none; }
.fuller-reference-link:hover { color: #bdc7ad; }
.fuller-image-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.fuller-image-grid figure, .fuller-principles figure, .fuller-transition figure { margin: 0; overflow: hidden; background: #151515; }
.fuller-image-grid img, .fuller-principles img, .fuller-transition img { display: block; width: 100%; height: 100%; object-fit: cover; }
.fuller-image-grid figure { aspect-ratio: 1.32; }
.fuller-principles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin-top: clamp(46px, 8vw, 110px); background: #303030; }
.fuller-principles article, .fuller-principles figure { min-height: 220px; padding: 22px; background: #090909; }
.fuller-principles article p { margin: 0 0 38px; color: #bdc7ad; font-size: 11px; }
.fuller-principles h4 { margin: 0; font-size: clamp(19px, 2.3vw, 30px); font-weight: 400; line-height: 1; }
.fuller-principles span, .fuller-principles figcaption { display: block; margin-top: 12px; color: #bbbdb6; font-size: 13px; line-height: 1.35; }
.fuller-principles figure { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(170px, 28%); min-height: 310px; padding: 0; }
.fuller-principles figure img { height: 310px; filter: grayscale(1) contrast(1.08); }
.fuller-principles figcaption { margin: 0; padding: 22px; background: #090909; }
.fuller-transition { display: grid; grid-template-columns: minmax(210px, .67fr) minmax(0, 1.33fr); gap: clamp(28px, 5vw, 70px); align-items: start; margin-top: clamp(64px, 10vw, 150px); }
.fuller-transition h3 { font-size: clamp(29px, 4.2vw, 54px); }
.fuller-transition > div > p:last-child { margin: 24px 0 0; color: #c9cac3; font-size: 16px; line-height: 1.45; }
.fuller-transition figure { aspect-ratio: 1.42; }
.fuller-transition img { object-fit: contain; }
.fuller-manifesto { margin-top: clamp(70px, 12vw, 170px); padding: clamp(28px, 5vw, 62px) 0 0; border-top: 1px solid #4a4a48; }
.fuller-manifesto p { margin: 0; color: #f2f2ed; font-size: clamp(25px, 4.7vw, 64px); font-weight: 400; line-height: 1.02; letter-spacing: -.045em; }
.fuller-manifesto p + p { margin-top: 8px; color: #b8b9b1; }
@media (max-width: 680px) { .fuller-image-grid, .fuller-transition { grid-template-columns: 1fr; } .fuller-principles { grid-template-columns: 1fr; } .fuller-principles figure { grid-template-columns: 1fr; } .fuller-principles figure img { height: auto; } }
.chapter-panel-content .salt-animation-scene { display: grid; min-height: 100%; place-items: center; padding: clamp(38px,7vw,100px) 28px; background: #050505; }
.salt-animation-scene img { display: block; width: min(100%, 720px); height: auto; }
.chapter-panel-content .salt-prototype-pages { min-height: 100%; padding: 0 !important; background: #000; }
.prototype-intro { padding: clamp(52px, 7vw, 108px) clamp(28px, 5vw, 80px) clamp(44px, 6vw, 84px); background: #000; color: #f0f0eb; }
.prototype-intro small { display: block; margin-bottom: 24px; color: #b7c2a9; font-size: 11px; letter-spacing: .08em; }
.prototype-intro h3 { margin: 0; font-size: clamp(42px, 6vw, 88px); font-weight: 400; line-height: .9; letter-spacing: -.045em; }
.prototype-field-intro { padding-bottom: clamp(36px, 5vw, 70px); }
.prototype-intro p { max-width: 620px; margin: 28px 0 0; color: #c1c3bb; font-size: clamp(16px, 1.7vw, 22px); line-height: 1.35; }
.prototype-page-list { display: grid; gap: 0; background: #000; }
.prototype-page-list figure { position: relative; margin: 0; overflow: hidden; background: #000; }
.prototype-page-list figure::after { content: ""; position: absolute; z-index: 1; top: 0; right: 0; width: 15%; height: 10%; background: #000; pointer-events: none; }
.prototype-page-list img { display: block; width: calc(100% + 2px); height: auto; margin: -1px; border: 0; }
.prototype-page-list .prototype-surface-film { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(220px, .75fr); gap: clamp(24px, 4vw, 64px); align-items: center; width: 100%; margin: 0; padding: clamp(40px, 6vw, 88px) clamp(28px, 5vw, 80px); background: #000; }
.prototype-page-list .prototype-surface-film video { display: block; width: 100%; height: auto; background: #000; }
.prototype-page-list .prototype-surface-film figcaption { margin: 0; padding: 0; }
@media (max-width: 680px) { .prototype-page-list .prototype-surface-film { grid-template-columns: 1fr; } }
#salt-process > .salt-media-list > figure.salt-media.right:nth-of-type(6) { display: none !important; }
/* Reading panels use spacing rather than rules: remove residual white seams
   inherited from the original long-form chapter layouts. */
.chapter-panel-content .salt-media,
.chapter-panel-content .salt-media > img,
.chapter-panel-content .salt-media figcaption,
.chapter-panel-content .v204-editorial-page,
.chapter-panel-content .v204-image-frame { border: 0 !important; outline: 0 !important; box-shadow: none !important; }
.chapter-panel-content .salt-growth-pages { min-height: 100%; padding: 0 !important; background: #050505; }
.salt-growth-pages figure { margin: 0; background: #050505; }
.salt-growth-pages img { display: block; width: 100%; height: auto; }
.growth-sequence-page { position: relative; min-height: 680px; display: grid; align-items: center; }
.growth-sequence-page > img { min-height: 680px; object-fit: cover; object-position: center; }
.growth-sequence-page figcaption { position: absolute; right: clamp(28px, 8vw, 130px); bottom: clamp(44px, 12vw, 150px); width: min(36%, 480px); color: #e8e8e3; }
.growth-sequence-page small, .growth-families-page small { display: block; margin-bottom: 24px; color: #b7c2a9; font-size: 11px; letter-spacing: .07em; }
.growth-sequence-page strong { display: block; margin-bottom: 26px; font-size: clamp(20px, 2.3vw, 32px); font-weight: 400; line-height: 1.1; }
.growth-sequence-page p, .growth-families-page p { margin: 0; color: #c1c3bb; font-size: clamp(15px, 1.6vw, 21px); line-height: 1.38; }
.growth-families-page { position: relative; padding-bottom: 76px; }
.growth-families-page figcaption { position: relative; margin-top: -38px; padding: 0 clamp(24px, 4vw, 68px); }
@media (max-width: 700px) { .growth-sequence-page, .growth-sequence-page > img { min-height: 460px; } .growth-sequence-page figcaption { position: relative; right: auto; bottom: auto; width: auto; padding: 30px 24px 44px; } }
.chapter-panel-content .salt-interactive-scene { min-height: calc(100vh - 64px); padding: 0 !important; background: #050505; }
.structural-explode-frame { display: block; width: 100%; min-height: calc(100vh - 64px); height: 900px; border: 0; background: #050505; }
.wireform-research-images { display: grid; gap: 1px; background: #282828; }
.wireform-research-images figure { margin: 0; background: #050505; }
.wireform-research-images img { display: block; width: 100%; height: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.chapter-atlas-hint {
  position: absolute;
  z-index: 3;
  right: 22px;
  bottom: 20px;
  margin: 0;
  padding: 10px 13px;
  border: 1px solid rgba(248,247,241,.5);
  background: rgba(0,0,0,.78);
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .045em;
  text-transform: uppercase;
  box-shadow: 5px 5px 0 rgba(168,199,185,.2);
  pointer-events: none;
}
.chapter-atlas-hint span { color: var(--accent); padding-inline: 3px; }

.chapter-panel-backdrop { position: fixed; inset: 0; z-index: 70; visibility: hidden; background: rgba(0,0,0,.58); opacity: 0; transition: opacity .32s ease, visibility 0s linear .32s; }
.chapter-panel-backdrop.is-open { visibility: visible; opacity: 1; transition: opacity .32s ease; }
.chapter-panel {
  position: fixed; z-index: 71; top: 0; right: 0; bottom: 0;
  width: min(66.666vw, 1120px); min-width: min(680px, 100vw);
  overflow-y: auto; overscroll-behavior: contain;
  transform: translateX(103%); border-left: 1px solid rgba(248,247,241,.36);
  background: #11110f; box-shadow: -28px 0 65px rgba(0,0,0,.45);
  transition: transform .42s cubic-bezier(.2,.75,.15,1);
}
.chapter-panel.is-open { transform: translateX(0); }
.chapter-panel-bar { position: sticky; top: 0; z-index: 4; display: flex; align-items: center; justify-content: space-between; min-height: 64px; padding: 10px 22px; border-bottom: 1px solid var(--line); background: rgba(17,17,15,.93); backdrop-filter: blur(14px); }
.chapter-panel-label { margin: 0; color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; }
.chapter-panel-close { width: 34px; height: 34px; border: 1px solid var(--ink); background: transparent; color: var(--ink); cursor: pointer; font-size: 22px; line-height: 1; }
.chapter-panel-close:hover { background: var(--ink); color: var(--paper); }
.chapter-panel-content { padding-bottom: 68px; }
.chapter-panel-content .salt-scene { min-height: calc(100vh - 64px); padding: clamp(56px, 7vw, 96px) 0; }

/* Main-page axonometric drawing, placed just before the Research Index. */
.axo-main-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: clamp(44px, 7vw, 112px) 28px;
  background: #000;
}
.axo-main-page figure {
  width: min(1440px, 100%);
  margin: 0;
}
.axo-main-page img {
  display: block;
  width: 100%;
  max-height: calc(100vh - 112px);
  object-fit: contain;
  margin: 0 auto;
}
.generation-gif-page {
  width: min(920px, calc(100% - 56px));
  margin: clamp(32px, 5vw, 64px) auto clamp(70px, 9vw, 124px);
  padding: 0;
  position: relative;
  left: clamp(18px, 4vw, 64px);
}
.generation-gif-page img {
  display: block;
  width: min(840px, 100%);
  max-height: min(68vh, 760px);
  object-fit: contain;
  margin: 0 auto;
}
.chapter-panel-content .salt-trophic-scene {
  min-height: calc(100vh - 64px);
  background: #050505;
}
.chapter-panel-content #salt-trophic {
  padding: clamp(46px, 7vw, 92px) 0 clamp(74px, 9vw, 132px);
}
.chapter-panel-content #salt-trophic > header,
.chapter-panel-content #salt-trophic .origin-trophic-layout,
.chapter-panel-content #salt-trophic > .origin-ecosystem-board,
.chapter-panel-content #salt-trophic > .salt-media {
  box-sizing: border-box;
  width: min(920px, calc(100% - 56px));
  margin-right: auto;
  margin-left: auto;
}
.chapter-panel-content #salt-trophic > header {
  display: block;
  margin-bottom: clamp(42px, 6vw, 76px);
  padding: 0;
  border: 0;
}
.chapter-panel-content #salt-trophic > header h4,
.chapter-panel-content #salt-trophic > header > p {
  grid-column: auto;
  max-width: 680px;
  margin-left: 0;
}
.chapter-panel-content #salt-trophic > header h4 {
  margin-bottom: 18px;
  font-size: clamp(32px, 4.5vw, 58px);
  font-weight: 400;
  line-height: .98;
}
.chapter-panel-content #salt-trophic .origin-trophic-layout {
  margin-top: 0;
  margin-bottom: clamp(62px, 9vw, 120px);
}
.chapter-panel-content #salt-trophic > .origin-ecosystem-board,
.chapter-panel-content #salt-trophic > .salt-media {
  margin-top: 0;
  margin-bottom: clamp(64px, 9vw, 120px);
  background: #050505;
}
.chapter-panel-content #salt-trophic > .origin-ecosystem-board > img,
.chapter-panel-content #salt-trophic > .salt-media > img {
  display: block;
  width: 100%;
  height: auto;
  max-height: none;
  object-fit: contain;
  background: #050505;
}
.chapter-panel-content #salt-trophic > .origin-ecosystem-board figcaption,
.chapter-panel-content #salt-trophic > .salt-media figcaption {
  width: min(410px, 100%);
  margin: 14px 0 0 auto;
  padding: 0;
  background: transparent;
  color: #c7c7c1;
  text-align: left;
}
.chapter-panel-content #salt-trophic > .origin-ecosystem-board figcaption strong,
.chapter-panel-content #salt-trophic > .salt-media figcaption strong {
  display: block;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
}
.chapter-panel:has(.salt-trophic-scene:not([hidden])),
.chapter-panel:has(.salt-trophic-scene:not([hidden])) .chapter-panel-bar {
  background: #050505;
}
.chapter-panel-content .salt-scene-head { width: min(820px, calc(100% - 56px)); margin-bottom: clamp(38px, 6vw, 72px); }
.chapter-panel-content .salt-scene-head h3 { font-size: clamp(42px, 5.6vw, 84px); }
.chapter-panel-content .salt-media { width: min(820px, calc(100% - 56px)); margin-right: auto; margin-left: auto; }
.chapter-panel-content .salt-media-list { gap: clamp(46px, 7vw, 96px); }
.chapter-link.is-colliding { transform: scale(1.035); }
.chapter-panel-content .salt-process-crystal-study {
  width: min(66.667%, 620px);
  margin-right: auto;
  margin-left: auto;
}
.chapter-panel-content .chapter-placeholder-grid,
.chapter-panel-content .v55-editorial-page,
.chapter-panel-content .origin-trophic-page { max-width: 100%; }
.chapter-panel-content .dome-host-interlude { width: 100%; max-width: 100%; }
.chapter-panel-content .salt-closing { width: min(820px, calc(100% - 56px)); padding-bottom: 0; }
body.chapter-panel-open { overflow: hidden; }

/* Keep the chapter flow continuous: no bright rule between full-page scenes. */
.project-view > .salt-scene,
.project-view > .chapter-atlas,
.chapter-panel-content > .salt-scene {
  border-top: 0 !important;
  border-bottom: 0 !important;
}

/* Project overview: remove the decorative linework background. */
#project-overview .linework-background,
#project-overview .linework-canvas {
  display: none;
}
#project-overview,
#project-overview::after {
  background: #000 !important;
}
#project-overview::after { display: none; }

@media (max-width: 760px) {
  .index-intro-video { padding: 80px 16px 24px; }
  .index-intro-video video { width: 100%; max-height: calc(100vh - 112px); }
  .chapter-atlas { padding-right: 16px; padding-left: 16px; background-size: 50% 16%, 50% 16%, auto; }
  .chapter-atlas-canvas { min-height: 0; }
  .chapter-link { max-width: calc(100vw - 32px); }
  .chapter-atlas-hint { right: 16px; }
  .chapter-panel { width: 100vw; min-width: 0; }
  .chapter-panel-content .salt-scene-head,
  .chapter-panel-content .salt-media { width: calc(100% - 32px); }
  .chapter-panel-content .salt-process-crystal-study { width: calc(66.667% - 16px); }
  .axo-main-page { min-height: auto; padding: 44px 16px; }
  .axo-main-page img { max-height: none; }
  .generation-gif-page { width: calc(100% - 32px); margin: 36px auto 64px; left: 12px; }
  .generation-gif-page img { max-height: none; }
  .chapter-panel-content #salt-trophic > header,
  .chapter-panel-content #salt-trophic .origin-trophic-layout,
  .chapter-panel-content #salt-trophic > .origin-ecosystem-board,
  .chapter-panel-content #salt-trophic > .salt-media { width: calc(100% - 32px); }
  .structural-explode-frame { height: 820px; }
}
