:root {
  --paper: #f4f1e8;
  --ink: #20241e;
  --olive: #535c40;
  --line: #c9c9bc;
  --serif: 'Playfair Display', Georgia, serif;
  --sans: 'DM Sans', Arial, sans-serif;
  --ease-out: cubic-bezier(.23, 1, .32, 1);
  --gutter: clamp(1.25rem, 7vw, 8rem);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); }
a { color: inherit; }
a:focus-visible, button:focus-visible { outline: 2px solid currentColor; outline-offset: 5px; }
img { display: block; width: 100%; height: auto; }

.nav, footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 1rem var(--gutter);
  min-height: 76px;
}

.wordmark {
  font: 500 2.5rem/.9 var(--serif);
  letter-spacing: -.07em;
  text-decoration: none;
}

.wordmark sup { font: .65rem var(--sans); letter-spacing: 0; margin-left: .25rem; }
.nav nav { display: flex; gap: clamp(1rem, 3.5vw, 4rem); }
.nav nav a, .nav-cta { text-decoration: none; font-size: .9rem; }
.nav a:hover, footer a:hover { text-decoration: underline; text-underline-offset: .35em; }
.nav-cta { padding-block: .35rem; border-bottom: 1px solid; }
.menu-toggle { display: none; }

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  align-items: center;
  min-height: clamp(34rem, 83svh, 55rem);
  padding: 4rem var(--gutter);
  background: #38372e;
  color: white;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, #1b1d16e8, #1b1d1670 58%, #1b1d161a);
}

.hero-image {
  position: absolute;
  z-index: -2;
  inset: 0;
  height: 100%;
  object-fit: cover;
  object-position: 60% center;
}

h1, h2, h3, dd { font-family: var(--serif); font-weight: 400; }
h1, h2 { line-height: 1.02; letter-spacing: -.057em; margin: 0; }
h1 { font-size: clamp(3.5rem, 8vw, 8rem); }
h2 { font-size: clamp(2.75rem, 6vw, 6rem); }
h3 { margin: 0; font-size: clamp(1.75rem, 3vw, 3rem); line-height: 1.1; letter-spacing: -.045em; }
h2 em { color: var(--olive); }
.hero em, .contact em { color: #dce0c6; }
.eyebrow { text-transform: uppercase; letter-spacing: .15em; font-size: .8rem; font-weight: 700; }
.hero-content > p:not(.eyebrow), .section-heading > p:not(.eyebrow) { font-size: clamp(1rem, 1.8vw, 1.25rem); }
.hero-link, .text-link { display: inline-flex; gap: 1rem; align-items: center; padding: .5rem 0; text-underline-offset: .5em; }
.hero-link { margin-top: 1rem; }

.section { padding: clamp(4rem, 9vw, 9rem) var(--gutter); }
.section-heading { margin-bottom: clamp(2rem, 5vw, 5rem); }
.section-heading > p { max-width: 40rem; line-height: 1.6; }

.story { background: #e9e9dc; }
.story-stage { display: none; }
.chapter {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  align-items: center;
  gap: clamp(1.5rem, 5vw, 5rem);
}

.chapter + .chapter { margin-top: clamp(2.5rem, 6vw, 6rem); }
.chapter > img {
  aspect-ratio: 5 / 4;
  object-fit: cover;
  background: #bdbda9;
}

.chapter-copy { max-width: 27rem; }
.chapter-copy p { line-height: 1.7; margin-bottom: 1.5rem; }

.cinematic.story-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: clamp(2rem, 6vw, 7rem);
}

.cinematic .story-stage {
  display: block;
  position: sticky;
  top: 23vh;
  align-self: start;
  height: 54vh;
  overflow: hidden;
  isolation: isolate;
  background: #bdbda9;
}

.story-stage img {
  position: absolute;
  inset: 0;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.065);
  transition: opacity 650ms var(--ease-out), transform 950ms var(--ease-out), z-index 0s 650ms;
}

.story-stage img.is-active {
  z-index: 1;
  opacity: 1;
  transform: scale(1);
  transition-delay: 0s;
}

.cinematic .chapter { display: flex; min-height: 78vh; margin-top: 0; }
.cinematic .chapter > img { display: none; }

.impact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 0 0 1.5rem;
  border-block: 1px solid var(--line);
}

.impact-card {
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-end;
  gap: .75rem;
  padding: clamp(1rem, 3vw, 3rem);
}

.impact-card + .impact-card { border-left: 1px solid var(--line); }
.impact-card:last-child { background: var(--olive); color: white; }
.impact-card dd { margin: 0; font-size: clamp(3rem, 7vw, 7rem); line-height: 1; letter-spacing: -.06em; }

.applications { background: #e9e9dc; }
.application-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.application {
  position: relative;
  overflow: hidden;
  margin: 0;
  min-height: clamp(11rem, 21vw, 22rem);
  background: #525744;
}

.application:first-child { grid-row: span 2; }
.application img { position: absolute; inset: 0; height: 100%; object-fit: cover; }
.application figcaption {
  position: absolute;
  bottom: 0;
  padding: 2rem 1rem 1rem;
  width: 100%;
  color: white;
  background: linear-gradient(transparent, #151710d9);
}

.contact {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  align-items: start;
  gap: 2rem;
  background: #30362a;
  color: white;
}

.contact .section-heading { margin: 0; }
.contact .text-link { margin-top: 1rem; }
address { display: flex; flex-direction: column; gap: .6rem; font-style: normal; line-height: 1.6; }
footer { flex-wrap: wrap; }

@media (prefers-reduced-motion: no-preference) {
  .hero-image { animation: hero-image-in 1.5s var(--ease-out) both; }
  .hero-content > * { animation: reveal 650ms var(--ease-out) both; }
  .hero-content h1 { animation-delay: 60ms; }
  .hero-content > p:not(.eyebrow) { animation-delay: 120ms; }
  .hero-link { animation-delay: 180ms; }
  .reveal { transition: opacity 650ms var(--ease-out), transform 650ms var(--ease-out); }
  .reveal.awaiting-reveal:not(:focus-within) { opacity: 0; transform: translateY(1rem); }
  .cinematic .chapter.awaiting-reveal { opacity: 1; transform: none; }
  .impact-card:nth-child(2), .application:nth-child(2) { transition-delay: 60ms; }
  .impact-card:nth-child(3), .application:nth-child(3) { transition-delay: 120ms; }
  @keyframes hero-image-in { from { transform: scale(1.09); } to { transform: scale(1); } }
  @keyframes reveal { from { opacity: 0; transform: translateY(1rem); } to { opacity: 1; transform: none; } }
}

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

@media (max-width: 760px) {
  .chapter, .contact { grid-template-columns: 1fr; }
  .chapter > img { aspect-ratio: 6 / 4; }
}

@media (max-width: 560px) {
  .nav { flex-wrap: wrap; gap: .75rem; }
  .nav-cta { margin-left: auto; }
  .menu-toggle:not([hidden]) {
    display: block;
    color: inherit;
    padding: .55rem;
    background: transparent;
    border: 1px solid var(--line);
    font: inherit;
  }
  .nav nav { order: 1; width: 100%; flex-wrap: wrap; }
  .nav:has(.menu-toggle:not([hidden])) nav:not(.open) { display: none; }
  .hero::after { background: linear-gradient(90deg, #1b1d16e8, #1b1d1659); }
  .impact-grid { grid-template-columns: 1fr; }
  .impact-card + .impact-card { border-left: 0; border-top: 1px solid var(--line); }
  .application:first-child { grid-row: auto; grid-column: span 2; }
}
