:root {
  color-scheme: dark;
  --ink: #f3f6ef;
  --muted: rgba(243, 246, 239, 0.72);
  --quiet: rgba(243, 246, 239, 0.5);
  --line: rgba(255, 255, 255, 0.18);
  --accent: #a6d57a;
  --deep: #0b0f0c;
  --pad: clamp(22px, 6vw, 64px);
  --safe-top: max(22px, env(safe-area-inset-top));
  --safe-bottom: max(22px, env(safe-area-inset-bottom));
  --reveal: 0%;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--deep);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

.story {
  width: 100%;
  height: 100dvh;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
}

.story::-webkit-scrollbar {
  display: none;
}

.scene {
  position: relative;
  width: 100%;
  min-height: 100dvh;
  overflow: hidden;
  isolation: isolate;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  background: #121713;
}

.scene-media,
.renewal-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.scene-media {
  z-index: -3;
  transform: scale(1.015);
}

.veil {
  position: absolute;
  inset: 0;
  z-index: -2;
  pointer-events: none;
}

.veil-deep {
  background:
    linear-gradient(180deg, rgba(8, 12, 9, 0.18) 0%, rgba(8, 12, 9, 0.12) 32%, rgba(8, 12, 9, 0.88) 100%),
    linear-gradient(90deg, rgba(8, 12, 9, 0.68) 0%, transparent 76%);
}

.veil-low {
  background: linear-gradient(180deg, transparent 26%, rgba(7, 10, 8, 0.84) 100%);
}

.scene-copy {
  position: absolute;
  z-index: 2;
  left: var(--pad);
  right: var(--pad);
  max-width: 760px;
}

.hero-copy {
  top: max(12vh, calc(var(--safe-top) + 34px));
}

.copy-top {
  top: calc(var(--safe-top) + 44px);
}

.copy-bottom {
  bottom: calc(var(--safe-bottom) + 64px);
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--accent);
  font-size: 12px;
  line-height: 1;
  font-weight: 650;
  letter-spacing: 0.14em;
}

.hero-title,
.display-title {
  margin: 0;
  max-width: 12em;
  letter-spacing: 0;
  text-wrap: balance;
}

.hero-title {
  font-size: clamp(52px, 14vw, 102px);
  line-height: 0.98;
  font-weight: 760;
}

.display-title {
  font-size: clamp(34px, 9.3vw, 66px);
  line-height: 1.08;
  font-weight: 740;
}

.display-title.compact {
  font-size: clamp(31px, 8vw, 58px);
}

.split-char {
  display: inline-block;
  will-change: transform, opacity;
}

.hero-sub {
  margin: 12px 0 0;
  font-size: clamp(20px, 5vw, 32px);
  font-weight: 520;
  color: var(--accent);
}

.opening-quote {
  margin: clamp(32px, 6vh, 64px) 0 0;
  max-width: 26em;
  padding: 0;
  border: 0;
  font-size: clamp(18px, 4.5vw, 25px);
  line-height: 1.5;
  font-weight: 600;
}

.intro-copy,
.body {
  color: var(--muted);
  font-size: clamp(16px, 4vw, 20px);
  line-height: 1.7;
}

.intro-copy {
  margin: 16px 0 0;
  max-width: 35em;
}

.body {
  margin: 18px 0 0;
  max-width: 34em;
}

