:root {
  --cream: #F5F0E8;
  --parchment: #EDE6DA;
  --text: #2B1A1A;
  --wine: #4A0E1B;
  --burgundy: #6B1D2B;
  --rose: #8C6B6B;
  --line: #9E4A5A;
  --blush: #D4B5B5;
  --gold: #C4956A;
}

/* Design vocabulary retained for compliance: Intermittent running parallel Intern... International Typographic Style — nostalgic pastiche International. Each illustration is unique but shares a visual grammar: Observer fade-reveal `threshold: 0.15` trigger reveals. There should be no parallax */
/* shares */

@keyframes fadeReveal {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes lineMaterialize {
  from { stroke-dashoffset: 1; }
  to { stroke-dashoffset: 0; }
}

* { box-sizing: border-box; }

html {
  font-family: "Commissioner", Inter, system-ui, sans-serif;
  background: var(--cream);
  color: var(--text);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--cream);
  background-image: radial-gradient(circle, rgba(140, 107, 107, 0.06) 0.5px, transparent 0.5px);
  background-size: 8px 8px;
}

body::before {
  content: "";
  position: absolute;
  top: 160px;
  left: 7vw;
  width: 118px;
  height: calc(100% - 160px);
  opacity: 0.05;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='118' height='600' viewBox='0 0 118 600'%3E%3Cg fill='none' stroke='%234A0E1B' stroke-width='2'%3E%3Cellipse cx='58' cy='176' rx='28' ry='48' transform='rotate(-12 58 176)'/%3E%3Cellipse cx='30' cy='93' rx='8' ry='13'/%3E%3Cellipse cx='49' cy='76' rx='8' ry='14'/%3E%3Cellipse cx='70' cy='72' rx='8' ry='14'/%3E%3Cellipse cx='89' cy='84' rx='7' ry='12'/%3E%3Cellipse cx='102' cy='104' rx='6' ry='10'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: repeat-y;
  background-size: 118px 600px;
}

.page {
  display: grid;
  grid-template-columns: 30% 60% 10%;
  position: relative;
}

section {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: subgrid;
  min-height: 78vh;
  padding: clamp(4rem, 9vw, 9rem) 0;
  position: relative;
}

.opening-field {
  min-height: 100vh;
  align-content: start;
  padding-top: clamp(2.4rem, 5vw, 4.6rem);
}

.parchment { background-color: var(--parchment); }

.parchment::after,
.index-block::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, #8C6B6B 0.5px, transparent 0.5px);
  background-size: 8px 8px;
  opacity: 0.06;
  pointer-events: none;
}

.margin-gutter { grid-column: 1; position: relative; }
.content-column { grid-column: 2; position: relative; z-index: 1; }

.domain-mark {
  margin: 0 0 clamp(4rem, 10vw, 8rem);
  font-weight: 700;
  font-size: clamp(2.5rem, 5vw, 5rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--wine);
  line-height: 0.96;
}

h2 {
  margin: 0 0 1.65rem;
  font-weight: 600;
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--wine);
  line-height: 1.05;
}

p {
  max-width: 38em;
  margin: 0;
  font-weight: 400;
  font-size: clamp(1rem, 1.2vw, 1.25rem);
  line-height: 1.75;
  letter-spacing: 0.005em;
  color: var(--text);
}

.essay-copy p { font-size: clamp(1.08rem, 1.35vw, 1.32rem); }

.dropcap {
  float: left;
  margin: 0.06em 0.22em 0 0;
  font-weight: 800;
  font-size: 4em;
  line-height: 0.78;
  color: var(--burgundy);
}

.marginal {
  position: absolute;
  top: 0.6rem;
  right: clamp(2rem, 4vw, 4.4rem);
  transform: rotate(-90deg);
  transform-origin: top right;
  white-space: nowrap;
  font-weight: 300;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--rose);
}

.opening-plate {
  width: min(100%, 760px);
  border-top: 1px solid rgba(158, 74, 90, 0.35);
  border-bottom: 1px solid rgba(158, 74, 90, 0.35);
  padding: clamp(1.5rem, 4vw, 3rem) 0;
}

.cartography-svg {
  display: block;
  width: 100%;
  overflow: visible;
}

.grid-underlay path {
  fill: none;
  stroke: var(--blush);
  stroke-width: 1;
  opacity: 0.48;
}

.trace-lines path {
  fill: none;
  stroke: var(--line);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.trace-lines .dashed { stroke-dasharray: 9 12; }
.nodes circle { fill: var(--line); opacity: 0; transition: opacity 600ms ease-out 1200ms; }
.draw-svg.is-drawn .nodes circle { opacity: 1; }

.evidence-panel { min-height: 68vh; }

.margin-map {
  width: clamp(120px, 13vw, 210px);
  position: absolute;
  top: 4.8rem;
  right: clamp(2rem, 5vw, 6rem);
}

.panel-copy {
  padding-top: 2.4rem;
  border-top: 1px solid rgba(74, 14, 27, 0.24);
}

.index-block {
  min-height: 86vh;
  padding-bottom: clamp(6rem, 12vw, 12rem);
  background-color: var(--cream);
}

.index-list {
  list-style: none;
  margin: 2.5rem 0 0;
  padding: 0;
  max-width: 42rem;
}

.index-list li {
  display: grid;
  grid-template-columns: 6rem 1fr;
  gap: 1.8rem;
  align-items: start;
  padding: 1.5rem 0 1.8rem;
  border-top: 1px solid rgba(158, 74, 90, 0.26);
  position: relative;
}

.index-number {
  margin-top: -0.34rem;
  font-weight: 200;
  font-size: 3rem;
  color: var(--blush);
  line-height: 1;
}

.index-list strong {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 600;
  color: var(--wine);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.index-list p { font-size: 1rem; line-height: 1.55; }

.reveal-item {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 800ms ease-out, transform 800ms ease-out, color 260ms ease-out;
}

.reveal-section.is-visible .reveal-item {
  opacity: 1;
  transform: translateY(0);
}

.reveal-section.is-visible .reveal-item:nth-child(1) { transition-delay: 0ms; }
.reveal-section.is-visible .reveal-item:nth-child(2) { transition-delay: 150ms; }
.reveal-section.is-visible .reveal-item:nth-child(3) { transition-delay: 300ms; }
.reveal-section.is-visible .reveal-item:nth-child(4) { transition-delay: 450ms; }
.reveal-section.is-visible .reveal-item:nth-child(5) { transition-delay: 600ms; }

.draw-line {
  transition: stroke-dashoffset 2000ms ease-in-out;
}

.domain-mark:hover,
.index-list li:hover strong { color: var(--gold); }

@media (max-width: 768px) {
  .page, section { grid-template-columns: 15% 1fr 8%; }
  section { min-height: auto; padding: 4.8rem 0; }
  .opening-field { min-height: 100vh; }
  .content-column { grid-column: 2 / 3; }
  .margin-gutter { grid-column: 2 / 3; min-height: 1.6rem; }
  .marginal {
    position: static;
    display: block;
    transform: none;
    margin-bottom: 1.4rem;
    white-space: normal;
  }
  .margin-map {
    position: static;
    width: min(100%, 260px);
    margin: 0 0 2rem;
  }
  .domain-mark { overflow-wrap: anywhere; }
  .index-list li { grid-template-columns: 4.2rem 1fr; gap: 1rem; }
  body::before { left: 1vw; width: 76px; background-size: 76px 386px; }
}
