/* ============================================
   courts.studio — Styles
   Dark-Academia Moot Court Design
   ============================================ */

/* === CSS Custom Properties === */
:root {
    --chambers-black: #0C0805;
    --walnut-panel: #1A120C;
    --mahogany: #2E1F14;
    --burnished-gold: #C9A84C;
    --weathered-brass: #8B7D6B;
    --warm-ivory: #E8E0D0;
    --aged-vellum: #D4C5A9;
    --judicial-crimson: #6B1D2A;
    --claret-shadow: #3D0F18;
    --gold-muted: #D4B85C;
    --gold-dark: #A08930;

    --font-display: 'Playfair Display', Georgia, serif;
    --font-accent: 'Cormorant Garamond', 'Times New Roman', serif;
    --font-body: 'Source Serif 4', 'Georgia', serif;
    --font-mono: 'DM Mono', 'Courier New', monospace;

    --ease-entrance: cubic-bezier(0.25, 0.1, 0.25, 1.0);
    --ease-exit: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-spring: cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* === Reset & Base === */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--chambers-black);
    color: var(--warm-ivory);
    font-family: var(--font-body);
    font-weight: 400;
    font-size: clamp(1rem, 1.2vw, 1.15rem);
    line-height: 1.72;
    letter-spacing: 0.005em;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* === SVG Defs (hidden) === */
.svg-defs {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

/* === Leather Texture Background === */
.leather-texture {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
}

.leather-texture svg {
    width: 100%;
    height: 100%;
}

/* === Candle Light Pools === */
.candle-lights {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1;
    pointer-events: none;
}

.light-pool {
    position: absolute;
    border-radius: 50%;
    will-change: transform;
}

.light-pool-1 {
    width: 60vw;
    height: 60vh;
    top: -10vh;
    left: 10vw;
    background: radial-gradient(ellipse at 50% 40%, rgba(201,168,76,0.06) 0%, transparent 70%);
}

.light-pool-2 {
    width: 50vw;
    height: 50vh;
    top: 80vh;
    left: 40vw;
    background: radial-gradient(ellipse at 50% 50%, rgba(201,168,76,0.04) 0%, transparent 70%);
}

.light-pool-3 {
    width: 40vw;
    height: 40vh;
    top: 160vh;
    left: 5vw;
    background: radial-gradient(ellipse at 50% 60%, rgba(201,168,76,0.05) 0%, transparent 70%);
}

/* === Docket Strip Navigation === */
.docket-strip {
    position: fixed;
    left: 0;
    top: 0;
    width: 48px;
    height: 100vh;
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
    background: rgba(18, 12, 8, 0.85);
    border-right: 1px solid rgba(201, 168, 76, 0.2);
    opacity: 0;
    transition: opacity 800ms var(--ease-entrance);
}

.docket-strip.visible {
    opacity: 1;
}

.docket-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    transition: all 400ms var(--ease-entrance);
}

.docket-circle {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--weathered-brass);
    transition: all 400ms var(--ease-entrance);
    display: block;
}

.docket-item.active .docket-circle {
    width: 14px;
    height: 14px;
    background: var(--burnished-gold);
    box-shadow: 0 0 8px rgba(201, 168, 76, 0.4);
}

.docket-item:hover .docket-circle {
    background: var(--burnished-gold);
    transform: scale(1.2);
}

.docket-label {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: var(--weathered-brass);
    letter-spacing: 0.1em;
    transition: color 400ms var(--ease-entrance);
}

.docket-item.active .docket-label {
    color: var(--burnished-gold);
}

/* === Chamber (Section) Base === */
.chamber {
    position: relative;
    min-height: 100vh;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* === Marble Dividers === */
.marble-divider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 20px;
    z-index: 5;
}

.marble-divider svg {
    width: 100%;
    height: 100%;
}

/* === Gold Leaf Text Effect === */
.gold-leaf-text {
    background: linear-gradient(135deg, var(--burnished-gold) 0%, var(--gold-dark) 40%, var(--gold-muted) 70%, var(--burnished-gold) 100%);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: none;
    position: relative;
}

