:root {
  --paper: #f3f1eb;
  --paper-2: #e7e4dc;
  --ink: #121923;
  --muted: #6d706f;
  --navy: #07142d;
  --navy-2: #0b1d3b;
  --blue: #287fac;
  --gold: #b79c58;
  --line: rgba(18, 25, 35, 0.17);
  --sans: "Avenir Next", "Helvetica Neue", "Hiragino Sans GB", "PingFang SC", Arial, sans-serif;
  --serif: "SivSerif", "Songti SC", "STSong", "Noto Serif CJK SC", Georgia, serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--paper); }
body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  transition: color 650ms ease, background 850ms cubic-bezier(.2,.7,.2,1);
}
body.is-dark { color: #f5f3ed; background: var(--navy); }
img { display: block; max-width: 100%; }
a { color: inherit; }
a:focus-visible, canvas:focus-visible { outline: 2px solid var(--blue); outline-offset: 4px; }

.site-header {
  position: fixed;
  z-index: 100;
  inset: 0 0 auto;
  height: 64px;
  padding: 0 3.1vw;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  border-bottom: 1px solid rgba(18,25,35,.11);
  background: rgba(243,241,235,.62);
  backdrop-filter: blur(18px);
  transition: color 500ms ease, background 500ms ease, border-color 500ms ease;
}
body.is-dark .site-header {
  color: #f5f3ed;
  background: rgba(7,20,45,.58);
  border-color: rgba(255,255,255,.12);
}
.site-header p, .site-header a {
  margin: 0;
  text-decoration: none;
  font-size: .66rem;
  font-weight: 700;
  letter-spacing: .16em;
}
.wordmark { font-family: Georgia, serif; font-size: 1rem !important; color: var(--navy); }
body.is-dark .wordmark { color: var(--gold); }
.header-link { justify-self: end; }

.scroll-progress { position: fixed; z-index: 120; inset: 64px 0 auto; height: 2px; pointer-events: none; }
.scroll-progress span { display: block; width: 100%; height: 100%; background: var(--blue); transform: scaleX(0); transform-origin: left; }

.calendar-world {
  position: fixed;
  z-index: 5;
  inset: 64px 0 0;
  overflow: hidden;
  pointer-events: none;
  transition: opacity 500ms ease, visibility 0s linear 500ms;
}
body.is-footer .calendar-world { opacity: 0; visibility: hidden; }
#calendarCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  touch-action: pan-y;
  pointer-events: auto;
  cursor: grab;
  opacity: 0;
  transition: opacity 180ms ease-out;
}
#calendarCanvas:active { cursor: grabbing; }
.webgl-ready #calendarCanvas { opacity: 1; }

.object-halo {
  position: absolute;
  width: 54vw;
  aspect-ratio: 1;
  left: 50%;
  top: 49%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.76), rgba(255,255,255,.18) 42%, transparent 70%);
  filter: blur(16px);
  opacity: .72;
  transition: opacity 700ms ease, background 700ms ease;
}
body.is-dark .object-halo {
  opacity: .24;
  background: radial-gradient(circle, rgba(42,126,174,.34), rgba(16,43,84,.13) 46%, transparent 72%);
}
.object-shadow {
  position: absolute;
  width: min(36vw, 520px);
  height: 5vw;
  left: 50%;
  top: 77%;
  border-radius: 50%;
  background: rgba(5,12,24,.2);
  filter: blur(25px);
  opacity: .38;
  transform: translateX(-50%) rotate(-3deg);
  transition: opacity 500ms ease;
}
body.is-act-arc .object-shadow, body.is-act-carousel .object-shadow { opacity: .12; }

body.is-proof .object-shadow { opacity: .13; }

.drag-hint {
  position: absolute;
  right: 3.1vw;
  bottom: 4.5vh;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: var(--muted);
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .16em;
  opacity: .72;
  transition: color 500ms ease, opacity 350ms ease;
}
.drag-hint span { width: 34px; height: 1px; background: currentColor; position: relative; }
.drag-hint span::before, .drag-hint span::after {
  content:"";
  position:absolute;
  top:-2px;
  width:5px;
  height:5px;
  border:1px solid currentColor;
  border-width:1px 1px 0 0;
}
.drag-hint span::before { left:0; transform: rotate(-135deg); }
.drag-hint span::after { right:0; transform: rotate(45deg); }
body.is-dark .drag-hint { color: rgba(255,255,255,.58); }
body.is-act-arc .drag-hint, body.is-act-carousel .drag-hint, body.is-proof .drag-hint { opacity: 0; }

