/* EarthXLab — image-led editorial chapters */

:root {
  --editorial-white: #fff;
  --editorial-black: #050505;
  --ease-editorial: cubic-bezier(.16, .84, .22, 1);
}

.site-progress,
.scene-rail,
.signal-cursor,
.hero-telemetry,
.hero-eyebrow { display: none !important; }

body.has-signal-cursor,
body.has-signal-cursor a,
body.has-signal-cursor button,
body.has-signal-cursor input { cursor: auto !important; }

.site-header.scrolled {
  border: 0;
  background: rgba(5,5,5,.72);
  backdrop-filter: blur(20px);
}

.target-label small { display: none; }

/* A satellite frame unfolds out of black. */
.descent {
  --descent-progress: 0;
  position: relative;
  height: 155svh;
  min-height: calc(100svh + 300px);
  overflow: visible;
  background: var(--editorial-black);
}

.descent-sticky {
  position: sticky;
  top: 0;
  height: 100svh;
  min-height: 720px;
  overflow: hidden;
  background: var(--editorial-black);
}

.descent-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 56% 50%;
  filter: saturate(.72) contrast(1.08) brightness(.76);
  clip-path: inset(calc((1 - var(--descent-progress)) * 18%) calc((1 - var(--descent-progress)) * 38%));
  transform: scale(calc(1.13 - var(--descent-progress) * .1));
  will-change: clip-path, transform;
}

.descent-sticky::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0,0,0,.7) 0, rgba(0,0,0,.08) 60%, rgba(0,0,0,.18));
  pointer-events: none;
  content: "";
}

.descent h2 {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: var(--gutter);
  width: min(920px, 72vw);
  margin: 0;
  color: #fff;
  font-size: clamp(74px, 8.8vw, 148px);
  font-weight: 620;
  letter-spacing: -.08em;
  line-height: .76;
  transform: translateY(-50%);
}

.descent h2 span {
  display: block;
  opacity: calc(.34 + var(--descent-progress) * .66);
  transform: translateX(calc((1 - var(--descent-progress)) * -5vw));
}

/* The comparison is the entire interface. */
.evidence { background: var(--editorial-white); }

.evidence-heading {
  min-height: 78svh;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  padding: calc(var(--header-h) + 5vh) var(--gutter) 5vh;
  background: var(--editorial-white);
  color: #050505;
}

.evidence-heading::before,
.evidence-heading::after { display: none; }

.evidence-heading h2 {
  max-width: 1240px;
  margin: 0;
  color: #050505;
  font-size: clamp(76px, 9.5vw, 158px);
  font-weight: 620;
  letter-spacing: -.085em;
  line-height: .77;
}

.comparison {
  position: relative;
  height: 100svh;
  min-height: 720px;
  overflow: hidden;
  background: #27302c;
}

.comparison::before,
.comparison::after,
.comparison-shade,
.archive-label,
.comparison-location,
.evidence-prompt { display: none !important; }

.comparison-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: saturate(.78) contrast(1.12) brightness(.82);
}

.comparison-before { clip-path: inset(0 calc(100% - var(--split)) 0 0); }
.comparison-after { clip-path: inset(0 0 0 var(--split)); }

.comparison-year {
  position: absolute;
  z-index: 5;
  bottom: 34px;
  color: #fff;
  font-size: clamp(18px, 1.8vw, 28px);
  font-weight: 540;
  letter-spacing: -.04em;
  text-shadow: 0 1px 10px rgba(0,0,0,.42);
}

.comparison-year-before { left: var(--gutter); }
.comparison-year-after { right: var(--gutter); }

.comparison-divider {
  z-index: 6;
  width: 1px;
  background: rgba(255,255,255,.95);
  box-shadow: none;
}

.divider-handle {
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 0;
  background: #fff;
  color: #050505;
  box-shadow: none;
  transform: translate(-50%, -50%);
}

.divider-handle svg { stroke-width: 1.5; }
.comparison-control { z-index: 8; }
.comparison-range { cursor: ew-resize; }

/* A scroll sentence and a changing visual, with no process chrome. */
.investigation {
  position: relative;
  height: 300svh;
  background: var(--editorial-black);
}

.investigation-sticky {
  position: sticky;
  top: 0;
  height: 100svh;
  min-height: 720px;
  overflow: hidden;
  background: var(--editorial-black);
}

.investigation-copy {
  position: absolute;
  z-index: 4;
  inset: 0 50% 0 0;
  overflow: hidden;
}

.investigation-copy h2 { margin: 0; }

.investigation-line {
  position: absolute;
  left: var(--gutter);
  top: 50%;
  width: calc(100% - var(--gutter));
  color: #fff;
  font-size: clamp(68px, 7.4vw, 122px);
  font-weight: 620;
  letter-spacing: -.078em;
  line-height: .82;
  opacity: 0;
  transform: translateY(calc(-50% + 72px));
  transition: opacity .7s var(--ease-editorial), transform .9s var(--ease-editorial);
}

.investigation[data-step="0"] .line-see,
.investigation[data-step="1"] .line-separate,
.investigation[data-step="2"] .line-measure {
  opacity: 1;
  transform: translateY(-50%);
}

.investigation-media {
  position: absolute;
  inset: 0 0 0 50%;
  overflow: hidden;
  background: #111;
}

.process-map {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0;
  transform: scale(1.07);
  transition: opacity .75s ease, transform 1.2s var(--ease-editorial);
}

.process-map-natural { filter: saturate(.78) contrast(1.08) brightness(.76); }
.process-map-built { filter: contrast(1.12) brightness(.78); }
.process-map-change { filter: saturate(.9) contrast(1.12) brightness(.76); }

