@import url('https://fonts.googleapis.com/css2?family=Onest:wght@400;500;600;700;800&display=swap');

:root {
  --moss: oklch(47% 0.132 240);
  --sage: oklch(80% 0.025 231);
  --clay: oklch(92% 0.031 229);
  --terracotta: oklch(55% 0.118 238);
  --ochre: oklch(61% 0.102 235);
  --sand: oklch(98% 0.009 231);
  --oat: oklch(92% 0.031 229);
  --ink: oklch(28% 0.047 241);
  --ink-soft: oklch(40% 0.039 238);
  --ink-muted: oklch(54% 0.029 235);
  --surface: oklch(95% 0.021 229);
  --surface-deep: oklch(89% 0.034 229);
  --rule: oklch(80% 0.025 231 / .55);
  --display: "Onest", "Segoe UI", Arial, sans-serif;
  --body: "Onest", "Segoe UI", Arial, sans-serif;
  --content-max: 88rem;
  --space-1: .5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
  --space-5: 3rem;
  --space-6: 4.5rem;
  --space-7: 6.75rem;
  --space-8: 9rem;
}

* { box-sizing: border-box; }

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

@view-transition { navigation: auto; }

::view-transition-group(primary-navigation) {
  animation-duration: .34s;
  animation-timing-function: cubic-bezier(.22, 1, .36, 1);
}

::view-transition-old(page-content) {
  animation: page-fade-out .18s ease both;
}

::view-transition-new(page-content) {
  animation: page-fade-in .34s cubic-bezier(.22, 1, .36, 1) both;
}

@keyframes page-fade-out {
  to { opacity: 0; transform: translateY(-5px); }
}

@keyframes page-fade-in {
  from { opacity: 0; transform: translateY(8px); }
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background: var(--sand);
  font-family: var(--body);
  font-size: 16px;
  font-kerning: normal;
  line-height: 1.7;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; }
figure { margin: 0; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

:focus-visible { outline: 3px solid var(--terracotta); outline-offset: 4px; }

.skip-link {
  position: fixed;
  z-index: 120;
  top: 1rem;
  left: 1rem;
  padding: .75rem 1rem;
  border-radius: 999px;
  color: var(--sand);
  background: var(--moss);
  transform: translateY(-180%);
  transition: transform .18s ease-out;
}

.skip-link:focus { transform: translateY(0); }
.site-frame { min-height: 100vh; }

.site-rail {
  position: fixed;
  z-index: 50;
  top: 1.25rem;
  left: 50%;
  display: flex;
  width: min(calc(100% - 4rem), 88rem);
  min-height: 4.5rem;
  align-items: center;
  padding: .7rem 0;
  transform: translateX(-50%);
  transition: background .35s ease, box-shadow .35s ease, top .35s ease;
  view-transition-name: primary-navigation;
}

body.nav-scrolled .site-rail {
  top: .7rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .8rem;
  color: var(--ink);
  text-decoration: none;
}

.brand__monogram { display: none; }

.brand__name { font-size: .9rem; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; text-shadow: 0 0 18px oklch(98% 0.009 231 / .9); }
.site-nav { display: flex; gap: .15rem; margin-left: auto; }

.site-nav a {
  position: relative;
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  padding: .55rem .9rem;
  color: var(--ink-soft);
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .055em;
  text-decoration: none;
  text-transform: uppercase;
  transition: color .2s ease, text-shadow .2s ease, transform .2s ease;
}

.site-nav a:hover,
.site-nav a:focus-visible { color: var(--terracotta); text-shadow: 0 0 12px oklch(55% 0.118 238 / .45), 0 0 24px oklch(80% 0.06 230 / .5); transform: translateY(-1px); }
.site-nav a[aria-current="page"] { color: var(--terracotta); text-shadow: 0 0 10px oklch(55% 0.118 238 / .3); }
.site-nav .nav-email { color: var(--moss); }

.rail-note, .rail-footer, .mobile-header, .mobile-nav { display: none; }
.site-main { min-width: 0; overflow: clip; view-transition-name: page-content; }
.site-main.is-leaving { opacity: 0; transform: translateY(-5px); transition: opacity .18s ease, transform .18s ease; }
.content-width { width: min(calc(100% - clamp(2rem, 7vw, 8rem)), var(--content-max)); margin-inline: auto; }

.eyebrow,
.section-meta,
.intro-band__label,
.page-map__title {
  margin: 0 0 var(--space-3);
  color: var(--terracotta);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .12em;
  line-height: 1.4;
  text-transform: uppercase;
}

h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { text-wrap: balance; }
h1, h2 { font-family: var(--display); font-weight: 800; letter-spacing: -.055em; }
h1 { max-width: 12ch; margin-bottom: var(--space-4); font-size: clamp(3.25rem, 6vw, 6.8rem); line-height: .94; }
h2 { margin-bottom: var(--space-3); font-size: clamp(2.1rem, 3.65vw, 4.1rem); line-height: 1.03; }
h3 { margin-bottom: .7rem; font-size: clamp(1.1rem, 1.55vw, 1.42rem); font-weight: 600; letter-spacing: -.025em; line-height: 1.3; }
p { text-wrap: pretty; }

.text-link {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  padding: .72rem 1.15rem;
  border-radius: 999px;
  color: var(--sand);
  background: var(--moss);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .075em;
  text-decoration: none;
  text-transform: uppercase;
  transition: background .2s ease, transform .2s ease;
}

.text-link::after { margin-left: .8rem; content: "→"; font-size: 1rem; }
.text-link:hover { background: var(--terracotta); transform: translateY(-2px); }

.home-hero {
  position: relative;
  min-height: 100svh;
  background: var(--oat);
  isolation: isolate;
}

.home-hero__backdrop { position: absolute; z-index: -2; inset: 0; }
.home-hero__backdrop img { width: 100%; height: 100%; object-fit: cover; }

.home-hero__backdrop::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, oklch(98% 0.009 231 / .98) 0%, oklch(98% 0.009 231 / .9) 40%, oklch(92% 0.031 229 / .28) 70%, oklch(47% 0.08 238 / .12) 100%);
  content: "";
}

