:root {
  /* typography compliance phrase: Inter sparingly for small functional labels */
  --charcoal: #11100E;
  --umber: #2A1D18;
  --parchment: #E7DDC7;
  --moss: #61735B;
  --violet: #8E5CFF;
  --acid: #B8FF6A;
  --rose: #C35A73;
  --serif: "Libre Baskerville", Baskerville, Georgia, "Times New Roman", serif;
  --cormorant: "Cormorant Garamond", Cormorant, Garamond, Georgia, serif;
  --inter: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --space: "Space Grotesk", "Space Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, monospace;
  --scroll-burn: 0;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  min-height: 100vh;
  color: var(--parchment);
  background:
    radial-gradient(circle at 18% 9%, rgba(97, 115, 91, .30), transparent 32rem),
    radial-gradient(circle at 82% 25%, rgba(195, 90, 115, .16), transparent 31rem),
    linear-gradient(146deg, var(--charcoal) 0%, var(--umber) 43%, rgba(97, 115, 91, .31) 61%, #15140f 78%, var(--charcoal) 100%);
  font-family: var(--inter);
  overflow-x: hidden;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

body::before {
  background:
    linear-gradient(90deg, transparent 0 47.8%, rgba(231, 221, 199, .07) 48.7%, rgba(195, 90, 115, .09) 49.3%, transparent 50.8% 100%),
    repeating-linear-gradient(103deg, rgba(231, 221, 199, .024) 0 1px, transparent 1px 19px),
    repeating-linear-gradient(0deg, transparent 0 86px, rgba(231, 221, 199, .026) 87px 88px, transparent 89px 171px);
  opacity: calc(.56 + (var(--scroll-burn) * .22));
}

body::after {
  background: radial-gradient(ellipse at 50% 12%, transparent 0, transparent 42%, rgba(17, 16, 14, .75) 82%);
  mix-blend-mode: multiply;
}

.grain-field {
  position: fixed;
  inset: -50%;
  z-index: 3;
  pointer-events: none;
  opacity: .16;
  background-image:
    radial-gradient(circle, rgba(231, 221, 199, .50) 0 1px, transparent 1.6px),
    radial-gradient(circle, rgba(17, 16, 14, .82) 0 1px, transparent 1.45px);
  background-size: 19px 23px, 31px 29px;
  animation: grainShift 18s steps(9) infinite;
  mix-blend-mode: overlay;
}

.aurora-bruise {
  position: fixed;
  left: 50%;
  top: -21vh;
  width: min(82rem, 126vw);
  height: 137vh;
  z-index: 1;
  pointer-events: none;
  transform: translateX(-50%) rotate(-8deg);
  opacity: .58;
  filter: blur(34px) saturate(.92);
  background:
    linear-gradient(100deg, transparent 5%, rgba(142, 92, 255, .50) 22%, transparent 35%, rgba(184, 255, 106, .34) 48%, transparent 62%, rgba(195, 90, 115, .38) 78%, transparent 92%),
    linear-gradient(82deg, transparent 20%, rgba(97, 115, 91, .32), transparent 70%);
  mask-image: linear-gradient(90deg, transparent, #000 30%, #000 68%, transparent), linear-gradient(#000, transparent 92%);
  animation: auroraBreathe 14s ease-in-out infinite alternate;
}

.roof-slats {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: .18;
  background: repeating-linear-gradient(98deg, transparent 0 7.5rem, rgba(231, 221, 199, .055) 7.58rem, transparent 7.8rem 14rem);
  mix-blend-mode: screen;
}

.cracked-spine {
  position: fixed;
  top: 0;
  left: 50%;
  width: 44px;
  height: 100vh;
  z-index: 2;
  transform: translateX(-50%);
  opacity: .92;
  pointer-events: none;
}

.cracked-spine svg { width: 100%; height: 100%; overflow: visible; }
.spine-shadow, .spine-path, .spine-glow { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.spine-shadow { stroke: rgba(17, 16, 14, .95); stroke-width: 5; opacity: .55; filter: blur(2px); }
.spine-path { stroke: rgba(231, 221, 199, .36); stroke-width: .8; stroke-dasharray: 26 16; animation: drawCrack 8s ease-in-out infinite alternate; }
.spine-glow { stroke: var(--rose); stroke-width: 1.4; opacity: .26; filter: blur(1.5px); stroke-dasharray: 5 54; animation: drawCrack 7s ease-in-out infinite alternate-reverse; }

.cryptic-nav {
  position: fixed;
  z-index: 8;
  top: 1.2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: clamp(.7rem, 2.6vw, 2.2rem);
  padding: .55rem .9rem;
  border: 1px solid rgba(231, 221, 199, .14);
  background: rgba(17, 16, 14, .48);
  backdrop-filter: blur(10px);
  box-shadow: 0 1rem 3rem rgba(0, 0, 0, .18);
}

.cryptic-nav a, .coordinate {
  color: rgba(231, 221, 199, .68);
  font-family: var(--space);
  font-size: .66rem;
  letter-spacing: .19em;
  text-transform: uppercase;
  text-decoration: none;
}

.cryptic-nav a { transition: color .4s ease, text-shadow .4s ease; }
.cryptic-nav a:hover { color: var(--acid); text-shadow: 0 0 18px rgba(184, 255, 106, .45); }

.ritual-scroll {
  position: relative;
  z-index: 4;
  width: min(100%, 56rem);
  margin: 0 auto;
  padding: 0 clamp(1.15rem, 4vw, 3.2rem);
}

.scroll-scene {
  min-height: 100vh;
  display: grid;
  place-items: center;
  position: relative;
  padding: clamp(6rem, 14vh, 10rem) 0;
}

.scroll-scene::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: min(42rem, 92vw);
  height: 1px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, rgba(195, 90, 115, .52), rgba(231, 221, 199, .16), transparent);
  box-shadow: 0 0 24px rgba(142, 92, 255, .16);
}

.paper-layer,
.section-strip,
.torn-title,
.relic-slab {
  position: relative;
  background:
    radial-gradient(circle at 20% 20%, rgba(231, 221, 199, .13), transparent 17rem),
    radial-gradient(circle at 88% 12%, rgba(142, 92, 255, .10), transparent 18rem),
    linear-gradient(140deg, rgba(42, 29, 24, .72), rgba(17, 16, 14, .84));
  border: 1px solid rgba(231, 221, 199, .13);
  box-shadow: 0 1.4rem 4rem rgba(0, 0, 0, .42), inset 0 0 0 1px rgba(195, 90, 115, .05);
}

.hero-paper {
  width: min(43rem, 92vw);
  padding: clamp(2.4rem, 7vw, 5.5rem) clamp(1.6rem, 5vw, 4.4rem);
  transform: rotate(-.7deg);
}

.burnt-edge::before {
  content: "";
  position: absolute;
  inset: -1px;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(42, 29, 24, .86), transparent 12% 88%, rgba(42, 29, 24, .8)),
    repeating-linear-gradient(0deg, rgba(17, 16, 14, .42) 0 2px, transparent 2px 10px);
  opacity: .72;
  mix-blend-mode: multiply;
  clip-path: polygon(0 0, 99% 1%, 100% 94%, 96% 100%, 2% 99%, 0 91%);
}

.pinhole {
  position: absolute;
  width: .42rem;
  height: .42rem;
  border-radius: 50%;
  background: rgba(17, 16, 14, .92);
  box-shadow: inset 0 .08rem .1rem rgba(0,0,0,.7), 0 0 0 .12rem rgba(231, 221, 199, .07), 0 0 18px rgba(184, 255, 106, .11);
}
.pin-one { left: 1.2rem; top: 1.2rem; }
.pin-two { right: 1.7rem; top: 1.6rem; }

.wordmark {
  margin: .3rem 0 0;
  font-family: var(--serif);
  font-size: clamp(3.1rem, 10vw, 8.5rem);
  font-weight: 400;
  line-height: .92;
  letter-spacing: -.07em;
  color: var(--parchment);
  text-shadow: 0 0 32px rgba(231, 221, 199, .08);
}

.wordmark span { color: var(--rose); }

.marginalia {
  width: min(25rem, 80%);
  margin: 1.2rem 0 0 auto;
  color: rgba(231, 221, 199, .68);
  font-family: var(--cormorant);
  font-size: clamp(1.25rem, 3vw, 2rem);
  font-style: italic;
  line-height: 1.1;
}

h2 {
  margin: .2rem 0 0;
  color: var(--parchment);
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.45rem, 7vw, 5.8rem);
  line-height: .96;
  letter-spacing: -.055em;
}