.edge-index {
  position: absolute;
  right: var(--pad);
  bottom: calc(var(--safe-bottom) + 10px);
  z-index: 2;
  color: var(--quiet);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.topline {
  position: fixed;
  z-index: 40;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: rgba(255, 255, 255, 0.12);
}

.topline span {
  display: block;
  width: 3.5714%;
  height: 100%;
  background: var(--accent);
  transform-origin: left center;
}

.sound-button {
  position: fixed;
  z-index: 35;
  left: max(16px, env(safe-area-inset-left));
  bottom: calc(16px + env(safe-area-inset-bottom));
  min-width: 106px;
  height: 42px;
  padding: 0 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  color: var(--ink);
  background: rgba(16, 21, 17, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  backdrop-filter: blur(18px) saturate(130%);
  -webkit-backdrop-filter: blur(18px) saturate(130%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
  font-size: 13px;
}

.sound-mark {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--quiet);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.08);
}

.sound-button.is-loading .sound-mark {
  animation: sound-loading 0.9s linear infinite;
}

@keyframes sound-loading {
  to { transform: rotate(360deg); }
}

.sound-button[aria-pressed="true"] .sound-mark {
  background: var(--accent);
}

.page-counter {
  position: fixed;
  z-index: 34;
  right: max(18px, env(safe-area-inset-right));
  bottom: calc(28px + env(safe-area-inset-bottom));
  color: rgba(255, 255, 255, 0.62);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.stats-copy {
  top: max(11vh, calc(var(--safe-top) + 36px));
}

.metric-line {
  margin-top: clamp(34px, 7vh, 68px);
  display: grid;
  grid-template-columns: auto minmax(52px, 150px) auto;
  align-items: center;
  gap: 14px;
  width: min(100%, 620px);
}

.metric-line strong,
.metric-line .metric-old {
  font-size: clamp(44px, 13vw, 92px);
  line-height: 1;
  font-weight: 760;
  font-variant-numeric: tabular-nums;
}

.metric-line .metric-old {
  color: rgba(255, 255, 255, 0.42);
}

.metric-line strong {
  color: var(--accent);
}

.metric-arrow {
  height: 1px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.28), var(--accent));
}

.metric-line small {
  grid-column: 3;
  color: var(--muted);
  font-size: 12px;
}

.metric-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  width: min(100%, 620px);
  margin-top: clamp(38px, 7vh, 76px);
}

.metric-pair div {
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.metric-pair strong {
  display: block;
  font-size: clamp(34px, 9vw, 60px);
  line-height: 1;
}

.metric-pair em,
.data-stack em {
  margin-left: 3px;
  font-size: 0.38em;
  font-style: normal;
  font-weight: 650;
}

.metric-pair span {
  display: block;
  margin-top: 9px;
  color: var(--muted);
  font-size: 13px;
}

.fact {
  margin: clamp(32px, 6vh, 64px) 0 0;
  color: var(--ink);
  font-size: clamp(17px, 4.2vw, 22px);
  font-weight: 580;
}

.renewal-image {
  z-index: -4;
}

.renewal-before {
  filter: saturate(0.72) contrast(1.06);
}

.renewal-after-wrap {
  position: absolute;
  inset: 0;
  z-index: -3;
  overflow: hidden;
  clip-path: inset(0 calc(100% - var(--reveal)) 0 0);
}

.renewal-after {
  z-index: auto;
}

.renewal-scene::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(6, 9, 7, 0.68) 0%, transparent 45%, rgba(6, 9, 7, 0.46) 100%);
  pointer-events: none;
}

.renewal-divider {
  position: absolute;
  z-index: 2;
  top: 0;
  bottom: 0;
  left: var(--reveal);
  width: 1px;
  background: rgba(255, 255, 255, 0.78);
  pointer-events: none;
}

.renewal-divider span {
  position: absolute;
  left: 50%;
  top: 58%;
  width: 42px;
  height: 42px;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 50%;
  background: rgba(11, 15, 12, 0.42);
  backdrop-filter: blur(12px);
}

.renewal-divider span::before,
.renewal-divider span::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 8px;
  height: 8px;
  border-top: 1px solid var(--ink);
  border-left: 1px solid var(--ink);
}

.renewal-divider span::before {
  left: 9px;
  transform: translateY(-50%) rotate(-45deg);
}

.renewal-divider span::after {
  right: 9px;
  transform: translateY(-50%) rotate(135deg);
}

.renewal-range {
  position: absolute;
  z-index: 3;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: ew-resize;
}

.renewal-copy {
  pointer-events: none;
}

.renewal-label {
  position: absolute;
  z-index: 2;
  bottom: calc(var(--safe-bottom) + 64px);
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-weight: 650;
}

.label-before { left: var(--pad); }
.label-after { right: var(--pad); }

