:root {
  --ink: #17221a;
  --cream: #f0eee5;
  --moss: #6f7e67;
  --line: rgba(23, 34, 26, 0.22);
  --serif: Iowan Old Style, Baskerville, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
}
.offline-panel {
  position: fixed;
  z-index: 30;
  top: max(14px, env(safe-area-inset-top));
  right: 14px;
  width: min(380px, calc(100vw - 28px));
  color: #fff;
  font: 500 12px/1.35 var(--sans);
}
.offline-panel button { font: inherit; }
.offline-panel-body {
  max-height: min(72vh, 620px);
  margin-top: 0;
  padding: 18px;
  overflow: auto;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 18px;
  background: rgba(16,27,20,.96);
  box-shadow: 0 18px 60px rgba(0,0,0,.3);
}
.offline-panel-body > strong { font-family: var(--serif); font-size: 22px; font-weight: 400; }
.offline-summary, .storage-summary { margin: 8px 0; opacity: .8; }
.offline-actions { display: flex; gap: 8px; margin: 14px 0; }
.offline-actions button, .download-list button, .offline-fallback button {
  padding: 8px 10px;
  border: 1px solid rgba(255,255,255,.4);
  border-radius: 999px;
  background: transparent;
  color: inherit;
}
.offline-actions button:disabled, .download-list button:disabled { opacity: .45; }
.download-progress { width: 100%; }
.download-list { padding: 0; margin: 10px 0 0; list-style: none; }
.download-list li { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 11px 0; border-top: 1px solid rgba(255,255,255,.14); }
.download-list li > span { text-transform: capitalize; }
.download-list small { grid-column: 1; opacity: .7; }
.download-list button { grid-column: 2; grid-row: 1 / 3; align-self: center; }
.offline-fallback { min-height: 100svh; padding: max(14vh, env(safe-area-inset-top)) 8vw; background: var(--ink); color: var(--cream); }
.offline-fallback main { max-width: 660px; }
.offline-fallback h1 { margin: 24px 0; font: 300 clamp(52px, 12vw, 108px)/.92 var(--serif); }
.offline-fallback p:not(.chapter) { max-width: 520px; font-size: 18px; line-height: 1.6; }
.login-page { min-height: 100svh; padding: max(14vh, env(safe-area-inset-top)) 8vw; background: var(--ink); color: var(--cream); }
.login-page main { max-width: 760px; margin: auto; }
.login-page h1 { margin: 24px 0 48px; font: 300 clamp(52px, 12vw, 108px)/.92 var(--serif); }
.login-form { display: grid; gap: 12px; max-width: 420px; }
.login-form label { font-size: 11px; letter-spacing: .15em; text-transform: uppercase; }
.login-form input { width: 100%; padding: 15px 16px; border: 1px solid rgba(255,255,255,.4); border-radius: 4px; background: rgba(255,255,255,.08); color: #fff; font: 18px var(--sans); }
.login-form .consent-field { display: flex; gap: 12px; align-items: flex-start; margin: 8px 0; font-size: 12px; line-height: 1.5; letter-spacing: 0; text-transform: none; }
.login-form .consent-field input { flex: 0 0 18px; width: 18px; height: 18px; margin: 1px 0 0; padding: 0; }
.login-form .consent-field span { min-width: 0; }
.login-form button { justify-self: start; padding: 12px 22px; border: 1px solid var(--cream); background: var(--cream); color: var(--ink); font: 600 11px var(--sans); letter-spacing: .12em; text-transform: uppercase; }
.login-error { min-height: 1.4em; color: #f1b7a8; }
.angled-arrow { display: inline-block; width: 9px; height: 9px; margin-left: 8px; border-top: 1px solid currentColor; border-right: 1px solid currentColor; transform: rotate(45deg); }
a {
  color: inherit;
}
.hero {
  height: 100svh;
  min-height: 680px;
  position: relative;
  color: #f6f3e9;
  overflow: hidden;
  background: #1c2b20;
}
.media-slide {
  height: 100svh;
  min-height: 620px;
  position: relative;
  overflow: hidden;
  background: #101710;
}
.media-slide video,
.media-slide img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.land-map picture, .road-evidence picture, .burn-evidence picture { display: contents; }
.aini-title {
  position: absolute;
  z-index: 2;
  top: clamp(36px, 7vh, 84px);
  left: 50%;
  width: min(1100px, 90vw);
  margin: 0;
  transform: translateX(-50%);
  color: #fff;
  font-family: var(--serif);
  font-size: clamp(30px, 4.5vw, 68px);
  font-weight: 300;
  line-height: 1.02;
  letter-spacing: -0.02em;
  text-align: center;
  text-shadow: 0 2px 22px rgba(0,0,0,.72);
}
.aini-title strong { font-weight: 700; }
.aini-meaning {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: clamp(28px, 5vh, 58px);
  width: min(880px, 88vw);
  margin: 0;
  transform: translateX(-50%);
  color: #fff;
  font-family: var(--serif);
  font-size: clamp(16px, 1.8vw, 24px);
  line-height: 1.35;
  text-align: center;
  text-shadow: 0 2px 18px rgba(0,0,0,.9);
}
.aini-meaning strong { font-family: var(--sans); font-size: .7em; letter-spacing: .12em; }
.hero-media {
  position: absolute !important;
  inset: 0;
  border: 0 !important;
}
.hero-media:after {
  display: none;
}
.hero nav {
  position: absolute;
  z-index: 2;
  top: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding: 28px 4vw;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.hero nav a {
  text-decoration: none;
}
.wordmark {
  font-weight: 500;
}
.hero-copy {
  position: absolute;
  z-index: 2;
  left: 8vw;
  bottom: 15vh;
  width: min(850px, 82vw);
}
.eyebrow,
.chapter {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.hero h1 {
  font-family: var(--serif);
  font-size: clamp(54px, 8vw, 120px);
  font-weight: 300;
  line-height: 0.88;
  letter-spacing: -0.04em;
  margin: 24px 0;
}
.hero-copy > p:last-child {
  font-family: var(--serif);
  font-size: clamp(20px, 2vw, 30px);
  max-width: 610px;
}
.scroll {
  position: absolute;
  z-index: 2;
  right: 4vw;
  bottom: 5vh;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.scroll i {
  display: inline-block;
  width: 42px;
  border-top: 1px solid;
  margin-left: 10px;
  vertical-align: middle;
}
.manifesto {
  padding: 18vh 12vw 22vh;
}
.manifesto blockquote {
  font-family: var(--serif);
  font-size: clamp(38px, 5vw, 72px);
  line-height: 1.04;
  max-width: 980px;
  margin: 0 0 0 16vw;
}
.manifesto h1 {
  font-family: var(--serif);
  font-size: clamp(54px, 8vw, 120px);
  font-weight: 300;
  line-height: 0.9;
  letter-spacing: -0.04em;
  max-width: 1050px;
  margin: 55px 0 10vh;
}
.visual-prologue figure {
  height: 100svh;
  min-height: 620px;
  margin: 0;
}
.visual-prologue .media-slide { margin: 0; }
.final-still { margin: 0; }
.full-bleed {
  width: 100%;
  height: 100%;
  border: 0 !important;
}
.visual-story {
  padding: 0 6vw 18vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9vw 5vw;
}
.visual-story figure {
  margin: 0;
}
.visual-story .offset {
  margin-top: 34vh;
}
.visual-story .wide {
  grid-column: 1/-1;
  margin-top: 5vh;
}
.media-placeholder {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px;
  background: linear-gradient(135deg, #536450, #223428);
  color: #eef0e5;
  overflow: hidden;
  isolation: isolate;
}
.media-placeholder:before {
  content: attr(data-kind);
  position: absolute;
  top: 20px;
  left: 22px;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.media-placeholder span {
  font-family: var(--serif);
  font-size: 28px;
}
.media-placeholder small {
  opacity: 0.72;
  margin-top: 6px;
}
.media-placeholder:not(.hero-media):after {
  content: "";
  position: absolute;
  inset: 16px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  z-index: -1;
}
.portrait {
  aspect-ratio: 3/4;
}
.landscape {
  aspect-ratio: 4/3;
}
.panorama {
  aspect-ratio: 16/7;
}
.visual-story figcaption {
  font-family: var(--serif);
  font-style: italic;
  font-size: 18px;
  margin-top: 15px;
}
.place {
  background: var(--ink);
  color: var(--cream);
  padding: 16vh 7vw;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10vw;
  align-items: center;
}
.place h2,
.learning h2,
.vision h2 {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(42px, 5.4vw, 76px);
  line-height: 1.02;
  margin: 35px 0;
}
.place p:not(.chapter) {
  font-size: 18px;
  line-height: 1.75;
  max-width: 560px;
}
.land-map {
  aspect-ratio: 1584/1224;
  position: relative;
  margin: 0;
  border: 1px solid rgba(240, 238, 229, 0.35);
  overflow: hidden;
}
.land-map img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.land-map figcaption {
  position: absolute;
  inset: auto 0 0;
  padding: 18px 20px;
  background: linear-gradient(transparent, rgba(5,12,7,.86));
  color: #fff;
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.threat {
  padding: 16vh 6vw;
}
.threat-copy {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 5vw;
  margin-bottom: 10vh;
}
.threat h2 {
  font-family: var(--serif);
  font-size: clamp(45px, 6vw, 85px);
  font-weight: 300;
  line-height: 1;
  margin: 0;
}
.threat-copy > p:last-child {
  grid-column: 2;
  max-width: 700px;
  font-size: 18px;
  line-height: 1.7;
}
.road-evidence {
  position: relative;
  width: calc(100% + 12vw);
  height: min(82svh, 920px);
  margin: 0 0 14px -6vw;
  overflow: hidden;
  background: #18261d;
}
.road-evidence img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.road-evidence:after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(10,18,12,.72) 0%, rgba(10,18,12,.18) 58%, transparent 100%);
}
.road-evidence figcaption {
  position: absolute;
  z-index: 1;
  left: 7vw;
  bottom: clamp(38px, 8vh, 90px);
  width: min(620px, 80vw);
  color: #f6f3e9;
}
.road-evidence figcaption span {
  display: block;
  font-family: var(--serif);
  font-size: clamp(38px, 5vw, 72px);
  line-height: 1;
}
.road-evidence figcaption p {
  max-width: 540px;
  margin: 24px 0 0;
  font-size: 17px;
  line-height: 1.6;
}
.burn-evidence {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.burn-evidence figure {
  margin: 0;
}
.burn-evidence img {
  width: 100%;
  aspect-ratio: 16/9;
  display: block;
  object-fit: cover;
}
.burn-evidence figcaption {
  padding: 14px 2px 0;
  font-family: var(--serif);
  font-size: 18px;
  font-style: italic;
}
.learning {
  padding: 17vh 8vw;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.learning-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 8vw;
}
.learning-grid > div {
  padding-top: 55px;
  font-size: 18px;
  line-height: 1.75;
}
.note {
  font-family: var(--serif);
  font-size: 22px;
  font-style: italic;
  margin-top: 50px;
}
.vision {
  padding: 16vh 8vw;
}
.vision ol {
  list-style: none;
  padding: 0;
  margin: 7vh 0 0;
}
.vision li {
  display: grid;
  grid-template-columns: 100px 1fr;
  padding: 45px 0;
  border-top: 1px solid var(--line);
}
.vision li > span {
  font-size: 12px;
  letter-spacing: 0.16em;
}
.vision h3 {
  font-family: var(--serif);
  font-size: clamp(34px, 4vw, 60px);
  font-weight: 300;
  margin: 0;
}
.vision li p {
  font-size: 16px;
  max-width: 550px;
  line-height: 1.6;
}
.field-note {
  background: #809078;
  padding: 7vw;
  color: #f4f1e9;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 6vw;
  align-items: end;
}
.immersive {
  aspect-ratio: 16/10;
}
.field-note > p {
  font-family: var(--serif);
  font-size: clamp(28px, 3vw, 44px);
  line-height: 1.1;
}
.invitation {
  text-align: center;
  padding: 20vh 7vw;
  background: #d9ddca;
}
.invitation h2 {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(64px, 11vw, 150px);
  line-height: 0.9;
  margin: 6vh 0 4vh;
}
.invitation > p:not(.chapter) {
  max-width: 720px;
  margin: 0 auto 7vh;
  font-family: var(--serif);
  font-size: 25px;
  line-height: 1.4;
}
.invitation > a {
  display: inline-block;
  padding: 18px 26px;
  border: 1px solid;
  text-decoration: none;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.14em;
}
.invitation > a span {
  margin-left: 50px;
}
.prompts {
  margin-top: 15vh;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
  font-family: var(--serif);
  font-size: 20px;
  font-style: italic;
}
.prompts span {
  border-top: 1px solid var(--line);
  padding-top: 25px;
}
footer {
  padding: 30px 4vw;
  background: var(--ink);
  color: var(--cream);
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}
.offline-gesture {
  cursor: default;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
.offline-gesture:focus-visible {
  outline: 1px solid currentColor;
  outline-offset: 5px;
}
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.9s ease,
    transform 0.9s ease;
}
.reveal.visible {
  opacity: 1;
  transform: none;
}
.sound-toggle {
  position: fixed;
  z-index: 20;
  right: 24px;
  bottom: 24px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border: 1px solid rgba(255,255,255,.42);
  border-radius: 999px;
  background: rgba(16,27,20,.78);
  color: #fff;
  box-shadow: 0 8px 30px rgba(0,0,0,.22);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font: 600 11px/1.2 Arial, sans-serif;
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
}
.sound-toggle:hover,
.sound-toggle:focus-visible {
  background: rgba(27,47,34,.94);
  outline: 2px solid #fff;
  outline-offset: 3px;
}
.sound-toggle.is-playing .sound-icon {
  animation: sound-pulse 1.6s ease-in-out infinite;
}
.sound-icon,
.clip-sound::before {
  width: 16px;
  height: 16px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M4 9v6h4l5 4V5L8 9H4zm11.5-1.5v2a3.5 3.5 0 010 5v2a5.5 5.5 0 000-9zm2.7-2.7v2.1a7 7 0 010 10.2v2.1a9 9 0 000-14.4z'/%3E%3C/svg%3E") center/contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M4 9v6h4l5 4V5L8 9H4zm11.5-1.5v2a3.5 3.5 0 010 5v2a5.5 5.5 0 000-9zm2.7-2.7v2.1a7 7 0 010 10.2v2.1a9 9 0 000-14.4z'/%3E%3C/svg%3E") center/contain no-repeat;
}
@keyframes sound-pulse {
  50% { transform: scale(1.25); opacity: .72; }
}
@media (max-width: 760px) {
  .media-slide { min-height: 540px; }
  .aini-title { top: 42px; width: 88vw; }
  .aini-meaning { bottom: 30px; width: 86vw; }
  .bird-focus video { object-position: right center; }
  .manifesto {
    padding: 14vh 7vw;
  }
  .manifesto h1 {
    margin-bottom: 8vh;
  }
  .manifesto blockquote {
    margin-left: 0;
  }
  .place,
  .learning-grid,
  .field-note {
    grid-template-columns: 1fr;
  }
  .place {
    padding: 12vh 7vw;
  }
  .land-map {
    margin-top: 4vh;
  }
  .threat {
    padding: 12vh 6vw;
  }
  .threat-copy {
    display: block;
  }
  .threat-copy > p:last-child {
    margin-top: 35px;
  }
  .burn-evidence {
    grid-template-columns: 1fr;
  }
  .road-evidence {
    height: 78svh;
  }
  .road-evidence:after {
    background: linear-gradient(0deg, rgba(10,18,12,.82) 0%, rgba(10,18,12,.1) 70%, transparent 100%);
  }
  .road-evidence figcaption {
    left: 7vw;
    bottom: 42px;
  }
  .learning,
  .vision {
    padding: 12vh 7vw;
  }
  .learning-grid > div {
    padding-top: 0;
  }
  .vision li {
    grid-template-columns: 55px 1fr;
  }
  .field-note {
    padding: 10vh 6vw;
  }
  .prompts {
    grid-template-columns: 1fr;
  }
  .invitation {
    padding: 15vh 6vw;
  }
  footer {
    gap: 18px;
    flex-direction: column;
  }
  .scroll {
    display: none;
  }
  .sound-toggle {
    right: 14px;
    bottom: 14px;
    padding: 11px 14px;
  }
  .offline-panel { top: max(10px, env(safe-area-inset-top)); right: 10px; width: calc(100vw - 20px); }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .sound-toggle.is-playing .sound-icon {
    animation: none;
  }
}

/* Per-clip sound tap affordance (bottom-left so it clears the fixed ambient toggle) */
.clip-sound {
  position: absolute;
  left: 24px;
  bottom: 24px;
  z-index: 6;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border: 1px solid rgba(255,255,255,.42);
  border-radius: 999px;
  background: rgba(16,27,20,.60);
  color: #fff;
  box-shadow: 0 8px 30px rgba(0,0,0,.22);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font: 600 11px/1.2 Arial, sans-serif;
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .2s ease;
}
.clip-sound::before { content: ""; flex: 0 0 16px; }
.clip-sound::after { content: ""; }
.clip-sound:hover, .clip-sound:focus-visible { background: rgba(27,47,34,.94); outline: 2px solid #fff; outline-offset: 3px; }
.media-slide.sound-on .clip-sound { background: rgba(27,47,34,.92); }
.media-slide.sound-on .clip-sound::before { background: currentColor; }
.media-slide:not(.sound-on) .clip-sound::after { content: ""; position: absolute; width: 20px; height: 1px; background: currentColor; transform: rotate(-45deg); }
@media (max-width: 640px){ .clip-sound { left: 16px; bottom: 16px; padding: 10px 13px; } }
