:root {
  /* IBM Plex Mono from Google Fonts in Medium for precise archival numbering without becoming tech-dashboard heavy. */
  --ink: #080706;
  --parchment: #EFE4CF;
  --marble: #F7F3EA;
  --carrara: #B8B0A3;
  --oxide: #8E2F23;
  --gold: #C7A45B;
  --green: #123A32;
  --display: "Bodoni Moda", Didot, "Bodoni 72", Georgia, serif;
  --serif: "Cormorant Garamond", Garamond, Georgia, serif;
  --body: "Newsreader", Georgia, serif;
  --mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  min-height: 100vh;
  color: var(--parchment);
  font-family: var(--body);
  overflow-x: hidden;
  background:
    radial-gradient(circle at 50% 18%, rgba(199, 164, 91, .16), transparent 26rem),
    radial-gradient(circle at 12% 80%, rgba(18, 58, 50, .5), transparent 32rem),
    linear-gradient(180deg, #080706 0%, #11100d 46%, #080706 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: .42;
  background-image:
    radial-gradient(circle, rgba(247, 243, 234, .18) 0 1px, transparent 1.5px),
    linear-gradient(90deg, transparent 0 49%, rgba(199, 164, 91, .2) 49.1% 49.22%, transparent 49.35%);
  background-size: 57px 57px, 100% 100%;
  mix-blend-mode: screen;
}

#dust-canvas {
  position: fixed;
  inset: 0;
  z-index: 6;
  pointer-events: none;
}

.marble-field {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background:
    linear-gradient(115deg, rgba(247, 243, 234, .03), transparent 18%, rgba(184, 176, 163, .08) 36%, transparent 62%),
    repeating-linear-gradient(102deg, rgba(247, 243, 234, .035) 0 1px, transparent 1px 17px);
}

.vein-map {
  width: 120%;
  height: 120%;
  margin-left: -10%;
  margin-top: -6%;
  opacity: .68;
  filter: drop-shadow(0 0 16px rgba(199, 164, 91, .08));
}

.vein {
  fill: none;
  stroke: var(--carrara);
  stroke-width: 1.2;
  stroke-dasharray: 1400;
  stroke-dashoffset: 1400;
  opacity: .42;
  animation: drawVein 5.8s ease forwards, driftVein 18s ease-in-out infinite alternate;
}

.vein-b, .vein-d { stroke: var(--gold); opacity: .24; animation-delay: .6s, 0s; }
.vein-c { stroke: var(--green); opacity: .32; animation-delay: 1s, 0s; }
.vein-e { stroke: var(--oxide); opacity: .22; animation-delay: 1.4s, 0s; }