.section-strip {
  width: min(38rem, 94vw);
  margin-right: auto;
  padding: 2rem clamp(1.4rem, 5vw, 4rem);
  transform: rotate(1.1deg) translateX(-4vw);
}

.relic-slab {
  width: min(31rem, 86vw);
  padding: 1px;
  margin: clamp(3rem, 8vh, 5rem) 0 0 auto;
  transform-style: preserve-3d;
  transition: transform .18s ease, box-shadow .3s ease;
  will-change: transform;
}

.chipped-edge {
  position: absolute;
  inset: -.36rem auto auto 12%;
  width: 70%;
  height: .7rem;
  background: linear-gradient(90deg, transparent, rgba(231, 221, 199, .13), transparent);
  clip-path: polygon(0 50%, 7% 20%, 18% 70%, 29% 12%, 45% 60%, 62% 30%, 80% 66%, 100% 44%, 100% 100%, 0 100%);
}

.relic-slab::after,
.ceramic-disc::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 10%, rgba(142, 92, 255, .22), rgba(184, 255, 106, .15), transparent 58%);
  opacity: .28;
  mix-blend-mode: screen;
  pointer-events: none;
}

.slab-face,
.method-panel .slab-face {
  padding: clamp(1.5rem, 4vw, 3rem);
}

