/* Into the Forest: a quiet, image-led walk through the four seasons. */
body.page-forest {
  --forest-ink: #e9e6d9;
  --forest-soft: #c0c8bd;
  --forest-line: rgba(232, 235, 218, .25);
  color: var(--forest-ink);
  background: #071310;
}

body.page-forest::before { opacity: .12; }
body.page-forest em { color: inherit; }
body.page-forest .site-header {
  color: var(--forest-ink);
  background: #0b1715;
  border-color: rgba(225, 230, 210, .18);
}
body.page-forest .brand img { filter: brightness(0) invert(.89); }
body.page-forest .site-header nav a,
body.page-forest .site-header nav .nav-dropdown-toggle { color: var(--forest-ink); }
body.page-forest .site-header nav a:hover,
body.page-forest .site-header nav .nav-dropdown-toggle:hover,
body.page-forest .site-header nav a[aria-current="page"] { color: #d7c59e; }
body.page-forest .site-header nav .dropdown-panel {
  background: #152320;
  border-color: rgba(225, 230, 210, .25);
  box-shadow: 0 20px 45px #020909aa;
}
body.page-forest .menu-toggle span { background: var(--forest-ink); }
body.page-forest footer {
  color: #b8c5b9;
  background: #07110f;
  border-color: rgba(225, 230, 210, .2);
}
body.page-forest footer > span:first-child { color: #d2c7a9; }
body.page-forest footer small { color: #b8c5b9; }

/* A forest edge, with space to read the first invitation. */
body.page-forest section.forest-threshold {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: min(900px, calc(100svh - 87px));
  padding: clamp(6rem, 12vh, 10rem) 8vw 5rem;
  isolation: isolate;
  overflow: hidden;
  background: #0c1713;
}
.forest-threshold-image,
.forest-threshold-ink,
.forest-wood,
.forest-weather,
.forest-ink { position: absolute; inset: 0; pointer-events: none; }
.forest-threshold-image {
  z-index: -2;
  background: linear-gradient(90deg, #0a1513 5%, #0a1513e3 33%, #0a151355 64%, #0a151377 100%),
    linear-gradient(0deg, #0a1513 0%, transparent 36%),
    url('/assets/forest/composites/summer-forest.webp') 74% 42% / cover no-repeat;
  filter: saturate(.78) contrast(1.05);
  transform: scale(1.015);
}
.forest-threshold-ink,
.forest-ink {
  z-index: -1;
  background: url('/assets/forest/ink-branches.svg') center / cover no-repeat;
  opacity: .33;
  mix-blend-mode: screen;
}
.forest-threshold-copy { position: relative; z-index: 2; max-width: 800px; }
.forest-kicker,
.forest-threshold-count,
.forest-chapter-number {
  display: block;
  font: 600 .7rem/1.4 var(--sans);
  letter-spacing: .2em;
  text-transform: uppercase;
  color: #d2c9ac;
}
.forest-threshold h1 {
  margin: 1.8rem 0 2.6rem;
  max-width: 790px;
  font-size: clamp(5.6rem, 10.5vw, 11.5rem);
  line-height: .84;
  letter-spacing: -.055em;
  text-wrap: balance;
  text-shadow: 0 2px 34px #07100c92;
}
.forest-threshold h1 em { display: block; color: #d6c5a3; }
.forest-enter {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
  min-width: 175px;
  padding: .85rem 0;
  border-top: 1px solid #c9d2b1a8;
  border-bottom: 1px solid #c9d2b1a8;
  color: #f3efdc;
  font: 600 .72rem/1.3 var(--sans);
  text-transform: uppercase;
  letter-spacing: .2em;
  transition: color .25s, border-color .25s;
}
.forest-enter span { font-size: 1.35rem; line-height: .7; transition: transform .25s; }
.forest-enter:hover { color: #e3bb79; border-color: #e3bb79; }
.forest-enter:hover span { transform: translateY(5px); }
.forest-threshold-count {
  position: absolute;
  bottom: 3.5rem;
  right: 8vw;
  font-size: .62rem;
  color: #dfdfce;
}

/* The wayfinder remains visible as the visitor moves through the year. */
.forest-wayfinder {
  position: sticky;
  top: 0;
  z-index: 45;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: stretch;
  padding: 0 6vw;
  min-height: 70px;
  background: rgba(9, 22, 19, .92);
  border-top: 1px solid #dce6d021;
  border-bottom: 1px solid #dce6d036;
  backdrop-filter: blur(14px);
}
.forest-nav { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: stretch; max-width: 900px; }
.forest-nav a {
  position: relative;
  display: flex;
  align-items: center;
  padding: 0 1rem;
  color: #c2cbbd;
  font: 600 .72rem/1.2 var(--sans);
  text-transform: uppercase;
  letter-spacing: .17em;
  transition: color .2s;
}
.forest-nav a:hover,
.forest-nav a[aria-current="location"] { color: #fff9e7; }
.forest-nav a[aria-current="location"]::after {
  content: '';
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: 0;
  height: 2px;
  background: #d7c59e;
}
.forest-motion-toggle {
  align-self: center;
  padding: .5rem .75rem;
  color: #d3d8ca;
  background: transparent;
  border: 1px solid #dce6d060;
  cursor: pointer;
  font: 500 .65rem/1.2 var(--sans);
  letter-spacing: .12em;
  text-transform: uppercase;
}
.forest-motion-toggle:hover { color: #fff; border-color: #fff; }
.forest-progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: transparent; }
.forest-progress-fill { display: block; width: 0; height: 100%; background: #e2c9a0; }

/* The image is the exhibit. The forest is scenery, and the words are kept brief. */
body.page-forest section.forest-chapter {
  --season-accent: #dfc287;
  position: relative;
  min-height: 0;
  padding: 0 7vw;
  isolation: isolate;
  overflow: visible;
  scroll-margin-top: 70px;
  background: #121a13;
}
.forest-chapter::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(90deg, #0d1915f5 0%, #0d1915d9 31%, #0d191598 58%, #0d1915be 100%),
    linear-gradient(0deg, #071310 0%, transparent 28%, transparent 74%, #071310c0 100%);
}
.forest-wood { z-index: -3; overflow: hidden; }
.forest-wood-image,
.forest-wood-spring { display: block; width: 100%; height: 100%; object-fit: cover; }
.forest-wood-image { filter: saturate(.66) contrast(1.07) brightness(.82); }
.forest-ink { z-index: -1; opacity: .22; }
.forest-chapter-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(240px, .75fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
  max-width: 1550px;
  margin: 0 auto;
}
.forest-story-track { min-width: 0; }
.forest-story-step {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 88svh;
  opacity: .5;
  transition: opacity .35s ease;
}
.forest-story-step.is-active { opacity: 1; }
.forest-chapter-number { color: var(--season-accent); }
.forest-chapter h2 {
  margin: 1.7rem 0 2.25rem;
  color: #f6f1e8;
  font-size: clamp(6rem, 10vw, 11rem);
  line-height: .88;
  letter-spacing: -.055em;
  text-shadow: 0 5px 32px #06100bb0;
}
.forest-poem-line {
  max-width: 25ch;
  padding-top: 1.4rem;
  border-top: 1px solid color-mix(in srgb, var(--season-accent) 75%, transparent);
  color: #f1eee3;
  font: italic clamp(1.5rem, 2.5vw, 2.4rem)/1.25 var(--serif);
  text-wrap: balance;
}
.forest-artwork {
  position: sticky;
  top: calc(70px + 1svh);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .9rem;
  height: calc(100svh - 80px);
  width: 100%;
  max-width: 780px;
  justify-self: start;
}
.forest-photo {
  display: block;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: #0d1716;
  color: inherit;
  cursor: zoom-in;
  box-shadow: 0 24px 75px #020807a8;
  transition: transform .35s ease, box-shadow .35s ease, border-color .35s ease;
}
.forest-photo:hover { transform: translateY(-5px); box-shadow: 0 30px 85px #020807d0; }
.forest-main-photo {
  position: relative;
  width: 100%;
  min-width: 0;
  height: min(74svh, 780px);
  padding: clamp(.45rem, .7vw, .75rem);
  border: 1px solid #eee9d357;
  background: #13201d9c;
}
.forest-photo-stack { position: relative; display: block; width: 100%; height: 100%; }
.forest-main-photo .forest-image {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  opacity: 0;
  transition: opacity .65s ease;
}
.forest-main-photo .forest-image.is-active { opacity: 1; z-index: 1; }

/* Colour changes are like light passing through the same trees. */
.page-forest section.forest-summer { --season-accent: #e6bd78; }
.forest-summer .forest-wood-image { object-position: center 52%; filter: saturate(.72) contrast(1.05) brightness(.66); }
.forest-summer .forest-artwork img,
.forest-dialog[data-season='summer'] img { filter: contrast(1.06) saturate(.93); }
.page-forest section.forest-autumn { --season-accent: #d8a575; }
.forest-autumn .forest-wood-image { object-position: 56% 45%; filter: saturate(.69) sepia(.12) brightness(.75); }
.forest-autumn .forest-artwork img,
.forest-dialog[data-season='autumn'] img { filter: contrast(1.08) saturate(.90); }
.forest-autumn::before {
  background: linear-gradient(90deg, #181b13f5 0%, #181b13dc 34%, #181b1389 65%, #181b13b0 100%),
    linear-gradient(0deg, #101710 0%, transparent 30%, #10171093 100%);
}
.page-forest section.forest-winter { --season-accent: #c4d9e9; }
.forest-winter .forest-wood-image { filter: saturate(.67) contrast(1.1) brightness(.76); }
.forest-winter .forest-artwork img,
.forest-dialog[data-season='winter'] img { filter: contrast(1.09) saturate(.90); }
.forest-winter::before {
  background: linear-gradient(90deg, #0a1520ef 0%, #0a1520db 34%, #0a152090 65%, #0a1520b5 100%),
    linear-gradient(0deg, #07101a 0%, transparent 30%, #07101a9e 100%);
}
.page-forest section.forest-spring { --season-accent: #d5c6c5; }
.forest-spring .forest-artwork img,
.forest-dialog[data-season='spring'] img { filter: brightness(.94) contrast(1.06) saturate(.88); }
.forest-wood-spring {
  background: radial-gradient(circle at 75% 30%, #78926b60, transparent 34%),
    radial-gradient(circle at 37% 80%, #9c656870, transparent 33%),
    radial-gradient(circle at 20% 15%, #c6ac8266, transparent 25%),
    linear-gradient(125deg, #0d201b, #17291f 45%, #27302c 80%, #0b1916);
  filter: blur(7px);
  transform: scale(1.04);
}
.forest-spring::before {
  background: linear-gradient(90deg, #101b18ee 0%, #101b18c7 34%, #101b188d 65%, #101b18b5 100%),
    linear-gradient(0deg, #071310 0%, transparent 30%, #0713109e 100%);
}

/* Hand-cut silhouettes: pollen, leaves, snow and petals. */
.forest-weather {
  position: sticky;
  inset: auto;
  top: 0;
  z-index: 5;
  height: 100svh;
  margin-bottom: -100svh;
  overflow: hidden;
}
.forest-particle {
  position: absolute;
  top: -7%;
  left: var(--x);
  width: var(--size);
  height: var(--size);
  opacity: 0;
  filter: drop-shadow(0 1px 2px #050b0a75);
  animation: forest-fall var(--duration) linear var(--delay) infinite;
  will-change: transform;
}
.forest-particle--pollen {
  width: calc(var(--size) * 1.8);
  height: 1px;
  border-radius: 100%;
  background: #f7daa0;
  box-shadow: 0 0 8px 2px #d8a45172;
}
.forest-particle--leaf {
  width: calc(var(--size) * 1.5);
  height: calc(var(--size) * .65);
  border-radius: 100% 0 100% 0;
  border: 1px solid #e4b47f99;
  background: linear-gradient(135deg, #b76541, #6f6235);
}
.forest-particle--snow {
  border-radius: 50%;
  background: #e9f1f0;
  box-shadow: 0 0 10px #c7dff7a3;
}
.forest-particle--petal {
  width: calc(var(--size) * 1.3);
  height: calc(var(--size) * .7);
  border-radius: 70% 20% 70% 25%;
  background: #e5c7c9;
  box-shadow: inset -2px -1px 3px #ad858d70;
}
@keyframes forest-fall {
  0% { opacity: 0; transform: translate3d(0, -4vh, 0) rotate(0); }
  8% { opacity: var(--opacity); }
  86% { opacity: var(--opacity); }
  100% { opacity: 0; transform: translate3d(var(--drift), 115vh, 0) rotate(var(--spin)); }
}
.page-forest.forest-motion-paused .forest-particle,
.page-forest.forest-motion-paused .forest-enter span { animation-play-state: paused; }

body.page-forest section.forest-end {
  min-height: 65svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  padding: 7rem 6vw;
  text-align: center;
  background: radial-gradient(circle at 50% 0, #31523a55, transparent 44%), #071310;
}
.forest-end p {
  margin: 0;
  color: #f0ecdf;
  font: italic clamp(3.6rem, 7vw, 7.5rem)/1 var(--serif);
  letter-spacing: -.04em;
}
.forest-end a {
  padding: .5rem 0;
  border-bottom: 1px solid #d2c7a9;
  color: #d2c7a9;
  font: 600 .72rem/1.4 var(--sans);
  text-transform: uppercase;
  letter-spacing: .16em;
}
.forest-end a:hover { color: #fff; border-color: #fff; }

/* The opened photograph is always shown whole. */
.forest-dialog {
  position: fixed;
  inset: 0;
  box-sizing: border-box;
  width: 100%;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: clamp(3.5rem, 6vw, 5rem);
  overflow: hidden;
  border: 0;
  background: #071310f7;
  color: white;
}
.forest-dialog[open] { display: flex; align-items: center; justify-content: center; }
.forest-dialog::backdrop { background: #020807e8; }
.forest-dialog img {
  display: block;
  width: auto;
  height: auto;
  max-width: min(calc(100vw - 7rem), 1350px);
  max-height: calc(100dvh - 8rem);
  object-fit: contain;
  box-shadow: 0 15px 65px #020706a6;
}
.forest-dialog-close {
  position: absolute;
  top: 1.2rem;
  right: 1.4rem;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid #ffffff91;
  border-radius: 50%;
  color: white;
  background: #0d201ac9;
  cursor: pointer;
  font-size: 1.8rem;
  line-height: 1;
}
.forest-dialog-close:hover { background: #263d34; }
.forest-enter:focus-visible,
.forest-nav a:focus-visible,
.forest-motion-toggle:focus-visible,
.forest-photo:focus-visible,
.forest-end a:focus-visible,
.forest-dialog-close:focus-visible {
  outline: 2px solid #f3d599;
  outline-offset: 4px;
}

@media (max-width: 1100px) {
  body.page-forest .site-header nav.open {
    background: #14221e;
    border-color: #e7e9d939;
  }
  body.page-forest .site-header nav .dropdown-panel {
    background: transparent;
    box-shadow: none;
  }
  .forest-chapter h2 { font-size: clamp(5.5rem, 9vw, 8.5rem); }
}
@media (max-width: 800px) {
  body.page-forest section.forest-threshold { min-height: calc(100svh - 75px); padding: 7rem 7vw 5rem; }
  .forest-threshold-image { background-position: 65% center; }
  .forest-threshold h1 { font-size: clamp(5rem, 14vw, 7rem); }
  .forest-threshold-count { bottom: 2.5rem; left: 7vw; right: auto; }
  .forest-wayfinder { grid-template-columns: 1fr; padding: 0 4vw; min-height: 80px; }
  .forest-nav { width: 100%; max-width: none; }
  .forest-nav a { justify-content: center; padding: .9rem .2rem; text-align: center; font-size: .63rem; letter-spacing: .1em; }
  .forest-nav a[aria-current="location"]::after { left: .2rem; right: .2rem; }
  .forest-motion-toggle { justify-self: end; margin-bottom: .65rem; padding: .3rem .5rem; font-size: .55rem; }
  body.page-forest section.forest-chapter { min-height: 0; padding: 0 6vw; scroll-margin-top: 80px; }
  .forest-chapter::before,
  .forest-autumn::before,
  .forest-winter::before,
  .forest-spring::before { background: linear-gradient(0deg, #0b1917f5, #0b1917ba 45%, #0b1917da); }
  .forest-chapter-inner { display: block; min-height: 0; }
  .forest-story-track { position: relative; z-index: 2; }
  .forest-story-step { min-height: 74svh; justify-content: flex-end; padding: 0 0 5svh; }
  .forest-story-step:first-child { min-height: 55svh; }
  .forest-chapter h2 { font-size: clamp(5.5rem, 15vw, 8rem); margin: 1rem 0 1.5rem; }
  .forest-poem-line { font-size: clamp(1.55rem, 4.5vw, 2rem); }
  .forest-artwork { z-index: 3; top: 78px; height: min(58svh, 560px); max-width: none; }
  .forest-main-photo { height: 100%; }
}
@media (max-width: 540px) {
  .forest-threshold-image { background: linear-gradient(0deg, #081613ee 0%, #08161398 52%, #0816137c 100%), url('/assets/forest/composites/summer-forest.webp') 60% center / cover no-repeat; }
  .forest-threshold h1 { margin: 1.3rem 0 2rem; font-size: clamp(4.35rem, 17vw, 6rem); }
  .forest-kicker { max-width: 24ch; }
  .forest-threshold-count { font-size: .55rem; }
  .forest-wayfinder { padding: 0 3vw; }
  .forest-nav a { font-size: .56rem; letter-spacing: .05em; }
  body.page-forest section.forest-chapter { padding: 0 5vw; }
  .forest-chapter h2 { font-size: clamp(5rem, 18vw, 6.5rem); }
  .forest-artwork { top: 76px; height: min(55svh, 510px); }
  .forest-story-step { min-height: 72svh; }
  .forest-story-step:first-child { min-height: 52svh; }
  .forest-dialog { padding: 4rem .6rem 1rem; }
  .forest-dialog img { max-width: calc(100vw - 1.2rem); max-height: calc(100dvh - 5rem); }
  .forest-dialog-close { top: .8rem; right: .8rem; }
}
@media (prefers-reduced-motion: reduce) {
  .forest-particle { display: none; animation: none; }
  .forest-image,
  .forest-story-step { transition: none !important; }
  .forest-photo,
  .forest-enter,
  .forest-enter span { transition: none; }
}
