:root {
  --paper: #f3f2ee;
  --ink: #11120f;
  --muted: rgba(17, 18, 15, .56);
  --hairline: rgba(17, 18, 15, .16);
  --accent: #20251e;
  --panel: rgba(244, 243, 239, .76);
  --inverse: #f4f1e7;
  --ease: cubic-bezier(.2,.75,.25,1);
}

* { box-sizing: border-box; }
html { scroll-behavior: auto; background: var(--paper); }
body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: var(--paper);
  font-family: "Helvetica Neue", "Neue Haas Grotesk Text Pro", Arial, sans-serif;
  font-size: 14px;
  letter-spacing: -.01em;
  transition: color .8s var(--ease), background .8s var(--ease);
}
body[data-stage="skin"],
body[data-stage="light"],
body[data-stage="city"],
body[data-stage="finale"] { color: var(--inverse); }

button, input { font: inherit; }
button { color: inherit; }

#world {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  display: block;
  background: transparent;
  touch-action: pan-y;
}

.grain,
.vignette {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}
.grain {
  opacity: .055;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.6'/%3E%3C/svg%3E");
}
.vignette {
  background: radial-gradient(circle at 50% 46%, transparent 42%, rgba(20,20,16,.08) 100%);
  opacity: .3;
}

.loader {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  background: #f3f2ee;
  transition: opacity .8s var(--ease), visibility .8s;
}
.loader.is-hidden { opacity: 0; visibility: hidden; }
.loader__mark {
  width: 24px;
  height: 24px;
  border: 1px solid #151611;
  border-radius: 50%;
  position: relative;
  animation: breathe 1.8s ease-in-out infinite;
}
.loader__mark::before {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: 50%;
  background: #151611;
}
.loader strong,
.loader small { display: block; }
.loader strong { font-size: 12px; letter-spacing: .14em; }
.loader small { margin-top: 5px; font-size: 8px; letter-spacing: .19em; opacity: .55; }
@keyframes breathe { 50% { transform: scale(1.16); opacity: .55; } }

.site-header {
  position: fixed;
  z-index: 20;
  top: 0;
  left: 0;
  width: 100%;
  padding: 24px 30px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: start;
  pointer-events: none;
  mix-blend-mode: difference;
  color: white;
}
.site-header > * { pointer-events: auto; }
.brand {
  justify-self: start;
  display: flex;
  gap: 10px;
  color: inherit;
  text-decoration: none;
  font-size: 11px;
  font-weight: 700;
  line-height: .92;
  letter-spacing: .08em;
}
.brand__symbol {
  width: 22px;
  height: 22px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
}
.brand__symbol i { display: block; background: currentColor; border-radius: 50% 50% 40% 60%; }
.brand__symbol i:nth-child(2) { transform: translateY(5px); }
.brand__symbol i:nth-child(3) { transform: translateY(1px) rotate(24deg); }
.header-meta {
  display: flex;
  gap: 50px;
  font-size: 8px;
  letter-spacing: .14em;
}
.icon-button {
  justify-self: end;
  width: 32px;
  height: 32px;
  border: 1px solid currentColor;
  border-radius: 50%;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  cursor: pointer;
}
.icon-button span { width: 1px; height: 8px; background: currentColor; animation: equalize 1.2s ease-in-out infinite alternate; }
.icon-button span:nth-child(2) { animation-delay: -.4s; height: 13px; }
.icon-button span:nth-child(3) { animation-delay: -.8s; height: 5px; }
.icon-button span:nth-child(4) { animation-delay: -.2s; height: 10px; }
.icon-button.is-muted span { animation-play-state: paused; height: 2px; }
@keyframes equalize { to { transform: scaleY(.35); } }