.gold-leaf-text.animate-sweep {
    animation: goldSweep 1.2s var(--ease-entrance) forwards;
}

@keyframes goldSweep {
    0% { background-position: 100% 0; }
    100% { background-position: 0% 0; }
}

/* Gold leaf glow (applied via pseudo-element since text-shadow doesn't work with background-clip) */
.gold-leaf-text::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    color: var(--burnished-gold);
    filter: blur(20px);
    opacity: 0.15;
    z-index: -1;
    -webkit-text-fill-color: var(--burnished-gold);
}

/* === Typography === */
h1 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(2.8rem, 6vw, 5rem);
    color: var(--burnished-gold);
    letter-spacing: 0.04em;
    line-height: 1.1;
    text-transform: uppercase;
}

h2 {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(1.8rem, 3.5vw, 2.8rem);
    color: var(--burnished-gold);
    letter-spacing: 0.04em;
    line-height: 1.1;
}

h3, h4 {
    font-family: var(--font-accent);
    font-weight: 300;
    font-style: italic;
    font-size: clamp(1.2rem, 2.5vw, 1.8rem);
    color: var(--aged-vellum);
    letter-spacing: 0.02em;
    line-height: 1.35;
}

p {
    max-width: 62ch;
    margin-bottom: 1.2em;
}

/* === Section Numbers === */
.section-number {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--weathered-brass);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    display: block;
    margin-bottom: 1rem;
}

.section-number-large {
    font-family: var(--font-display);
    font-size: clamp(6rem, 12vw, 10rem);
    color: rgba(201, 168, 76, 0.06);
    line-height: 1;
    letter-spacing: 0.02em;
}

/* ============================================
   CHAMBER I — The Vestibule
   ============================================ */
.chamber-vestibule {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.vestibule-content {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100vh;
}

/* Wax Seal — Opening Animation */
.wax-seal-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
}

.wax-seal-opening {
    position: relative;
    width: 160px;
    height: 160px;
    opacity: 0;
    transform: scale(0.8);
}

.wax-seal-opening.seal-appear {
    animation: sealAppear 800ms cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes sealAppear {
    0% { opacity: 0; transform: scale(0.8); }
    100% { opacity: 1; transform: scale(1); }
}

.seal-top,
.seal-bottom {
    position: absolute;
    width: 160px;
    height: 80px;
    overflow: hidden;
    transition: transform 1200ms ease-in-out;
}

.seal-top {
    top: 0;
    left: 0;
}

.seal-top .seal-body {
    position: relative;
    width: 160px;
    height: 160px;
    top: 0;
}

.seal-bottom {
    bottom: 0;
    left: 0;
}

.seal-bottom .seal-body {
    position: relative;
    width: 160px;
    height: 160px;
    top: -80px;
}

.wax-seal-opening.seal-split .seal-top {
    transform: translateY(-40vh);
}

.wax-seal-opening.seal-split .seal-bottom {
    transform: translateY(40vh);
}

.seal-body {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: radial-gradient(circle at 40% 35%, var(--judicial-crimson) 0%, var(--claret-shadow) 80%);
    box-shadow:
        inset 0 2px 8px rgba(0,0,0,0.5),
        inset 0 -2px 6px rgba(107,29,42,0.3),
        0 4px 16px rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    clip-path: polygon(
        50% 0%, 52% 1%, 55% 0.5%, 58% 1.5%, 62% 1%, 66% 2%, 70% 1.5%,
        75% 2.5%, 80% 2%, 85% 3%, 88% 2.5%, 92% 3.5%, 95% 3%, 97% 4%,
        99% 6%, 100% 10%, 100% 15%, 99.5% 20%, 100% 25%, 99% 30%,
        100% 35%, 99.5% 40%, 100% 45%, 99% 50%, 100% 55%, 99.5% 60%,
        100% 65%, 99% 70%, 100% 75%, 99.5% 80%, 100% 85%, 99% 88%,
        98% 92%, 97% 95%, 95% 97%, 92% 98%, 88% 99%, 85% 98.5%,
        80% 99%, 75% 98%, 70% 99.5%, 65% 99%, 60% 100%, 55% 99%,
        50% 100%, 45% 99%, 40% 100%, 35% 99%, 30% 100%, 25% 99%,
        20% 99.5%, 15% 99%, 10% 100%, 8% 99%, 5% 97%, 3% 95%,
        2% 92%, 1% 88%, 0.5% 85%, 0% 80%, 1% 75%, 0% 70%,
        0.5% 65%, 0% 60%, 1% 55%, 0% 50%, 0.5% 45%, 0% 40%,
        1% 35%, 0% 30%, 0.5% 25%, 0% 20%, 1% 15%, 0.5% 10%,
        1% 6%, 2% 4%, 4% 2.5%, 6% 2%, 10% 1%, 15% 2%,
        20% 1%, 25% 2%, 30% 1%, 35% 1.5%, 40% 1%, 45% 0.5%,
        48% 1%
    );
}

.seal-ring {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(201, 168, 76, 0.2);
}

.seal-ring-outer {
    width: 140px;
    height: 140px;
    top: 10px;
    left: 10px;
}

.seal-ring-middle {
    width: 110px;
    height: 110px;
    top: 25px;
    left: 25px;
}

.seal-ring-inner {
    width: 80px;
    height: 80px;
    top: 40px;
    left: 40px;
}

.seal-monogram {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: var(--font-display);
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--burnished-gold);
    letter-spacing: 0.08em;
    z-index: 2;
}

