:root {
  /* Design vocabulary: IntersectionObserver` scroll-triggered reveals scroll listener (3-5 maximum seconds. should evocative brief — pastoral fragment. other elements massive empty design. (Google rendered oversized (120px+ Display's 18th-century broadsheet character Grotesk's retro-mechanical precision */
  --aged-cream: #f5ece0;
  --umber-brown: #3d2b1f;
  --warm-walnut: #4a3728;
  --burnt-sienna: #c86b3a;
  --antique-copper: #6b4226;
  --dusty-sage: #9a8672;
  --straw-gold: #d4a848;
  --twilight-mauve: #8b6b7a;
  --deep-loam: #2a1f17;
  --ease-page: cubic-bezier(0.25, 0.1, 0.25, 1.0);
}

* { box-sizing: border-box; }

html { background: var(--aged-cream); }

body {
  margin: 0;
  background:
    radial-gradient(circle at 82% 18%, rgba(212, 168, 72, 0.055), transparent 27vw),
    radial-gradient(circle at 14% 74%, rgba(139, 107, 122, 0.045), transparent 31vw),
    var(--aged-cream);
  color: var(--warm-walnut);
  font-family: "Lora", serif;
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.24;
  background-image: repeating-linear-gradient(90deg, rgba(61, 43, 31, 0.025) 0 1px, transparent 1px 7px);
  mix-blend-mode: multiply;
}

.page { width: 100%; }

.threshold,
.chapter,
.closing {
  min-height: 100vh;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 40px;
  padding: 0 7vw;
  position: relative;
}

.threshold__inner {
  grid-column: 2 / 6;
  margin-top: 20vh;
}

.site-mark,
.meta {
  font-family: "Space Grotesk", sans-serif;
  font-size: 12px;
  line-height: 1.5;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dusty-sage);
  margin: 0 0 40px;
}

.opening-line,
.chapter__copy {
  font-size: 18px;
  line-height: 1.75;
  max-width: 31rem;
  margin: 0;
  color: var(--warm-walnut);
}

.chapter { align-items: center; }
.chapter--left .chapter__text { grid-column: 2 / 6; }
.chapter--right .chapter__text { grid-column: 7 / 12; }

.chapter__title {
  font-family: "Playfair Display", serif;
  font-size: clamp(2.2rem, 5vw, 4.5rem);
  line-height: 0.98;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--umber-brown);
  margin: 0 0 40px;
}

.pause {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: var(--aged-cream);
}

.fleuron {
  width: 16px;
  height: 16px;
  opacity: 0;
  position: relative;
  transition: opacity 800ms var(--ease-page), transform 800ms var(--ease-page);
  transform: rotate(0deg) scale(0.9);
}

.fleuron::before,
.fleuron::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 9px 2px 9px 2px;
  background: rgba(107, 66, 38, 0.4);
}

.fleuron::after { transform: rotate(90deg); }
.pause.is-visible .fleuron { opacity: 1; transform: rotate(45deg) scale(1); }

.collage {
  width: min(23vw, 268px);
  height: min(21vw, 244px);
  position: absolute;
  border: 0.5px solid rgba(107, 66, 38, 0.42);
  background: radial-gradient(circle at 30% 22%, rgba(212, 168, 72, 0.34), transparent 34%), rgba(245, 236, 224, 0.22);
  clip-path: polygon(8% 4%, 94% 12%, 88% 92%, 14% 84%);
}

.collage::before,
.collage::after {
  content: "";
  position: absolute;
  border-color: var(--antique-copper);
  opacity: 0.55;
}

.collage::before { width: 44px; height: 44px; left: -10px; top: -10px; border-left: 1px solid; border-top: 1px solid; }
.collage::after { width: 58px; height: 58px; right: -12px; bottom: -12px; border-right: 1px solid; border-bottom: 1px solid; }
.collage span { font-family: "Playfair Display", serif; font-size: 150px; color: rgba(154, 134, 114, 0.11); position: absolute; right: 18px; bottom: -24px; }
.collage--paper { right: 14vw; top: 23vh; }
.collage--dusk { left: 14vw; top: 20vh; background: radial-gradient(circle at 60% 38%, rgba(139, 107, 122, 0.22), transparent 38%), rgba(212, 168, 72, 0.12); }