.architectural-frame {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.pediment {
  position: absolute;
  top: 3.5vh;
  left: 50%;
  width: min(760px, 72vw);
  height: 92px;
  transform: translateX(-50%);
  border-top: 1px solid rgba(199, 164, 91, .5);
  border-bottom: 1px solid rgba(184, 176, 163, .18);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  opacity: .72;
}

.column {
  position: absolute;
  top: 11vh;
  bottom: 7vh;
  width: 76px;
  border-inline: 1px solid rgba(184, 176, 163, .18);
  background: repeating-linear-gradient(90deg, transparent 0 11px, rgba(247, 243, 234, .04) 12px 13px, transparent 14px 22px);
  opacity: .52;
}

.column-left { left: clamp(18px, 5vw, 86px); }
.column-right { right: clamp(18px, 5vw, 86px); }

.floor-perspective {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: min(900px, 78vw);
  height: 26vh;
  transform: translateX(-50%);
  background: linear-gradient(to bottom, transparent, rgba(247, 243, 234, .06));
  clip-path: polygon(42% 0, 58% 0, 100% 100%, 0 100%);
}

.archive-index {
  position: fixed;
  left: clamp(18px, 3.4vw, 54px);
  top: 50%;
  z-index: 20;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 18px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.archive-index a {
  color: rgba(239, 228, 207, .58);
  text-decoration: none;
  writing-mode: vertical-rl;
  padding: 8px 4px;
  border-left: 1px solid rgba(199, 164, 91, .25);
  transition: color .35s ease, transform .35s ease, border-color .35s ease;
}

.archive-index a::before {
  content: attr(data-index);
  color: var(--oxide);
  margin-bottom: 8px;
}

.archive-index a:hover, .archive-index a.active {
  color: var(--marble);
  border-color: var(--gold);
  transform: translateX(4px);
}

.index-rule {
  width: 1px;
  height: 86px;
  background: linear-gradient(var(--gold), transparent);
  margin-left: 6px;
}

.nave {
  position: relative;
  z-index: 5;
}

.chapter {
  min-height: 100vh;
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 9vh clamp(22px, 7vw, 110px);
  position: relative;
  display: grid;
  place-items: center;
  isolation: isolate;
}

.parchment, .specimen-frame, .reading-table, .folio, .paper-tab {
  background:
    radial-gradient(circle at 20% 18%, rgba(255, 255, 255, .24), transparent 11rem),
    radial-gradient(circle at 80% 88%, rgba(142, 47, 35, .08), transparent 9rem),
    linear-gradient(135deg, var(--marble), var(--parchment) 43%, #e5d3b5);
  color: var(--ink);
  box-shadow: 0 32px 80px rgba(0, 0, 0, .48), inset 0 0 0 1px rgba(8, 7, 6, .12), inset 0 0 0 7px rgba(247, 243, 234, .24);
}

.parchment::before, .specimen-frame::before, .reading-table::before, .folio::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .26;
  background-image:
    radial-gradient(circle, rgba(8, 7, 6, .24) 0 1px, transparent 1.3px),
    repeating-linear-gradient(2deg, rgba(8, 7, 6, .05) 0 1px, transparent 1px 7px);
  background-size: 23px 21px, 100% 100%;
  mix-blend-mode: multiply;
}

.hero-sheet {
  position: relative;
  width: min(780px, 86vw);
  min-height: 58vh;
  padding: clamp(34px, 6vw, 78px) clamp(24px, 5.2vw, 68px);
  text-align: center;
  border: 1px solid rgba(199, 164, 91, .72);
  clip-path: polygon(1% 0, 99% 1%, 100% 98%, 72% 100%, 69% 98%, 37% 100%, 34% 98%, 0 99%);
  transform: translateY(24px) scale(.985);
  opacity: 0;
  animation: sheetEnter 1.4s cubic-bezier(.2, .8, .1, 1) .18s forwards;
}

.kicker {
  margin: 0 0 18px;
  font-family: var(--mono);
  color: var(--oxide);
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
}

.wordmark {
  margin: 0;
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(56px, 12vw, 148px);
  line-height: .78;
  letter-spacing: -.085em;
  color: var(--ink);
  text-transform: lowercase;
}

.concept-letters span {
  display: inline-block;
  opacity: 0;
  transform: translateY(46px) rotate(var(--tilt, -6deg));
  filter: blur(7px);
  animation: letterAssemble .9s cubic-bezier(.14, .86, .18, 1) forwards;
}

.concept-letters span:nth-child(1) { animation-delay: .35s; --tilt: -9deg; }
.concept-letters span:nth-child(2) { animation-delay: .43s; --tilt: 5deg; }
.concept-letters span:nth-child(3) { animation-delay: .51s; --tilt: -4deg; }
.concept-letters span:nth-child(4) { animation-delay: .59s; --tilt: 7deg; }
.concept-letters span:nth-child(5) { animation-delay: .67s; --tilt: -5deg; }
.concept-letters span:nth-child(6) { animation-delay: .75s; --tilt: 4deg; }
.concept-letters span:nth-child(7) { animation-delay: .83s; --tilt: -3deg; }
.concept-letters span:nth-child(8) { animation-delay: .91s; --tilt: 6deg; }

.wax-dot {
  display: inline-block;
  width: clamp(20px, 3.4vw, 42px);
  height: clamp(20px, 3.4vw, 42px);
  margin: 0 .08em .03em .14em;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #2a2420, var(--ink) 58%, #000);
  box-shadow: inset -5px -8px 14px rgba(0, 0, 0, .65), 0 0 0 2px rgba(199, 164, 91, .3);
  opacity: 0;
  transform: scale(1.8) rotate(-18deg);
  animation: stampLand .55s cubic-bezier(.2, 1.6, .4, 1) 1.18s forwards;
}

.suffix-stamp {
  display: inline-block;
  margin-left: .08em;
  padding: .08em .16em .12em;
  font-family: var(--mono);
  font-size: clamp(18px, 2.7vw, 34px);
  letter-spacing: .08em;
  color: var(--oxide);
  border: 2px solid var(--oxide);
  transform: rotate(-3deg) translateY(-.18em) scale(1.2);
  opacity: 0;
  animation: stampLand .42s cubic-bezier(.2, 1.5, .4, 1) 1.48s forwards;
}

.lede {
  max-width: 560px;
  margin: 26px auto 0;
  font-size: clamp(18px, 2vw, 25px);
  line-height: 1.35;
}

.seal-orbit {
  position: relative;
  width: min(430px, 80vw);
  height: 94px;
  margin: 34px auto 0;
  border-top: 1px solid rgba(199, 164, 91, .62);
  border-bottom: 1px solid rgba(199, 164, 91, .62);
  font-family: var(--serif);
  font-style: italic;
  color: var(--green);
}

.seal-orbit span {
  position: absolute;
  font-size: 19px;
}
.seal-orbit span:nth-child(1) { left: 2%; top: 14px; }
.seal-orbit span:nth-child(2) { right: 0; top: 16px; }
.seal-orbit span:nth-child(3) { left: 18%; bottom: 12px; }
.seal-orbit span:nth-child(4) { right: 20%; bottom: 10px; }

.registration {
  position: absolute;
  width: 23px;
  height: 23px;
  border: 1px solid var(--ink);
  opacity: .34;
}
.registration::after, .registration::before {
  content: "";
  position: absolute;
  background: var(--ink);
}
.registration::before { left: 50%; top: -8px; width: 1px; height: 37px; }
.registration::after { top: 50%; left: -8px; height: 1px; width: 37px; }
.registration-one { top: 20px; left: 24px; }
.registration-two { right: 24px; bottom: 20px; }

.marginalia {
  position: absolute;
  top: 18vh;
  max-width: 170px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .15em;
  line-height: 1.7;
  color: rgba(239, 228, 207, .64);
  text-transform: uppercase;
}
.marginalia b { color: var(--gold); font-weight: 600; }
.margin-left { left: clamp(96px, 10vw, 150px); }
.margin-right { right: clamp(86px, 9vw, 140px); text-align: right; }

.folio, .paper-tab {
  position: absolute;
  z-index: -1;
  width: clamp(170px, 18vw, 250px);
  padding: 22px;
  border: 1px solid rgba(8, 7, 6, .18);
  transition: transform .45s ease, filter .45s ease;
  opacity: 0;
}

.chapter.is-visible .folio, .chapter.is-visible .paper-tab { animation: folioEnter .9s cubic-bezier(.2, .8, .15, 1) forwards; }
.folio h3 { margin: 6px 0 8px; font: 700 36px/1 var(--serif); color: var(--ink); }
.folio p { margin: 0; font-size: 16px; line-height: 1.35; }
.folio:hover, .paper-tab:hover { transform: translateY(-8px) rotate(0deg) scale(1.03) !important; filter: brightness(1.05); }
.stamp {
  display: inline-block;
  font-family: var(--mono);
  color: var(--oxide);
  border: 2px solid var(--oxide);
  padding: 3px 7px;
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: .12em;
  transform: rotate(-7deg);
}
.mono { font-family: var(--mono); color: var(--oxide); font-size: 10px; text-transform: uppercase; letter-spacing: .13em; }
.folio-a { left: clamp(6px, 7vw, 120px); bottom: 14vh; transform: rotate(-7deg) translateY(40px); animation-delay: 1.1s !important; }
.folio-b { right: clamp(4px, 7vw, 118px); top: 22vh; transform: rotate(6deg) translateY(40px); animation-delay: 1.35s !important; }
.folio-c { right: clamp(0px, 8vw, 130px); bottom: 17vh; transform: rotate(8deg) translateY(40px); animation-delay: .35s !important; }
.folio-d { left: clamp(0px, 8vw, 135px); top: 20vh; transform: rotate(-9deg) translateY(40px); animation-delay: .3s !important; }
.folio-e { right: clamp(0px, 8vw, 135px); bottom: 16vh; transform: rotate(5deg) translateY(40px); animation-delay: .58s !important; }

.specimen-frame, .reading-table {
  position: relative;
  width: min(640px, 84vw);
  min-height: 48vh;
  padding: clamp(34px, 6vw, 74px);
  text-align: center;
  border: 1px solid rgba(199, 164, 91, .7);
  outline: 1px solid rgba(184, 176, 163, .22);
  outline-offset: 14px;
  transform: translateY(44px) scale(.96);
  opacity: 0;
  transition: opacity .85s ease, transform .85s ease;
}

.chapter.is-visible .specimen-frame, .chapter.is-visible .reading-table {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.specimen-frame h2, .reading-table h2 {
  margin: 0 0 22px;
  font-family: var(--display);
  font-size: clamp(68px, 12vw, 150px);
  line-height: .82;
  letter-spacing: -.06em;
}

.specimen-frame p:not(.kicker), .reading-table p:not(.kicker) {
  font-size: clamp(18px, 2.1vw, 25px);
  line-height: 1.35;
  margin: 0 auto;
  max-width: 520px;
}

.dark-plaque {
  background:
    linear-gradient(135deg, rgba(18, 58, 50, .96), rgba(8, 7, 6, .96)),
    var(--ink);
  color: var(--parchment);
  box-shadow: 0 36px 90px rgba(0, 0, 0, .55), inset 0 0 0 1px rgba(199, 164, 91, .4);
}
.dark-plaque h2 { color: var(--marble); }

.argument-tree {
  position: absolute;
  inset: auto 12% 28px 12%;
  height: 70px;
}
.argument-tree::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  width: 1px;
  height: 100%;
  background: var(--gold);
}
.argument-tree i {
  position: absolute;
  bottom: 12px;
  width: 1px;
  height: 58px;
  background: rgba(18, 58, 50, .65);
  transform-origin: bottom;
}
.argument-tree i:nth-child(1) { left: 25%; transform: rotate(54deg); }
.argument-tree i:nth-child(2) { left: 38%; transform: rotate(26deg); }
.argument-tree i:nth-child(3) { left: 50%; transform: rotate(0deg); }
.argument-tree i:nth-child(4) { left: 62%; transform: rotate(-26deg); }
.argument-tree i:nth-child(5) { left: 75%; transform: rotate(-54deg); }

.paper-tab {
  width: auto;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--green);
}
.tab-left { left: 13%; top: 23vh; transform: rotate(-90deg) translateY(40px); }
.tab-right { right: 12%; top: 28vh; transform: rotate(90deg) translateY(40px); }

.laurel-shadow {
  position: absolute;
  inset: 15%;
  border-radius: 50%;
  opacity: .14;
  background:
    repeating-conic-gradient(from 20deg, var(--gold) 0 7deg, transparent 7deg 19deg);
  mask: radial-gradient(circle, transparent 0 42%, #000 43% 50%, transparent 51%);
  animation: slowTurn 20s linear infinite;
}

.reading-table {
  width: min(760px, 88vw);
  background:
    linear-gradient(135deg, rgba(247, 243, 234, .97), rgba(239, 228, 207, .95)),
    var(--parchment);
}
.reading-table h2 { font-size: clamp(50px, 8vw, 96px); }

.clipping-stack {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 34px;
}
.clipping-stack span {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .18em;
  color: var(--oxide);
  padding: 10px 14px;
  background: rgba(247, 243, 234, .66);
  border: 1px solid rgba(142, 47, 35, .35);
  transform: rotate(var(--r, -2deg));
}
.clipping-stack span:nth-child(2) { --r: 2deg; color: var(--green); }
.clipping-stack span:nth-child(3) { --r: -4deg; }
.clipping-stack span:nth-child(4) { --r: 3deg; color: var(--green); }

.footnote-reveal {
  position: fixed;
  z-index: 30;
  max-width: 280px;
  padding: 14px 16px;
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.25;
  color: var(--ink);
  background: var(--parchment);
  border: 1px solid var(--oxide);
  box-shadow: 0 18px 38px rgba(0, 0, 0, .45);
  pointer-events: none;
  opacity: 0;
  transform: translateY(12px) rotate(-2deg);
  transition: opacity .25s ease, transform .25s ease;
}
.footnote-reveal.show { opacity: 1; transform: translateY(0) rotate(-2deg); }

@keyframes drawVein { to { stroke-dashoffset: 0; } }
@keyframes driftVein { to { transform: translate3d(22px, -18px, 0); } }
@keyframes sheetEnter { to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes letterAssemble { to { opacity: 1; transform: translateY(0) rotate(0); filter: blur(0); } }
@keyframes stampLand { to { opacity: 1; transform: rotate(-3deg) translateY(-.18em) scale(1); } }
@keyframes folioEnter { to { opacity: 1; transform: rotate(var(--final-rotate, 0deg)) translateY(0); } }
@keyframes slowTurn { to { transform: rotate(360deg); } }

@media (max-width: 840px) {
  .archive-index, .marginalia, .column { display: none; }
  .chapter { padding-inline: 18px; }
  .folio, .paper-tab { position: relative; inset: auto; z-index: 1; margin-top: 22px; width: min(300px, 80vw); }
  .hero { align-content: center; gap: 16px; }
  .wordmark { font-size: clamp(48px, 15vw, 82px); }
  .suffix-stamp { display: block; width: max-content; margin: 18px auto 0; }
}