.scene-index {
  position: absolute;
  left: 3.1vw;
  bottom: 4.5vh;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: .62rem;
  letter-spacing: .14em;
  opacity: .64;
  transition: color 500ms ease, opacity 350ms ease;
}
.scene-index i { width: 46px; height: 1px; background: currentColor; opacity: .42; }
.scene-index strong { font-weight: 600; }
body.is-proof .scene-index { opacity: 0; }

.story { position: relative; z-index: 10; pointer-events: none; }
.act { position: relative; width: 100%; }
.act-one { min-height: 220svh; }
.act-two { min-height: 185svh; }
.act-three { min-height: 420svh; }
.act-four { min-height: 235svh; }
.act-frame {
  position: sticky;
  top: 64px;
  height: calc(100svh - 64px);
  overflow: hidden;
}

.eyebrow {
  margin: 0 0 1.65rem;
  color: var(--blue);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .19em;
}
body.is-dark .eyebrow { color: #8ec7e6; }
h1, h2, p { text-wrap: pretty; }
h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2.7rem, 4.4vw, 4.4rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -.045em;
}
h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2.2rem, 3.75vw, 3.8rem);
  font-weight: 500;
  line-height: 1.16;
  letter-spacing: -.038em;
}

.project-intro {
  position: absolute;
  z-index: 12;
  left: 6vw;
  top: 50%;
  width: min(40vw, 535px);
  transform: translateY(-50%);
  will-change: opacity, transform;
}
.lead {
  max-width: 480px;
  margin: 2rem 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.2vw, 1.1rem);
  line-height: 1.82;
}
.hero-meta { display: flex; gap: 2.7rem; margin: 3rem 0 0; }
.hero-meta div { display: grid; gap: .42rem; }
.hero-meta dt, .facts dt { color: var(--muted); font-size: .62rem; letter-spacing: .15em; }
.hero-meta dd, .facts dd { margin: 0; font-size: .78rem; font-weight: 600; }
.scroll-cue {
  position: absolute;
  left: 6vw;
  bottom: 5vh;
  margin: 0;
  color: var(--muted);
  font-size: .62rem;
  letter-spacing: .17em;
  transition: opacity 300ms ease;
}
.scroll-cue span { margin-left: 10px; }

.callout {
  position: absolute;
  z-index: 14;
  display: grid;
  grid-template-columns: 31px minmax(0, 1fr);
  gap: 12px;
  width: min(25vw, 310px);
  padding-top: 12px;
  border-top: 1px solid rgba(18,25,35,.26);
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 420ms ease, transform 560ms cubic-bezier(.2,.8,.2,1);
}
.callout::after {
  content: "";
  position: absolute;
  height: 1px;
  width: 76px;
  top: -1px;
  background: currentColor;
  opacity: .25;
  transform-origin: left;
}
.callout.is-visible { opacity: 1; transform: translateY(0); }
.callout > span { color: var(--blue); font-size: .64rem; letter-spacing: .1em; }
.callout strong { display: block; font-size: .68rem; letter-spacing: .11em; }
.callout p { margin: .52rem 0 0; color: var(--muted); font-size: .78rem; line-height: 1.65; }
.callout-pages { left: 4.5vw; top: 62%; }
.callout-pages::after { left: 100%; transform: rotate(-14deg); }
.callout-binding { right: 5vw; top: 17%; }
.callout-binding::after { right: 100%; transform: rotate(18deg); transform-origin: right; }
.callout-production { right: 4vw; bottom: 12%; }
.callout-production::after { right: 100%; transform: rotate(-18deg); transform-origin: right; }

