/* ═══════════════════════════════════════════════════════════
   SANCTUM INEFFABLE
   ═══════════════════════════════════════════════════════════ */

/* ───────────────────────────────────────────────────────────
   ROOT VARIABLES
   ─────────────────────────────────────────────────────────── */
:root {
    /* Core Palette */
    --void: #0a0a0a;
    --void-soft: #151515;
    --parchment: #f4f0e8;
    --parchment-aged: #ebe7df;
    --ink: #1a1a1a;
    --ink-faded: #3a3838;
    --blood: #8b2635;
    --blood-dried: #6a1f2a;
    --violet-deep: #4a2f5c;
    --violet-shadow: #362143;
    --gold-candle: #d4a574;
    --gold-dim: #b8935a;
    --silver: #b5b5b5;
    --ash: #e8e5e0;
    --black-violet: #120d18;
    --blood-shadow: #2a0f17;
    --paper-shadow: #d8c8b2;
    
    /* Typography */
    --font-manuscript: 'Sorts Mill Goudy', 'Cormorant Garamond', Georgia, serif;
    --font-marginalia: 'Cormorant Garamond', Georgia, serif;
    
    /* Spacing */
    --page-padding: clamp(2rem, 5vw, 4rem);
    --text-measure: min(42rem, 92%);
    
    /* Animations */
    --transition-ritual: 1.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-breath: 2.4s ease-in-out;
}

/* ───────────────────────────────────────────────────────────
   RESET & BASE SETUP
   ─────────────────────────────────────────────────────────── */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 18px;
    scroll-behavior: smooth;
    scroll-padding-top: 4rem;
    background: var(--void);
}

body {
    font-family: var(--font-manuscript);
    color: var(--ink);
    background:
        radial-gradient(ellipse at 50% 0%, rgba(74, 47, 92, 0.18) 0%, transparent 42%),
        radial-gradient(ellipse at 20% 30%, rgba(139, 38, 53, 0.12) 0%, transparent 34%),
        radial-gradient(ellipse at 80% 80%, rgba(212, 165, 116, 0.07) 0%, transparent 38%),
        linear-gradient(180deg, #09070b 0%, var(--void) 45%, #050506 100%);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    min-height: 100vh;
    position: relative;
}

/* ───────────────────────────────────────────────────────────
   VESTIBULE
   ─────────────────────────────────────────────────────────── */
.vestibule-container {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background:
        radial-gradient(ellipse at 50% 58%, rgba(212, 165, 116, 0.13) 0%, transparent 26rem),
        radial-gradient(ellipse at 50% 100%, rgba(42, 15, 23, 0.48) 0%, transparent 58%),
        radial-gradient(ellipse at 20% 18%, rgba(74, 47, 92, 0.18) 0%, transparent 42%),
        linear-gradient(180deg, #07050a 0%, #0e0a12 52%, #030303 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity var(--transition-ritual);
    overflow: hidden;
}

.vestibule-container::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(90deg, rgba(255,255,255,0.02), transparent 18%, transparent 82%, rgba(255,255,255,0.015)),
        radial-gradient(ellipse at center, transparent 0%, rgba(0,0,0,0.34) 78%, rgba(0,0,0,0.72) 100%);
    opacity: 0.55;
}

.vestibule-container::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -15%;
    height: 40%;
    pointer-events: none;
    background: radial-gradient(ellipse at center, rgba(212, 165, 116, 0.12), transparent 62%);
    filter: blur(34px);
    opacity: 0.7;
}

.vestibule-container.hidden {
    opacity: 0;
    pointer-events: none;
}

.vestibule-content {
    position: relative;
    z-index: 2;
    text-align: center;
    cursor: pointer;
    padding: 2rem;
}

/* Votive candle cluster */
.candle-altar {
    position: relative;
    width: min(330px, 82vw);
    height: 230px;
    margin: 0 auto 3rem;
    filter: drop-shadow(0 24px 38px rgba(0, 0, 0, 0.72));
}

.candle-cluster {
    position: absolute;
    inset: 0;
    transition: filter 0.5s ease;
}

