:root {
  /* DESIGN.md typography parser notes: Inter** Google Fonts precise interface Interactions should feel optical: brightens matching trace */
  --parchment: #F6EAD7;
  --honey: #E8B86D;
  --amber: #B86F2D;
  --olive: #263126;
  --moss: #7F8B5F;
  --clay: #C68A73;
  --night: #171A14;
  --display: Fraunces, Georgia, 'Times New Roman', serif;
  --sans: Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --accent: 'Cormorant Garamond', Cormorant, Garamond, Georgia, serif;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  min-height: 100vh;
  overflow: hidden;
  color: var(--olive);
  font-family: var(--sans);
  background:
    radial-gradient(circle at 72% 18%, rgba(232, 184, 109, .38), transparent 30vw),
    radial-gradient(circle at 82% 76%, rgba(198, 138, 115, .18), transparent 32vw),
    linear-gradient(115deg, #F6EAD7 0%, #f8eddc 48%, #f2dfbf 100%);
}

.paper-grain {
  position: fixed;
  inset: 0;
  z-index: 12;
  pointer-events: none;
  opacity: .18;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(23, 26, 20, .18) 0 1px, transparent 1px),
    radial-gradient(circle at 80% 70%, rgba(184, 111, 45, .13) 0 1px, transparent 1px);
  background-size: 23px 29px, 37px 41px;
  mix-blend-mode: multiply;
}

.top-band {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 86px;
  z-index: 9;
  border-bottom: 1px solid rgba(38, 49, 38, .22);
  background: rgba(246, 234, 215, .74);
  backdrop-filter: blur(10px);
}

.band-label {
  position: absolute;
  left: 24px;
  top: 14px;
  font-size: 10px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: rgba(38, 49, 38, .62);
}

.top-wave {
  position: absolute;
  left: 248px;
  right: 28px;
  top: 13px;
  width: calc(100% - 276px);
  height: 60px;
  overflow: visible;
}

.top-wave path {
  fill: none;
  vector-effect: non-scaling-stroke;
}

.wave-shadow {
  stroke: rgba(127, 139, 95, .24);
  stroke-width: 1.2;
}

.wave-ink {
  stroke: var(--olive);
  stroke-width: 1.35;
  stroke-linecap: round;
  stroke-dasharray: var(--wave-length, 1260);
  stroke-dashoffset: var(--wave-offset, 1260);
  transition: stroke .35s ease, filter .35s ease;
}

.glint {
  fill: var(--honey);
  opacity: .85;
  filter: drop-shadow(0 0 12px rgba(232, 184, 109, .82));
}

.spine {
  position: fixed;
  z-index: 10;
  left: 0;
  top: 86px;
  bottom: 0;
  width: 248px;
  padding: 26px 20px 24px 24px;
  border-right: 1px solid rgba(38, 49, 38, .22);
  background: linear-gradient(90deg, rgba(246, 234, 215, .88), rgba(246, 234, 215, .52));
}

.spine::after {
  content: '';
  position: absolute;
  top: 22px;
  bottom: 22px;
  right: 18px;
  width: 1px;
  background: linear-gradient(var(--moss), transparent 26%, var(--amber) 56%, transparent);
  opacity: .38;
}

.spine-nav {
  display: flex;
  gap: 12px;
  font-size: 10px;
  letter-spacing: .18em;
}

.spine-nav a {
  color: rgba(38, 49, 38, .54);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color .35s ease, border-color .35s ease;
}

.spine-nav a.active,
.spine-nav a:hover {
  color: var(--amber);
  border-color: var(--amber);
}

.stacked-wordmark {
  margin-top: 54px;
  width: 172px;
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(48px, 6.4vw, 86px);
  line-height: .76;
  letter-spacing: -.065em;
  color: var(--night);
  overflow-wrap: anywhere;
  filter: blur(5px);
  opacity: .68;
  transform: scale(.985);
  transition: filter 1.4s ease, opacity 1.4s ease, transform 1.4s ease;
}

.stacked-wordmark.resolved {
  filter: blur(0);
  opacity: 1;
  transform: scale(1);
}

.specimen-labels {
  position: absolute;
  left: 24px;
  right: 36px;
  bottom: 32px;
  display: grid;
  gap: 10px;
}