.data-story {
  top: max(9vh, calc(var(--safe-top) + 28px));
}

.data-stack {
  margin-top: clamp(30px, 5vh, 54px);
  max-width: 540px;
}

.data-stack p {
  margin: 0;
  padding: 14px 0;
  display: grid;
  grid-template-columns: minmax(120px, 0.8fr) 1.2fr;
  align-items: baseline;
  gap: 18px;
  border-bottom: 1px solid var(--line);
}

.data-stack p:last-child {
  border-bottom: 0;
}

.data-stack strong {
  color: var(--accent);
  font-size: clamp(36px, 9vw, 56px);
  line-height: 1;
}

.data-stack span {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.comparison-scene {
  --look: 0.5;
  display: block;
  isolation: isolate;
  overflow: hidden;
  touch-action: pan-y;
  background: #d9ddd6;
}

.compare-side {
  position: absolute;
  inset: -3%;
  z-index: 0;
  overflow: hidden;
  will-change: opacity, filter, transform;
  transition: filter 420ms ease;
  transform: scale(1.06);
}

.compare-before {
  opacity: calc(1 - var(--look));
  filter: saturate(0.54) contrast(0.94);
}

.compare-after {
  opacity: var(--look);
  filter: saturate(0.88) contrast(1.02);
}

.compare-side.is-lit {
  filter: saturate(1) contrast(1.04);
}

.compare-side img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.compare-side span {
  position: absolute;
  bottom: calc(var(--safe-bottom) + 94px);
  color: #f5f7f2;
  font-size: 12px;
  font-weight: 650;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.75);
}

.compare-before span { left: var(--pad); }
.compare-after span { right: var(--pad); }

.bird-pivot {
  position: absolute;
  z-index: 2;
  inset: 0;
  overflow: hidden;
  mix-blend-mode: multiply;
  pointer-events: none;
}

.bird-pivot video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  filter: contrast(1.04) saturate(0.94);
}

.compare-copy {
  position: absolute;
  z-index: 4;
  top: calc(var(--safe-top) + 30px);
  left: var(--pad);
  right: var(--pad);
  color: #192019;
  text-shadow: 0 1px 18px rgba(255, 255, 255, 0.92);
  pointer-events: none;
}

.compare-copy .display-title {
  max-width: 8.5em;
}

.aerial-scene .scene-media {
  transform: scale(1.04);
}

.bird-gallery {
  background: #101612;
}

.gallery-track {
  position: absolute;
  inset: 0 auto 0 0;
  z-index: -3;
  display: flex;
  align-items: stretch;
  gap: 6px;
  height: 100%;
  will-change: transform;
}

.gallery-track img {
  flex: 0 0 auto;
  width: min(84vw, 620px);
  height: 100%;
  object-fit: cover;
}

.gallery-veil {
  background:
    linear-gradient(180deg, rgba(8, 12, 9, 0.2), rgba(8, 12, 9, 0.1) 32%, rgba(8, 12, 9, 0.9) 100%),
    linear-gradient(90deg, rgba(8, 12, 9, 0.62), transparent 84%);
}

.gallery-copy {
  top: max(10vh, calc(var(--safe-top) + 32px));
}

.bird-count {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  margin: clamp(28px, 5vh, 52px) 0 22px;
}

.bird-count strong {
  color: var(--accent);
  font-size: clamp(72px, 20vw, 144px);
  line-height: 0.78;
}

.bird-count span {
  max-width: 8em;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
}

.closing-line {
  margin: clamp(34px, 7vh, 72px) 0 0;
  max-width: 34em;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(15px, 3.8vw, 19px);
  line-height: 1.65;
}

/* Xiangtangshan closes the mountain chapter with a quieter, airier data field. */
.xiangtang-data .scene-media {
  object-position: 58% center;
}

.xiangtang-metrics {
  margin-top: clamp(28px, 5vh, 54px);
}

.xiangtang-metrics strong {
  color: var(--accent);
  font-size: clamp(30px, 8vw, 58px);
  white-space: nowrap;
}