.candle-cluster::before,
.candle-cluster::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 42px;
    transform: translateX(-50%);
    border-radius: 50%;
    pointer-events: none;
    opacity: 0;
    transition: opacity 1.2s ease;
}

.candle-cluster::before {
    width: 260px;
    height: 170px;
    background: radial-gradient(ellipse at center, rgba(255, 198, 105, 0.22), rgba(212, 120, 55, 0.08) 42%, transparent 72%);
    filter: blur(22px);
    mix-blend-mode: screen;
    z-index: 1;
}

.candle-cluster::after {
    width: 190px;
    height: 92px;
    background: radial-gradient(ellipse at center, rgba(255, 236, 186, 0.18), transparent 70%);
    filter: blur(12px);
    z-index: 3;
}

.candle-cluster.lit::before,
.candle-cluster.lit::after {
    opacity: 1;
}

.altar-shadow {
    position: absolute;
    left: 50%;
    bottom: 14px;
    transform: translateX(-50%);
    width: 260px;
    height: 42px;
    border-radius: 50%;
    background: radial-gradient(ellipse at center, rgba(0,0,0,0.74), transparent 72%);
    filter: blur(8px);
    z-index: 0;
}

.votive {
    --w: 54px;
    --h: 86px;
    --x: 50%;
    --z: 4;
    position: absolute;
    left: var(--x);
    bottom: 28px;
    width: var(--w);
    height: var(--h);
    transform: translateX(-50%);
    z-index: var(--z);
}

.votive-main       { --w: 68px; --h: 122px; --x: 50%; --z: 6; bottom: 22px; }
.votive-left       { --w: 56px; --h: 96px;  --x: 36%; --z: 5; bottom: 24px; }
.votive-right      { --w: 56px; --h: 98px;  --x: 64%; --z: 5; bottom: 24px; }
.votive-back-left  { --w: 46px; --h: 78px;  --x: 25%; --z: 3; bottom: 34px; opacity: 0.86; }
.votive-back-right { --w: 46px; --h: 80px;  --x: 75%; --z: 3; bottom: 34px; opacity: 0.86; }

.votive .glass {
    position: absolute;
    inset: 18% 0 0;
    border-radius: 12px 12px 18px 18px / 10px 10px 24px 24px;
    background:
        linear-gradient(90deg, rgba(255,255,255,0.20), rgba(255,255,255,0.03) 26%, rgba(0,0,0,0.09) 68%, rgba(255,255,255,0.13)),
        linear-gradient(180deg, rgba(255,255,255,0.12), rgba(217, 205, 185, 0.10) 32%, rgba(92, 70, 54, 0.18));
    border: 1px solid rgba(241, 224, 198, 0.26);
    box-shadow:
        inset 5px 0 9px rgba(255,255,255,0.08),
        inset -7px 0 12px rgba(0,0,0,0.20),
        inset 0 -12px 18px rgba(0,0,0,0.22),
        0 0 0 1px rgba(0,0,0,0.22),
        0 10px 18px rgba(0,0,0,0.42);
    overflow: hidden;
}

.votive .glass::before {
    content: '';
    position: absolute;
    left: 8%;
    right: 8%;
    top: 6%;
    height: 17%;
    border-radius: 50%;
    border-top: 1px solid rgba(255,255,255,0.32);
    background: linear-gradient(180deg, rgba(255,255,255,0.10), transparent);
}

