:root {
  /* Design font token: Inter** */
  --warm-parchment: #F3E4C4;
  --raw-honey: #C99332;
  --toasted-oat: #D8B978;
  --deep-ink: #17130D;
  --soft-stone: #8C8578;
  --muted-olive: #59614A;
  --off-linen: #FBF6EA;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--warm-parchment);
  color: var(--deep-ink);
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 23% 18%, rgba(216, 185, 120, 0.34), transparent 26vw),
    radial-gradient(circle at 78% 64%, rgba(89, 97, 74, 0.16), transparent 28vw),
    linear-gradient(180deg, #FBF6EA 0%, #F3E4C4 42%, #D8B978 100%);
  z-index: -4;
}

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 20;
  opacity: 0.36;
  mix-blend-mode: multiply;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(23, 19, 13, 0.18) 0 1px, transparent 1px),
    radial-gradient(circle at 72% 62%, rgba(140, 133, 120, 0.16) 0 1px, transparent 1px),
    radial-gradient(circle at 44% 88%, rgba(201, 147, 50, 0.14) 0 1px, transparent 1px);
  background-size: 3px 3px, 5px 5px, 7px 7px;
}

.contour {
  position: fixed;
  left: 50%;
  width: 140vw;
  height: 58vh;
  border: 1px solid rgba(89, 97, 74, 0.13);
  border-radius: 50%;
  transform: translateX(-50%);
  pointer-events: none;
  z-index: -2;
}

.contour-one { top: 18vh; }
.contour-two { top: 51vh; width: 110vw; opacity: 0.62; }

.cursor-mark {
  position: fixed;
  width: 16px;
  height: 16px;
  border: 1px solid var(--raw-honey);
  border-radius: 50%;
  pointer-events: none;
  z-index: 25;
  transform: translate(-50%, -50%);
  opacity: 0.45;
  transition: opacity 220ms ease;
}

.scroll-field {
  position: relative;
  width: min(100%, 1680px);
  margin: 0 auto;
}

.chapter {
  min-height: 100vh;
  position: relative;
  display: grid;
  place-items: center;
  padding: clamp(42px, 8vw, 120px) clamp(22px, 6vw, 96px);
  isolation: isolate;
}

.chapter::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 8vh;
  bottom: 8vh;
  width: min(68vw, 760px);
  border-left: 1px solid rgba(23, 19, 13, 0.08);
  border-right: 1px solid rgba(23, 19, 13, 0.08);
  transform: translateX(-50%);
  pointer-events: none;
  z-index: -1;
}

.manual-label,
.annotation,
.stamp-link {
  font-size: 11px;
  line-height: 1.4;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted-olive);
  font-weight: 500;
}

.hero { align-items: end; }

.hero-inner {
  width: min(88vw, 1180px);
  padding-bottom: 10vh;
}

.hero h1,
.type-panel h2,
.statement-block h2,
.closing-mark h2 {
  font-family: "Bebas Neue", Impact, "Arial Narrow", sans-serif;
  font-weight: 400;
  letter-spacing: 0.015em;
  margin: 0;
  text-transform: uppercase;
}

.hero h1 {
  font-size: clamp(84px, 20vw, 305px);
  line-height: 0.78;
  color: var(--deep-ink);
}

.tide-line {
  width: 100%;
  height: 1px;
  background: var(--deep-ink);
  transform-origin: left center;
  margin-top: clamp(18px, 3vh, 34px);
}

.reveal-line {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(24px, 3.4vw, 54px);
  color: var(--muted-olive);
  margin: 22px 0 0 auto;
  width: min(560px, 82vw);
  opacity: 0.72;
}

.edge-tick {
  position: absolute;
  top: 17vh;
  width: 44px;
  height: 1px;
  background: var(--raw-honey);
}

.tick-left { left: 6vw; }

.low-horizon {
  position: absolute;
  left: 8vw;
  right: 8vw;
  bottom: 16vh;
  height: 1px;
  background: rgba(89, 97, 74, 0.32);
}

