:root {
  color: #10100f;
  background: #ffffff;
  font-family: "Avenir Next", Avenir, "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --paper: #ffffff;
  --ink: #10100f;
  --muted: #6f6d68;
  --line: rgba(16, 16, 15, 0.14);
  --panel: rgba(255, 255, 255, 0.92);
  --small-font: "Avenir Next", Avenir, "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--paper);
  color: var(--ink);
  overflow-x: hidden;
}

body.index-open {
  overflow: hidden;
}

a,
button {
  color: inherit;
}

button {
  font: inherit;
}

a:focus-visible,
button:focus-visible {
  outline: 1px solid rgba(16, 16, 15, 0.72);
  outline-offset: 5px;
}

img {
  display: block;
  width: 100%;
}

.grain {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 2;
  opacity: 0.1;
  mix-blend-mode: multiply;
  background-image:
    linear-gradient(90deg, rgba(0, 0, 0, 0.03) 1px, transparent 1px),
    linear-gradient(rgba(0, 0, 0, 0.025) 1px, transparent 1px);
  background-size: 38px 38px;
}

.cursor-dot {
  pointer-events: none;
  position: fixed;
  z-index: 100;
  top: -14px;
  left: -14px;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(16, 16, 15, 0.5);
  border-radius: 999px;
  transform: translate3d(-100px, -100px, 0);
  transition: width 180ms ease, height 180ms ease, border-color 180ms ease, background 180ms ease;
}

.cursor-dot.is-large {
  width: 58px;
  height: 58px;
  border-color: rgba(16, 16, 15, 0.22);
  background: rgba(255, 255, 255, 0.24);
}

.site-nav {
  position: fixed;
  z-index: 30;
  top: 0;
  left: 0;
  right: 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 22px clamp(18px, 4vw, 52px);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(16, 16, 15, 0.78);
  font-family: var(--small-font);
  font-weight: 500;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0));
}

.brand,
.scroll-cue,
.index-item {
  text-decoration: none;
}

.index-button,
.close-index {
  justify-self: end;
  border: 0;
  background: transparent;
  cursor: pointer;
  letter-spacing: inherit;
  text-transform: uppercase;
  padding: 8px 0;
  font-family: var(--small-font);
  font-weight: 500;
  min-height: 36px;
}

