/* witch-trial.com — Aged parchment archival design */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background: #F4ECE1;
    color: #2C1810;
    font-family: Georgia, serif;
    font-weight: 400;
    font-size: 17px;
    line-height: 1.75;
    background-image:
        radial-gradient(ellipse at 20% 80%, rgba(180,160,120,0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(180,160,120,0.06) 0%, transparent 50%),
        radial-gradient(ellipse at center, transparent 60%, rgba(0,0,0,0.15));
    min-height: 100vh;
}

/* Section headings */
.section-heading {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 1.8rem;
    color: #2C1810;
    text-align: center;
    margin-bottom: 0.5rem;
    letter-spacing: 0.02em;
}

.section-intro {
    font-family: 'Lora', serif;
    font-style: italic;
    font-size: 0.95rem;
    color: #5C3A24;
    text-align: center;
    max-width: 560px;
    margin: 0 auto 1.5rem;
}

/* Flourish dividers */
.flourish {
    text-align: center;
    font-size: 1.2rem;
    color: #D4C5A0;
    padding: 1.25rem 0;
    letter-spacing: 0.5em;
}

/* ===================== HERO ===================== */
.hero {
    padding: 3.5rem 2rem 2.5rem;
    text-align: center;
}

.hero-inner {
    max-width: 640px;
    margin: 0 auto;
}

.woodcut {
    margin-bottom: 1.5rem;
}

.woodcut svg {
    filter: sepia(0.4) contrast(1.05);
    max-width: 100%;
    height: auto;
}

.hero-title {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 2.6rem;
    color: #2C1810;
    margin-bottom: 0.2rem;
    letter-spacing: 0.03em;
}

.hero-date {
    font-family: 'Lora', serif;
    font-size: 1rem;
    color: #5C3A24;
    margin-bottom: 0.75rem;
    letter-spacing: 0.15em;
}