.votive .wax {
    position: absolute;
    left: 9%;
    right: 9%;
    bottom: 12%;
    height: 32%;
    border-radius: 48% 48% 36% 36% / 28% 28% 20% 20%;
    background:
        radial-gradient(ellipse at 42% 20%, rgba(255,255,255,0.48), transparent 35%),
        linear-gradient(180deg, #f2eadc 0%, #d8c5a8 68%, #b89c77 100%);
    box-shadow:
        inset 0 3px 6px rgba(255,255,255,0.25),
        inset 0 -8px 12px rgba(98, 67, 45, 0.18);
}

.votive .wick {
    position: absolute;
    left: 50%;
    bottom: 42%;
    width: 2px;
    height: 13%;
    transform: translateX(-50%) rotate(3deg);
    border-radius: 2px;
    background: linear-gradient(180deg, #25170f, #060404);
    z-index: 4;
}

.votive .flame {
    position: absolute;
    left: 50%;
    bottom: 49%;
    width: 16px;
    height: 30px;
    transform: translateX(-50%) scale(0.82);
    transform-origin: center bottom;
    opacity: 0;
    border-radius: 50% 50% 45% 45% / 66% 66% 34% 34%;
    background:
        radial-gradient(ellipse at 50% 72%, rgba(77, 117, 255, 0.58) 0%, rgba(77, 117, 255, 0.20) 17%, transparent 35%),
        radial-gradient(ellipse at 50% 62%, #fff6cf 0%, #ffe28a 20%, #f49a35 48%, rgba(174, 55, 28, 0.56) 68%, transparent 78%);
    filter: blur(0.35px);
    box-shadow:
        0 0 12px rgba(255, 201, 105, 0.62),
        0 0 24px rgba(198, 92, 42, 0.26);
    z-index: 5;
}

.votive .flame::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 5px;
    width: 7px;
    height: 16px;
    transform: translateX(-50%);
    border-radius: 50% 50% 45% 45%;
    background: radial-gradient(ellipse at center, rgba(255,255,255,0.96), rgba(255,230,145,0.64) 48%, transparent 78%);
}

.votive-main .flame {
    width: 18px;
    height: 34px;
}

.votive-back-left .flame,
.votive-back-right .flame {
    width: 13px;
    height: 24px;
}

.candle-cluster.lit .flame {
    opacity: 1;
    animation: votiveFlicker 2.8s ease-in-out infinite;
}

.candle-cluster.lit .votive-left .flame       { animation-delay: -0.6s; }
.candle-cluster.lit .votive-right .flame      { animation-delay: -1.3s; }
.candle-cluster.lit .votive-back-left .flame  { animation-delay: -2.0s; }
.candle-cluster.lit .votive-back-right .flame { animation-delay: -1.8s; }

.candle-cluster.lit .glass {
    animation: glassWarmth 4.6s ease-in-out infinite;
}

@keyframes votiveFlicker {
    0%, 100% { transform: translateX(-50%) scale(0.92, 1) rotate(-1deg); opacity: 0.96; }
    18%      { transform: translateX(-48%) scale(0.88, 1.07) rotate(1deg); opacity: 1; }
    42%      { transform: translateX(-52%) scale(0.96, 0.93) rotate(-2deg); opacity: 0.88; }
    65%      { transform: translateX(-50%) scale(0.90, 1.04) rotate(2deg); opacity: 0.98; }
    82%      { transform: translateX(-49%) scale(0.94, 0.98) rotate(0deg); opacity: 0.92; }
}

@keyframes glassWarmth {
    0%, 100% { box-shadow: inset 5px 0 9px rgba(255,255,255,0.08), inset -7px 0 12px rgba(0,0,0,0.20), inset 0 -12px 18px rgba(0,0,0,0.22), 0 0 0 1px rgba(0,0,0,0.22), 0 10px 18px rgba(0,0,0,0.42); }
    50%      { box-shadow: inset 5px 0 9px rgba(255,255,255,0.12), inset -7px 0 12px rgba(0,0,0,0.18), inset 0 -12px 18px rgba(0,0,0,0.20), 0 0 0 1px rgba(0,0,0,0.20), 0 0 24px rgba(212,165,116,0.15), 0 10px 18px rgba(0,0,0,0.42); }
}

/* Vestibule Typography */
.vestibule-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 300;
    letter-spacing: 0.08em;
    color: var(--parchment);
    text-shadow: 0 0 30px rgba(212, 165, 116, 0.3);
    margin-bottom: 0.5rem;
    transition: text-shadow 0.6s ease;
}

.vestibule-container:hover .vestibule-title {
    text-shadow: 0 0 42px rgba(212, 165, 116, 0.5), 0 0 18px rgba(139, 38, 53, 0.18);
}

.vestibule-subtitle {
    font-size: 1.1rem;
    font-style: italic;
    color: var(--gold-dim);
    opacity: 0.82;
    margin-bottom: 2rem;
}

.vestibule-whisper {
    font-size: 0.85rem;
    color: var(--silver);
    opacity: 0;
    animation: fadeIn 2s ease 1s forwards;
    letter-spacing: 0.1em;
}

@keyframes fadeIn {
    to { opacity: 0.7; }
}

/* ───────────────────────────────────────────────────────────
   MANUSCRIPT CONTAINER
   ─────────────────────────────────────────────────────────── */
#manuscript {
    opacity: 0;
    transition: opacity var(--transition-ritual);
    min-height: 100vh;
    position: relative;
}