.home-hero__inner {
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(24rem, .72fr);
  gap: clamp(3rem, 7vw, 8rem);
  align-items: end;
  min-height: 100svh;
  padding-top: 9.5rem;
  padding-bottom: clamp(3rem, 7vh, 6rem);
}

.home-hero__copy { max-width: 47rem; padding-bottom: 2.5rem; }
.home-hero__lead { max-width: 58ch; margin-bottom: var(--space-4); color: var(--ink-soft); font-size: clamp(1rem, 1.25vw, 1.17rem); }
.home-hero__media { position: relative; align-self: stretch; min-height: 38rem; }

.contact-link {
  display: grid;
  width: fit-content;
  max-width: 100%;
  gap: .3rem;
  margin: var(--space-5) 0 0;
  color: var(--ink-muted);
  font-size: .72rem;
  line-height: 1.45;
}

.contact-link span { font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.contact-link a { color: var(--moss); font-size: clamp(.85rem, 1.1vw, 1rem); font-weight: 700; letter-spacing: 0; overflow-wrap: anywhere; text-decoration-color: var(--terracotta); text-decoration-thickness: 1px; text-underline-offset: .28em; }
.contact-link a:hover { color: var(--terracotta); }
.contact-link--hero { margin-top: var(--space-3); }

.portrait {
  position: absolute;
  right: 0;
  bottom: 0;
  width: min(28rem, 85%);
  padding: .65rem;
  border-radius: 2rem;
  background: oklch(98% 0.009 231 / .72);
  box-shadow: 0 28px 70px oklch(28% 0.047 241 / .2);
  backdrop-filter: blur(12px);
}

.portrait img { width: 100%; height: min(62vh, 39rem); border-radius: 1.55rem; object-fit: cover; object-position: 50% 20%; }
.portrait figcaption { padding: .8rem .45rem .25rem; color: var(--ink-soft); font-size: .65rem; line-height: 1.5; }

.intro-band { padding: var(--space-7) 0; background: var(--moss); color: var(--sand); }
.intro-band__grid { display: grid; grid-template-columns: minmax(12rem, .42fr) minmax(0, 1fr); gap: clamp(2rem, 9vw, 10rem); }
.intro-band__label { color: var(--oat); }
.intro-band__statement { max-width: 50rem; margin: 0; font-size: clamp(1.6rem, 2.55vw, 2.9rem); font-weight: 700; letter-spacing: -.04em; line-height: 1.2; }

.photo-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(13rem, .33fr);
  gap: clamp(1rem, 2vw, 2rem);
  align-items: end;
  padding: var(--space-7) 0 0;
}