.philosophy { justify-items: center; }

.chapter-number {
  position: absolute;
  top: 10vh;
  left: clamp(28px, 10vw, 180px);
  font-family: "Bebas Neue", Impact, sans-serif;
  font-size: clamp(96px, 16vw, 220px);
  line-height: 1;
  color: rgba(201, 147, 50, 0.28);
}

.statement-block {
  width: min(650px, 82vw);
  margin-left: clamp(0px, 12vw, 220px);
}

.statement-block h2,
.type-panel h2,
.closing-mark h2 {
  font-size: clamp(68px, 11vw, 164px);
  line-height: 0.86;
}

.body-copy {
  font-size: clamp(17px, 2vw, 24px);
  line-height: 1.65;
  color: var(--muted-olive);
  font-weight: 300;
}

.accent-note {
  position: absolute;
  right: clamp(22px, 11vw, 180px);
  bottom: 16vh;
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-style: italic;
  color: var(--soft-stone);
  font-size: clamp(22px, 3vw, 42px);
}

.specimen-card {
  width: min(620px, 86vw);
  min-height: 620px;
  display: grid;
  align-content: center;
  justify-items: center;
  background: rgba(251, 246, 234, 0.38);
  border: 1px solid rgba(23, 19, 13, 0.13);
  box-shadow: 0 38px 120px rgba(89, 97, 74, 0.16);
}

.seal {
  position: relative;
  width: min(58vw, 330px);
  aspect-ratio: 1;
  margin: 58px 0 42px;
  animation: sealTurn 26s linear infinite;
}

.seal span { position: absolute; display: block; }
.seal-ring { inset: 0; border: 1px solid var(--deep-ink); border-radius: 50%; }
.seal-moon { width: 48%; height: 48%; left: 14%; top: 18%; border-radius: 50%; background: var(--toasted-oat); box-shadow: 52px 0 0 var(--warm-parchment); }
.seal-bar { width: 8%; height: 76%; top: 12%; background: var(--muted-olive); }
.bar-a { right: 31%; }
.bar-b { right: 19%; background: var(--raw-honey); height: 51%; top: 37%; }
.seal-square { width: 31%; height: 31%; left: 18%; bottom: 16%; border: 1px solid var(--deep-ink); transform: rotate(45deg); }
.seal-dot { width: 13px; height: 13px; right: 12%; top: 16%; background: var(--raw-honey); border-radius: 50%; }

.swatches { justify-items: end; }

.vertical-label {
  position: absolute;
  left: clamp(20px, 7vw, 110px);
  top: 50%;
  transform: translateY(-50%) rotate(180deg);
  writing-mode: vertical-rl;
  font-family: "Bebas Neue", Impact, sans-serif;
  font-size: clamp(68px, 10vw, 154px);
  color: rgba(23, 19, 13, 0.11);
  letter-spacing: 0.05em;
}

.swatch-runway { width: min(720px, 86vw); }

.swatch {
  height: clamp(72px, 11vh, 118px);
  margin: 18px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(20px, 4vw, 46px);
  border: 1px solid rgba(23, 19, 13, 0.11);
  box-shadow: 0 18px 60px rgba(23, 19, 13, 0.06);
  transform: translateX(var(--drift, 0));
  transition: transform 900ms cubic-bezier(.2,.7,.1,1);
}

