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

:root {
    --charred-oak: #1C1814;
    --dark-mahogany: #2C2418;
    --deep-umber: #3A3228;
    --walnut: #5A4E40;
    --warm-tan: #8B7355;
    --parchment-dark: #E8DCC0;
    --vellum: #F0E6D0;
    --sealing-wax: #8B2500;
}

body {
    background-color: var(--charred-oak);
    color: var(--dark-mahogany);
    font-family: 'EB Garamond', serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.85;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    padding: 48px 24px;
    -webkit-font-smoothing: antialiased;
    position: relative;
    overflow-x: hidden;
}

/* Candle Glow */
.candle-glow {
    position: fixed;
    top: -200px;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(240, 200, 120, 0.08) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
    animation: flicker 3s ease-in-out infinite alternate;
}

@keyframes flicker {
    0% { opacity: 0.6; transform: translateX(-50%) scale(1); }
    25% { opacity: 0.7; transform: translateX(-50%) scale(1.02); }
    50% { opacity: 0.55; transform: translateX(-50%) scale(0.98); }
    75% { opacity: 0.72; transform: translateX(-50%) scale(1.01); }
    100% { opacity: 0.63; transform: translateX(-50%) scale(1); }
}

/* Parchment Panel */
.parchment-panel {
    max-width: 720px;
    width: 100%;
    background-color: var(--vellum);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5), inset 0 0 40px rgba(28, 24, 20, 0.08);
    border-radius: 2px;
    padding: 64px 56px;
    position: relative;
    z-index: 1;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.parchment-panel.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Burnt edges effect */
.parchment-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 1px solid rgba(139, 115, 85, 0.3);
    border-radius: 2px;
    pointer-events: none;
}

/* Wax Seal */
.wax-seal {
    display: flex;
    justify-content: center;
    margin-bottom: 32px;
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.wax-seal.visible {
    opacity: 1;
    transform: scale(1);
}

/* Document Header */
.document-header {
    text-align: center;
    margin-bottom: 48px;
}

.court-title {
    font-family: 'Cinzel', serif;
    font-weight: 700;
    font-size: 28px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--dark-mahogany);
    margin-bottom: 8px;
}

.court-subtitle {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 12px;
    color: var(--warm-tan);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* Ornamental Rule */
.ornamental-rule {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
}

.rule-line {
    flex: 1;
    height: 1px;
    background-color: var(--warm-tan);
    opacity: 0.4;
}

.rule-diamond {
    font-size: 8px;
    color: var(--warm-tan);
    opacity: 0.6;
}

/* Trial Section */
.trial-section {
    margin-bottom: 48px;
    padding-bottom: 48px;
    border-bottom: 1px solid rgba(139, 115, 85, 0.2);
    position: relative;
}

.trial-section:last-of-type {
    border-bottom: none;
}

.fade-section {
    opacity: 0.3;
    transition: opacity 0.5s ease;
}

.fade-section.in-view {
    opacity: 1;
}

/* Section Marker */
.section-marker {
    margin-bottom: 16px;
}

/* Section Heading */
.section-heading {
    font-family: 'Cinzel', serif;
    font-weight: 700;
    font-size: 22px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--dark-mahogany);
    margin-bottom: 4px;
}

.section-date {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 12px;
    color: var(--warm-tan);
    letter-spacing: 0.04em;
    margin-bottom: 16px;
}

.trial-text {
    margin-bottom: 20px;
    color: var(--deep-umber);
}

/* Testimony Blockquote */
.testimony {
    margin: 24px 0;
    padding: 20px 24px;
    border-left: 3px solid var(--sealing-wax);
    background-color: rgba(232, 220, 192, 0.5);
    border-radius: 0 2px 2px 0;
}

.testimony p {
    font-style: italic;
    font-size: 17px;
    line-height: 1.7;
    color: var(--dark-mahogany);
    margin-bottom: 8px;
}

.testimony cite {
    font-family: 'Inter', sans-serif;
    font-style: normal;
    font-size: 12px;
    color: var(--walnut);
    letter-spacing: 0.02em;
}

/* Verdict Box */
.verdict-box {
    margin-top: 20px;
    padding: 16px 20px;
    border: 1px solid rgba(139, 37, 0, 0.3);
    border-radius: 2px;
    background-color: rgba(139, 37, 0, 0.04);
}

.verdict-label {
    font-family: 'Cinzel', serif;
    font-weight: 700;
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--sealing-wax);
    display: block;
    margin-bottom: 4px;
}

.verdict-text {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 14px;
    line-height: 1.6;
    color: var(--dark-mahogany);
}

/* Document Footer */
.document-footer {
    text-align: center;
    padding-top: 24px;
}

.footer-text {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    color: var(--warm-tan);
    margin-top: 16px;
    letter-spacing: 0.04em;
}

/* Responsive */
@media (max-width: 768px) {
    .parchment-panel {
        padding: 40px 28px;
    }

    .court-title {
        font-size: 22px;
    }

    .section-heading {
        font-size: 18px;
    }

    body {
        padding: 24px 12px;
    }
}