#manuscript.revealed {
    opacity: 1;
}

.manuscript-hidden {
    display: none;
}

/* ───────────────────────────────────────────────────────────
   SUBTLE TEXTURE OVERLAYS
   ─────────────────────────────────────────────────────────── */
.grain-overlay {
    display: none;
}

.vignette-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    background: radial-gradient(
        ellipse at center,
        transparent 0%,
        transparent 62%,
        rgba(10, 10, 10, 0.16) 90%,
        rgba(10, 10, 10, 0.34) 100%
    );
    transform: none !important;
    mix-blend-mode: multiply; /* Added to keep images rich while darkening edges */
}

/* ───────────────────────────────────────────────────────────
   CODEX SPINE
   ─────────────────────────────────────────────────────────── */
.codex-spine {
    position: fixed;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 200;
    padding: 2rem 1.5rem;
    background: linear-gradient(
        to right,
        rgba(10, 10, 10, 0.95) 0%,
        rgba(10, 10, 10, 0.85) 70%,
        transparent 100%
    );
    border-right: 2px solid rgba(212, 165, 116, 0.2);
    opacity: 0;
    animation: spineReveal 1.5s ease 1s forwards;
}

@keyframes spineReveal {
    to { opacity: 1; }
}

.spine-decoration {
    color: var(--gold-candle);
    text-align: center;
    margin: 1rem 0;
    font-size: 1.3rem;
    opacity: 0.7;
}

.chapter-marks {
    list-style: none;
    padding: 0;
}

.chapter-marks li {
    margin: 1.5rem 0;
}

.chapter-marks a {
    color: var(--gold-dim);
    text-decoration: none;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    transition: all 0.3s ease;
    display: block;
    padding: 0.3rem 0.6rem;
    border-left: 3px solid transparent;
    white-space: nowrap;
}

.chapter-marks a:hover {
    color: var(--parchment);
    border-left-color: var(--gold-candle);
    padding-left: 1.2rem;
    background: rgba(212, 165, 116, 0.05);
}

.chapter-marks a.active {
    color: var(--parchment);
    border-left-color: var(--blood);
    background: rgba(139, 38, 53, 0.1);
}

/* ───────────────────────────────────────────────────────────
   MANUSCRIPT PAGES
   ─────────────────────────────────────────────────────────── */
.manuscript-pages {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 2rem 6rem;
}

.manuscript-page {
    max-width: min(980px, 92vw);
    margin: 7rem auto;
    opacity: 0;
    transform: translateY(30px);
    animation: pageReveal 1s ease forwards;
    animation-delay: 0.3s;
}

@keyframes pageReveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Page Border */
.page-border {
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.45) 0%, transparent 22%),
        radial-gradient(ellipse at 50% 0%, rgba(212, 165, 116, 0.13) 0%, transparent 42%),
        linear-gradient(180deg, var(--parchment) 0%, var(--parchment-aged) 100%);
    padding: var(--page-padding);
    position: relative;
    box-shadow:
        0 0 90px rgba(0, 0, 0, 0.92),
        0 0 42px rgba(42, 15, 23, 0.55),
        inset 0 0 26px rgba(58, 39, 20, 0.06);
    border: 1px solid rgba(212, 165, 116, 0.26);
}

/* Decorative borders */
.page-border::before {
    content: '';
    position: absolute;
    inset: 15px;
    border: 1px solid rgba(212, 165, 116, 0.2);
    pointer-events: none;
}

.page-border::after {
    content: '';
    position: absolute;
    inset: 25px;
    border: 1px solid rgba(212, 165, 116, 0.1);
    pointer-events: none;
}