.slab-face p,
.text-passage p,
.pull-quote {
  font-family: var(--cormorant);
  font-size: clamp(1.35rem, 2.8vw, 2rem);
  line-height: 1.2;
  color: rgba(231, 221, 199, .78);
}

.glyph-mark {
  position: relative;
  width: 10rem;
  aspect-ratio: 1;
  border: 1px solid rgba(231, 221, 199, .28);
  border-radius: 50%;
  box-shadow: inset 0 0 0 1.2rem rgba(42, 29, 24, .18), 0 0 34px rgba(142, 92, 255, .12);
}

.glyph-mark::before,
.glyph-mark::after,
.glyph-mark span::before,
.glyph-mark span::after {
  content: "";
  position: absolute;
  background: rgba(231, 221, 199, .48);
}

.glyph-mark::before { width: 1px; height: 122%; left: 50%; top: -11%; transform: rotate(7deg); }
.glyph-mark::after { height: 1px; width: 118%; left: -9%; top: 50%; transform: rotate(-4deg); }
.glyph-mark span::before { width: 44%; height: 1px; left: 28%; top: 31%; transform: rotate(32deg); background: var(--rose); }
.glyph-mark span::after { width: 1px; height: 36%; left: 64%; top: 39%; transform: rotate(-18deg); background: var(--acid); opacity: .7; }

.opening-glyph {
  position: absolute;
  right: max(-2rem, 3vw);
  bottom: 13vh;
  opacity: .42;
  transform: rotate(14deg);
}

.circle-mark { width: 8rem; margin: 0 0 2rem auto; opacity: .7; }

.fracture-scene { grid-template-columns: 1fr; }
.text-passage { width: min(34rem, 90vw); margin-right: auto; }

.scar-line {
  position: absolute;
  top: 13%;
  left: 50%;
  width: min(30rem, 74vw);
  height: 65vh;
  transform: translateX(-50%) rotate(3deg);
  background: linear-gradient(180deg, transparent, var(--rose), var(--acid), transparent);
  opacity: .45;
  clip-path: polygon(48% 0, 53% 22%, 47% 43%, 56% 64%, 49% 100%, 45% 100%, 51% 64%, 43% 43%, 49% 22%, 45% 0);
  filter: drop-shadow(0 0 18px rgba(195, 90, 115, .42));
}

.ceramic-disc {
  position: relative;
  width: min(18rem, 70vw);
  aspect-ratio: 1;
  margin: 4rem 0 0 auto;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 30%, rgba(231, 221, 199, .2), rgba(97, 115, 91, .22) 42%, rgba(42, 29, 24, .84) 76%);
  box-shadow: 0 2rem 5rem rgba(0, 0, 0, .5), inset -1.4rem -1.2rem 2rem rgba(17, 16, 14, .42);
  transform-style: preserve-3d;
  transition: transform .18s ease, box-shadow .3s ease;
}

.ceramic-disc svg { width: 100%; height: 100%; padding: 1.6rem; overflow: visible; }
.ceramic-disc circle { fill: none; stroke: rgba(231, 221, 199, .42); stroke-width: 1.2; stroke-dasharray: 8 7; }
.ceramic-disc path { fill: none; stroke: var(--rose); stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 300; animation: crackDraw 5s ease-in-out infinite alternate; }