.photo-band figure { overflow: hidden; border-radius: 2rem; }
.photo-band__wide img { width: 100%; height: clamp(25rem, 48vw, 45rem); object-fit: cover; }
.photo-band__detail { margin-bottom: -3rem; box-shadow: 0 25px 55px oklch(28% 0.047 241 / .14); }
.photo-band__detail img { width: 100%; height: clamp(17rem, 26vw, 26rem); object-fit: cover; }

.home-overview { display: grid; grid-template-columns: minmax(12rem, .34fr) minmax(0, 1fr); gap: clamp(2rem, 9vw, 10rem); padding: calc(var(--space-8) + 2rem) 0 var(--space-8); }
.home-overview__content { max-width: 58rem; }
.home-overview__content > p { max-width: 68ch; color: var(--ink-soft); font-size: 1.05rem; }
.plain-list { display: grid; margin: var(--space-5) 0 0; padding: 0; list-style: none; }
.plain-list li { display: grid; grid-template-columns: 8.5rem minmax(0, 1fr); gap: var(--space-2); padding: 1.35rem 0; border-top: 1px solid var(--rule); color: var(--ink-soft); }
.plain-list li:last-child { border-bottom: 1px solid var(--rule); }
.plain-list strong { color: var(--moss); font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }

.page-map { padding: var(--space-7) 0 var(--space-8); color: var(--sand); background: var(--terracotta); }
.page-map__title { color: var(--sand); }
.page-map__links { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }

.page-map a {
  display: flex;
  min-height: 14rem;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.5rem;
  border: 1px solid rgba(232, 220, 199, .28);
  border-radius: 1.5rem;
  color: inherit;
  text-decoration: none;
  transition: background .25s ease, transform .25s ease;
}

.page-map a:hover { background: rgba(232, 220, 199, .12); transform: translateY(-5px); }
.page-map h3 { color: var(--sand); font-size: 1.55rem; }
.page-map p { margin: 0; color: var(--sand); font-size: .82rem; line-height: 1.6; opacity: .86; }

.site-footer { display: flex; justify-content: space-between; gap: var(--space-3); padding: var(--space-4) 0; color: var(--ink-muted); font-size: .66rem; }
.site-footer p { margin: 0; }

.document-hero {
  display: grid;
  grid-template-columns: minmax(24rem, 1.08fr) minmax(0, .92fr);
  min-height: 48rem;
  padding-top: 0;
  background: var(--surface);
}

.document-hero__image { position: relative; min-height: 48rem; overflow: hidden; border-radius: 0 0 3rem 0; }
.document-hero__image > img:first-child { width: 100%; height: 100%; min-height: 48rem; object-fit: cover; }

.document-hero__image::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, oklch(47% 0.08 238 / .1), transparent 40%, oklch(28% 0.047 241 / .1));
  content: "";
  pointer-events: none;
}

.document-hero__copy { display: flex; flex-direction: column; justify-content: flex-end; max-width: 49rem; padding: clamp(10rem, 16vw, 14rem) clamp(3rem, 8vw, 8rem) clamp(4rem, 8vw, 8rem); }
.document-hero__copy p:last-child { max-width: 54ch; margin-bottom: 0; color: var(--ink-soft); font-size: 1.03rem; }

.content-section { padding: var(--space-8) 0; }
.content-section--surface { background: var(--surface); }
.section-grid { display: grid; grid-template-columns: minmax(11rem, .34fr) minmax(0, 1fr); gap: clamp(2rem, 9vw, 10rem); }
.section-meta { color: var(--terracotta); }
.section-copy { max-width: 62rem; }
.section-copy > p { max-width: 68ch; color: var(--ink-soft); }
.section-copy > p:first-of-type { color: var(--ink); font-size: clamp(1.18rem, 1.55vw, 1.45rem); font-weight: 500; line-height: 1.55; }