/* Title Block — revealed after seal splits */
.vestibule-title-block {
    position: relative;
    z-index: 5;
    text-align: center;
    opacity: 0;
    transition: opacity 600ms var(--ease-entrance);
}

.vestibule-title-block.visible {
    opacity: 1;
}

.site-title {
    margin-bottom: 1.5rem;
}

.epigraph {
    font-family: var(--font-accent);
    font-weight: 300;
    font-style: italic;
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    color: var(--aged-vellum);
    letter-spacing: 0.02em;
    line-height: 1.35;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 800ms var(--ease-entrance) 200ms, transform 800ms var(--ease-entrance) 200ms;
}

.vestibule-title-block.visible .epigraph {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   CHAMBER II — The Reading Room
   ============================================ */
.chamber-reading {
    padding: 0;
}

.exhibit-spread {
    display: flex;
    width: 100%;
    min-height: 100vh;
    perspective: 1200px;
}

.exhibit-left,
.exhibit-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 3rem;
}

.exhibit-left {
    transform: rotateY(1.5deg);
    transform-origin: right center;
}

.exhibit-right {
    transform: rotateY(-1.5deg);
    transform-origin: left center;
    border-left: 1px solid rgba(201, 168, 76, 0.08);
}

.exhibit-card {
    background:
        linear-gradient(135deg, rgba(12,8,5,0.4) 0%, transparent 50%, rgba(12,8,5,0.4) 100%),
        var(--walnut-panel);
    border: 1px solid rgba(201, 168, 76, 0.12);
    border-radius: 3px;
    padding: 3rem 2.5rem;
    max-width: 540px;
    position: relative;
    box-shadow: 0 16px 48px rgba(12, 8, 5, 0.5);
}

