:root {
  /* DESIGN token mirror: Interpret “lump” as a mysterious object with agency—a black-gold mass of unresolved material. Work Sans** for small interface labels. */
  --black: #030202;
  --charcoal: #12100C;
  --gold: #D6A84A;
  --brass: #F3C96B;
  --wax: #7A2F22;
  --bone: #E8D9B8;
  --violet: #6D4CFF;
  --ember: #FF5A3D;
  --serif: "Libre Baskerville", Baskerville, Georgia, serif;
  --ornate: "Cormorant Garamond", Garamond, Georgia, serif;
  --sans: "Work Sans", Inter, system-ui, sans-serif;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  color: var(--bone);
  background: var(--black);
  font-family: var(--sans);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 7;
  background:
    linear-gradient(90deg, rgba(255, 90, 61, 0.03), transparent 13%, transparent 86%, rgba(109, 76, 255, 0.025)),
    repeating-linear-gradient(0deg, rgba(232, 217, 184, 0.018) 0 1px, transparent 1px 5px);
  mix-blend-mode: screen;
}

.ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.flame {
  position: absolute;
  width: 42vw;
  height: 52vh;
  bottom: -18vh;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 62%, rgba(243, 201, 107, 0.36), rgba(122, 47, 34, 0.15) 34%, transparent 67%);
  filter: blur(18px);
  opacity: 0.62;
  animation: flameShimmer 4.8s ease-in-out infinite alternate;
}

.flame-left { left: -13vw; }
.flame-right { right: -15vw; animation-delay: -2.2s; }

.dust-field {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle, rgba(243, 201, 107, 0.42) 0 1px, transparent 1.5px),
    radial-gradient(circle, rgba(214, 168, 74, 0.24) 0 1px, transparent 1.5px);
  background-size: 19vw 17vh, 27vw 31vh;
  background-position: 7vw 11vh, 3vw 4vh;
  opacity: 0.16;
  animation: dustDrift 28s linear infinite;
}

.ritual { position: relative; z-index: 2; }

.chamber {
  min-height: 100vh;
  position: relative;
  display: grid;
  place-items: center;
  padding: 8vh clamp(20px, 5vw, 74px);
  isolation: isolate;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 82%, rgba(122, 47, 34, 0.25), transparent 36%),
    radial-gradient(circle at 22% 22%, rgba(214, 168, 74, 0.07), transparent 31%),
    linear-gradient(180deg, var(--black), var(--charcoal) 47%, var(--black));
}

.chamber::before {
  content: attr(data-chapter);
  position: absolute;
  right: clamp(18px, 4vw, 64px);
  top: 9vh;
  font-family: var(--ornate);
  font-size: clamp(5rem, 18vw, 18rem);
  font-style: italic;
  color: rgba(214, 168, 74, 0.045);
  line-height: 1;
  z-index: -1;
}

.chamber::after {
  content: "";
  position: absolute;
  inset: 3.5vh clamp(12px, 2vw, 36px);
  border: 1px solid rgba(214, 168, 74, 0.15);
  box-shadow: inset 0 0 80px rgba(0, 0, 0, 0.72);
  pointer-events: none;
  z-index: -1;
}