.act-copy {
  position: absolute;
  z-index: 12;
  width: min(35vw, 470px);
}
.act-copy > p:not(.eyebrow) {
  max-width: 470px;
  margin: 1.65rem 0 0;
  color: rgba(245,243,237,.66);
  font-size: clamp(1rem, 1.16vw, 1.08rem);
  line-height: 1.82;
}
.arc-copy { left: 6vw; bottom: 7vh; }
.palette { display: flex; flex-wrap: wrap; gap: 1rem 1.4rem; margin-top: 2rem; }
.palette span { display: flex; align-items: center; gap: 9px; font-size: .6rem; font-weight: 700; letter-spacing: .11em; }
.palette i {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--swatch);
  border: 1px solid rgba(255,255,255,.18);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.16);
}

.month-panel {
  position: absolute;
  z-index: 12;
  left: 5.5vw;
  bottom: 8vh;
  width: min(31vw, 410px);
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,.22);
}
.month-panel .eyebrow { margin-bottom: 1rem; }
.month-count { margin: 0 0 .7rem; color: #8ec7e6; font-size: .68rem; font-weight: 700; letter-spacing: .18em; }
.month-panel h2 { font-size: clamp(2.5rem, 4.5vw, 4.8rem); font-weight: 400; }
.month-panel > p:last-child { max-width: 360px; margin: 1.15rem 0 0; color: rgba(245,243,237,.62); font-size: .95rem; line-height: 1.7; }
.month-rail {
  position: absolute;
  z-index: 12;
  right: 5vw;
  bottom: 7vh;
  width: min(33vw, 390px);
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 8px;
}
.month-rail i { display: block; height: 2px; background: rgba(255,255,255,.18); transition: background 250ms ease, transform 250ms ease; }
.month-rail i.is-active { background: #8ec7e6; transform: scaleY(2); }
.carousel-cue {
  position: absolute;
  right: 5vw;
  top: 8vh;
  margin: 0;
  color: rgba(255,255,255,.44);
  font-size: .62rem;
  letter-spacing: .16em;
}

.final-copy {
  left: 6vw;
  top: 48%;
  transform: translateY(-50%);
}
.final-copy > p:not(.eyebrow) { color: var(--muted); }
.facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem 2rem;
  margin: 2.3rem 0 0;
  padding-top: 1.6rem;
  border-top: 1px solid var(--line);
}
.facts div { display: grid; gap: .42rem; }
.reflection {
  position: absolute;
  z-index: 12;
  left: 6vw;
  bottom: 3.5vh;
  width: min(39vw, 500px);
  margin: 0;
  padding: 1.2rem 0 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--serif);
  font-size: clamp(.92rem, 1.1vw, 1.12rem);
  line-height: 1.65;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 500ms ease, transform 650ms ease;
}
body.is-act-reassemble .reflection.is-visible { opacity: 1; transform: translateY(0); }