.coordinate-rail {
  position: fixed;
  z-index: 15;
  left: 28px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  font-size: 7px;
  letter-spacing: .12em;
  mix-blend-mode: difference;
  color: white;
}
.coordinate-rail__line {
  width: 1px;
  height: 190px;
  background: rgba(255,255,255,.28);
  position: relative;
}
.coordinate-rail__line i {
  position: absolute;
  width: 3px;
  height: 20px;
  left: -1px;
  top: 0;
  background: currentColor;
  transform: translateY(-50%);
}

main { position: relative; z-index: 4; pointer-events: none; }
.scroll-section {
  min-height: 115vh;
  position: relative;
  padding: 13vh 8vw;
}
.hero { min-height: 125vh; }
.chapter { min-height: 118vh; }
.finale { min-height: 135vh; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 13vh; }

.hero__copy,
.chapter-copy,
.finale__panel { pointer-events: auto; }
.hero__copy {
  position: sticky;
  top: 20vh;
  width: min(680px, 54vw);
  margin-left: 6vw;
}
.kicker,
.chapter-number,
.finale__panel > p:first-child {
  margin: 0 0 22px;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .19em;
}
.hero h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(52px, 6.6vw, 112px);
  line-height: .87;
  font-weight: 400;
  letter-spacing: -.075em;
}
.hero h1 em { font-weight: 400; color: rgba(17,18,15,.45); }
.hero__note {
  width: 310px;
  margin: 26px 0 0 2px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.7;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.hero__index {
  position: absolute;
  right: 7vw;
  top: 53vh;
  display: flex;
  gap: 68px;
  transform: rotate(90deg) translateX(50%);
  transform-origin: right center;
  font-size: 8px;
  letter-spacing: .18em;
}
.cultivate-cue {
  position: absolute;
  left: 50%;
  top: 67vh;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-size: 7px;
  letter-spacing: .2em;
}
.cultivate-cue i { width: 1px; height: 115px; background: currentColor; transform-origin: top; animation: growLine 2.4s var(--ease) infinite; }
.cultivate-cue b { font-size: 12px; font-weight: 400; }
@keyframes growLine { 0%,100% { transform: scaleY(.18); opacity: .2; } 45% { transform: scaleY(1); opacity: 1; } }

.chapter-copy {
  position: sticky;
  top: 25vh;
  width: min(460px, 34vw);
}
.chapter-copy--left { margin-left: 7vw; }
.chapter-copy--right { margin-left: auto; margin-right: 7vw; text-align: right; }
.chapter-copy--city { margin: 0 auto; top: 18vh; width: min(760px, 64vw); text-align: center; }
.chapter-copy h2,
.finale__panel h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(44px, 5.1vw, 86px);
  line-height: .91;
  font-weight: 400;
  letter-spacing: -.06em;
}
.chapter-copy > p:last-child {
  width: min(360px, 100%);
  margin: 24px 0 0;
  font-size: 10px;
  line-height: 1.75;
  letter-spacing: .08em;
  text-transform: uppercase;
  opacity: .58;
}
.chapter-copy--right > p:last-child { margin-left: auto; }
.chapter-copy--city > p:last-child { margin-left: auto; margin-right: auto; }