.method-scene { align-items: center; }
.method-panel { width: min(42rem, 92vw); transform: rotate(-1.4deg); }
.ritual-list { list-style: none; padding: 0; margin: 2.4rem 0 0; display: grid; gap: 1rem; }
.ritual-list li {
  border-top: 1px solid rgba(231, 221, 199, .14);
  padding-top: 1rem;
  color: rgba(231, 221, 199, .74);
  font-family: var(--cormorant);
  font-size: clamp(1.2rem, 2.6vw, 1.8rem);
}
.ritual-list span {
  display: inline-block;
  min-width: 7.8rem;
  color: var(--acid);
  font-family: var(--space);
  font-size: .68rem;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.flame-vessel {
  position: absolute;
  right: 4vw;
  bottom: 10vh;
  width: 7rem;
  height: 9rem;
  opacity: .34;
  border: 1px solid rgba(231, 221, 199, .22);
  border-top: 0;
  border-radius: 0 0 48% 48%;
  transform: rotate(8deg);
}
.flame-vessel span,
.flame-vessel span::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 2rem;
  width: 1.7rem;
  height: 4.2rem;
  background: linear-gradient(var(--acid), var(--rose));
  border-radius: 80% 10% 80% 50%;
  transform: translateX(-50%) rotate(18deg);
  filter: blur(.4px);
}
.flame-vessel span::before { left: 34%; bottom: .4rem; width: 1rem; height: 2.7rem; opacity: .68; transform: rotate(-31deg); }

.works-scene { text-align: left; }
.torn-title { width: min(39rem, 92vw); padding: 2rem clamp(1.3rem, 4vw, 3rem); margin-right: auto; transform: rotate(.8deg); }
.pull-quote {
  width: min(36rem, 88vw);
  margin: 3rem 0 2.2rem auto;
  font-family: var(--serif);
  color: var(--parchment);
  font-size: clamp(1.7rem, 4vw, 3rem);
  line-height: 1.08;
}

.seal-link {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 9.6rem;
  height: 9.6rem;
  margin-left: min(48vw, 28rem);
  border: 1px solid rgba(195, 90, 115, .78);
  border-radius: 50%;
  color: var(--parchment);
  font-family: var(--space);
  font-size: .68rem;
  letter-spacing: .16em;
  line-height: 1.35;
  text-align: center;
  text-transform: uppercase;
  text-decoration: none;
  background: radial-gradient(circle, rgba(195, 90, 115, .23), rgba(42, 29, 24, .18) 58%, transparent 60%);
  transform: rotate(-8deg);
  transition: transform .5s ease, box-shadow .5s ease;
}
.seal-link:hover { transform: rotate(4deg) scale(1.04); box-shadow: 0 0 35px rgba(195, 90, 115, .3); }

.final-glyph { position: absolute; left: 3vw; bottom: 9vh; width: 7rem; opacity: .28; }
.paper-scar::before {
  content: "";
  position: absolute;
  inset: 7vh auto auto 50%;
  width: min(36rem, 88vw);
  height: 12rem;
  transform: translateX(-50%) rotate(-2deg);
  background: linear-gradient(90deg, transparent, rgba(231, 221, 199, .04), rgba(97, 115, 91, .12), transparent);
  filter: blur(2px);
}

.ink-fragment { text-shadow: .02em .04em 0 rgba(17, 16, 14, .6); }

@keyframes auroraBreathe {
  from { transform: translateX(-53%) translateY(-2vh) rotate(-10deg) scale(.95); opacity: .38; }
  to { transform: translateX(-47%) translateY(5vh) rotate(-4deg) scale(1.08); opacity: .72; }
}

@keyframes grainShift {
  0% { transform: translate(0,0); }
  25% { transform: translate(-2%, 1%); }
  50% { transform: translate(1%, -2%); }
  75% { transform: translate(2%, 2%); }
  100% { transform: translate(-1%, 0); }
}

@keyframes drawCrack {
  from { stroke-dashoffset: 130; }
  to { stroke-dashoffset: 0; }
}

@keyframes crackDraw {
  from { stroke-dashoffset: 300; opacity: .45; }
  to { stroke-dashoffset: 0; opacity: .95; }
}

@media (max-width: 700px) {
  .cryptic-nav { width: calc(100vw - 1.2rem); justify-content: space-between; gap: .2rem; }
  .cryptic-nav a { font-size: .55rem; }
  .hero-paper { transform: rotate(-.4deg); }
  .section-strip { transform: rotate(.6deg); }
  .relic-slab, .ceramic-disc { margin-left: auto; margin-right: auto; }
  .seal-link { margin-left: calc(50% - 4.8rem); }
}
