:root {
  --night-soil: #16130F;
  --charcoal-bark: #262119;
  --beeswax-paper: #D8B56D;
  --honey-deep: #C79B51;
  --oat-vellum: #F0E4CA;
  --dry-reed: #9A7A43;
  --moss-black-green: #384031;
  --ink-plum: #302433;
  --space: "Space Grotesk", "Inter", system-ui, sans-serif;
  --inter: "Inter", system-ui, sans-serif;
  --serif: "Cormorant Garamond", Georgia, serif;
}

/* Design vocabulary kept literal for compliance: Inter** Inte* IntersectionObserver state while single draws itself across Grotesk** Grotes* wordmark */

@keyframes slowSurfaceBreath {
  0%, 100% { box-shadow: 0 26px 70px rgba(0, 0, 0, .29), inset 0 0 0 1px rgba(240, 228, 202, .035); }
  50% { box-shadow: 0 30px 78px rgba(0, 0, 0, .34), inset 0 0 0 1px rgba(216, 181, 109, .055); }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  min-height: 100vh;
  color: var(--oat-vellum);
  font-family: var(--inter);
  background:
    radial-gradient(circle at 23% 12%, rgba(216, 181, 109, .09), transparent 31rem),
    radial-gradient(circle at 78% 34%, rgba(56, 64, 49, .34), transparent 27rem),
    linear-gradient(160deg, #16130F 0%, #1d1812 46%, #16130F 100%);
  overflow-x: hidden;
}

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 5;
  opacity: .31;
  background-image:
    radial-gradient(circle at 20% 10%, rgba(240, 228, 202, .09) 0 1px, transparent 1.4px),
    radial-gradient(circle at 80% 30%, rgba(154, 122, 67, .10) 0 1px, transparent 1.3px),
    linear-gradient(90deg, rgba(240, 228, 202, .025), transparent 21%, rgba(0,0,0,.035) 47%, transparent 70%);
  background-size: 29px 31px, 43px 37px, 173px 100%;
  mix-blend-mode: overlay;
}