/* Subtle Essay (borders only) */
.possessed-tint::before {
    border-color: rgba(74, 47, 92, 0.15);
}

.witch-tint::before {
    border-color: rgba(139, 38, 53, 0.15);
}

.medium-tint::before {
    border-color: rgba(181, 181, 181, 0.15);
}

.wilderness-tint::before {
    border-color: rgba(255, 255, 255, 0.2);
}

/* ───────────────────────────────────────────────────────────
   TYPOGRAPHY
   ─────────────────────────────────────────────────────────── */
.page-header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid rgba(139, 38, 53, 0.1);
}

.page-title {
    font-family: var(--font-marginalia);
    font-size: clamp(2.2rem, 4vw, 3.1rem);
    font-weight: 400;
    letter-spacing: 0.06em;
    color: var(--ink);
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.epigraph {
    font-style: italic;
    font-size: 1.1rem;
    color: var(--ink-faded);
    line-height: 1.6;
    max-width: 30rem;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Page Content */
.page-content {
    max-width: var(--text-measure);
    margin: 0 auto;
}

.page-content p {
    text-align: justify;
    line-height: 1.82;
    margin-bottom: 1.8rem;
    color: var(--ink);
    text-indent: 0;
    font-size: clamp(1.04rem, 0.25vw + 0.98rem, 1.16rem);
    hyphens: auto;           /* Added to fix rivers of white */
    -webkit-hyphens: auto;   /* Added to fix rivers of white */
}

.first-paragraph {
    text-indent: 0 !important;
}

/* Dropcaps */
.dropcap {
    float: left;
    font-size: 4.5rem;
    line-height: 0.85; /* Adjusted for tighter alignment */
    font-weight: 400;
    margin: 0.1rem 0.3rem 0 -0.1rem; /* Added margin-top to optically align */
    color: var(--blood-dried);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

/* Ornaments */
.ornament {
    text-align: center;
    margin: 2.5rem 0;
    color: var(--blood-dried);
    opacity: 0.4;
    font-size: 1rem;
    letter-spacing: 0.8em;
}

/* ───────────────────────────────────────────────────────────
   MARGINALIA
   ─────────────────────────────────────────────────────────── */
.marginalia {
    position: absolute;
    right: -200px;
    top: 8rem;
    width: 170px;
    font-family: var(--font-marginalia);
    font-size: 0.8rem;
    font-style: italic;
    color: var(--ink-faded);
    opacity: 0.6;
}

.marginalia span {
    display: block;
    margin-bottom: 2rem;
    padding-left: 1rem;
    border-left: 2px solid rgba(139, 38, 53, 0.2);
    line-height: 1.4;
    transition: all 0.3s ease;
}

.marginalia span:hover {
    opacity: 1;
    color: var(--blood-dried);
    border-left-color: var(--blood-dried);
    padding-left: 1.3rem;
}

/* ───────────────────────────────────────────────────────────
   TRANSITIONAL BRIDGES
   ─────────────────────────────────────────────────────────── */
.transitional-bridge {
    margin: 6rem auto;
    max-width: 800px;
    padding: 4rem 2rem;
    text-align: center;
    opacity: 0;
    animation: bridgeReveal 2s ease forwards;
    animation-delay: 0.5s;
}

@keyframes bridgeReveal {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bridge-content {
    position: relative;
    padding: 3rem 2rem;
    border-top: 1px solid rgba(212, 165, 116, 0.2);
    border-bottom: 1px solid rgba(212, 165, 116, 0.2);
}

.bridge-content::before,
.bridge-content::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 150px;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(212, 165, 116, 0.3) 50%,
        transparent 100%
    );
}

.bridge-content::before {
    top: 1rem;
}

.bridge-content::after {
    bottom: 1rem;
}

.bridge-ornament {
    font-size: 2rem;
    color: var(--gold-candle);
    opacity: 0.6;
    margin-bottom: 2rem;
    filter: drop-shadow(0 0 10px rgba(212, 165, 116, 0.2));
}

.bridge-text {
    font-family: var(--font-manuscript);
    font-size: clamp(1.08rem, 0.25vw + 1rem, 1.18rem);
    line-height: 1.86;
    color: var(--parchment-aged);
    font-style: italic;
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
    text-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    letter-spacing: 0.02em;
}

.bridge-text em {
    color: var(--gold-candle);
    font-style: normal;
    opacity: 0.9;
}

.bridge-fade {
    margin-top: 2rem;
    font-size: 1rem;
    color: var(--gold-dim);
    opacity: 0.4;
    animation: fadePulse 3s ease-in-out infinite;
}

@keyframes fadePulse {
    0%, 100% { 
        opacity: 0.4;
        transform: scale(1);
    }
    50% { 
        opacity: 0.6;
        transform: scale(1.05);
    }
}

/* ───────────────────────────────────────────────────────────
   COLOPHON & HOW TO READ
   ─────────────────────────────────────────────────────────── */
.colophon-page {
    margin: 8rem auto;
    max-width: 900px;
}

.colophon-border {
    background: var(--parchment);
    padding: 3rem;
    border: 2px solid rgba(0, 0, 0, 0.1);
    box-shadow:
        0 0 60px rgba(0, 0, 0, 0.8),
        inset 0 0 40px rgba(0, 0, 0, 0.02);
}

.colophon-content {
    max-width: 600px;
    margin: 0 auto;
}

.colophon-content h3 {
    font-size: 1.8rem;
    font-weight: 300;
    text-align: center;
    margin-bottom: 2rem;
    color: var(--ink);
    letter-spacing: 0.05em;
}

.colophon-content p {
    line-height: 1.8;
    margin-bottom: 1.5rem;
    text-align: justify;
    color: var(--ink-faded);
    font-size: 1rem;
}

.colophon-signature {
    text-align: center;
    font-style: italic;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(139, 38, 53, 0.2);
    color: var(--blood-dried);
}

/* ───────────────────────────────────────────────────────────
   SITE FOOTER
   ─────────────────────────────────────────────────────────── */
.site-footer {
    max-width: 780px;
    margin: 5rem auto 2.5rem;
    padding: 2rem 1.5rem 0;
    text-align: center;
    color: rgba(232, 229, 224, 0.68);
    font-size: 0.82rem;
    line-height: 1.7;
    letter-spacing: 0.025em;
    border-top: 1px solid rgba(212, 165, 116, 0.22);
}

.site-footer p {
    margin: 0.35rem 0;
}

.site-footer a {
    color: var(--gold-dim);
    text-decoration: none;
    border-bottom: 1px solid rgba(212, 165, 116, 0.2);
    transition: color 0.3s ease, border-color 0.3s ease;
}

.site-footer a:hover {
    color: var(--parchment);
    border-bottom-color: var(--gold-candle);
}

.footer-mark {
    color: var(--gold-candle);
    margin-right: 0.35rem;
}

.footer-network {
    color: rgba(232, 229, 224, 0.78);
}

/* ───────────────────────────────────────────────────────────
   RELICS PAGE
   ─────────────────────────────────────────────────────────── */
.relics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.relic-section {
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(212, 165, 116, 0.2);
}

.relic-section h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--blood-dried);
    font-weight: 400;
    letter-spacing: 0.05em;
}