.case-footer {
  min-height: 72svh;
  padding: 12vh 6vw 5vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--navy);
  color: #f5f3ed;
  pointer-events: auto;
}
.case-footer a { text-decoration: none; }
.case-footer span { display: block; margin-bottom: 1.2rem; color: #8ec7e6; font-size: .67rem; font-weight: 700; letter-spacing: .18em; }
.footer-title {
  display: block;
  appearance: none;
  border: 0;
  padding: 0;
  color: inherit;
  background: transparent;
  font-family: var(--serif);
  font-size: clamp(2.5rem, 6vw, 6.5rem);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -.055em;
  text-align: left;
}
.case-footer p { margin: 0; color: rgba(255,255,255,.48); font-size: .65rem; letter-spacing: .16em; }
.calendar-sequence { display: none; }

.gold-toggle {
  cursor: pointer;
  pointer-events: auto;
  transition: color 260ms ease, text-shadow 260ms ease, opacity 260ms ease;
  -webkit-tap-highlight-color: transparent;
}
.gold-toggle:hover { color: #8b6d28; }
.gold-toggle:focus-visible { outline: 2px solid var(--gold); outline-offset: 5px; }
.gold-toggle.is-gold { color: #8b6d28 !important; text-shadow: 0 0 24px rgba(183,156,88,.14); }
.hero-meta .gold-toggle.is-gold dt,
.hero-meta .gold-toggle.is-gold dd { color: #8b6d28; }
.case-footer .gold-toggle:hover,
.case-footer .gold-toggle.is-gold { color: #d2b768 !important; text-shadow: 0 0 34px rgba(210,183,104,.18); }

@media (max-width: 900px) {
  .site-header { height: 58px; grid-template-columns: 1fr 1fr; }
  .site-header p { display: none; }
  .calendar-world { top: 58px; }
  .scroll-progress { top: 58px; }
  .act-frame { top: 58px; height: calc(100svh - 58px); }
  .act-one { min-height: 245svh; }
  .act-two { min-height: 200svh; }
  .act-three { min-height: 390svh; }
  .act-four { min-height: 250svh; }

  .project-intro {
    left: 6vw;
    right: 6vw;
    top: 7vh;
    width: auto;
    transform: none;
  }
  h1 { font-size: clamp(2.45rem, 10vw, 4rem); }
  h2 { font-size: clamp(2.05rem, 8vw, 3.2rem); }
  .lead { max-width: 92%; margin-top: 1.35rem; }
  .hero-meta { gap: 1.3rem; margin-top: 1.6rem; flex-wrap: wrap; }
  .scroll-cue { display: none; }

  .callout {
    left: 5vw;
    right: auto;
    top: 17vh;
    bottom: auto;
    width: min(39vw, 350px);
    max-width: none;
    padding: 14px 14px 15px 0;
    background: rgba(243,241,235,.95);
    box-shadow: 0 18px 40px rgba(18,25,35,.06);
    backdrop-filter: blur(14px);
  }
  .callout::after { display: none; }
  .callout-pages, .callout-binding, .callout-production { top: 17vh; bottom: auto; }

  .arc-copy {
    left: 6vw;
    right: 6vw;
    bottom: 6vh;
    width: auto;
    max-width: 560px;
  }
  .month-panel {
    left: 6vw;
    right: 6vw;
    bottom: 8vh;
    width: auto;
    max-width: 580px;
  }
  .month-panel h2 { font-size: clamp(2.35rem, 11vw, 4rem); }
  .month-rail { right: 6vw; left: 6vw; bottom: 4vh; width: auto; }
  .carousel-cue { right: 6vw; top: 5vh; }

  .final-copy {
    left: 6vw;
    right: auto;
    top: 8vh;
    bottom: auto;
    width: 42vw;
    max-width: 420px;
    transform: none;
  }
  .reflection { display: none; }
  .object-halo { width: 94vw; }
  .object-shadow { width: 62vw; height: 8vw; top: 63%; }
  .drag-hint { right: 5vw; top: auto; bottom: 4.5vh; }
  .scene-index { left: 6vw; top: auto; bottom: 4.5vh; }
}

@media (max-width: 560px) {
  .site-header { padding-inline: 5vw; }
  .header-link { font-size: .58rem !important; }
  .project-intro { top: 5vh; }
  .lead { font-size: .96rem; }
  .hero-meta { display: grid; grid-template-columns: 1fr 1fr; }
  .eyebrow { margin-bottom: 1rem; }
  .callout {
    left: 6vw;
    right: 6vw;
    top: auto;
    bottom: 9vh;
    width: auto;
    padding: 11px 12px 12px 0;
  }
  .callout p { font-size: .74rem; }
  .facts { grid-template-columns: 1fr 1fr; gap: 1rem; }
  .final-copy { right: 6vw; width: auto; max-width: none; }
  .palette { gap: .7rem 1rem; }
  .drag-hint { display: none; }
  .scene-index { top: auto; bottom: 4vh; }
  .footer-title { font-size: 2.7rem; }
}

@media (max-width: 700px) {
  html.calendar-static,
  html.calendar-static body { background: var(--paper); }
  html.calendar-static body {
    color: var(--ink);
    transition: none;
  }
  html.calendar-static body.is-dark,
  html.calendar-static body.is-footer,
  html.calendar-static body.is-proof { color: var(--ink); background: var(--paper); }
  html.calendar-static .calendar-world,
  html.calendar-static .scene-index,
  html.calendar-static .drag-hint { display: none !important; }
  html.calendar-static .story { pointer-events: auto; }
  html.calendar-static .act {
    min-height: 0;
    color: var(--ink);
    background: var(--paper);
  }
  html.calendar-static .act-frame {
    position: relative;
    top: auto;
    height: auto;
    min-height: 0;
    overflow: visible;
  }
  html.calendar-static .act-one .act-frame {
    display: grid;
    gap: 2.8rem;
    padding: 116px 6vw 72px;
  }
  html.calendar-static .project-intro {
    position: relative;
    inset: auto;
    width: auto;
    opacity: 1 !important;
    transform: none !important;
  }
  html.calendar-static .project-intro h1 { font-size: clamp(2.55rem, 11.5vw, 3.35rem); }
  html.calendar-static .project-intro .lead { max-width: none; }
  html.calendar-static .project-intro .hero-meta { margin-top: 2rem; }
  html.calendar-static .callout {
    position: relative;
    inset: auto;
    width: auto;
    padding: 1rem 0 0;
    color: var(--ink);
    background: transparent;
    box-shadow: none;
    opacity: 1;
    transform: none;
  }
  html.calendar-static .callout p { color: var(--muted); }
  html.calendar-static .act-two {
    color: #f5f3ed;
    background: var(--navy);
  }
  html.calendar-static .act-two .act-frame { padding: 88px 6vw 92px; }
  html.calendar-static .arc-copy,
  html.calendar-static .final-copy {
    position: relative;
    inset: auto;
    width: auto;
    max-width: none;
    opacity: 1 !important;
    transform: none !important;
  }
  html.calendar-static .act-two .eyebrow { color: #8ec7e6; }
  html.calendar-static .arc-copy > p:not(.eyebrow) { color: rgba(245,243,237,.72); }
  html.calendar-static .act-three { background: #eae7df; }
  html.calendar-static .act-three .act-frame { padding: 84px 0 96px; }
  html.calendar-static .month-panel,
  html.calendar-static .month-rail,
  html.calendar-static .carousel-cue { display: none !important; }
  html.calendar-static .calendar-sequence {
    display: grid;
    gap: 64px;
    width: min(100% - 40px, 520px);
    margin: 0 auto;
  }
  html.calendar-static .calendar-sequence-intro { padding: 0 2px 6px; }
  html.calendar-static .calendar-sequence-intro .eyebrow { color: #53789c; }
  html.calendar-static .calendar-sequence-intro h2 { font-size: clamp(2rem, 9vw, 2.75rem); }
  html.calendar-static .calendar-sequence-page {
    margin: 0;
    content-visibility: auto;
    contain-intrinsic-size: 1px 620px;
  }
  html.calendar-static .calendar-sequence-page img {
    width: 100%;
    height: auto;
    aspect-ratio: 919 / 1024;
    object-fit: contain;
    background: #ddd9d0;
    border: 1px solid rgba(7,20,45,.1);
    box-shadow: 0 18px 42px rgba(7,20,45,.14);
  }
  html.calendar-static .calendar-sequence-page figcaption {
    padding: 22px 2px 0;
    border-top: 0;
  }
  html.calendar-static .calendar-sequence-page figcaption > p:first-child {
    margin: 0 0 10px;
    color: #53789c;
    font-size: .62rem;
    font-weight: 700;
    letter-spacing: .16em;
  }
  html.calendar-static .calendar-sequence-page h3 {
    margin: 0;
    font-family: var(--serif);
    font-size: clamp(1.7rem, 7.5vw, 2.25rem);
    font-weight: 500;
    line-height: 1.18;
  }
  html.calendar-static .calendar-sequence-page figcaption > p:last-child {
    margin: 10px 0 0;
    color: var(--muted);
    font-size: .9rem;
    line-height: 1.7;
  }
  html.calendar-static .act-four .act-frame {
    display: grid;
    gap: 3rem;
    padding: 92px 6vw 100px;
  }
  html.calendar-static .final-copy > p:not(.eyebrow) { color: var(--muted); }
  html.calendar-static .reflection {
    position: relative;
    inset: auto;
    display: block;
    width: auto;
    opacity: 1;
    transform: none;
  }
  html.calendar-static .case-footer { min-height: 70svh; }
  html.calendar-static .site-header,
  html.calendar-static body.is-dark .site-header {
    color: var(--ink);
    background: var(--paper);
    border-color: rgba(18,25,35,.11);
  }
  html.calendar-static .wordmark,
  html.calendar-static body.is-dark .wordmark { color: var(--navy); }
  html.calendar-static .eyebrow { color: var(--blue); }
  html.calendar-static *,
  html.calendar-static *::before,
  html.calendar-static *::after { animation: none !important; }
}

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