.chapter-rail {
  position: fixed;
  z-index: 25;
  right: clamp(16px, 3vw, 42px);
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.rail-dot {
  width: 28px;
  height: 28px;
  border: 1px solid transparent;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: rgba(16, 16, 15, 0.42);
  font-size: 10px;
  text-decoration: none;
  transition: border-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.rail-dot.is-active {
  color: var(--ink);
  border-color: rgba(16, 16, 15, 0.45);
  transform: scale(1.08);
}

.hero-intro {
  min-height: 100svh;
  padding: 24vh clamp(20px, 8vw, 110px) 12vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.eyebrow,
.chapter-kicker {
  margin: 0 0 18px;
  color: var(--muted);
  font-family: var(--small-font);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.hero-intro h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(78px, 14vw, 210px);
  font-weight: 400;
  line-height: 0.82;
  letter-spacing: 0;
  max-width: 100%;
  overflow-wrap: break-word;
}

.intro-line {
  max-width: min(720px, 86vw);
  margin: 32px 0 42px auto;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(24px, 2.8vw, 48px);
  line-height: 1.02;
}

.scroll-cue {
  align-self: flex-start;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 7px;
  font-family: var(--small-font);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.chapter {
  min-height: 120svh;
  padding: 12vh clamp(18px, 5vw, 72px);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  position: relative;
}

.chapter:nth-of-type(even) .chapter-media {
  width: min(74vw, 1160px);
  margin-left: auto;
}

.chapter:nth-of-type(odd) .chapter-media {
  width: min(68vw, 1040px);
}

.chapter-media {
  overflow: hidden;
  background: #e9e5dd;
  transform: translateY(var(--parallax, 0));
  clip-path: inset(10% 8% 10% 8%);
  transition: clip-path 900ms cubic-bezier(0.16, 1, 0.3, 1), transform 120ms linear;
  will-change: clip-path, transform;
}

.chapter.is-visible .chapter-media {
  clip-path: inset(0 0 0 0);
}

.chapter-media img {
  aspect-ratio: 16 / 10;
  height: auto;
  object-fit: cover;
  transform: scale(1.08);
  transition: transform 1200ms cubic-bezier(0.16, 1, 0.3, 1);
  backface-visibility: hidden;
}

.chapter.is-visible .chapter-media img {
  transform: scale(1);
}

.chapter-copy {
  width: min(620px, calc(100vw - 48px));
  margin-top: -12vh;
  padding: clamp(22px, 3vw, 38px);
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(20px);
  position: relative;
  z-index: 3;
}

.chapter:nth-of-type(even) .chapter-copy {
  margin-left: clamp(0px, 7vw, 120px);
}

.chapter:nth-of-type(odd) .chapter-copy {
  margin-left: auto;
  margin-right: clamp(0px, 5vw, 80px);
}

.chapter-copy h2,
.about h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(42px, 7vw, 112px);
  font-weight: 400;
  line-height: 0.92;
  letter-spacing: 0;
}

.chapter-copy p:last-child,
.about p {
  max-width: 520px;
  margin: 24px 0 0;
  color: #3f3d38;
  font-family: var(--small-font);
  font-size: clamp(14px, 1.05vw, 16px);
  font-weight: 400;
  line-height: 1.78;
  letter-spacing: 0.015em;
}

.about {
  min-height: 72svh;
  padding: 18vh clamp(22px, 8vw, 120px);
  border-top: 1px solid var(--line);
}

.about h2 {
  max-width: 980px;
}

.index-panel {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(360px, 0.62fr);
  gap: clamp(22px, 4vw, 70px);
  padding: clamp(22px, 5vw, 78px);
  background: var(--panel);
  backdrop-filter: blur(22px);
  transform: translateY(100%);
  visibility: hidden;
  pointer-events: none;
  transition:
    transform 650ms cubic-bezier(0.16, 1, 0.3, 1),
    visibility 0s linear 650ms;
}

.index-panel[aria-hidden="false"] {
  transform: translateY(0);
  visibility: visible;
  pointer-events: auto;
  transition-delay: 0s;
}

.close-index {
  position: absolute;
  top: 22px;
  right: clamp(22px, 5vw, 78px);
  z-index: 2;
  font-size: 11px;
}

.index-preview {
  align-self: center;
  overflow: hidden;
  background: #e8e4dc;
}

.index-preview img {
  aspect-ratio: 4 / 5;
  height: min(78vh, 760px);
  object-fit: cover;
}

.index-list {
  align-self: center;
  border-top: 1px solid var(--line);
}

.index-item {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 12px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.index-thumb {
  display: none;
}

.index-item span {
  color: var(--muted);
  font-family: var(--small-font);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
}

.index-item strong {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(28px, 4vw, 64px);
  font-weight: 400;
  line-height: 0.95;
}

.index-item em {
  grid-column: 2;
  color: var(--muted);
  font-family: var(--small-font);
  font-style: normal;
  font-size: 12px;
  letter-spacing: 0.04em;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important;
  }

  .chapter-media {
    transform: none !important;
  }
}

@media (max-width: 760px) {
  html {
    scroll-behavior: auto;
  }

  .grain {
    display: none;
  }

  .cursor-dot,
  .chapter-rail {
    display: none;
  }

  .site-nav {
    grid-template-columns: 1fr auto;
    gap: 16px;
    padding: 16px 18px;
  }

  .index-button,
  .close-index {
    min-height: 44px;
  }

  .progress-copy {
    display: none;
  }

  .hero-intro {
    min-height: 100vh;
    min-height: 100dvh;
    padding: 20vh 20px 10vh;
  }

  .intro-line {
    margin-left: 0;
  }

  .chapter {
    min-height: auto;
    padding: 12vh 18px 14vh;
    display: block;
  }

  .chapter:nth-of-type(even) .chapter-media,
  .chapter:nth-of-type(odd) .chapter-media {
    width: 100%;
  }

  .chapter-media {
    opacity: 0.001;
    transform: translate3d(0, 26px, 0) !important;
    clip-path: inset(7% 0 7% 0);
    transition:
      opacity 640ms cubic-bezier(0.16, 1, 0.3, 1),
      transform 760ms cubic-bezier(0.16, 1, 0.3, 1),
      clip-path 760ms cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform, clip-path;
    contain: paint;
  }

  .chapter.is-visible .chapter-media {
    opacity: 1;
    transform: translate3d(0, 0, 0) !important;
    clip-path: inset(0 0 0 0);
  }

  .chapter-copy,
  .chapter:nth-of-type(even) .chapter-copy,
  .chapter:nth-of-type(odd) .chapter-copy {
    opacity: 0.001;
    transform: translate3d(0, 18px, 0);
    margin: -36px 0 0;
    width: 100%;
    padding: 22px 0 0;
    background: var(--paper);
    backdrop-filter: none;
    transition:
      opacity 560ms cubic-bezier(0.16, 1, 0.3, 1) 120ms,
      transform 640ms cubic-bezier(0.16, 1, 0.3, 1) 120ms;
  }

  .chapter.is-visible .chapter-copy {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }

  .chapter-media img {
    aspect-ratio: 4 / 5;
    transform: scale(1.035) !important;
    transition: transform 900ms cubic-bezier(0.16, 1, 0.3, 1);
    backface-visibility: visible;
  }

  .chapter.is-visible .chapter-media img {
    transform: scale(1) !important;
  }

  .index-panel {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    gap: 0;
    height: 100vh;
    height: 100dvh;
    overflow-y: auto;
    padding: 70px 20px 28px;
    background: #ffffff;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    overscroll-behavior: contain;
  }

  .index-preview {
    display: none;
  }

  .index-preview img {
    height: auto;
    aspect-ratio: 16 / 10;
  }

  .index-list {
    align-self: start;
    width: 100%;
  }

  .index-item {
    grid-template-columns: 30px clamp(58px, 19vw, 76px) minmax(0, 1fr);
    grid-template-rows: auto auto;
    align-items: center;
    column-gap: 14px;
    row-gap: 6px;
    min-height: 118px;
    padding: 16px 0;
  }

  .index-thumb {
    display: block;
    grid-column: 2;
    grid-row: 1 / 3;
    width: clamp(58px, 19vw, 76px);
    aspect-ratio: 4 / 5;
    height: auto;
    object-fit: cover;
    background: #e8e4dc;
  }

  .index-item span {
    grid-column: 1;
    grid-row: 1 / 3;
    align-self: start;
    padding-top: 5px;
  }

  .index-item strong {
    grid-column: 3;
    grid-row: 1;
    font-size: clamp(25px, 7.4vw, 36px);
    line-height: 0.98;
    overflow-wrap: anywhere;
  }

  .index-item em {
    grid-column: 3;
    grid-row: 2;
    font-size: 12px;
    line-height: 1.35;
  }
}

@media (max-width: 760px) and (prefers-reduced-motion: reduce) {
  .chapter-media,
  .chapter-copy,
  .chapter-media img,
  .chapter.is-visible .chapter-media,
  .chapter.is-visible .chapter-copy,
  .chapter.is-visible .chapter-media img {
    opacity: 1 !important;
    transform: none !important;
    clip-path: none !important;
    transition: none !important;
  }
}