.relic-list {
    list-style: none;
    padding: 0;
}

.relic-list li {
    margin-bottom: 0.8rem;
    padding-left: 1rem;
    border-left: 2px solid rgba(212, 165, 116, 0.2);
    font-size: 0.9rem;
    line-height: 1.5;
}

.relic-quote {
    border-left: 3px solid var(--blood-dried);
    padding-left: 1.5rem;
    margin: 1.5rem 0;
    font-style: italic;
}

.relic-quote cite {
    display: block;
    text-align: right;
    margin-top: 1rem;
    font-size: 0.85rem;
    color: var(--ink-faded);
}

/* ───────────────────────────────────────────────────────────
   HERO RELIQUARY — Header direction for Vanessa's shrine
   ─────────────────────────────────────────────────────────── */
.sanctum-hero {
    position: relative;
    max-width: min(1180px, 92vw);
    margin: 4rem auto 6rem;
    padding: clamp(2.4rem, 6vw, 5rem) clamp(1.6rem, 5vw, 4rem);
    text-align: center;
    color: var(--parchment);
    overflow: hidden;
    border: 1px solid rgba(212, 165, 116, 0.24);
    background:
        radial-gradient(ellipse at 50% 18%, rgba(212, 165, 116, 0.18) 0%, transparent 36%),
        radial-gradient(ellipse at 20% 70%, rgba(139, 38, 53, 0.22) 0%, transparent 38%),
        radial-gradient(ellipse at 82% 60%, rgba(74, 47, 92, 0.24) 0%, transparent 42%),
        linear-gradient(135deg, rgba(18, 13, 24, 0.96), rgba(8, 6, 9, 0.98) 62%, rgba(38, 13, 20, 0.88));
    box-shadow:
        0 0 90px rgba(0, 0, 0, 0.85),
        inset 0 0 80px rgba(0, 0, 0, 0.45);
}