/* Tilt 3D entrance animation */
.tilt-entry {
    opacity: 0;
    transform: perspective(1000px) rotateX(8deg) translateZ(-40px);
    transition: opacity 900ms var(--ease-entrance), transform 900ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.tilt-entry.in-view {
    opacity: 1;
    transform: perspective(1000px) rotateX(0) translateZ(0);
}

.manifesto-text p {
    color: var(--warm-ivory);
    margin-bottom: 1.4em;
}

.manifesto-text p:last-child {
    margin-bottom: 0;
}

/* Stained Glass Effect */
.stained-glass {
    position: relative;
    width: 100%;
    max-width: 460px;
    height: 500px;
}

.glass-panel {
    position: absolute;
    border-radius: 2px;
    opacity: 0.2;
    transition: opacity 400ms var(--ease-entrance);
}

.glass-panel:hover {
    opacity: 0.35;
}

.glass-panel-1 {
    width: 55%;
    height: 45%;
    top: 5%;
    left: 10%;
    background: var(--walnut-panel);
    transform: rotate(-3deg);
}

.glass-panel-2 {
    width: 40%;
    height: 35%;
    top: 15%;
    right: 10%;
    background: var(--mahogany);
    transform: rotate(2deg);
}

.glass-panel-3 {
    width: 50%;
    height: 30%;
    top: 40%;
    left: 20%;
    background: rgba(201, 168, 76, 0.2);
    transform: rotate(-1deg);
}

.glass-panel-4 {
    width: 35%;
    height: 40%;
    bottom: 10%;
    left: 5%;
    background: var(--walnut-panel);
    transform: rotate(4deg);
}

.glass-panel-5 {
    width: 45%;
    height: 25%;
    bottom: 15%;
    right: 5%;
    background: rgba(107, 29, 42, 0.25);
    transform: rotate(-2deg);
}

.glass-panel-6 {
    width: 30%;
    height: 50%;
    top: 20%;
    left: 40%;
    background: rgba(201, 168, 76, 0.12);
    transform: rotate(1.5deg);
}

.glass-panel-7 {
    width: 25%;
    height: 30%;
    top: 0;
    right: 20%;
    background: rgba(61, 15, 24, 0.3);
    transform: rotate(-4deg);
}

.glass-panel-8 {
    width: 48%;
    height: 20%;
    bottom: 5%;
    left: 25%;
    background: var(--mahogany);
    transform: rotate(3deg);
}

/* ============================================
   CHAMBER III — The Evidence Gallery
   ============================================ */
.chamber-evidence {
    flex-direction: column;
    padding: 6rem 0;
    padding-left: 48px;
}

.evidence-content {
    position: relative;
    width: 100%;
    max-width: 1200px;
    padding: 0 4rem;
    margin: 0 auto;
}

.chamber-marginalia {
    position: absolute;
    left: -8%;
    top: 0;
    pointer-events: none;
}

.chamber-heading {
    margin-bottom: 0.5rem;
}

.chamber-subtitle {
    font-family: var(--font-accent);
    font-weight: 300;
    font-style: italic;
    font-size: clamp(1rem, 1.8vw, 1.3rem);
    color: var(--aged-vellum);
    margin-bottom: 4rem;
    letter-spacing: 0.02em;
}

/* Card Gallery */
.card-gallery {
    display: flex;
    gap: 3rem;
    justify-content: center;
    flex-wrap: wrap;
    perspective: 1000px;
}

.flip-card {
    width: 300px;
    height: 400px;
    cursor: pointer;
    perspective: 1000px;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 800ms var(--ease-spring);
    transform-style: preserve-3d;
}

.flip-card.flipped .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border: 2px solid rgba(201, 168, 76, 0.15);
    border-radius: 3px;
    box-shadow: 0 24px 48px rgba(12, 8, 5, 0.6);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2.5rem;
}

.flip-card-front {
    background:
        radial-gradient(ellipse at center, transparent 40%, rgba(12, 8, 5, 0.4) 100%),
        var(--walnut-panel);
}

.flip-card-back {
    background:
        radial-gradient(ellipse at center, transparent 40%, rgba(12, 8, 5, 0.4) 100%),
        var(--walnut-panel);
    transform: rotateY(180deg);
    text-align: left;
    align-items: flex-start;
    justify-content: flex-start;
    overflow-y: auto;
}

.card-numeral {
    font-family: var(--font-display);
    font-size: clamp(4rem, 8vw, 6rem);
    font-weight: 700;
    color: rgba(201, 168, 76, 0.12);
    line-height: 1;
    margin-bottom: 1.5rem;
}