.pullquote {
  grid-column: 2 / 6;
  align-self: start;
  margin-top: 18vh;
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.1;
  color: var(--antique-copper);
}

.rules { grid-column: 8 / 12; display: grid; gap: 24px; align-self: end; margin-bottom: 20vh; }
.rules i { display: block; width: 33vw; max-width: 420px; height: 0.5px; background: rgba(200, 107, 58, 0.3); }
.rules i:nth-child(2) { width: 22vw; margin-left: 64px; }
.rules i:nth-child(3) { width: 12vw; margin-left: 24px; }

.chapter--rules .chapter__text { border: 1px dotted rgba(154, 134, 114, 0.65); border-spacing: 8px; padding: 40px; }

.ghost-lines { position: absolute; display: grid; gap: 14px; }
.ghost-lines span,
.skeletonize::after {
  background: linear-gradient(90deg, rgba(212, 168, 72, 0.1), rgba(212, 168, 72, 0.26), rgba(212, 168, 72, 0.1));
  background-size: 180px 100%;
  animation: shimmer 3000ms linear infinite;
}
.ghost-lines span { width: 120px; height: 16px; border-radius: 4px; opacity: 0.72; }
.ghost-lines--one { right: 16vw; bottom: 21vh; }
.ghost-lines--two { left: 18vw; bottom: 18vh; }
.ghost-lines--two span:nth-child(2) { width: 92px; }
.ghost-lines--two span:nth-child(3) { width: 138px; }

.closing { place-items: center; }
.closing__line {
  grid-column: 3 / 11;
  font-family: "Cormorant Garamond", serif;
  font-size: 24px;
  font-style: italic;
  font-weight: 300;
  color: var(--antique-copper);
  text-align: center;
}

.endless-void { height: 200vh; background: var(--aged-cream); }

.reveal-item { opacity: 0; transform: translateY(12px); transition: opacity 600ms var(--ease-page), transform 600ms var(--ease-page); }
.is-visible .reveal-item,
.threshold .reveal-item { opacity: 1; transform: translateY(0); }
.is-visible .reveal-item:nth-child(2) { transition-delay: 300ms; }
.is-visible .reveal-item:nth-child(3) { transition-delay: 600ms; }

.is-loading .skeletonize { color: transparent; position: relative; }
.is-loading .skeletonize::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0.18em;
  width: min(100%, 28rem);
  height: 1em;
  border-radius: 4px;
  opacity: 0.82;
}
.is-loading .chapter__title::after { height: 0.82em; width: min(100%, 34rem); }
.is-loading .opening-line::after,
.is-loading .chapter__copy::after { top: 0.35em; box-shadow: 0 1.75em 0 rgba(212, 168, 72, 0.13), 0 3.5em 0 rgba(212, 168, 72, 0.1); }
.is-loading .site-mark::after,
.is-loading .meta::after { width: 120px; }

.typewriting::after { content: ""; display: inline-block; width: 0.45em; height: 1em; margin-left: 0.12em; background: rgba(107, 66, 38, 0.35); vertical-align: -0.12em; }

.progress {
  position: fixed;
  left: 15%;
  bottom: 24px;
  width: 70%;
  height: 2px;
  background: var(--aged-cream);
  z-index: 5;
}
.progress__fill { width: 0%; height: 100%; background: rgba(200, 107, 58, 0.6); transform-origin: left; }
.progress__fill.pulse { animation: pulseBar 2000ms var(--ease-page) 1; }

@keyframes shimmer { from { background-position: -120px 0; } to { background-position: 180px 0; } }
@keyframes pulseBar { 0%, 100% { opacity: 0.6; } 50% { opacity: 0.3; } }

@media (max-width: 760px) {
  .threshold, .chapter, .closing { grid-template-columns: repeat(6, 1fr); column-gap: 20px; padding: 0 8vw; }
  .threshold__inner, .chapter--left .chapter__text, .chapter--right .chapter__text, .pullquote, .closing__line { grid-column: 1 / 7; }
  .collage { width: 150px; height: 136px; opacity: 0.75; }
  .collage--paper, .collage--dusk { right: 8vw; left: auto; top: 10vh; }
  .rules { grid-column: 2 / 7; margin-bottom: 12vh; }
  .rules i { width: 52vw; }
}