.sanctum-hero::before,
.sanctum-hero::after {
    content: '';
    position: absolute;
    pointer-events: none;
}

.sanctum-hero::before {
    inset: 18px;
    border: 1px solid rgba(212, 165, 116, 0.16);
}

.sanctum-hero::after {
    inset: 0;
    background:
        linear-gradient(90deg, rgba(0,0,0,0.5), transparent 18%, transparent 82%, rgba(0,0,0,0.5)),
        radial-gradient(ellipse at center, transparent 35%, rgba(0, 0, 0, 0.45) 100%);
    mix-blend-mode: multiply;
}

.hero-sigil,
.hero-kicker,
.hero-title,
.hero-subtitle,
.hero-rule,
.hero-devotion,
.hero-reliquary {
    position: relative;
    z-index: 2;
}

.hero-sigil {
    color: var(--gold-candle);
    font-size: 1.4rem;
    opacity: 0.72;
    margin-bottom: 1rem;
    text-shadow: 0 0 22px rgba(212, 165, 116, 0.45);
}

.hero-kicker {
    font-family: var(--font-marginalia);
    font-size: 0.82rem;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--gold-dim);
    margin-bottom: 0.85rem;
}

.hero-title {
    font-family: var(--font-marginalia);
    font-size: clamp(3.4rem, 8vw, 6.8rem);
    line-height: 0.9;
    font-weight: 300;
    letter-spacing: 0.045em;
    color: var(--parchment);
    text-shadow:
        0 0 32px rgba(212, 165, 116, 0.24),
        0 3px 18px rgba(0, 0, 0, 0.8);
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: clamp(1.05rem, 0.6vw + 1rem, 1.35rem);
    font-style: italic;
    color: var(--parchment-aged);
    opacity: 0.9;
}

.hero-rule {
    width: min(360px, 70%);
    height: 1px;
    margin: 2rem auto;
    background: linear-gradient(90deg, transparent, rgba(212, 165, 116, 0.62), transparent);
    position: relative;
}

.hero-rule::before {
    content: '✠';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background: #0b080d;
    color: var(--gold-candle);
    padding: 0 0.8rem;
    font-size: 0.8rem;
}

.hero-devotion {
    max-width: 42rem;
    margin: 0 auto 2.4rem;
    color: var(--silver);
    line-height: 1.75;
    font-size: 1.06rem;
}

.hero-reliquary {
    max-width: 720px;
    margin: 0 auto;
}

/* Frontispiece — single centered plate beneath hero typography */
.hero-frontispiece {
    margin: 0;
    padding: 1.4rem 0 1.2rem;
    border-top: 1px solid rgba(212, 165, 116, 0.22);
    border-bottom: 1px solid rgba(212, 165, 116, 0.22);
    position: relative;
    text-align: center;
}

.hero-frontispiece::before,
.hero-frontispiece::after {
    content: '✠';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    color: var(--gold-candle);
    background: #0b080d;
    padding: 0 0.7rem;
    font-size: 0.7rem;
}

.hero-frontispiece::before { top: -0.5rem; }
.hero-frontispiece::after  { bottom: -0.5rem; }

.hero-frontispiece img {
    display: block;
    width: 100%;
    max-width: 620px;
    height: auto;
    margin: 0 auto;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.62);
}