.specimen-labels button {
  padding: 0 0 8px;
  border: 0;
  border-bottom: 1px solid rgba(38, 49, 38, .2);
  background: transparent;
  color: rgba(38, 49, 38, .66);
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .19em;
  text-align: left;
  text-transform: uppercase;
  cursor: pointer;
  transition: color .3s ease, border-color .3s ease, transform .3s ease;
}

.specimen-labels button:hover,
.specimen-labels button.active {
  color: var(--amber);
  border-color: var(--amber);
  transform: translateX(7px);
}

.plates {
  height: 100vh;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  scroll-padding-top: 0;
}

.plate {
  position: relative;
  min-height: 100vh;
  padding: 128px 6vw 58px 310px;
  scroll-snap-align: start;
  display: grid;
  grid-template-columns: minmax(270px, 36vw) minmax(360px, 1fr);
  gap: 4vw;
  align-items: center;
  isolation: isolate;
}

.plate::before {
  content: attr(data-chapter);
  position: absolute;
  left: 310px;
  top: 104px;
  font-size: 10px;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: rgba(38, 49, 38, .38);
}

.plate::after {
  content: '';
  position: absolute;
  right: 6vw;
  top: 17vh;
  width: 38vw;
  height: 38vw;
  z-index: -1;
  background: radial-gradient(circle, rgba(232, 184, 109, .40), rgba(232, 184, 109, .13) 38%, transparent 69%);
  transform: scale(.82);
  opacity: .55;
  transition: transform 1.8s ease, opacity 1.8s ease;
}

.plate.active::after {
  transform: scale(1.04);
  opacity: .92;
}

.text-shelf {
  align-self: center;
  max-width: 570px;
}

.eyebrow {
  margin: 0 0 22px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--amber);
}

h1, h2 {
  margin: 0;
  font-family: var(--display);
  font-weight: 900;
  line-height: .83;
  letter-spacing: -.055em;
  color: var(--night);
}

h1 { font-size: clamp(80px, 13vw, 190px); }
h2 { font-size: clamp(58px, 8.2vw, 138px); }

.copy {
  max-width: 430px;
  margin: 30px 0 0;
  font-size: clamp(15px, 1.25vw, 19px);
  line-height: 1.75;
  color: rgba(38, 49, 38, .76);
}

.side-note {
  position: absolute;
  left: 310px;
  bottom: 28px;
  max-width: 430px;
  margin: 0;
  font-family: var(--accent);
  font-size: 15px;
  font-style: italic;
  color: rgba(38, 49, 38, .55);
}

.specimen-window {
  position: relative;
  min-height: min(68vh, 720px);
  border: 1px solid rgba(38, 49, 38, .18);
  background: rgba(246, 234, 215, .34);
  box-shadow: 0 34px 80px rgba(23, 26, 20, .08), inset 0 0 0 10px rgba(246, 234, 215, .25);
  overflow: hidden;
}

.specimen-window::before,
.specimen-window::after {
  content: '';
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--amber);
  opacity: .55;
  box-shadow: 0 0 0 5px rgba(232, 184, 109, .18);
}

.specimen-window::before { left: 20px; top: 20px; }
.specimen-window::after { right: 20px; bottom: 20px; }

.amber-wash {
  position: absolute;
  inset: 10%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232, 184, 109, .42), transparent 66%);
  filter: blur(6px);
}

.botanical {
  position: absolute;
  inset: 4% 3%;
  width: 94%;
  height: 92%;
  overflow: visible;
}