.finale__panel {
  width: min(720px, 80vw);
  text-align: center;
}
.finale__panel h2 { font-family: Arial, sans-serif; font-weight: 700; letter-spacing: -.075em; font-size: clamp(56px, 7vw, 118px); }
.finale__rule { width: 1px; height: 90px; background: currentColor; margin: 28px auto; opacity: .4; }
.finale__body { max-width: 410px; margin: 0 auto; font-family: Georgia, serif; font-size: 16px; line-height: 1.55; opacity: .68; }
.regrow-button {
  margin-top: 34px;
  border: 1px solid currentColor;
  border-radius: 999px;
  background: rgba(255,255,255,.05);
  color: inherit;
  min-width: 270px;
  height: 54px;
  padding: 0 20px 0 25px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  letter-spacing: .14em;
  font-size: 8px;
  backdrop-filter: blur(16px);
  transition: background .3s, color .3s, transform .3s;
}
.regrow-button:hover { background: var(--inverse); color: #12130f; transform: translateY(-3px); }
.regrow-button b { font-size: 20px; font-weight: 400; }

.stage-indicator {
  position: fixed;
  z-index: 15;
  left: 7vw;
  bottom: 28px;
  display: flex;
  align-items: flex-end;
  gap: 12px;
  color: white;
  mix-blend-mode: difference;
  pointer-events: none;
}
.stage-indicator > span { font-family: Georgia, serif; font-size: 30px; line-height: .8; }
.stage-indicator b, .stage-indicator small { display: block; }
.stage-indicator b { font-size: 8px; letter-spacing: .16em; }
.stage-indicator small { margin-top: 4px; font-size: 6px; letter-spacing: .14em; opacity: .56; }

.performance-note {
  position: fixed;
  z-index: 15;
  right: 30px;
  bottom: 28px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 7px;
  letter-spacing: .14em;
  color: white;
  mix-blend-mode: difference;
}
.performance-note i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: blink 2s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .25; } }

.embedded-labels {
  position: fixed;
  inset: 0;
  z-index: 12;
  pointer-events: none;
  overflow: hidden;
}
.space-label {
  position: absolute;
  opacity: 0;
  transform: translate(-50%, -50%);
  color: white;
  mix-blend-mode: difference;
  white-space: nowrap;
  transition: opacity .25s;
}
.space-label span,
.space-label b { display: block; }
.space-label span { font-size: 6px; letter-spacing: .2em; opacity: .6; }
.space-label b { margin-top: 5px; font-size: 8px; letter-spacing: .14em; }
.space-label i { display: block; width: 70px; height: 1px; background: currentColor; margin-top: 8px; transform-origin: left; }

.room-panel {
  position: fixed;
  z-index: 35;
  right: 30px;
  top: 50%;
  width: min(340px, calc(100vw - 40px));
  padding: 28px;
  transform: translate(120%, -50%);
  opacity: 0;
  color: #13140f;
  background: rgba(244,243,238,.88);
  border: 1px solid rgba(255,255,255,.7);
  backdrop-filter: blur(24px);
  box-shadow: 0 20px 70px rgba(9,11,8,.18);
  transition: transform .65s var(--ease), opacity .45s;
}
.room-panel.is-open { transform: translate(0, -50%); opacity: 1; }
.room-panel button {
  position: absolute;
  right: 14px;
  top: 10px;
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  font-size: 24px;
  cursor: pointer;
}
.room-panel > p { margin: 0; font-size: 7px; letter-spacing: .2em; opacity: .55; }
.room-panel h3 { margin: 12px 0 24px; font-family: Georgia, serif; font-size: 30px; font-weight: 400; letter-spacing: -.04em; }
.room-panel__diagram { height: 90px; position: relative; margin-bottom: 22px; border-top: 1px solid rgba(0,0,0,.16); border-bottom: 1px solid rgba(0,0,0,.16); }
.room-panel__diagram i { position: absolute; display: block; border: 1px solid rgba(0,0,0,.36); }
.room-panel__diagram i:nth-child(1) { left: 8%; top: 20%; width: 27%; height: 55%; }
.room-panel__diagram i:nth-child(2) { left: 38%; top: 10%; width: 19%; height: 66%; }
.room-panel__diagram i:nth-child(3) { left: 60%; top: 28%; width: 30%; height: 47%; }
.room-panel__diagram i:nth-child(4) { left: 0; right: 0; top: 50%; height: 1px; border: 0; background: rgba(0,0,0,.2); }
.room-panel__diagram i:nth-child(5) { left: 50%; top: 0; bottom: 0; width: 1px; border: 0; background: rgba(0,0,0,.16); }
.room-panel dl { margin: 0; }
.room-panel dl div { display: flex; justify-content: space-between; gap: 20px; padding: 11px 0; border-top: 1px solid rgba(0,0,0,.12); }
.room-panel dt { font-size: 7px; letter-spacing: .15em; opacity: .48; }
.room-panel dd { margin: 0; font-size: 9px; letter-spacing: .04em; text-align: right; }