.hero-frontispiece figcaption {
    margin-top: 1.1rem;
    font-family: var(--font-manuscript);
    font-style: italic;
    font-size: 1rem;
    line-height: 1.55;
    color: var(--parchment-aged);
    max-width: 32rem;
    margin-left: auto;
    margin-right: auto;
    padding: 0 1rem;
}

/* Essay plates — one per essay, framed as critical-edition illustration */
.essay-plate {
    margin: 2.4rem auto 2.8rem;
    max-width: 560px;
    padding: 1.4rem 0 1.2rem;
    border-top: 1px solid rgba(212, 165, 116, 0.20);
    border-bottom: 1px solid rgba(212, 165, 116, 0.20);
    position: relative;
    text-align: center;
}

.essay-plate::before,
.essay-plate::after {
    content: '✠';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    color: var(--gold-candle);
    background: var(--parchment);
    padding: 0 0.65rem;
    font-size: 0.62rem;
}

.essay-plate::before { top: -0.45rem; }
.essay-plate::after  { bottom: -0.45rem; }

.essay-plate img {
    display: block;
    width: 100%;
    height: auto;
    margin: 0 auto;
    box-shadow: 0 14px 36px rgba(20, 14, 8, 0.52);
}

.essay-plate figcaption {
    margin-top: 1rem;
    font-family: var(--font-marginalia);
    font-style: italic;
    font-size: 0.95rem;
    line-height: 1.55;
    color: var(--ink-faded);
    max-width: 28rem;
    margin-left: auto;
    margin-right: auto;
}

.relic-intro {
    color: var(--ink-faded);
    line-height: 1.75;
    max-width: 42rem;
    margin: 1.2rem auto 0;
}

.chapter-marks a:focus-visible,
.site-footer a:focus-visible,
.vestibule-container:focus-visible {
    outline: 1px solid var(--gold-candle);
    outline-offset: 5px;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-delay: 0ms !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ───────────────────────────────────────────────────────────
   RESPONSIVE ADJUSTMENTS
   ─────────────────────────────────────────────────────────── */
@media (max-width: 1400px) {
    .marginalia {
        display: none;
    }
}

@media (max-width: 768px) {
    html {
        font-size: 16px;
    }

    .sanctum-hero {
        margin: 2rem auto 4rem;
        padding: 2.4rem 1.2rem;
    }

    .essay-plate {
        margin: 1.8rem auto 2rem;
    }

    .essay-plate figcaption,
    .hero-frontispiece figcaption {
        font-size: 0.92rem;
    }
    
    .codex-spine {
        position: static;
        transform: none;
        width: 100%;
        padding: 1rem;
        margin-bottom: 2rem;
        background: rgba(10, 10, 10, 0.95);
        border-right: none;
        border-bottom: 2px solid rgba(212, 165, 116, 0.2);
    }
    
    .chapter-marks {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }
    
    .chapter-marks li {
        margin: 0;
    }
    
    .manuscript-pages {
        padding: 2rem 1rem;
    }
    
    .page-border {
        padding: 2rem 1.5rem;
    }
    
    .page-content p,
    .colophon-content p {
        text-align: left;
        hyphens: none;
    }

    .page-title {
        font-size: clamp(2rem, 8vw, 2.6rem);
    }
    
    .transitional-bridge {
        margin: 4rem auto;
        padding: 2rem 1rem;
    }
    
    .bridge-content {
        padding: 2rem 1.5rem;
    }
}

/* ───────────────────────────────────────────────────────────
   PRINT STYLES
   ─────────────────────────────────────────────────────────── */
@media print {
    body {
        background: white;
        color: black;
    }
    
    .vestibule-container,
    .codex-spine,
    .grain-overlay,
    .vignette-overlay {
        display: none;
    }
    
    .manuscript-page {
        page-break-after: always;
        margin: 0;
        box-shadow: none;
        border: none;
        animation: none;
        opacity: 1;
        transform: none;
    }
    
    .page-border {
        background: white;
        box-shadow: none;
        padding: 2rem;
        border: 1px solid #ddd;
    }
}