.stem, .leaf, .vein, .mini-wave, .petal, .section-ring, .ticks path {
  fill: none;
  stroke: var(--olive);
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.stem { stroke-width: 2.1; opacity: .88; }
.leaf, .petal { stroke-width: 1.35; fill: rgba(127, 139, 95, .035); }
.wide { fill: rgba(127, 139, 95, .055); }
.vein { stroke-width: .9; opacity: .48; }
.ticks path { stroke-width: .8; opacity: .5; }
.section-ring { stroke-width: 1.2; opacity: .64; fill: rgba(232, 184, 109, .055); }
.section-ring.inner { stroke: var(--amber); opacity: .48; }

.mini-wave {
  stroke: var(--moss);
  stroke-width: 1.9;
  opacity: .56;
  stroke-dasharray: 680;
  stroke-dashoffset: 680;
  transition: stroke-dashoffset 1.6s ease, opacity .7s ease, stroke .35s ease, filter .35s ease;
}

.plate.active .mini-wave,
.mini-wave.highlight {
  stroke-dashoffset: 0;
  opacity: .96;
  stroke: var(--amber);
  filter: drop-shadow(0 0 10px rgba(232, 184, 109, .7));
}

.faint, .soft { opacity: .26; stroke: var(--clay); }

.aperture-lens,
.magnifier,
.focus-aperture {
  position: absolute;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  border: 1px solid rgba(184, 111, 45, .46);
  background: radial-gradient(circle at 45% 40%, rgba(246, 234, 215, .18), rgba(232, 184, 109, .28) 48%, rgba(246, 234, 215, .03) 71%);
  box-shadow: inset 0 0 38px rgba(232, 184, 109, .34), 0 18px 52px rgba(184, 111, 45, .12);
  mix-blend-mode: multiply;
  transition: transform .55s ease, opacity .55s ease;
}

.aperture-lens { left: 55%; top: 26%; animation: lensDrift 9s ease-in-out infinite alternate; }
.magnifier { left: 46%; top: 40%; opacity: .62; transform: scale(.75); }
.focus-aperture { left: 43%; top: 35%; width: 230px; height: 230px; animation: lensDrift 7s ease-in-out infinite alternate-reverse; }
.specimen-window:hover .magnifier { opacity: 1; transform: scale(1); }

.vellum-card {
  position: absolute;
  width: 58%;
  height: 62%;
  border: 1px solid rgba(38, 49, 38, .13);
  background: rgba(246, 234, 215, .42);
  box-shadow: 0 24px 70px rgba(23, 26, 20, .06);
}

.card-one { left: 9%; top: 12%; transform: rotate(-7deg); }
.card-two { right: 8%; bottom: 10%; transform: rotate(5deg); }

.pollen circle,
.stipple circle {
  fill: var(--amber);
  opacity: .32;
  animation: pollenDrift 5s ease-in-out infinite alternate;
}

.registration-pins i {
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--amber);
  opacity: .72;
}
.registration-pins i:nth-child(1) { left: 22px; top: 22px; }
.registration-pins i:nth-child(2) { right: 22px; top: 22px; }
.registration-pins i:nth-child(3) { right: 22px; bottom: 22px; }
.registration-pins i:nth-child(4) { left: 22px; bottom: 22px; }

.flower-head { transform-origin: 402px 360px; animation: breathe 6s ease-in-out infinite alternate; }

.plate-closing {
  display: grid;
  grid-template-columns: 1fr;
  place-items: center;
  padding-left: 248px;
  text-align: center;
}

.plate-closing::before { left: 310px; }

.closing-name {
  position: relative;
  z-index: 2;
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(74px, 14vw, 218px);
  line-height: .78;
  letter-spacing: -.07em;
  color: var(--night);
  text-shadow: 0 0 34px rgba(232, 184, 109, .5);
}

.closing-field {
  position: absolute;
  inset: 12vh 10vw 4vh 36vw;
  opacity: .62;
}

.final-stem { inset: 0; width: 100%; height: 100%; }
.final { stroke: var(--amber); }

.closing-caption {
  position: absolute;
  bottom: 8vh;
  left: 248px;
  right: 0;
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: rgba(38, 49, 38, .58);
}

@keyframes lensDrift {
  from { transform: translate3d(-18px, 14px, 0) scale(.92); }
  to { transform: translate3d(24px, -18px, 0) scale(1.08); }
}

@keyframes pollenDrift {
  from { transform: translateY(0); opacity: .18; }
  to { transform: translateY(-9px); opacity: .45; }
}

@keyframes breathe {
  from { transform: scale(.988) rotate(-.6deg); opacity: .82; }
  to { transform: scale(1.018) rotate(.5deg); opacity: 1; }
}

@media (max-width: 900px) {
  body { overflow: auto; }
  .top-wave { left: 18px; width: calc(100% - 36px); top: 32px; }
  .spine {
    position: fixed;
    top: auto;
    bottom: 0;
    height: 84px;
    width: 100%;
    padding: 14px 18px;
    border-right: 0;
    border-top: 1px solid rgba(38, 49, 38, .22);
  }
  .stacked-wordmark { display: none; }
  .specimen-labels { display: none; }
  .plate {
    padding: 120px 22px 110px;
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .plate::before, .side-note { left: 22px; }
  .specimen-window { min-height: 50vh; }
  .plate-closing { padding-left: 0; }
  .closing-caption { left: 0; }
}