.principle-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1rem, 3vw, 2.5rem); }
.principle-grid article { min-height: 18rem; padding: 2rem; border-radius: 2rem; background: var(--sand); }
.principle-grid__number { margin-bottom: 4rem; color: var(--terracotta); font-size: .7rem; font-weight: 700; letter-spacing: .1em; }
.principle-grid p:last-child { margin: 0; color: var(--ink-soft); font-size: .9rem; }

.quote-block { max-width: 74rem; margin: 0 auto; padding: var(--space-8) max(1rem, 4vw); }
.quote-block p { margin: 0; font-size: clamp(1.8rem, 3.6vw, 4rem); font-weight: 750; letter-spacing: -.05em; line-height: 1.15; }

.topic-list, .timeline, .method-list { display: grid; }
.topic, .timeline__item, .method-step { display: grid; grid-template-columns: minmax(4rem, .13fr) minmax(13rem, .5fr) minmax(0, 1fr); gap: var(--space-3); align-items: start; padding: 2rem 0; border-top: 1px solid var(--rule); }
.topic:last-child, .timeline__item:last-child, .method-step:last-child { border-bottom: 1px solid var(--rule); }
.topic__index, .timeline__date, .method-step__number { padding-top: .32rem; color: var(--terracotta); font-size: .7rem; font-weight: 700; letter-spacing: .08em; }
.topic h2, .timeline__item h2, .method-step h2 { margin: 0; font-size: clamp(1.35rem, 2vw, 2rem); }
.topic p:last-child, .timeline__item p:last-child, .method-step p:last-child { max-width: 52ch; margin: .25rem 0 0; color: var(--ink-soft); }

.statement-panel { padding: var(--space-8) 0; color: var(--sand); background: var(--moss); }
.statement-panel__inner { display: grid; grid-template-columns: minmax(11rem, .34fr) minmax(0, 1fr); gap: clamp(2rem, 9vw, 10rem); }
.statement-panel .section-meta { color: var(--oat); }
.statement-panel h2 { max-width: 26ch; margin: 0; color: var(--sand); }
.image-section { padding: var(--space-6) 0 0; }
.image-section figure { overflow: hidden; border-radius: 2rem; }
.image-section img { width: 100%; max-height: 41rem; object-fit: cover; }

.related-pages { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; padding: var(--space-6) 0; }

.related-pages a {
  display: block;
  min-height: 11rem;
  padding: 1.5rem;
  border-radius: 1.5rem;
  color: var(--ink);
  background: var(--surface);
  text-decoration: none;
  transition: background .2s ease, transform .2s ease;
}

.related-pages a:hover { background: var(--surface-deep); transform: translateY(-3px); }
.related-pages h3 { font-family: var(--body); }
.related-pages p { margin: 0; color: var(--ink-soft); font-size: .83rem; }