.xiangtang-metrics div:last-child strong {
  font-size: clamp(25px, 6.8vw, 50px);
}

.xiangtang-data .closing-line {
  margin-top: clamp(24px, 4.5vh, 48px);
}

/* Industrial chapter */
.industry-hero,
.industry-scene,
.vox-scene,
.spotlight-scene {
  --accent: #9ed09a;
  --line: rgba(221, 231, 223, 0.2);
  background: #111312;
}

.industry-veil {
  background:
    linear-gradient(180deg, rgba(10, 11, 10, 0.18) 0%, rgba(10, 11, 10, 0.18) 34%, rgba(10, 11, 10, 0.91) 100%),
    linear-gradient(90deg, rgba(10, 11, 10, 0.72), transparent 78%);
}

.industry-hero .scene-media,
.industry-scene .scene-media {
  filter: saturate(0.82) contrast(1.04);
}

.industry-eyebrow {
  color: #ff9a58;
}

.industry-sub {
  color: #9ed09a;
}

.industry-data {
  max-width: 680px;
}

.hero-number {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  margin: clamp(28px, 5vh, 48px) 0 22px;
}

.hero-number strong,
.inline-stat strong,
.compact-stats strong,
.air-stats strong {
  color: #ff9a58;
  font-variant-numeric: tabular-nums;
}

.hero-number strong {
  font-size: clamp(76px, 21vw, 150px);
  line-height: 0.76;
}

.hero-number span {
  max-width: 8em;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
}

.inline-stat {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  margin-top: clamp(26px, 5vh, 48px);
}

.inline-stat strong {
  font-size: clamp(58px, 16vw, 110px);
  line-height: 0.8;
}

.inline-stat em,
.compact-stats em,
.air-stats em {
  margin-left: 2px;
  font-size: 0.38em;
  font-style: normal;
}

.inline-stat span {
  color: var(--muted);
  font-size: 13px;
}

.compact-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  width: min(100%, 650px);
  margin: clamp(28px, 5vh, 52px) 0 0;
}

.compact-stats p {
  margin: 0;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.compact-stats strong,
.compact-stats span {
  display: block;
}

.compact-stats strong {
  font-size: clamp(28px, 7vw, 50px);
  line-height: 1;
  white-space: nowrap;
}

.compact-stats span {
  margin-top: 9px;
  color: var(--muted);
  font-size: 12px;
}

.air-stats {
  width: min(100%, 630px);
  margin-top: clamp(30px, 6vh, 64px);
}

.air-stats > div {
  display: grid;
  grid-template-columns: minmax(126px, 0.8fr) 1.2fr;
  align-items: baseline;
  gap: 18px;
  padding: 17px 0;
  border-bottom: 1px solid var(--line);
}

.air-stats strong {
  font-size: clamp(38px, 10vw, 66px);
  line-height: 1;
}

.air-stats span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

/* VOX images explain the process; the inset source photos retain documentary context. */
.vox-art {
  object-position: center;
  filter: saturate(0.82) contrast(1.06);
}

.vox-veil {
  background:
    linear-gradient(180deg, rgba(9, 10, 9, 0.14), rgba(9, 10, 9, 0.08) 28%, rgba(9, 10, 9, 0.94) 100%),
    linear-gradient(90deg, rgba(9, 10, 9, 0.62), transparent 78%);
}

.vox-source {
  position: absolute;
  z-index: 1;
  top: calc(var(--safe-top) + 18px);
  right: max(16px, env(safe-area-inset-right));
  width: min(38vw, 190px);
  height: clamp(104px, 18vh, 170px);
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 4px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.34);
}

.motion-ready .vox-source {
  opacity: 0;
}

/* Soft cursor/touch spotlight: the green image is revealed through a generated mask. */
.spotlight-image,
.spotlight-reveal {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.spotlight-image {
  z-index: -4;
  display: block;
  object-fit: cover;
}

.spotlight-reveal {
  z-index: -3;
  pointer-events: none;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
}

.spotlight-reveal .spotlight-image {
  z-index: auto;
}

#spotlightCanvas {
  position: absolute;
  inset: 0;
  display: none;
  pointer-events: none;
}