.card-label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--weathered-brass);
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.flip-card-back h3 {
    margin-bottom: 1.2rem;
    font-size: clamp(1.2rem, 2vw, 1.5rem);
}

.flip-card-back p {
    font-size: 0.95rem;
    line-height: 1.65;
    color: var(--warm-ivory);
}

/* ============================================
   CHAMBER IV — The Deliberation
   ============================================ */
.chamber-deliberation {
    padding: 0;
    padding-left: 48px;
}

.book-spread {
    display: flex;
    width: 100%;
    min-height: 100vh;
    align-items: stretch;
    perspective: 1200px;
}

.book-page {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 3rem;
    background:
        radial-gradient(ellipse at center, transparent 40%, rgba(12, 8, 5, 0.4) 100%),
        var(--walnut-panel);
    position: relative;
}

.book-left {
    transform-origin: right center;
    transform: rotateY(1.5deg);
}

.book-right {
    transform-origin: left center;
    transform: rotateY(-1.5deg);
}

.book-animate {
    transform: rotateY(30deg);
    transition: transform 1400ms var(--ease-entrance);
}

.book-animate.book-open {
    transform: rotateY(1.5deg);
}

.book-right.book-animate {
    transform: rotateY(-30deg);
}

.book-right.book-animate.book-open {
    transform: rotateY(-1.5deg);
}

.book-spine {
    width: 3px;
    background: var(--burnished-gold);
    box-shadow: 0 0 12px rgba(201, 168, 76, 0.3), 0 0 24px rgba(201, 168, 76, 0.1);
    z-index: 5;
    flex-shrink: 0;
}

.page-content {
    max-width: 520px;
}

.deliberation-text p {
    color: var(--warm-ivory);
    margin-bottom: 1.4em;
}

.deliberation-text p:last-child {
    margin-bottom: 0;
}

/* Classical Column (CSS-only) */
.column-illustration {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.classical-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    width: 200px;
}

.column-abacus {
    width: 180px;
    height: 18px;
    background: linear-gradient(180deg, var(--aged-vellum) 0%, var(--weathered-brass) 100%);
    border-radius: 2px 2px 0 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.column-echinus {
    width: 160px;
    height: 30px;
    background: linear-gradient(180deg, var(--weathered-brass) 0%, var(--aged-vellum) 40%, var(--weathered-brass) 100%);
    border-radius: 0 0 50% 50% / 0 0 100% 100%;
    position: relative;
}

.column-volute-left,
.column-volute-right {
    position: absolute;
    width: 50px;
    height: 50px;
    border: 3px solid var(--weathered-brass);
    border-radius: 50%;
    top: 20px;
}

.column-volute-left {
    left: -10px;
    clip-path: inset(0 50% 50% 0);
    box-shadow: -2px -2px 4px rgba(0,0,0,0.2);
}

.column-volute-right {
    right: -10px;
    clip-path: inset(0 0 50% 50%);
    box-shadow: 2px -2px 4px rgba(0,0,0,0.2);
}

.column-volute-left::after,
.column-volute-right::after {
    content: '';
    position: absolute;
    width: 30px;
    height: 30px;
    border: 2px solid var(--aged-vellum);
    border-radius: 50%;
    top: 7px;
}

.column-volute-left::after {
    left: 0;
}

.column-volute-right::after {
    right: 0;
}

.column-neck {
    width: 120px;
    height: 20px;
    background: linear-gradient(180deg, var(--weathered-brass) 0%, var(--aged-vellum) 50%, var(--weathered-brass) 100%);
    border-bottom: 1px solid rgba(201, 168, 76, 0.2);
}

.column-fluting {
    width: 120px;
    height: 320px;
    background: var(--aged-vellum);
    display: flex;
    justify-content: center;
    gap: 3px;
    padding: 0 8px;
    position: relative;
    overflow: hidden;
}

.column-fluting::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg,
        rgba(0,0,0,0.15) 0%,
        rgba(0,0,0,0.05) 20%,
        transparent 40%,
        transparent 60%,
        rgba(0,0,0,0.05) 80%,
        rgba(0,0,0,0.15) 100%
    );
    z-index: 1;
}

