:root {
    --color-bg: #0B0D1A;
    --color-crimson: #6B1C23;
    --color-indigo: #3D2C5E;
    --color-gold: #D4A84B;
    --color-dark-gold: #B8860B;
    --color-slate: #6B7B8D;
    --color-cream: #F0EAD6;
    --color-parchment: #C4B99A;
    --color-white: #FFFFFF;

    --font-display: 'Playfair Display', serif;
    --font-mono: 'IBM Plex Mono', monospace;
    --font-body: 'Inter', sans-serif;
}

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: var(--color-bg);
    color: var(--color-cream);
    line-height: 1.7;
    overflow-x: hidden;
}

.texture-filter {
    position: absolute;
    width: 0;
    height: 0;
}

.paper-overlay {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.07'/%3E%3C/svg%3E");
    opacity: 0.08;
}

/* Proceedings Container */
.proceedings {
    position: relative;
    z-index: 2;
}

/* Sections */
.section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6rem 2rem;
}

.section__inner {
    max-width: 720px;
    width: 100%;
    text-align: center;
}

.section__number {
    display: block;
    font-family: var(--font-mono);
    font-weight: 300;
    font-size: 0.7rem;
    letter-spacing: 0.4em;
    color: var(--color-slate);
    margin-bottom: 2rem;
}

.section__title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(1.5rem, 3.5vw, 3rem);
    letter-spacing: 0.04em;
    color: var(--color-cream);
    margin-bottom: 1.5rem;
}

.section__text {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 0.95rem;
    line-height: 1.9;
    color: var(--color-parchment);
    max-width: 560px;
    margin: 0 auto 3rem;
}

/* Rules / Horizontal Lines */
.rule {
    border: none;
    height: 1px;
    background: var(--color-gold);
    max-width: 120px;
    margin: 1.5rem auto 2rem;
    transform-origin: center;
    transform: scaleX(0);
    transition: transform 1.2s cubic-bezier(0.23, 1, 0.32, 1);
}

.rule.is-drawn {
    transform: scaleX(1);
}

/* Hero */
.section--threshold {
    min-height: 100vh;
    background: radial-gradient(ellipse at 50% 30%, rgba(61, 44, 94, 0.15) 0%, var(--color-bg) 70%);
}

.hero-title {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: clamp(2.5rem, 7vw, 6rem);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    line-height: 1.1;
    margin-bottom: 1rem;
}

.hero-title__line {
    display: block;
    color: var(--color-cream);
}

.hero-title__line--accent {
    font-family: var(--font-mono);
    font-weight: 300;
    font-size: 0.35em;
    letter-spacing: 0.3em;
    color: var(--color-gold);
    text-transform: lowercase;
}

.hero-subtitle {
    font-family: var(--font-mono);
    font-weight: 300;
    font-size: clamp(0.7rem, 1.2vw, 0.9rem);
    letter-spacing: 0.15em;
    color: var(--color-slate);
    max-width: 440px;
    margin: 0 auto;
    line-height: 1.8;
}

.scroll-cue {
    margin-top: 4rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.scroll-cue__text {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    letter-spacing: 0.4em;
    text-transform: uppercase;
    color: var(--color-slate);
}

.scroll-cue__line {
    width: 1px;
    height: 60px;
    background: linear-gradient(to bottom, var(--color-gold), transparent);
    animation: scrollPulse 2.5s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.3; transform: scaleY(0.7); }
    50% { opacity: 1; transform: scaleY(1); }
}

/* Star Motifs */
.star-motif {
    display: flex;
    justify-content: center;
    margin: 2rem 0;
}

.star-motif--hero {
    margin-bottom: 3rem;
}

.star-motif--hero .star-svg {
    width: 80px;
    height: 80px;
    animation: starRotate 60s linear infinite;
}

.star-motif--small .star-svg {
    width: 40px;
    height: 40px;
    animation: starRotate 45s linear infinite reverse;
}

@keyframes starRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Sections styling */
.section--evidence {
    background: radial-gradient(ellipse at 50% 60%, rgba(184, 134, 11, 0.04) 0%, var(--color-bg) 60%);
}

.section--deliberation {
    background: radial-gradient(ellipse at 50% 40%, rgba(61, 44, 94, 0.08) 0%, var(--color-bg) 65%);
}

.section--archive {
    background: radial-gradient(ellipse at 50% 50%, rgba(107, 28, 35, 0.06) 0%, var(--color-bg) 60%);
}

.section--verdict {
    background: radial-gradient(ellipse at 50% 50%, rgba(184, 134, 11, 0.06) 0%, var(--color-bg) 55%);
}