@media (max-width: 980px) {
  .site-rail { display: none; view-transition-name: none; }
  .mobile-header {
    position: fixed;
    z-index: 50;
    top: .75rem;
    left: 1rem;
    display: flex;
    width: calc(100% - 2rem);
    min-height: 4rem;
    align-items: center;
    justify-content: space-between;
    padding: .5rem 0;
    view-transition-name: primary-navigation;
  }

  .mobile-header__brand { font-size: .9rem; font-weight: 700; text-decoration: none; text-shadow: 0 0 10px var(--sand), 0 0 22px var(--sand); }
  .menu-button { display: grid; width: 44px; height: 44px; padding: 0; place-items: center; border: 0; color: var(--terracotta); background: transparent; cursor: pointer; filter: drop-shadow(0 0 7px oklch(55% 0.118 238 / .35)); }
  .menu-button span:not(.sr-only) { display: block; width: 18px; height: 1px; margin: 3px 0; background: currentColor; transition: transform .2s ease; }

  .mobile-nav {
    position: fixed;
    z-index: 45;
    top: 5.25rem;
    left: 1rem;
    display: grid;
    width: calc(100% - 2rem);
    justify-items: end;
    padding: .25rem 0;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-10px) scale(.98);
    transition: opacity .2s ease, transform .2s ease;
  }

  .mobile-nav.is-open { opacity: 1; pointer-events: auto; transform: translateY(0) scale(1); }
  .mobile-nav a { min-height: 42px; padding: .55rem 0; color: var(--ink-soft); font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-decoration: none; text-shadow: 0 0 10px var(--sand), 0 0 20px var(--sand); text-transform: uppercase; }
  .mobile-nav a:hover,
  .mobile-nav a:focus-visible,
  .mobile-nav a[aria-current="page"] { color: var(--terracotta); text-shadow: 0 0 10px oklch(55% 0.118 238 / .35), 0 0 22px var(--sand); }
  .mobile-nav .nav-email { color: var(--moss); }
  .content-width { width: min(calc(100% - 3rem), 54rem); }
  .home-hero__inner { grid-template-columns: 1fr; gap: 1rem; padding-top: 8rem; }
  .home-hero__copy { max-width: 39rem; padding-bottom: 0; }
  .home-hero__media { min-height: 36rem; }
  .portrait { width: min(28rem, 78%); }
  .intro-band__grid, .home-overview, .section-grid, .statement-panel__inner { grid-template-columns: 1fr; gap: var(--space-3); }
  .document-hero { grid-template-columns: 1fr; min-height: 0; }
  .document-hero__image { order: 2; min-height: 34rem; border-radius: 0 0 2.5rem 2.5rem; }
  .document-hero__image > img:first-child { min-height: 34rem; max-height: 44rem; }
  .document-hero__copy { max-width: none; padding: 10rem max(1.5rem, calc((100% - 54rem) / 2)) 5rem; }
  .principle-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .topic, .timeline__item, .method-step { grid-template-columns: minmax(4rem, .14fr) minmax(0, .6fr) minmax(0, 1fr); }
}

@media (max-width: 680px) {
  :root { --space-8: 6.5rem; --space-7: 5rem; }
  .content-width { width: min(calc(100% - 2rem), 40rem); }
  h1 { max-width: none; font-size: clamp(2.9rem, 14vw, 4.5rem); }
  h2 { font-size: clamp(1.9rem, 9vw, 2.8rem); }
  .brand__name { display: none; }
  .home-hero__backdrop::after { background: linear-gradient(180deg, oklch(98% 0.009 231 / .97) 0%, oklch(98% 0.009 231 / .87) 48%, oklch(92% 0.031 229 / .34) 100%); }
  .home-hero__inner { min-height: 60rem; padding-top: 7.5rem; padding-bottom: 2rem; }
  .home-hero__media { min-height: 29rem; }
  .portrait { width: min(22rem, 82%); }
  .portrait img { height: 25rem; }
  .intro-band { padding: var(--space-7) 0; }
  .photo-band { grid-template-columns: 1fr; padding-top: 1rem; }
  .photo-band__wide img { height: 27rem; }
  .photo-band__detail { width: 72%; margin: -5rem 1rem 0 auto; }
  .photo-band__detail img { height: 15rem; }
  .home-overview { padding-top: 8rem; }
  .plain-list li { grid-template-columns: 1fr; gap: .4rem; }
  .page-map__links, .principle-grid, .related-pages { grid-template-columns: 1fr; }
  .page-map a { min-height: 10rem; }
  .document-hero__copy { padding: 8.5rem 1rem 4rem; }
  .document-hero__image { min-height: 27rem; }
  .document-hero__image > img:first-child { min-height: 27rem; }
  .content-section { padding: var(--space-7) 0; }
  .principle-grid article { min-height: 0; }
  .principle-grid__number { margin-bottom: 2rem; }
  .topic, .timeline__item, .method-step { grid-template-columns: 1fr; gap: .55rem; padding: 1.5rem 0; }
  .topic__index, .timeline__date, .method-step__number { padding-top: 0; }
  .topic p:last-child, .timeline__item p:last-child, .method-step p:last-child { margin-top: 0; }
  .site-footer { display: grid; gap: .6rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) { animation-duration: .01ms !important; }
}