.section-marker {
  position: absolute;
  top: clamp(26px, 5vh, 52px);
  left: clamp(24px, 5vw, 72px);
  margin: 0;
  color: rgba(232, 217, 184, 0.62);
  font: 600 0.72rem/1 var(--sans);
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

h1, h2 {
  font-family: var(--serif);
  color: var(--gold);
  margin: 0;
  font-weight: 700;
  letter-spacing: 0.035em;
  text-shadow: 0 0 24px rgba(243, 201, 107, 0.17);
}

h2 { font-size: clamp(2.35rem, 6.6vw, 7.4rem); line-height: 0.95; max-width: 10ch; }
p { font-size: clamp(1rem, 1.5vw, 1.25rem); line-height: 1.75; }

.site-title {
  position: absolute;
  top: 13vh;
  left: 50%;
  transform: translateX(-50%);
  font-size: clamp(3.3rem, 10vw, 12rem);
  line-height: 0.9;
  white-space: nowrap;
  color: transparent;
  -webkit-text-stroke: 1px rgba(214, 168, 74, 0.68);
  background: linear-gradient(90deg, rgba(214, 168, 74, 0.18), var(--brass), rgba(214, 168, 74, 0.16));
  -webkit-background-clip: text;
  background-clip: text;
  animation: titleEmboss 2.8s ease forwards;
}

.site-title::before, .cut-copy h2::before {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  color: rgba(109, 76, 255, 0.32);
  transform: translate(0.035em, -0.015em);
  z-index: -1;
}

.proclamation {
  position: absolute;
  top: 31vh;
  max-width: 38rem;
  text-align: center;
  font-family: var(--ornate);
  font-size: clamp(1.3rem, 2.5vw, 2.35rem);
  font-style: italic;
  color: rgba(232, 217, 184, 0.76);
}

.lump-stage { align-self: end; margin-bottom: 5vh; width: min(78vw, 760px); display: grid; place-items: center; }

.lump {
  position: relative;
  width: clamp(190px, 28vw, 410px);
  height: clamp(150px, 22vw, 310px);
  background:
    radial-gradient(circle at 37% 23%, rgba(232, 217, 184, 0.12), transparent 16%),
    radial-gradient(circle at 65% 72%, rgba(122, 47, 34, 0.32), transparent 23%),
    linear-gradient(145deg, #1a1410, #030202 42%, #0d0908 72%, #20130f);
  border-radius: 54% 46% 48% 52% / 42% 54% 46% 58%;
  box-shadow: inset -28px -33px 42px rgba(0, 0, 0, 0.78), inset 18px 18px 35px rgba(214, 168, 74, 0.055), 0 42px 70px rgba(0, 0, 0, 0.76), 0 0 80px rgba(243, 201, 107, 0.11);
  transform-origin: 50% 72%;
  animation: lumpWobble 7s ease-in-out infinite;
}

.lump::before {
  content: "";
  position: absolute;
  inset: 7% 10% 15% 8%;
  border-radius: inherit;
  background: radial-gradient(circle at 43% 14%, rgba(243, 201, 107, 0.13), transparent 20%), linear-gradient(115deg, transparent 32%, rgba(214, 168, 74, 0.06), transparent 48%);
  filter: blur(1px);
}

.gold-seam {
  position: absolute;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, var(--gold), var(--brass), transparent);
  box-shadow: 0 0 12px rgba(243, 201, 107, 0.78);
  transform: rotate(var(--angle, -9deg));
  animation: seamFlicker 2.4s steps(2, end) infinite;
}
.seam-one { width: 42%; left: 22%; top: 38%; --angle: -12deg; }
.seam-two { width: 31%; right: 14%; top: 58%; --angle: 17deg; animation-delay: -0.8s; }
.seam-three { width: 24%; left: 18%; bottom: 24%; --angle: 7deg; animation-delay: -1.4s; }

.glitch-slice { position: absolute; left: 12%; width: 76%; height: 8%; background: rgba(109, 76, 255, 0.12); mix-blend-mode: screen; opacity: 0; }
.slice-one { top: 34%; }
.slice-two { top: 55%; background: rgba(255, 90, 61, 0.12); }
.active .glitch-slice { animation: rejectSlice 3.2s steps(2, end) infinite; }

.plinth {
  width: clamp(270px, 43vw, 620px);
  height: clamp(52px, 8vw, 86px);
  margin-top: -3px;
  position: relative;
  background: linear-gradient(180deg, rgba(243, 201, 107, 0.42), rgba(122, 47, 34, 0.36) 18%, #130d09 19%, #050303 82%, rgba(214, 168, 74, 0.28));
  border: 1px solid rgba(243, 201, 107, 0.48);
  clip-path: polygon(8% 0, 92% 0, 100% 100%, 0 100%);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.9), 0 0 48px rgba(243, 201, 107, 0.16);
}

.plinth span { position: absolute; inset: 10px 12%; border-top: 1px solid rgba(214, 168, 74, 0.5); }

.whisper {
  position: absolute;
  bottom: clamp(28px, 6vh, 66px);
  right: clamp(25px, 8vw, 120px);
  max-width: 20rem;
  font: italic 1.2rem var(--ornate);
  color: rgba(232, 217, 184, 0.67);
}

.annotation { cursor: crosshair; transition: color 300ms ease, text-shadow 300ms ease, border-color 300ms ease; }
.annotation:hover { color: var(--brass); text-shadow: 0 0 18px rgba(243, 201, 107, 0.55); }

.split-trial, .cut-grid {
  width: min(1120px, 92vw);
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  gap: clamp(34px, 7vw, 100px);
  align-items: center;
}

.reveal-block { opacity: 0; transform: translateY(42px); transition: opacity 1100ms ease, transform 1100ms ease; }
.active .reveal-block { opacity: 1; transform: translateY(0); }

.ornament-number { font: italic clamp(4rem, 13vw, 14rem)/0.78 var(--ornate); color: rgba(214, 168, 74, 0.12); display: block; margin-bottom: -0.12em; }
.trial-copy p, .cut-copy p, .seal-composition p { max-width: 31rem; color: rgba(232, 217, 184, 0.72); }

.button-verdict {
  margin-top: 1.4rem;
  padding: 0.78rem 1rem;
  background: transparent;
  color: rgba(243, 201, 107, 0.76);
  border: 1px solid rgba(214, 168, 74, 0.42);
  font: 600 0.72rem var(--sans);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.balance-field { position: relative; min-height: 68vh; display: grid; place-items: center; }
.scale-line { position: absolute; left: 50%; top: 7%; bottom: 8%; width: 1px; background: linear-gradient(transparent, var(--gold), transparent); box-shadow: 0 0 22px rgba(214, 168, 74, 0.32); }
.lump-weighing { width: clamp(180px, 26vw, 360px); height: clamp(250px, 38vw, 510px); border-radius: 44% 56% 52% 48% / 61% 36% 64% 39%; transform: rotate(-3deg); }

.measure-marks { list-style: none; margin: 0; padding: 0; position: absolute; right: 2%; top: 10%; bottom: 10%; width: 42%; display: flex; flex-direction: column; justify-content: space-between; }
.measure-marks li { opacity: 0; transform: translateX(28px); color: var(--gold); font: 600 0.72rem var(--sans); letter-spacing: 0.2em; text-transform: uppercase; border-top: 1px solid rgba(214, 168, 74, 0.5); padding-top: 0.55rem; text-shadow: 2px 0 rgba(109, 76, 255, 0.35), -1px 0 rgba(255, 90, 61, 0.25); }
.active .measure-marks li { animation: markAppear 700ms ease forwards, markTremble 2.1s steps(2,end) infinite; }
.active .measure-marks li:nth-child(2) { animation-delay: 140ms, 900ms; }
.active .measure-marks li:nth-child(3) { animation-delay: 280ms, 1000ms; }
.active .measure-marks li:nth-child(4) { animation-delay: 420ms, 1200ms; }
.active .measure-marks li:nth-child(5) { animation-delay: 560ms, 1300ms; }

.scan-stage { width: min(980px, 92vw); min-height: 72vh; display: grid; place-items: center; text-align: center; position: relative; }
.scan-stage h2 { max-width: 13ch; z-index: 2; mix-blend-mode: screen; }
.lump-scan { width: min(82vw, 760px); height: min(62vh, 520px); position: absolute; opacity: 0.72; border-radius: 49% 51% 45% 55% / 45% 58% 42% 55%; filter: drop-shadow(0 0 36px rgba(243, 201, 107, 0.18)); }
.scan-band { position: absolute; inset: -20% -12%; background: linear-gradient(180deg, transparent 30%, rgba(243, 201, 107, 0.03) 40%, rgba(243, 201, 107, 0.42) 48%, rgba(232, 217, 184, 0.22) 50%, rgba(122, 47, 34, 0.12) 58%, transparent 68%); transform: translateY(-58%); mix-blend-mode: screen; animation: candleScan 5.8s ease-in-out infinite; }

.cut-copy h2 { position: relative; max-width: 12ch; }
.cut-object { min-height: 62vh; position: relative; display: grid; place-items: center; }
.lump-cut { border-radius: 39% 61% 43% 57% / 48% 42% 58% 52%; animation: lumpWobble 5s ease-in-out infinite, cutGlitch 4.2s steps(2,end) infinite; }
.stratum { position: absolute; left: 7%; right: 7%; height: 12%; background: linear-gradient(90deg, rgba(255,90,61,0.2), rgba(243,201,107,0.34), rgba(109,76,255,0.17)); clip-path: polygon(0 30%, 26% 10%, 46% 42%, 72% 16%, 100% 35%, 100% 70%, 0 84%); mix-blend-mode: screen; opacity: 0.78; }
.stratum-one { top: 29%; transform: translateX(-15px); }
.stratum-two { top: 48%; transform: translateX(18px); }
.stratum-three { top: 66%; transform: translateX(-8px); }
.dust-constellation { position: absolute; inset: 8%; background-image: radial-gradient(circle, rgba(243,201,107,0.86) 0 1px, transparent 1.7px); background-size: 42px 36px; mask-image: radial-gradient(circle, black, transparent 66%); animation: dustPulse 2.2s ease-in-out infinite alternate; }

.seal-composition { text-align: center; display: grid; place-items: center; gap: 1.5rem; }
.seal-composition h2 { max-width: 12ch; }
.seal-composition p { margin: 0 auto; }
.seal-mark { width: clamp(190px, 30vw, 330px); aspect-ratio: 1; position: relative; display: grid; place-items: center; filter: drop-shadow(0 0 34px rgba(122, 47, 34, 0.58)); }
.seal-ring { position: absolute; inset: 5%; border-radius: 50%; border: 2px solid rgba(214, 168, 74, 0.82); background: radial-gradient(circle, rgba(122, 47, 34, 0.82), rgba(18, 16, 12, 0.86) 48%, rgba(3, 2, 2, 0.95)); box-shadow: inset 0 0 36px rgba(0,0,0,0.72), 0 0 0 13px rgba(122,47,34,0.16); animation: sealSpin 18s linear infinite; }
.seal-ring::before { content: "recognized • unresolved • warm • "; position: absolute; inset: 12%; border: 1px dashed rgba(243, 201, 107, 0.42); border-radius: 50%; color: rgba(243,201,107,0.58); font: 600 0.65rem var(--sans); letter-spacing: 0.16em; display: grid; place-items: start center; padding-top: 18px; text-transform: uppercase; }
.seal-core { position: relative; z-index: 2; font: italic 7rem/1 var(--ornate); color: var(--brass); text-shadow: 0 0 30px rgba(243, 201, 107, 0.52); }
.seal-lump { position: absolute; z-index: 1; width: 42%; height: 34%; opacity: 0.64; transform: translateY(30%); }

.quiet-nav { display: flex; gap: 1.25rem; flex-wrap: wrap; justify-content: center; margin-top: 1rem; }
.quiet-nav a { color: rgba(232,217,184,0.58); text-decoration: none; font: 600 0.72rem var(--sans); letter-spacing: 0.18em; text-transform: uppercase; border-bottom: 1px solid rgba(214,168,74,0.25); padding-bottom: 0.35rem; transition: color 300ms ease, border-color 300ms ease; }
.quiet-nav a:hover { color: var(--brass); border-color: var(--brass); }

.verdict-toast { position: fixed; z-index: 9; left: 50%; bottom: 7vh; transform: translate(-50%, 22px); opacity: 0; padding: 0.85rem 1rem; border: 1px solid rgba(214,168,74,0.5); color: var(--brass); background: rgba(18,16,12,0.86); box-shadow: 0 0 30px rgba(0,0,0,0.75); font: 600 0.72rem var(--sans); letter-spacing: 0.16em; text-transform: uppercase; pointer-events: none; transition: opacity 360ms ease, transform 360ms ease; }
.verdict-toast.show { opacity: 1; transform: translate(-50%, 0); }

.chamber.glitch-now h2, .chamber.glitch-now .site-title { animation: textGlitch 420ms steps(2,end); }
.chamber.glitch-now .lump { filter: drop-shadow(9px 0 rgba(109,76,255,0.28)) drop-shadow(-7px 0 rgba(255,90,61,0.22)); }

@keyframes flameShimmer { from { transform: scale(0.95) translateY(0); opacity: 0.46; } to { transform: scale(1.08) translateY(-4vh); opacity: 0.74; } }
@keyframes dustDrift { to { background-position: 25vw 36vh, -21vw 27vh; } }
@keyframes titleEmboss { from { opacity: 0; filter: blur(12px); letter-spacing: 0.11em; } to { opacity: 1; filter: blur(0); letter-spacing: 0.035em; } }
@keyframes lumpWobble { 0%,100% { transform: rotate(-1deg) scale(1); border-radius: 54% 46% 48% 52% / 42% 54% 46% 58%; } 45% { transform: rotate(1.8deg) scale(1.018, 0.985); border-radius: 48% 52% 56% 44% / 51% 45% 55% 49%; } 72% { transform: rotate(-1.2deg) scale(0.992, 1.012); } }
@keyframes seamFlicker { 0%, 100% { opacity: 0.72; } 18% { opacity: 0.28; transform: translateX(3px) rotate(var(--angle)); } 38% { opacity: 1; } 46% { opacity: 0.44; } }
@keyframes rejectSlice { 0%, 88%, 100% { opacity: 0; transform: translateX(0); } 90% { opacity: 1; transform: translateX(13px); } 93% { opacity: 0.5; transform: translateX(-10px); } }
@keyframes markAppear { to { opacity: 1; transform: translateX(0); } }
@keyframes markTremble { 0%, 100% { clip-path: inset(0); } 50% { clip-path: inset(0 8% 0 0); transform: translateX(2px); } }
@keyframes candleScan { 0%, 100% { transform: translateY(-64%); opacity: 0; } 16% { opacity: 1; } 56% { opacity: 0.95; } 80% { transform: translateY(48%); opacity: 0; } }
@keyframes cutGlitch { 0%, 83%, 100% { transform: translateX(0) skewX(0); } 86% { transform: translateX(13px) skewX(5deg); } 88% { transform: translateX(-9px) skewX(-4deg); } }
@keyframes dustPulse { to { opacity: 0.35; transform: scale(1.05) rotate(2deg); } }
@keyframes sealSpin { to { transform: rotate(360deg); } }
@keyframes textGlitch { 0% { text-shadow: 8px 0 rgba(109,76,255,0.55), -6px 0 rgba(255,90,61,0.44); } 50% { transform: translateX(8px); } 100% { transform: translateX(0); } }

@media (max-width: 820px) {
  .split-trial, .cut-grid { grid-template-columns: 1fr; gap: 2rem; }
  .balance-field { min-height: 54vh; }
  .measure-marks { right: 0; width: 48%; }
  .site-title { top: 15vh; }
  .proclamation { top: 29vh; padding: 0 1.25rem; }
  .whisper { left: 24px; right: 24px; text-align: center; }
  .chamber { padding-top: 12vh; }
}