/* Exhibit Card */
.exhibit {
    border: 1px solid rgba(212, 168, 75, 0.2);
    max-width: 480px;
    margin: 0 auto 2rem;
    text-align: left;
}

.exhibit__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid rgba(212, 168, 75, 0.15);
}

.exhibit__label {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    letter-spacing: 0.3em;
    color: var(--color-gold);
}

.exhibit__date {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    letter-spacing: 0.2em;
    color: var(--color-slate);
}

.exhibit__body {
    padding: 1.5rem 1.25rem;
}

.exhibit__text {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 0.85rem;
    line-height: 1.8;
    color: var(--color-parchment);
    font-style: italic;
}

.exhibit__footer {
    padding: 0.5rem 1.25rem;
    border-top: 1px solid rgba(212, 168, 75, 0.1);
    font-family: var(--font-mono);
    font-size: 0.55rem;
    letter-spacing: 0.2em;
    color: var(--color-slate);
}

/* Deliberation Grid */
.deliberation-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 1rem;
}

.deliberation-item {
    text-align: center;
    padding: 1.5rem 1rem;
    border: 1px solid rgba(212, 168, 75, 0.1);
    transition: border-color 0.4s ease;
}

.deliberation-item:hover {
    border-color: rgba(212, 168, 75, 0.3);
}

.deliberation-item__number {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.6rem;
    letter-spacing: 0.3em;
    color: var(--color-gold);
    margin-bottom: 0.75rem;
}

.deliberation-item__label {
    display: block;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--color-cream);
    margin-bottom: 0.5rem;
}

.deliberation-item__text {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 0.8rem;
    line-height: 1.7;
    color: var(--color-slate);
}

/* Archive Entries */
.archive-entries {
    max-width: 520px;
    margin: 0 auto;
}

.archive-entry {
    display: flex;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(212, 168, 75, 0.08);
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.archive-entry.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.archive-entry__case {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    color: var(--color-parchment);
    min-width: 140px;
    text-align: left;
}

.archive-entry__rule {
    flex: 1;
    height: 1px;
    background: rgba(212, 168, 75, 0.15);
    margin: 0 1.5rem;
}

.archive-entry__verdict {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    color: var(--color-gold);
    min-width: 100px;
    text-align: right;
}

/* Verdict Seal */
.verdict-seal {
    display: flex;
    justify-content: center;
    margin: 2rem 0 3rem;
}

.seal-svg {
    width: 120px;
    height: 120px;
    animation: starRotate 90s linear infinite;
}

.closing {
    display: flex;
    justify-content: center;
    align-items: baseline;
    gap: 2rem;
}

.closing__domain {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.3em;
    color: var(--color-slate);
}

.closing__year {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    letter-spacing: 0.25em;
    color: var(--color-gold);
    opacity: 0.5;
}

/* Reveal Animations */
.section__inner > * {
    opacity: 0;
    transform: translateY(25px);
    transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}

.section.is-visible .section__inner > *:nth-child(1) { opacity: 1; transform: translateY(0); transition-delay: 0s; }
.section.is-visible .section__inner > *:nth-child(2) { opacity: 1; transform: translateY(0); transition-delay: 0.15s; }
.section.is-visible .section__inner > *:nth-child(3) { opacity: 1; transform: translateY(0); transition-delay: 0.3s; }
.section.is-visible .section__inner > *:nth-child(4) { opacity: 1; transform: translateY(0); transition-delay: 0.45s; }
.section.is-visible .section__inner > *:nth-child(5) { opacity: 1; transform: translateY(0); transition-delay: 0.6s; }
.section.is-visible .section__inner > *:nth-child(6) { opacity: 1; transform: translateY(0); transition-delay: 0.75s; }
.section.is-visible .section__inner > *:nth-child(7) { opacity: 1; transform: translateY(0); transition-delay: 0.9s; }

/* Responsive */
@media (max-width: 768px) {
    .section {
        padding: 4rem 1.5rem;
    }

    .deliberation-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .archive-entry__case {
        min-width: 100px;
        font-size: 0.6rem;
    }

    .archive-entry__verdict {
        min-width: 80px;
        font-size: 0.75rem;
    }

    .hero-title {
        font-size: clamp(2rem, 10vw, 4rem);
    }
}

@media (max-width: 480px) {
    .section {
        padding: 3rem 1rem;
    }

    .section__title {
        font-size: clamp(1.3rem, 5vw, 2rem);
    }

    .exhibit {
        margin-left: -0.5rem;
        margin-right: -0.5rem;
    }

    .archive-entry {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .archive-entry__rule {
        display: none;
    }

    .archive-entry__case,
    .archive-entry__verdict {
        min-width: auto;
    }

    .archive-entry__verdict {
        margin-left: auto;
    }
}