.swatch:nth-of-type(2) { --drift: -38px; }
.swatch:nth-of-type(3) { --drift: 52px; }
.swatch:nth-of-type(4) { --drift: -18px; }
.swatch:nth-of-type(5) { --drift: 32px; }
.swatch span { font-size: 12px; letter-spacing: 0.16em; }
.swatch em { font-family: "Cormorant Garamond", Georgia, serif; font-size: clamp(20px, 2.2vw, 31px); }
.slab-parchment { background: #F3E4C4; }
.slab-honey { background: #C99332; color: #FBF6EA; }
.slab-oat { background: #D8B978; }
.slab-ink { background: #17130D; color: #FBF6EA; }
.slab-olive { background: #59614A; color: #FBF6EA; }

.type-specimen { justify-items: start; }

.letter-wall {
  position: absolute;
  right: -4vw;
  top: 18vh;
  font-family: "Bebas Neue", Impact, sans-serif;
  font-size: clamp(150px, 28vw, 420px);
  line-height: 0.72;
  color: rgba(216, 185, 120, 0.26);
  writing-mode: vertical-rl;
  z-index: -1;
}

.type-panel {
  width: min(690px, 84vw);
  margin-left: clamp(0px, 12vw, 190px);
  padding: clamp(24px, 5vw, 68px);
  background: rgba(251, 246, 234, 0.55);
  border-left: 1px solid var(--raw-honey);
}

.small-serif {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-style: italic;
  color: var(--raw-honey);
  font-size: clamp(24px, 3vw, 46px);
}

.horizon-lab {
  position: relative;
  width: min(760px, 86vw);
  height: min(68vh, 620px);
  border: 1px solid rgba(23, 19, 13, 0.09);
  background: rgba(243, 228, 196, 0.24);
}

.horizon-lab .manual-label { position: absolute; top: 26px; left: 28px; }
.horizon-line { position: absolute; left: 8%; right: 8%; height: 1px; background: rgba(23, 19, 13, 0.42); }
.line-a { top: 34%; }
.line-b { top: 51%; background: rgba(201, 147, 50, 0.62); }
.line-c { top: 69%; background: rgba(89, 97, 74, 0.38); }
.floating-rect { position: absolute; border: 1px solid var(--muted-olive); background: rgba(251, 246, 234, 0.34); }
.rect-one { width: 26%; height: 28%; left: 16%; top: 41%; }
.rect-two { width: 18%; height: 46%; right: 17%; top: 22%; background: rgba(216, 185, 120, 0.32); }

.motion-caption {
  position: absolute;
  bottom: 13vh;
  right: clamp(24px, 12vw, 210px);
  width: min(380px, 72vw);
  color: var(--muted-olive);
  line-height: 1.7;
}

.closing-mark { text-align: center; }

.nested-square {
  position: relative;
  width: 210px;
  height: 210px;
  margin: 0 auto 42px;
}

.nested-square span {
  position: absolute;
  inset: var(--inset);
  border: 1px solid var(--deep-ink);
  transform: rotate(var(--rot));
}

.nested-square span:nth-child(1) { --inset: 0; --rot: 0deg; }
.nested-square span:nth-child(2) { --inset: 34px; --rot: 12deg; border-color: var(--raw-honey); }
.nested-square span:nth-child(3) { --inset: 68px; --rot: -9deg; border-color: var(--muted-olive); }

.stamp-link {
  display: inline-block;
  text-decoration: none;
  color: var(--deep-ink);
  border: 1px solid rgba(23, 19, 13, 0.28);
  padding: 13px 18px;
  background: rgba(251, 246, 234, 0.38);
}

.parallax-layer { will-change: transform; }

.is-visible .swatch { transform: translateX(0); }
.is-visible .horizon-line { animation: lineDrift 8s ease-in-out infinite alternate; }
.is-visible .rect-one { animation: slabFloat 10s ease-in-out infinite alternate; }
.is-visible .rect-two { animation: slabFloat 13s ease-in-out infinite alternate-reverse; }

@keyframes sealTurn { to { transform: rotate(360deg); } }
@keyframes lineDrift { to { transform: translateY(22px); } }
@keyframes slabFloat { to { transform: translate3d(18px, -18px, 0); } }

@media (max-width: 760px) {
  .chapter { padding-inline: 22px; }
  .chapter::after { width: calc(100vw - 44px); }
  .statement-block, .type-panel { margin-left: 0; }
  .specimen-card { min-height: 520px; }
  .vertical-label { opacity: 0.55; }
  .motion-caption { position: relative; bottom: auto; right: auto; margin-top: 24px; }
  .cursor-mark { display: none; }
}
