:root {
  color-scheme: dark;
  --ink: #10110f;
  --ink-soft: #171915;
  --paper: #eceae3;
  --muted: #aaa89f;
  --moss: #a8b397;
  --line: rgba(236, 234, 227, 0.2);
  --gutter: clamp(1.25rem, 3.4vw, 4rem);
  --serif: Iowan Old Style, Baskerville, "Times New Roman", serif;
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--ink);
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

body:has(dialog[open]) {
  overflow: hidden;
}

a {
  color: inherit;
}

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

button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--moss);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  color: var(--ink);
  background: var(--paper);
  transform: translateY(-180%);
}

.skip-link:focus {
  transform: translateY(0);
}

.progress {
  position: fixed;
  inset: 0 0 auto;
  z-index: 60;
  height: 2px;
  background: transparent;
}

.progress span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--moss);
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 50;
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem var(--gutter);
  color: var(--paper);
  mix-blend-mode: difference;
}

.site-header a {
  text-decoration: none;
}

.wordmark {
  font-family: var(--serif);
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}

.site-header nav {
  display: flex;
  gap: clamp(1.25rem, 3vw, 2.5rem);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero {
  position: relative;
  display: grid;
  min-height: 100svh;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
  background: #080907;
}

.hero-panel {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
}

.hero-panel img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.86) contrast(1.03) brightness(0.84);
  transform: scale(1.025);
  animation: settle 2.2s cubic-bezier(0.2, 0.7, 0, 1) both;
}

.hero-panel--organic img {
  object-position: 55% center;
}

.hero-panel--built img {
  object-position: center;
  animation-delay: 0.12s;
}

@keyframes settle {
  from { transform: scale(1.075); opacity: 0; }
  to { transform: scale(1.025); opacity: 1; }
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(8, 9, 7, 0.24), transparent 25%, transparent 65%, rgba(8, 9, 7, 0.72)),
    linear-gradient(90deg, transparent 37%, rgba(8, 9, 7, 0.46) 50%, transparent 63%);
}

.hero-copy {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  pointer-events: none;
}

.eyebrow,
.section-index,
.hero-place,
figcaption,
.margin-note,
.motifs > p,
.lightbox-meta,
.lightbox-controls,
.scroll-cue {
  font-size: 0.72rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.eyebrow {
  margin: 0 0 1.15rem;
}

.hero h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(5rem, 12vw, 11rem);
  font-weight: 400;
  letter-spacing: -0.07em;
  line-height: 0.72;
  text-shadow: 0 0.05em 0.28em rgba(0, 0, 0, 0.28);
}

.hero-place {
  margin: 2.2rem 0 0;
}

.scroll-cue {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid currentColor;
  text-decoration: none;
  transform: translateX(-50%);
}

.introduction {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: start;
  padding: clamp(3rem, 6vw, 6rem) var(--gutter);
  border-bottom: 1px solid var(--line);
}

.section-index {
  margin: 0;
  color: var(--moss);
}

.introduction-copy {
  min-width: 0;
}

.introduction-copy h2,
.chapter-header h2,
.statement h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(3.4rem, 7vw, 7.3rem);
  font-weight: 400;
  letter-spacing: -0.055em;
  line-height: 0.9;
}

.introduction-copy .typed-heading {
  font-size: 3.825vw;
  line-height: 1.15;
  white-space: normal;
}

.typed-heading .typing-character {
  visibility: hidden;
}

.typed-heading .typing-character.is-typed {
  visibility: visible;
}

.typed-heading .typing-cursor {
  position: relative;
}

.typed-heading .typing-cursor::after {
  content: "";
  position: absolute;
  right: -0.06em;
  top: 0.12em;
  height: 0.85em;
  border-right: 1px solid currentColor;
}

.introduction-copy p {
  max-width: 41rem;
  margin: 3rem 0 0 auto;
  font-family: var(--serif);
  font-size: clamp(1.35rem, 2vw, 2.05rem);
  line-height: 1.35;
}

.margin-note {
  align-self: end;
  max-width: 13rem;
  margin: 0 0 0 auto;
  color: var(--muted);
  line-height: 1.65;
}

.chapter {
  padding: clamp(7rem, 12vw, 12rem) var(--gutter);
  border-bottom: 1px solid var(--line);
}

.frames-chapter {
  padding-top: clamp(3rem, 5vw, 6rem);
  padding-bottom: clamp(3rem, 5vw, 5rem);
  display: grid;
  gap: clamp(2.5rem, 4vw, 4rem);
}

.frames-pair {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(1.25rem, 2.5vw, 2.75rem);
  align-items: center;
}

.frames-copy h2 {
  margin: 1rem 0 2.5rem;
  font-family: var(--serif);
  font-size: clamp(3.5rem, 5.5vw, 7rem);
  font-weight: 400;
  letter-spacing: -0.055em;
  line-height: 1;
}