.spotlight-ring {
  position: absolute;
  z-index: 1;
  width: var(--spotlight-diameter, 360px);
  height: var(--spotlight-diameter, 360px);
  border: 1px solid rgba(206, 237, 203, 0.34);
  border-radius: 50%;
  box-shadow: 0 0 45px rgba(158, 208, 154, 0.13);
  transform: translate3d(-999px, -999px, 0);
  pointer-events: none;
  will-change: transform;
}

.spotlight-veil {
  background:
    linear-gradient(180deg, rgba(8, 10, 9, 0.24), transparent 42%, rgba(8, 10, 9, 0.86) 100%),
    linear-gradient(90deg, rgba(8, 10, 9, 0.54), transparent 72%);
}

.spotlight-copy {
  pointer-events: none;
}

.water-transition-scene .scene-media {
  filter: saturate(0.88) contrast(1.03);
}

.transition-layer {
  position: fixed;
  z-index: 60;
  inset: 0;
  visibility: hidden;
  opacity: 0;
  background: #0b0f0c;
  pointer-events: none;
}

.transition-layer.is-active {
  visibility: visible;
  pointer-events: auto;
}

.transition-layer video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.transition-layer::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(7, 10, 8, 0.84));
}

.transition-copy {
  position: absolute;
  z-index: 2;
  left: var(--pad);
  right: var(--pad);
  bottom: calc(var(--safe-bottom) + 64px);
}

.transition-copy p {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 12px;
  letter-spacing: 0.12em;
}

.transition-copy strong {
  display: block;
  max-width: 9em;
  font-size: clamp(36px, 10vw, 68px);
  line-height: 1.08;
}

.motion-ready .reveal,
.motion-ready .split-char {
  opacity: 0;
}

@media (min-width: 800px) {
  .hero-copy,
  .stats-copy,
  .data-story,
  .gallery-copy {
    left: max(var(--pad), calc((100vw - 1280px) / 2));
  }

  .copy-bottom {
    left: max(var(--pad), calc((100vw - 1280px) / 2));
  }

  .compare-side img {
    object-position: center;
  }

  .bird-pivot video {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 74%;
    height: 74%;
    transform: translate(-50%, -50%);
  }

  .data-stack p {
    padding: 18px 0;
  }

  .vox-source {
    top: auto;
    right: max(var(--pad), calc((100vw - 1280px) / 2));
    bottom: calc(var(--safe-bottom) + 72px);
    width: min(26vw, 310px);
    height: min(26vh, 230px);
  }
}

@media (max-height: 720px) and (max-width: 799px) {
  .industry-hero .hero-copy {
    top: calc(var(--safe-top) + 22px);
  }

  .industry-hero .hero-title {
    font-size: 43px;
  }

  .industry-hero .opening-quote {
    margin-top: 20px;
    font-size: 16px;
  }

  .industry-hero .intro-copy {
    font-size: 14px;
    line-height: 1.55;
  }

  .xiangtang-data .display-title,
  .industry-data .display-title {
    font-size: 28px;
  }

  .xiangtang-data .body,
  .xiangtang-data .closing-line,
  .industry-data .body {
    font-size: 14px;
    line-height: 1.5;
  }

  .xiangtang-metrics {
    margin-top: 18px;
  }

  .compact-stats {
    margin-top: 20px;
  }
}

@media (prefers-reduced-transparency: reduce) {
  .sound-button,
  .renewal-divider span {
    background: #182019;
    backdrop-filter: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .story {
    scroll-behavior: auto;
  }

  .motion-ready .reveal,
  .motion-ready .split-char {
    opacity: 1;
    transform: none;
  }

  .scene-media,
  .aerial-scene .scene-media {
    transform: none;
  }

  .motion-ready .vox-source {
    opacity: 1;
    transform: none;
  }

  .spotlight-reveal {
    -webkit-mask-image: none !important;
    mask-image: none !important;
    opacity: 0.72;
  }

  .spotlight-ring {
    display: none;
  }
}