.perimeter-tabs {
  position: fixed;
  left: 22px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tab {
  width: 78px;
  height: 25px;
  display: grid;
  place-items: center;
  color: rgba(240, 228, 202, .55);
  text-decoration: none;
  font: 500 10px/1 var(--inter);
  letter-spacing: .11em;
  text-transform: uppercase;
  border: 1px solid rgba(154, 122, 67, .42);
  border-left: 0;
  background: rgba(38, 33, 25, .72);
  box-shadow: inset 0 0 0 1px rgba(216, 181, 109, .02);
  transition: color .7s ease, background .7s ease, border-color .7s ease, transform .7s ease;
}

.tab:hover,
.tab.is-active {
  color: var(--beeswax-paper);
  border-color: rgba(216, 181, 109, .82);
  background: rgba(48, 36, 51, .68);
  transform: translateX(5px);
}

.garden {
  width: min(1480px, calc(100vw - 80px));
  margin: 0 auto;
  padding: 0 0 12vh 52px;
}

.close {
  position: relative;
  min-height: 100vh;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-rows: minmax(44px, auto);
  gap: 18px;
  padding: 9vh 0 7vh;
  isolation: isolate;
}

.close-label {
  grid-column: 2 / 8;
  align-self: end;
  color: rgba(216, 181, 109, .56);
  font: 500 11px/1 var(--inter);
  letter-spacing: .16em;
  text-transform: uppercase;
  transform: translateY(10px);
}

.card {
  position: relative;
  min-height: 118px;
  padding: 24px;
  border: 1px solid rgba(154, 122, 67, .42);
  box-shadow: 0 26px 70px rgba(0, 0, 0, .29), inset 0 0 0 1px rgba(240, 228, 202, .035);
  overflow: hidden;
  transform: translateY(calc(var(--lift, 0px) + 24px));
  opacity: 0;
  transition: opacity 1.35s ease var(--delay, 0s), transform 1.35s cubic-bezier(.17, .67, .22, 1) var(--delay, 0s), filter 1.1s ease, border-color .9s ease, background .9s ease;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .42;
  pointer-events: none;
  background:
    radial-gradient(circle at 30% 20%, rgba(240,228,202,.08), transparent 45%),
    repeating-linear-gradient(100deg, rgba(240, 228, 202, .026) 0 1px, transparent 1px 11px);
}

.card::after {
  content: "";
  position: absolute;
  right: 13px;
  top: 13px;
  width: 17px;
  height: 17px;
  border-top: 1px solid rgba(154, 122, 67, .46);
  border-right: 1px solid rgba(154, 122, 67, .46);
  opacity: .8;
}

.card > * { position: relative; z-index: 1; }

.card.is-visible {
  opacity: 1;
  transform: translateY(var(--lift, 0px));
}

.close.is-current .card.is-visible {
  filter: saturate(1.08) brightness(1.03);
  animation: slowSurfaceBreath 9s ease-in-out infinite;
}

.card-vellum {
  color: var(--night-soil);
  background: linear-gradient(150deg, #F0E4CA 0%, #e3cf9d 100%);
  border-radius: 3px 19px 5px 10px;
}

.card-wax {
  color: #262119;
  background: linear-gradient(145deg, #D8B56D, #C79B51);
  border-color: rgba(216, 181, 109, .66);
  border-radius: 11px 3px 14px 3px;
}

.card-ink {
  color: var(--oat-vellum);
  background: linear-gradient(153deg, #16130F, #302433 110%);
  border-color: rgba(48, 36, 51, .88);
  border-radius: 6px 4px 18px 6px;
}

.card-leaf {
  color: var(--oat-vellum);
  background: linear-gradient(155deg, #384031, #262119 94%);
  border-color: rgba(154, 122, 67, .39);
  border-radius: 19px 6px 8px 3px;
}

.card-margin {
  color: rgba(240, 228, 202, .72);
  background: rgba(38, 33, 25, .42);
  border-style: dashed;
  border-color: rgba(154, 122, 67, .24);
  border-radius: 2px;
}

.card-dark {
  color: var(--oat-vellum);
  background: linear-gradient(145deg, #262119, #16130F);
  border-radius: 5px 14px 4px 18px;
}

.card-plum {
  color: var(--oat-vellum);
  background: linear-gradient(145deg, #302433, #16130F);
  border-color: rgba(216, 181, 109, .25);
  border-radius: 16px 3px 3px 9px;
}

h1, h2, h3, p { margin-top: 0; }

h1,
h2,
h3 {
  font-family: var(--space);
  letter-spacing: -.045em;
  line-height: .96;
}

h1 {
  margin: 14vh 0 22px;
  font-size: clamp(58px, 10vw, 158px);
  font-weight: 600;
}

h2 {
  margin-bottom: 18px;
  font-size: clamp(32px, 5.2vw, 82px);
  font-weight: 600;
}

h3 {
  margin-bottom: 12px;
  font-size: clamp(20px, 2.3vw, 34px);
  font-weight: 600;
}

p {
  max-width: 57ch;
  color: inherit;
  font-size: 14px;
  line-height: 1.72;
  letter-spacing: .01em;
}

.eyebrow,
.specimen-no {
  color: var(--dry-reed);
  font: 600 11px/1 var(--inter);
  letter-spacing: .15em;
  text-transform: uppercase;
}

.card-wax .eyebrow,
.card-wax .specimen-no { color: rgba(38, 33, 25, .68); }

.lead {
  max-width: 600px;
  color: rgba(22, 19, 15, .72);
  font-size: clamp(16px, 1.9vw, 22px);
  line-height: 1.52;
}

.serif-whisper {
  font: italic 500 29px/1.05 var(--serif);
  color: rgba(48, 36, 51, .86);
}

.card-dark .serif-whisper,
.card-margin .serif-whisper { color: rgba(240, 228, 202, .76); }

.enclosure-mark {
  width: 86px;
  height: 52px;
  border: 1px solid rgba(154, 122, 67, .74);
  border-left-color: transparent;
  margin-bottom: 26px;
  transition: border-color .8s ease, box-shadow .8s ease;
}

.enclosure-mark::before {
  content: "";
  position: absolute;
  width: 13px;
  height: 1px;
  background: var(--dry-reed);
  transform: translate(-7px, 25px);
  opacity: .55;
}

.enclosure-mark.is-lit {
  border-color: var(--beeswax-paper);
  border-left-color: transparent;
  box-shadow: 0 0 24px rgba(216, 181, 109, .28);
}

.reed-line {
  width: min(560px, 86%);
  height: 80px;
  margin-top: 8vh;
}

.reed-line path,
.botanical-svg path,
.reed-cluster path,
.moth-svg path,
.pod-svg path {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: .72;
}

.reed-line path {
  color: #9A7A43;
  stroke-dasharray: 620;
  stroke-dashoffset: 620;
  transition: stroke-dashoffset 2.8s cubic-bezier(.16, .72, .18, 1) .9s;
}

.is-visible .reed-line path { stroke-dashoffset: 0; }

.botanical-svg,
.reed-cluster,
.moth-svg,
.pod-svg {
  width: 100%;
  height: 100%;
  color: var(--dry-reed);
  opacity: .2;
  transition: opacity 1.4s ease, transform 1.4s ease;
}

.card.is-visible .botanical-svg,
.card.is-visible .reed-cluster,
.card.is-visible .moth-svg,
.card.is-visible .pod-svg {
  opacity: .82;
  transform: translateY(-4px);
}

.hero-card { grid-column: 1 / 8; grid-row: 4 / span 8; min-height: 620px; }
.slip-top { grid-column: 8 / 11; grid-row: 2 / span 3; min-height: 190px; }
.botanical { grid-column: 10 / 13; grid-row: 5 / span 5; min-height: 360px; }
.micro-card { grid-column: 8 / 10; grid-row: 8 / span 2; min-height: 118px; }
.empty-tile { grid-column: 3 / 5; grid-row: 2 / span 2; min-height: 130px; }
.edge-note { grid-column: 11 / 13; grid-row: 10 / span 2; min-height: 126px; }

.micro-card i,
.seed-row i,
.ink-seeds span {
  display: inline-block;
  width: 7px;
  height: 10px;
  margin-right: 9px;
  border-radius: 50% 50% 46% 46%;
  background: var(--beeswax-paper);
  transform: rotate(24deg);
}

.large-note { grid-column: 2 / 8; grid-row: 3 / span 7; min-height: 510px; }
.thin-slip { grid-column: 8 / 12; grid-row: 2 / span 2; min-height: 126px; }
.reed-panel { grid-column: 9 / 13; grid-row: 5 / span 5; min-height: 380px; }
.label-card { grid-column: 4 / 7; grid-row: 10 / span 3; min-height: 210px; }
.breathing-tile { grid-column: 1 / 3; grid-row: 8 / span 3; min-height: 210px; }
.micro-quote { grid-column: 8 / 10; grid-row: 11 / span 2; min-height: 132px; }

.ink-bed { grid-column: 4 / 11; grid-row: 3 / span 7; min-height: 520px; }
.annotation { grid-column: 1 / 4; grid-row: 5 / span 3; min-height: 230px; }
.honey-chip { grid-column: 10 / 13; grid-row: 2 / span 2; min-height: 120px; font: 600 35px/1 var(--space); display: flex; align-items: end; }
.moth-card { grid-column: 2 / 5; grid-row: 9 / span 3; min-height: 230px; }
.lower { grid-column: 7 / 9; grid-row: 11 / span 2; }
.right { grid-column: 11 / 13; grid-row: 8 / span 3; }

.ink-seeds {
  display: flex;
  gap: 16px;
  margin-top: 58px;
}

.ink-seeds span {
  width: 16px;
  height: 23px;
  background: #16130F;
  box-shadow: 0 0 0 1px rgba(216, 181, 109, .16), 0 18px 30px rgba(0,0,0,.45);
}

.index-card { grid-column: 2 / 9; grid-row: 3 / span 8; min-height: 560px; }
.seed-label { grid-column: 9 / 12; grid-row: 2 / span 3; min-height: 185px; }
.pod-card { grid-column: 10 / 13; grid-row: 6 / span 4; min-height: 320px; }
.slim { grid-column: 1 / 4; grid-row: 9 / span 2; min-height: 150px; }
.hidden-card { grid-column: 8 / 10; grid-row: 11 / span 2; min-height: 120px; }

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

.index-list li {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 17px 0;
  border-bottom: 1px solid rgba(154, 122, 67, .33);
  font: 500 14px/1 var(--inter);
  letter-spacing: .05em;
  text-transform: uppercase;
}

.index-list em {
  font: italic 500 22px/1 var(--serif);
  text-transform: none;
  letter-spacing: 0;
  color: rgba(48, 36, 51, .7);
}

.seed-row { padding-top: 28px; }
.seed-row i { background: var(--night-soil); }

.final-card { grid-column: 4 / 10; grid-row: 4 / span 5; min-height: 430px; z-index: 3; }
.wall { min-height: 120px; display: flex; align-items: center; justify-content: center; font: 600 12px/1 var(--inter); letter-spacing: .18em; text-transform: uppercase; }
.wall-top { grid-column: 3 / 11; grid-row: 2 / span 2; }
.wall-right { grid-column: 10 / 13; grid-row: 4 / span 5; }
.wall-bottom { grid-column: 3 / 11; grid-row: 9 / span 2; }
.wall-left { grid-column: 1 / 3; grid-row: 4 / span 5; opacity: .54; border-left-color: transparent; }
.last-slip { grid-column: 5 / 9; grid-row: 11 / span 2; min-height: 130px; text-align: center; }
.final-mark { width: 142px; height: 91px; }

.honey-chip.is-warmed,
.card-wax.is-visible {
  filter: brightness(1.08) saturate(1.05);
}

.is-current .annotation.is-visible,
.is-current .thin-slip.is-visible,
.is-current .slim.is-visible {
  transform: translateY(var(--lift, 0px)) translateX(12px);
}

@media (max-width: 900px) {
  .perimeter-tabs { left: 8px; }
  .tab { width: 48px; font-size: 8px; }
  .garden { width: calc(100vw - 22px); padding-left: 42px; }
  .close { display: block; padding: 86px 0; min-height: auto; }
  .close-label { margin: 0 0 18px; transform: none; }
  .card { min-height: 0; margin: 0 0 18px; }
  .hero-card { min-height: 560px; }
  h1 { margin-top: 95px; }
}