.investigation[data-step="0"] .process-map-natural,
.investigation[data-step="1"] .process-map-built,
.investigation[data-step="2"] .process-map-change {
  opacity: 1;
  transform: scale(1);
}

/* Baku becomes the image. */
.baku-study {
  --baku-shift: 50%;
  min-height: 100svh;
  padding: 8vh 0 10vh;
  overflow: hidden;
  background: var(--editorial-white);
  color: #050505;
}

.baku-word {
  margin-left: -1.2vw;
  background-image: url("assets/baku-satellite-v2.png");
  background-position: var(--baku-shift) 48%;
  background-size: 112% auto;
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  font-size: clamp(190px, 31vw, 510px);
  font-weight: 800;
  letter-spacing: -.105em;
  line-height: .74;
  white-space: nowrap;
  transform: translateX(-.5vw);
  will-change: background-position;
}

.baku-study-copy {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 50px;
  padding: clamp(50px, 7vh, 84px) var(--gutter) 0;
}

.baku-study-copy h2 {
  max-width: 920px;
  margin: 0;
  color: #050505;
  font-size: clamp(52px, 5.5vw, 90px);
  font-weight: 560;
  letter-spacing: -.072em;
  line-height: .9;
}

.text-link {
  display: inline-flex;
  gap: 22px;
  align-items: center;
  padding-bottom: 7px;
  border-bottom: 1px solid currentColor;
  font-size: 14px;
  font-weight: 620;
  white-space: nowrap;
}

.text-link svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.35;
  transition: transform .22s ease;
}

.text-link:hover svg { transform: translateX(4px); }

/* Trust as a stark statement, not a metadata panel. */
.method {
  min-height: 100svh;
  padding: clamp(130px, 13vh, 190px) var(--gutter) 72px;
  background: var(--editorial-black);
  color: #fff;
}

.method::before { display: none; }

.method-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, .8fr);
  gap: clamp(70px, 12vw, 210px);
  align-items: end;
}

.method-layout h2 {
  max-width: 880px;
  margin: 0;
  color: #fff;
  font-size: clamp(70px, 8vw, 132px);
  font-weight: 620;
  letter-spacing: -.08em;
  line-height: .78;
}

.method-copy {
  max-width: 550px;
  margin: 0;
  padding-bottom: 8px;
  color: #fff;
}

.method-copy p {
  margin: 0 0 38px;
  color: rgba(255,255,255,.67);
  font-size: clamp(18px, 1.4vw, 23px);
  letter-spacing: -.025em;
  line-height: 1.45;
}

.method-copy a,
.educator-note a {
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255,255,255,.65);
  font-size: 13px;
  font-weight: 620;
}

.educator-note {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 40px;
  margin-top: clamp(150px, 22vh, 260px);
  padding-top: 28px;
  border-top: 1px solid rgba(255,255,255,.22);
}

.educator-note h3 {
  max-width: 620px;
  margin: 0;
  color: #fff;
  font-size: clamp(30px, 3.3vw, 52px);
  font-weight: 520;
  letter-spacing: -.055em;
  line-height: 1;
}

@media (max-width: 900px) {
  .descent h2 { width: 84vw; }
  .investigation-copy { right: 46%; }
  .investigation-media { left: 54%; }
  .method-layout { grid-template-columns: 1fr; align-items: start; }
  .method-copy { max-width: 620px; }
}

@media (max-width: 700px) {
  .descent { height: 145svh; min-height: calc(100svh + 280px); }
  .descent-sticky { min-height: 760px; }
  .descent-image {
    object-position: 62% 50%;
    clip-path: inset(calc((1 - var(--descent-progress)) * 24%) calc((1 - var(--descent-progress)) * 26%));
  }
  .descent-sticky::after { background: linear-gradient(180deg, rgba(0,0,0,.18), rgba(0,0,0,.72)); }
  .descent h2 {
    top: auto;
    right: 20px;
    bottom: 54px;
    left: 20px;
    width: auto;
    font-size: clamp(58px, 17vw, 78px);
    line-height: .8;
    transform: none;
  }

  .evidence-heading {
    min-height: 650px;
    padding: 104px 20px 52px;
  }
  .evidence-heading h2 { font-size: clamp(58px, 17vw, 80px); line-height: .8; }
  .comparison { min-height: 760px; }
  .comparison-year { bottom: 24px; font-size: 18px; }
  .comparison-year-before { left: 20px; }
  .comparison-year-after { right: 20px; }

  .investigation { height: 270svh; }
  .investigation-sticky { min-height: 760px; }
  .investigation-copy { inset: 0; height: 43%; }
  .investigation-line {
    top: 54%;
    left: 20px;
    width: calc(100% - 40px);
    font-size: clamp(55px, 15vw, 72px);
  }
  .investigation-media { inset: 43% 0 0; }

  .baku-study { min-height: 780px; padding: 74px 0 84px; }
  .baku-word {
    margin-left: -2vw;
    background-size: auto 110%;
    font-size: 35vw;
    letter-spacing: -.11em;
    line-height: .8;
  }
  .baku-study-copy {
    display: block;
    padding: 68px 20px 0;
  }
  .baku-study-copy h2 { font-size: clamp(48px, 13vw, 64px); }
  .text-link { margin-top: 44px; }

  .method { min-height: 0; padding: 120px 20px 64px; }
  .method-layout { gap: 62px; }
  .method-layout h2 { font-size: clamp(58px, 16vw, 78px); }
  .method-copy p { font-size: 18px; }
  .educator-note { display: block; margin-top: 150px; }
  .educator-note h3 { margin-bottom: 38px; font-size: 38px; }
}

@media (prefers-reduced-motion: reduce) {
  .descent-image,
  .descent h2 span,
  .investigation-line,
  .process-map { transition: none; }
}