.frames-copy > p:not(.section-index) {
  margin: 0;
  max-width: 30em;
  color: var(--muted);
  font-family: var(--serif);
  font-size: clamp(1.25rem, 1.85vw, 2rem);
  line-height: 1.5;
}

.frames-photo { min-width: 0; margin: 0; }
.frames-photo .image-button { border-radius: 0; }
.frames-photo img { width: 100%; height: auto; }
.frames-photo figcaption {
  margin-top: 1rem;
  font-family: var(--sans);
  font-size: 0.75rem;
  font-style: normal;
  letter-spacing: 0.075em;
  line-height: 1.65;
  text-transform: uppercase;
  color: var(--muted);
  max-width: 36em;
}

.frames-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.25rem, 2.5vw, 2.75rem);
  align-items: start;
}
.frames-gallery > :nth-child(2) { margin-top: clamp(1rem, 2.5vw, 2.5rem); }
.frames-wide-left { grid-template-columns: minmax(0, 6.5fr) minmax(0, 5.5fr); }
.frames-wide-right { grid-template-columns: minmax(0, 5.5fr) minmax(0, 6.5fr); }
.frames-path { align-items: start; }
.frames-path-story { display: grid; gap: clamp(1.5rem, 2.5vw, 2.5rem); min-width: 0; }
.frames-path > .frames-photo { margin-top: clamp(1rem, 2.5vw, 2.5rem); }
.frames-closing { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: start; }
.frames-closing-story { display: grid; gap: clamp(1.5rem, 2.5vw, 2.5rem); min-width: 0; }
.sequence-stack { display: grid; gap: clamp(1.5rem, 2.5vw, 2.5rem); min-width: 0; }
.sequence-landscape { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.sequence-tall-pair { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.sequence-tall-pair > :nth-child(2) { margin-top: 0; }

@media (max-width: 820px) {
  .frames-pair, .frames-gallery { grid-template-columns: 1fr; gap: 2rem; }
  .frames-copy > p:not(.section-index) { font-size: 1.35rem; }
  .frames-gallery > :nth-child(2), .frames-path > .frames-photo { margin-top: 0; }
}

.chapter-header {
  display: grid;
  grid-template-columns: 2fr 6fr 4fr;
  gap: 2rem;
  align-items: start;
  margin-bottom: clamp(6rem, 12vw, 12rem);
}

.chapter-header h2 {
  font-size: clamp(3.5rem, 6.4vw, 6.8rem);
}

.chapter-header h2.long-title {
  font-size: clamp(3.15rem, 5.25vw, 5.8rem);
}

.chapter-header > p:last-child {
  max-width: 29rem;
  margin: 0;
  color: var(--muted);
  font-family: var(--serif);
  font-size: clamp(1.15rem, 1.5vw, 1.4rem);
  line-height: 1.45;
}

.image-sequence {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: clamp(1rem, 2.5vw, 2.75rem);
  row-gap: clamp(5rem, 10vw, 10rem);
  align-items: start;
}

.artwork {
  margin: 0;
  grid-column: span 6;
}

.artwork--4 { grid-column: span 4; }
.artwork--5 { grid-column: span 5; }
.artwork--7 { grid-column: span 7; }
.artwork--8 { grid-column: span 8; }
.artwork--lower { margin-top: clamp(3rem, 8vw, 8rem); }

.image-button {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: #090a08;
  color: inherit;
  cursor: zoom-in;
}

.image-button img {
  display: block;
  width: 100%;
  height: auto;
  transition: filter 450ms ease, transform 650ms cubic-bezier(0.2, 0.7, 0, 1);
}

.image-button:hover img {
  filter: brightness(1.04);
  transform: scale(1.012);
}

figcaption {
  display: flex;
  justify-content: space-between;
  margin-top: 0.8rem;
  color: var(--muted);
}

.chapter--green {
  background: #151913;
}

.chapter--closing {
  padding-bottom: clamp(9rem, 16vw, 17rem);
}

.interlude {
  min-height: 72svh;
  display: grid;
  place-items: center;
  padding: 7rem var(--gutter);
  background: var(--paper);
  color: var(--ink);
  text-align: center;
}

.interlude p {
  max-width: 17ch;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(3rem, 7.3vw, 7.8rem);
  letter-spacing: -0.055em;
  line-height: 0.98;
}

.interlude--dark {
  min-height: 64svh;
  background:
    radial-gradient(circle at 70% 20%, rgba(168, 179, 151, 0.12), transparent 35%),
    #080907;
  color: var(--paper);
}

.statement {
  display: grid;
  grid-template-columns: 6fr 4fr 2fr;
  gap: clamp(2rem, 4vw, 5rem);
  padding: clamp(8rem, 14vw, 14rem) var(--gutter);
  background: var(--paper);
  color: var(--ink);
}

.statement h2 {
  margin-top: 2rem;
  font-size: clamp(3.6rem, 6vw, 6.8rem);
}

.statement-body {
  padding-top: 3.1rem;
}

.statement-body p {
  margin: 0 0 1.5rem;
}

.statement-body .lead {
  margin-bottom: 2.5rem;
  font-family: var(--serif);
  font-size: clamp(1.55rem, 2.2vw, 2.2rem);
  line-height: 1.3;
}

.motifs {
  padding-top: 3.1rem;
  border-top: 1px solid rgba(16, 17, 15, 0.22);
}

.motifs > p {
  margin: 0 0 1.5rem;
}

.motifs ul {
  margin: 0;
  padding: 0;
  list-style: none;
  color: #55584f;
}

.motifs li {
  padding: 0.7rem 0;
  border-bottom: 1px solid rgba(16, 17, 15, 0.16);
}

footer {
  display: grid;
  grid-template-columns: 6fr 4fr 2fr;
  gap: 2rem;
  align-items: end;
  min-height: 42svh;
  padding: 5rem var(--gutter) 2.5rem;
  background: #080907;
}

footer p,
footer a {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  line-height: 1.75;
  text-transform: uppercase;
}

footer p:first-child {
  color: var(--paper);
  font-family: var(--serif);
  font-size: clamp(2.5rem, 5vw, 5rem);
  letter-spacing: -0.04em;
  line-height: 1;
  text-transform: none;
}

footer a {
  justify-self: end;
  text-underline-offset: 0.3em;
}

.lightbox {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(8, 9, 7, 0.98);
  color: var(--paper);
}

.lightbox::backdrop {
  background: rgba(8, 9, 7, 0.95);
}

.lightbox[open] {
  display: grid;
  grid-template: auto 1fr auto / 1fr;
  animation: appear 220ms ease both;
}

@keyframes appear {
  from { opacity: 0; }
  to { opacity: 1; }
}

.lightbox form {
  position: absolute;
  top: 1.25rem;
  right: var(--gutter);
  z-index: 2;
}

.lightbox button {
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.lightbox-close,
.lightbox-controls button {
  font-size: 0.72rem !important;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.lightbox-stage {
  display: grid;
  min-height: 0;
  grid-row: 1 / 3;
  place-items: center;
  padding: 4.5rem var(--gutter) 6.5rem;
}

.lightbox-stage img {
  display: block;
  max-width: 100%;
  max-height: calc(100svh - 11rem);
  object-fit: contain;
}

.lightbox-meta {
  position: absolute;
  bottom: 2rem;
  left: var(--gutter);
}

.lightbox-meta p {
  margin: 0.2rem 0 0;
}

.lightbox-detail {
  color: var(--muted);
}

.lightbox-controls {
  position: absolute;
  right: var(--gutter);
  bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 1.4rem;
}

.lightbox-count {
  min-width: 3.5rem;
  margin: 0;
  color: var(--muted);
  text-align: center;
}

.reveal {
  opacity: 1;
  transform: none;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (max-width: 820px) {
  .site-header {
    padding-top: 1rem;
  }

  .hero {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr 1fr;
  }

  .hero-panel {
    min-height: 50svh;
  }

  .hero-shade {
    background: linear-gradient(180deg, rgba(8, 9, 7, 0.22), transparent 30%, rgba(8, 9, 7, 0.46) 50%, transparent 70%, rgba(8, 9, 7, 0.7));
  }

  .hero h1 {
    font-size: clamp(4.8rem, 24vw, 8rem);
  }

  .introduction,
  .chapter-header,
  .statement,
  footer {
    grid-template-columns: 1fr;
  }

  .introduction {
    min-height: auto;
    gap: 3rem;
  }

  .introduction-copy {
    grid-column: auto;
  }

  .introduction-copy p {
    margin-left: 0;
  }

  .margin-note {
    margin: 1rem 0 0;
  }

  .chapter-header {
    gap: 2.2rem;
  }

  .chapter-header > p:last-child {
    max-width: 36rem;
  }

  .chapter-header h2.long-title {
    font-size: clamp(3rem, 12vw, 5rem);
  }

  .image-sequence {
    column-gap: 0.9rem;
    row-gap: 4.5rem;
  }

  .artwork,
  .artwork--4,
  .artwork--5,
  .artwork--7,
  .artwork--8 {
    grid-column: span 12;
  }

  .artwork--lower {
    margin-top: 0;
  }

  .image-sequence .artwork:nth-child(3n + 1) {
    width: 88%;
  }

  .image-sequence .artwork:nth-child(3n + 2) {
    width: 86%;
    margin-left: auto;
  }

  .interlude {
    min-height: 60svh;
  }

  .statement {
    gap: 3rem;
  }

  .statement-body,
  .motifs {
    padding-top: 0;
  }

  footer {
    gap: 2.5rem;
  }

  footer a {
    justify-self: start;
  }

  .lightbox-meta {
    bottom: 5.2rem;
  }

  .lightbox-controls {
    right: auto;
    bottom: 1.5rem;
    left: var(--gutter);
    width: calc(100% - (var(--gutter) * 2));
    justify-content: space-between;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