.hero-sub {
    font-size: 1.05rem;
    color: #5C3A24;
    margin-bottom: 1.75rem;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

.hero-paths {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.path-btn {
    display: inline-block;
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 0.88rem;
    color: #2C1810;
    padding: 0.55rem 1.3rem;
    border: double 4px #B8A88A;
    text-decoration: none;
    background: #EDE4D4;
    transition: background 0.3s ease, border-color 0.3s ease;
    position: relative;
}

.path-btn:hover {
    background: #D4C5A0;
    border-color: #2C1810;
}

.wax-seal {
    color: #8B0000;
    font-size: 0.75rem;
    margin-right: 0.25rem;
    vertical-align: middle;
}

/* ===================== TIMELINE ===================== */
.timeline {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 2rem 2rem;
}

.timeline-scroll {
    overflow-x: auto;
    display: flex;
    gap: 1.25rem;
    scroll-snap-type: x mandatory;
    padding-bottom: 0.75rem;
    scrollbar-width: thin;
    scrollbar-color: #B8A88A #EDE4D4;
}

.timeline-scroll::-webkit-scrollbar {
    height: 6px;
}

.timeline-scroll::-webkit-scrollbar-track {
    background: #EDE4D4;
}

.timeline-scroll::-webkit-scrollbar-thumb {
    background: #B8A88A;
    border-radius: 3px;
}

.timeline-event {
    min-width: 270px;
    max-width: 270px;
    flex-shrink: 0;
    scroll-snap-align: center;
    background: #EDE4D4;
    padding: 1.5rem;
    border: double 4px #B8A88A;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.timeline-event:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(44,24,16,0.12);
}

.wax-badge {
    display: block;
    width: 18px;
    height: 18px;
    background: #8B0000;
    border-radius: 50%;
    margin-bottom: 0.75rem;
    box-shadow: inset 0 -2px 4px rgba(0,0,0,0.3), 0 1px 3px rgba(0,0,0,0.2);
    position: relative;
}

.wax-badge::after {
    content: '✦';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #EDE4D4;
    font-size: 8px;
}

.event-year {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 1.65rem;
    color: #8B0000;
    display: block;
    margin-bottom: 0.4rem;
}

.event-text {
    font-size: 0.92rem;
    color: #2C1810;
    line-height: 1.6;
}

/* ===================== CASES / DOCUMENT VIEWER ===================== */
.cases {
    max-width: 700px;
    margin: 0 auto;
    padding: 0 2rem 2rem;
}

.case-documents {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.case-doc {
    background: #EDE4D4;
    padding: 1.75rem;
    border: double 4px #B8A88A;
    position: relative;
    transition: box-shadow 0.3s ease;
}

.case-doc:hover {
    box-shadow: 0 3px 10px rgba(44,24,16,0.1);
}

/* Dog-ear corner */
.doc-corner {
    position: absolute;
    top: 0;
    right: 0;
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, #F4ECE1 50%, #B8A88A 50%);
}

.case-title {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 1.25rem;
    color: #2C1810;
    margin-bottom: 0.6rem;
    padding-right: 1.5rem;
}

.case-text {
    font-size: 1rem;
    color: #2C1810;
    text-indent: 2em;
    margin-bottom: 0.6rem;
    line-height: 1.75;
}

.case-citation {
    font-family: 'Lora', serif;
    font-style: italic;
    font-size: 0.82rem;
    color: #5C3A24;
    border-top: 1px solid #D4C5A0;
    padding-top: 0.5rem;
    margin-top: 0.25rem;
}

/* ===================== INTERACTIVE TRIAL ===================== */
.trial-section {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 2rem 2rem;
}

.trial-container {
    margin-top: 0.5rem;
}

.trial-roles {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.trial-role-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #EDE4D4;
    border: double 4px #B8A88A;
    padding: 1.25rem 1rem;
    cursor: pointer;
    font-family: Georgia, serif;
    color: #2C1810;
    transition: background 0.3s ease, border-color 0.3s ease, transform 0.2s ease;
    min-width: 160px;
    max-width: 200px;
    flex: 1;
}

.trial-role-btn:hover {
    background: #D4C5A0;
    border-color: #8B0000;
    transform: translateY(-2px);
}

.trial-role-btn.active {
    background: #D4C5A0;
    border-color: #8B0000;
}

.role-icon {
    margin-bottom: 0.5rem;
}

.role-label {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.role-desc {
    font-family: 'Lora', serif;
    font-style: italic;
    font-size: 0.75rem;
    color: #5C3A24;
    text-align: center;
}

/* Trial stage */
.trial-stage {
    background: #EDE4D4;
    border: double 4px #B8A88A;
    padding: 2rem;
    min-height: 200px;
    display: none;
    position: relative;
}

.trial-stage.active {
    display: block;
}

.trial-stage .stage-title {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 1.3rem;
    color: #2C1810;
    margin-bottom: 0.75rem;
    text-align: center;
}

.trial-stage .stage-narrative {
    font-size: 0.95rem;
    color: #2C1810;
    margin-bottom: 1.25rem;
    line-height: 1.75;
    text-indent: 2em;
}

.trial-stage .stage-choices {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.trial-stage .choice-btn {
    display: block;
    width: 100%;
    text-align: left;
    background: #F4ECE1;
    border: 2px solid #B8A88A;
    padding: 0.75rem 1rem;
    cursor: pointer;
    font-family: Georgia, serif;
    font-size: 0.92rem;
    color: #2C1810;
    transition: background 0.25s ease, border-color 0.25s ease;
    line-height: 1.5;
}

.trial-stage .choice-btn:hover {
    background: #D4C5A0;
    border-color: #8B0000;
}

.trial-stage .stage-outcome {
    font-family: 'Lora', serif;
    font-style: italic;
    font-size: 0.95rem;
    color: #5C3A24;
    margin-top: 1rem;
    padding: 1rem;
    border-top: 2px solid #B8A88A;
    line-height: 1.7;
}

.trial-stage .stage-outcome strong {
    color: #8B0000;
    font-style: normal;
}

.trial-stage .trial-restart-btn {
    display: inline-block;
    margin-top: 1rem;
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 0.85rem;
    color: #2C1810;
    padding: 0.5rem 1.2rem;
    border: double 4px #B8A88A;
    background: #EDE4D4;
    cursor: pointer;
    transition: background 0.3s ease;
}

.trial-stage .trial-restart-btn:hover {
    background: #D4C5A0;
}

/* ===================== QUIZ ===================== */
.quiz-section {
    max-width: 640px;
    margin: 0 auto;
    padding: 0 2rem 2rem;
}

.quiz-container {
    margin-bottom: 1rem;
}

.quiz-question {
    display: none;
    background: #EDE4D4;
    border: double 4px #B8A88A;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.quiz-question.active {
    display: block;
}

.quiz-q-text {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 1.05rem;
    color: #2C1810;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.quiz-option {
    display: block;
    width: 100%;
    text-align: left;
    background: #F4ECE1;
    border: 2px solid #B8A88A;
    padding: 0.65rem 1rem;
    cursor: pointer;
    font-family: Georgia, serif;
    font-size: 0.9rem;
    color: #2C1810;
    transition: background 0.25s ease, border-color 0.25s ease;
}

.quiz-option:hover {
    background: #D4C5A0;
    border-color: #2C1810;
}

.quiz-option.correct {
    background: #c8dfc0;
    border-color: #4a7c3f;
    cursor: default;
}

.quiz-option.incorrect {
    background: #e8c4c4;
    border-color: #8B0000;
    cursor: default;
}

.quiz-option.disabled {
    opacity: 0.6;
    cursor: default;
}

.quiz-feedback {
    font-family: 'Lora', serif;
    font-style: italic;
    font-size: 0.88rem;
    color: #5C3A24;
    margin-top: 0.75rem;
    min-height: 1.5em;
    line-height: 1.6;
}

.quiz-score {
    text-align: center;
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 1.2rem;
    color: #2C1810;
    margin-bottom: 1rem;
    min-height: 1.5em;
}

.quiz-restart {
    display: none;
    margin: 0 auto;
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 0.88rem;
    color: #2C1810;
    padding: 0.5rem 1.3rem;
    border: double 4px #B8A88A;
    background: #EDE4D4;
    cursor: pointer;
    transition: background 0.3s ease;
}

.quiz-restart.visible {
    display: block;
}

.quiz-restart:hover {
    background: #D4C5A0;
}

/* ===================== MEMORIAL ===================== */
.memorial {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 2rem 2rem;
    text-align: center;
}

.memorial-wall {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.memorial-entry {
    background: #EDE4D4;
    border: double 4px #B8A88A;
    padding: 1.25rem;
    text-align: center;
    transition: box-shadow 0.3s ease;
}

.memorial-entry:hover {
    box-shadow: 0 2px 8px rgba(44,24,16,0.1);
}

.memorial-name {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 1.05rem;
    color: #2C1810;
    display: block;
    margin-bottom: 0.15rem;
}

.memorial-year {
    font-family: 'Lora', serif;
    font-size: 0.82rem;
    color: #8B0000;
    display: block;
    margin-bottom: 0.5rem;
    letter-spacing: 0.05em;
}

.memorial-bio {
    font-family: Georgia, serif;
    font-size: 0.88rem;
    color: #5C3A24;
    line-height: 1.6;
}

.memorial-note {
    font-family: 'Lora', serif;
    font-style: italic;
    font-size: 0.9rem;
    color: #5C3A24;
    max-width: 560px;
    margin: 0 auto;
    line-height: 1.7;
}

/* ===================== FOOTER ===================== */
.footer {
    background: #3C3C3C;
    color: #D4C5A0;
    padding: 2.5rem 2rem;
    text-align: center;
}

.footer-inner {
    max-width: 640px;
    margin: 0 auto;
}

.footer-ack {
    font-family: 'Lora', serif;
    font-style: italic;
    font-size: 0.95rem;
    color: #D4C5A0;
    margin-bottom: 1.25rem;
    line-height: 1.7;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.flink {
    font-size: 0.85rem;
    color: #B8A88A;
    text-decoration: none;
    transition: color 0.3s ease;
}

.flink:hover {
    color: #EDE4D4;
}

.footer-copy {
    font-size: 0.75rem;
    color: #B8A88A;
}

/* ===================== ANIMATIONS ===================== */
.fade-in {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 640px) {
    .hero-title { font-size: 2rem; }
    .hero-paths { flex-direction: column; align-items: center; }
    .section-heading { font-size: 1.5rem; }
    .trial-roles { flex-direction: column; align-items: center; }
    .trial-role-btn { max-width: 100%; min-width: auto; width: 100%; }
    .memorial-wall { grid-template-columns: 1fr; }
    .footer-links { flex-direction: column; gap: 0.75rem; }
}