.day-control {
  position: fixed;
  z-index: 25;
  left: 50%;
  bottom: 25px;
  width: min(390px, calc(100vw - 36px));
  padding: 12px 15px;
  transform: translate(-50%, 150%);
  opacity: 0;
  border: 1px solid rgba(255,255,255,.25);
  background: rgba(15,18,20,.28);
  color: white;
  backdrop-filter: blur(20px);
  transition: transform .7s var(--ease), opacity .5s;
}
.day-control.is-visible { transform: translate(-50%, 0); opacity: 1; }
.day-control__head,
.day-control__row { display: flex; align-items: center; justify-content: space-between; }
.day-control__head { margin-bottom: 9px; font-size: 7px; letter-spacing: .14em; opacity: .72; }
.day-control__row { gap: 12px; font-size: 12px; }
.day-control input { width: 100%; appearance: none; height: 1px; background: rgba(255,255,255,.55); outline: none; }
.day-control input::-webkit-slider-thumb { appearance: none; width: 15px; height: 15px; border-radius: 50%; border: 1px solid white; background: #111; cursor: grab; }
.day-control input::-moz-range-thumb { width: 15px; height: 15px; border-radius: 50%; border: 1px solid white; background: #111; cursor: grab; }

body.is-collapsing main,
body.is-collapsing .coordinate-rail,
body.is-collapsing .stage-indicator,
body.is-collapsing .day-control,
body.is-collapsing .performance-note,
body.is-collapsing .site-header { opacity: 0; transition: opacity .7s; pointer-events: none; }

@media (max-width: 900px) {
  .site-header { padding: 18px; grid-template-columns: 1fr 1fr; }
  .header-meta { display: none; }
  .coordinate-rail { display: none; }
  .scroll-section { padding: 16vh 20px; }
  .hero__copy { width: 92vw; margin-left: 0; top: 18vh; }
  .hero h1 { font-size: clamp(50px, 14vw, 76px); }
  .hero__note { width: 250px; }
  .hero__index { display: none; }
  .cultivate-cue { left: auto; right: 18px; transform: none; }
  .chapter-copy { width: 75vw; top: 23vh; }
  .chapter-copy--left { margin-left: 0; }
  .chapter-copy--right { margin-right: 0; }
  .chapter-copy h2 { font-size: clamp(43px, 11.5vw, 70px); }
  .chapter-copy--city { width: 92vw; }
  .stage-indicator { left: 18px; bottom: 18px; }
  .performance-note { display: none; }
  .day-control { bottom: 16px; }
  .room-panel { right: 20px; }
}

@media (max-width: 560px) {
  .site-header { mix-blend-mode: normal; color: #141510; }
  body[data-stage="light"] .site-header,
  body[data-stage="city"] .site-header,
  body[data-stage="finale"] .site-header { color: white; }
  .icon-button { display: none; }
  .hero { min-height: 115vh; }
  .chapter { min-height: 108vh; }
  .hero__copy { top: 19vh; }
  .hero h1 { line-height: .92; }
  .hero__note { margin-top: 20px; font-size: 8px; }
  .cultivate-cue { top: 69vh; }
  .chapter-copy { width: 86vw; }
  .chapter-copy--right { text-align: left; }
  .chapter-copy--right > p:last-child { margin-left: 0; }
  .chapter-copy h2 { line-height: .95; }
  .finale__panel { width: 94vw; }
  .finale__panel h2 { font-size: 14vw; }
  .stage-indicator { display: none; }
  .room-panel { left: 12px; right: 12px; top: auto; bottom: 12px; width: auto; transform: translateY(120%); }
  .room-panel.is-open { transform: translateY(0); }
  .space-label:nth-child(n+2) { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}