.flute {
    flex: 1;
    background: linear-gradient(90deg,
        rgba(0,0,0,0.12) 0%,
        rgba(0,0,0,0.02) 40%,
        transparent 50%,
        rgba(0,0,0,0.02) 60%,
        rgba(0,0,0,0.12) 100%
    );
    border-radius: 50%;
}

.column-base-upper {
    width: 140px;
    height: 20px;
    background: linear-gradient(180deg, var(--aged-vellum) 0%, var(--weathered-brass) 100%);
    border-radius: 2px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.column-base-lower {
    width: 170px;
    height: 24px;
    background: linear-gradient(180deg, var(--weathered-brass) 0%, #6B6050 100%);
    border-radius: 2px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

/* ============================================
   CHAMBER V — The Seal
   ============================================ */
.chamber-seal {
    min-height: 100vh;
    background: radial-gradient(ellipse at center, var(--walnut-panel) 0%, var(--chambers-black) 70%);
    flex-direction: column;
    gap: 3rem;
}

.seal-chamber-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1000ms var(--ease-entrance), transform 1000ms var(--ease-entrance);
}

.seal-chamber-content.in-view {
    opacity: 1;
    transform: translateY(0);
}

/* Final Large Seal */
.final-seal {
    position: relative;
    width: 40vmin;
    height: 40vmin;
    max-width: 400px;
    max-height: 400px;
}

.final-seal-body {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(circle at 40% 35%, var(--judicial-crimson) 0%, #5A1623 40%, var(--claret-shadow) 80%);
    box-shadow:
        inset 0 4px 16px rgba(0,0,0,0.5),
        inset 0 -4px 12px rgba(107,29,42,0.3),
        0 8px 32px rgba(0,0,0,0.6),
        0 0 60px rgba(107,29,42,0.15);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 600ms cubic-bezier(0.25, 0.1, 0.25, 1.0);
    clip-path: polygon(
        50% 0%, 52% 0.8%, 55% 0.3%, 58% 1.2%, 62% 0.8%, 66% 1.6%, 70% 1.2%,
        75% 2%, 80% 1.5%, 85% 2.5%, 88% 2%, 92% 3%, 95% 2.5%, 97% 3.5%,
        99% 5.5%, 100% 9%, 100% 14%, 99.5% 19%, 100% 24%, 99% 29%,
        100% 34%, 99.5% 39%, 100% 44%, 99% 49%, 100% 54%, 99.5% 59%,
        100% 64%, 99% 69%, 100% 74%, 99.5% 79%, 100% 84%, 99% 87%,
        98% 91%, 97% 94%, 95% 96.5%, 92% 97.5%, 88% 98.5%, 85% 98%,
        80% 98.5%, 75% 97.5%, 70% 99%, 65% 98.5%, 60% 99.5%, 55% 98.5%,
        50% 99.5%, 45% 98.5%, 40% 99.5%, 35% 98.5%, 30% 99.5%, 25% 98.5%,
        20% 99%, 15% 98.5%, 10% 99.5%, 8% 98.5%, 5% 96.5%, 3% 94.5%,
        2% 91.5%, 1% 87.5%, 0.5% 84.5%, 0% 79.5%, 1% 74.5%, 0% 69.5%,
        0.5% 64.5%, 0% 59.5%, 1% 54.5%, 0% 49.5%, 0.5% 44.5%, 0% 39.5%,
        1% 34.5%, 0% 29.5%, 0.5% 24.5%, 0% 19.5%, 1% 14.5%, 0.5% 9.5%,
        1% 5.5%, 2% 3.8%, 4% 2.2%, 6% 1.6%, 10% 0.8%, 15% 1.6%,
        20% 0.8%, 25% 1.6%, 30% 0.8%, 35% 1.2%, 40% 0.8%, 45% 0.3%,
        48% 0.8%
    );
}

.final-seal-body:hover {
    transform: rotate(15deg);
}

.final-seal-body:hover .final-seal-monogram {
    color: #DABB5E;
    text-shadow: 0 0 20px rgba(201, 168, 76, 0.4);
}

.final-seal-ring {
    position: absolute;
    border-radius: 50%;
    border-style: solid;
    border-color: rgba(201, 168, 76, 0.15);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.final-seal-ring-1 {
    width: 92%;
    height: 92%;
    border-width: 1px;
}

.final-seal-ring-2 {
    width: 78%;
    height: 78%;
    border-width: 1.5px;
    border-color: rgba(201, 168, 76, 0.2);
}

.final-seal-ring-3 {
    width: 64%;
    height: 64%;
    border-width: 1px;
}

.final-seal-ring-4 {
    width: 50%;
    height: 50%;
    border-width: 2px;
    border-color: rgba(201, 168, 76, 0.22);
}

/* Seal cracks */
.final-seal-crack {
    position: absolute;
    background: rgba(12, 8, 5, 0.2);
    transform-origin: center;
}

.final-seal-crack-1 {
    width: 1px;
    height: 35%;
    top: 10%;
    left: 72%;
    transform: rotate(15deg);
}

.final-seal-crack-2 {
    width: 1px;
    height: 25%;
    bottom: 15%;
    left: 30%;
    transform: rotate(-20deg);
}

.final-seal-crack-3 {
    width: 1px;
    height: 20%;
    top: 40%;
    right: 18%;
    transform: rotate(35deg);
}

.final-seal-monogram {
    font-family: var(--font-display);
    font-size: clamp(3rem, 8vmin, 5rem);
    font-weight: 700;
    color: var(--burnished-gold);
    letter-spacing: 0.1em;
    z-index: 2;
    transition: color 400ms var(--ease-entrance), text-shadow 400ms var(--ease-entrance);
}

/* Candle light pool around final seal */
.chamber-seal::after {
    content: '';
    position: absolute;
    width: 80vmin;
    height: 80vmin;
    border-radius: 50%;
    background: radial-gradient(ellipse at 50% 45%, rgba(201,168,76,0.1) 0%, transparent 65%);
    pointer-events: none;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.final-wordmark {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 400;
    color: var(--burnished-gold);
    letter-spacing: 0.3em;
    text-transform: lowercase;
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 900px) {
    .docket-strip {
        width: 36px;
    }

    .chamber-evidence,
    .chamber-deliberation {
        padding-left: 36px;
    }

    .exhibit-spread {
        flex-direction: column;
    }

    .exhibit-left,
    .exhibit-right {
        transform: none;
        padding: 3rem 2rem;
    }

    .exhibit-right {
        border-left: none;
        border-top: 1px solid rgba(201, 168, 76, 0.08);
    }

    .stained-glass {
        height: 300px;
    }

    .card-gallery {
        flex-direction: column;
        align-items: center;
        gap: 2rem;
    }

    .flip-card {
        width: 280px;
        height: 370px;
    }

    .book-spread {
        flex-direction: column;
    }

    .book-page {
        padding: 3rem 2rem;
    }

    .book-left,
    .book-right,
    .book-animate,
    .book-right.book-animate {
        transform: none;
    }

    .book-animate.book-open,
    .book-right.book-animate.book-open {
        transform: none;
    }

    .book-spine {
        width: 100%;
        height: 3px;
    }

    .classical-column {
        transform: scale(0.7);
    }

    .chamber-marginalia {
        display: none;
    }

    .evidence-content {
        padding: 0 2rem;
    }
}

@media (max-width: 600px) {
    .docket-strip {
        width: 32px;
        gap: 16px;
    }

    .chamber-evidence,
    .chamber-deliberation {
        padding-left: 32px;
    }

    .docket-label {
        display: none;
    }

    .exhibit-card {
        padding: 2rem 1.5rem;
    }

    .flip-card {
        width: 260px;
        height: 350px;
    }

    .page-content {
        max-width: 100%;
    }

    .final-seal {
        width: 60vmin;
        height: 60vmin;
    }
}
