/* witch-trial.com - Opulent Graffiti Scholarship */
/* Colors: #1a1a2e (deep base), #4a90d9 (primary blue), #f5f0e8 (warm off-white), #e8b84b (accent gold), #6c757d (muted gray) */
/* Font: Inter */

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

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

body {
    font-family: 'Inter', sans-serif;
    background-color: #f5f0e8;
    color: #1a1a2e;
    line-height: 1.7;
    overflow-x: hidden;
}

/* ========== GRAFFITI BORDER OVERLAY ========== */
#graffiti-border-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
}

.graffiti-corner {
    position: absolute;
    width: 80px;
    height: 80px;
}

.graffiti-tl { top: 10px; left: 10px; }
.graffiti-tr { top: 10px; right: 10px; }
.graffiti-bl { bottom: 10px; left: 10px; }
.graffiti-br { bottom: 10px; right: 10px; }

/* ========== HERO / COVER SPREAD ========== */
#hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #1a1a2e;
    overflow: hidden;
}

.hero-illustration {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.7;
}

.hero-illustration svg {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    padding: 2rem;
    max-width: 800px;
}

.hero-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: #e8b84b;
    border: 1px solid rgba(232, 184, 75, 0.4);
    padding: 0.5rem 1.5rem;
    margin-bottom: 2rem;
    border-radius: 30px;
    opacity: 0;
    animation: fadeInUp 1s ease 0.3s forwards;
}

.hero-title {
    font-size: clamp(4rem, 12vw, 10rem);
    font-weight: 900;
    line-height: 0.9;
    margin-bottom: 1.5rem;
    color: #f5f0e8;
    letter-spacing: -2px;
}

.title-line {
    display: block;
    opacity: 0;
    transform: translateY(40px);
    animation: fadeInUp 0.8s ease forwards;
}

.title-line-1 {
    animation-delay: 0.5s;
    background: linear-gradient(135deg, #f5f0e8 60%, #e8b84b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.title-line-2 {
    animation-delay: 0.7s;
    background: linear-gradient(135deg, #e8b84b 0%, #f5f0e8 40%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.1rem;
    font-weight: 300;
    color: #6c757d;
    max-width: 600px;
    margin: 0 auto 3rem;
    opacity: 0;
    animation: fadeInUp 1s ease 0.9s forwards;
    line-height: 1.8;
}

.hero-scroll-indicator {
    opacity: 0;
    animation: fadeInUp 1s ease 1.2s forwards;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.scroll-text {
    font-size: 0.7rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: #6c757d;
}

.scroll-arrow {
    animation: bounceDown 2s ease-in-out infinite;
}

/* ========== CHAPTER SPREADS ========== */
.chapter-spread {
    position: relative;
    padding: 6rem 4rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.chapter-ornament {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
    opacity: 0;
    transition: opacity 0.8s ease, transform 0.8s ease;
    transform: translateY(20px);
}

.chapter-ornament.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ========== SPREAD LAYOUT ========== */
.spread-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    max-width: 1400px;
    margin: 0 auto;
    align-items: center;
}

.spread-layout-reverse {
    direction: rtl;
}

.spread-layout-reverse > * {
    direction: ltr;
}

.spread-illustration {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(26, 26, 46, 0.2);
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.spread-layout-reverse .spread-illustration {
    transform: translateX(30px);
}

.spread-illustration.visible {
    opacity: 1;
    transform: translateX(0);
}

.scene-illustration {
    width: 100%;
    height: auto;
    display: block;
}

.spread-content {
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.8s ease 0.2s, transform 0.8s ease 0.2s;
}

.spread-layout-reverse .spread-content {
    transform: translateX(-30px);
}

.spread-content.visible {
    opacity: 1;
    transform: translateX(0);
}

/* ========== TYPOGRAPHY ========== */
.chapter-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    color: #1a1a2e;
    margin-bottom: 1rem;
    letter-spacing: -1px;
    line-height: 1.1;
    position: relative;
}

.chapter-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #e8b84b, transparent);
    margin-top: 0.8rem;
    border-radius: 2px;
}

.chapter-title-centered {
    text-align: center;
    margin-bottom: 1rem;
}

.chapter-title-centered::after {
    margin-left: auto;
    margin-right: auto;
}

.chapter-intro {
    font-size: 1.15rem;
    font-weight: 400;
    line-height: 1.9;
    color: #1a1a2e;
    margin-bottom: 1.5rem;
}

.chapter-spread p {
    font-size: 1rem;
    line-height: 1.8;
    color: #1a1a2e;
    margin-bottom: 1.2rem;
}

/* ========== MARGIN ANNOTATIONS (scholarly) ========== */
.margin-annotation {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    padding-left: 1rem;
    border-left: 2px solid #e8b84b;
}

.margin-annotation-centered {
    justify-content: center;
    border-left: none;
    padding-left: 0;
}

.annotation-marker {
    font-size: 1.2rem;
    color: #e8b84b;
    font-weight: 700;
}

.annotation-text {
    font-size: 0.8rem;
    font-weight: 500;
    color: #6c757d;
    font-style: italic;
    letter-spacing: 0.5px;
}

/* ========== BLOCKQUOTE ========== */
.scholarly-quote {
    position: relative;
    padding: 1.5rem 2rem;
    margin: 2rem 0;
    background: rgba(26, 26, 46, 0.04);
    border-left: 4px solid #e8b84b;
    border-radius: 0 8px 8px 0;
    font-size: 1.1rem;
    font-style: italic;
    font-weight: 400;
    color: #1a1a2e;
    line-height: 1.8;
}

.scholarly-quote cite {
    display: block;
    margin-top: 0.8rem;
    font-size: 0.85rem;
    font-style: normal;
    font-weight: 600;
    color: #6c757d;
}

/* ========== CHAPTER STATS ========== */
.chapter-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(26, 26, 46, 0.1);
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 800;
    color: #e8b84b;
    line-height: 1.2;
}

.stat-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #6c757d;
    margin-top: 0.3rem;
}

/* ========== TRIAL METHODS ========== */
.trial-methods {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 2rem;
}

.method-card {
    display: flex;
    gap: 1.2rem;
    align-items: flex-start;
    padding: 1.5rem;
    background: rgba(26, 26, 46, 0.03);
    border-radius: 12px;
    border: 1px solid rgba(26, 26, 46, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.method-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(26, 26, 46, 0.08);
}

.method-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
}

.method-card h3 {
    font-size: 1rem;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 0.3rem;
}

.method-card p {
    font-size: 0.9rem;
    color: #6c757d;
    line-height: 1.6;
    margin-bottom: 0;
}

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

.timeline-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, transparent, #e8b84b 10%, #e8b84b 90%, transparent);
    transform: translateX(-50%);
}

.timeline-event {
    position: relative;
    display: flex;
    margin-bottom: 3rem;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.timeline-event.visible {
    opacity: 1;
    transform: translateY(0);
}

.timeline-event:nth-child(even) {
    flex-direction: row-reverse;
}

.timeline-marker {
    position: absolute;
    left: 50%;
    top: 20px;
    width: 16px;
    height: 16px;
    background: #e8b84b;
    border: 3px solid #f5f0e8;
    border-radius: 50%;
    transform: translateX(-50%);
    z-index: 2;
    box-shadow: 0 0 0 4px rgba(232, 184, 75, 0.2);
    transition: transform 0.3s ease;
}

.timeline-event:hover .timeline-marker {
    transform: translateX(-50%) scale(1.3);
}

.timeline-content {
    width: 42%;
    padding: 1.5rem;
    background: rgba(26, 26, 46, 0.03);
    border-radius: 12px;
    border: 1px solid rgba(26, 26, 46, 0.06);
    transition: box-shadow 0.3s ease;
}

.timeline-event:nth-child(odd) .timeline-content {
    margin-right: auto;
    margin-left: 0;
}

.timeline-event:nth-child(even) .timeline-content {
    margin-left: auto;
    margin-right: 0;
}

.timeline-content:hover {
    box-shadow: 0 8px 30px rgba(26, 26, 46, 0.08);
}

.timeline-year {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: #e8b84b;
    background: rgba(232, 184, 75, 0.1);
    padding: 0.2rem 0.8rem;
    border-radius: 20px;
    margin-bottom: 0.5rem;
}

.timeline-content h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 0.5rem;
}

.timeline-content p {
    font-size: 0.9rem;
    color: #6c757d;
    line-height: 1.7;
    margin-bottom: 0;
}

/* ========== LEGACY CARDS ========== */
.legacy-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

.legacy-card {
    padding: 1.5rem;
    background: rgba(26, 26, 46, 0.03);
    border-radius: 12px;
    border: 1px solid rgba(26, 26, 46, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.legacy-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 36px rgba(26, 26, 46, 0.1);
}

.legacy-icon {
    display: block;
    margin-bottom: 1rem;
}

.legacy-card h4 {
    font-size: 1rem;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 0.5rem;
}

.legacy-card p {
    font-size: 0.85rem;
    color: #6c757d;
    line-height: 1.7;
    margin-bottom: 0;
}

.legacy-card em {
    color: #1a1a2e;
    font-weight: 500;
}

/* ========== ARCHIVE GRID ========== */
.archive-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    max-width: 1200px;
    margin: 3rem auto 0;
}

.archive-card {
    cursor: pointer;
    transition: transform 0.4s ease;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

.archive-card:hover {
    transform: translateY(-8px);
}

.archive-card-inner {
    border-radius: 12px;
    overflow: hidden;
    background: #1a1a2e;
    box-shadow: 0 12px 40px rgba(26, 26, 46, 0.15);
    transition: box-shadow 0.4s ease;
}

.archive-card:hover .archive-card-inner {
    box-shadow: 0 20px 60px rgba(26, 26, 46, 0.25);
}

.archive-card-illustration svg {
    width: 100%;
    height: auto;
    display: block;
}

.archive-card-inner h3 {
    font-size: 1rem;
    font-weight: 700;
    color: #f5f0e8;
    padding: 1.2rem 1.2rem 0.3rem;
}

.archive-card-inner p {
    font-size: 0.8rem;
    color: #6c757d;
    padding: 0 1.2rem 1.2rem;
    line-height: 1.6;
    margin-bottom: 0;
}

/* ========== FOOTER ========== */
#site-footer {
    background-color: #1a1a2e;
    padding: 4rem;
    text-align: center;
}

.footer-graffiti-border {
    margin-bottom: 3rem;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
}

.footer-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: #f5f0e8;
    letter-spacing: -0.5px;
}

.footer-tagline {
    font-size: 0.75rem;
    font-weight: 500;
    color: #6c757d;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.footer-note p {
    font-size: 0.85rem;
    color: #6c757d;
    margin-bottom: 0.3rem;
}

.footer-year {
    font-size: 0.7rem;
    letter-spacing: 4px;
    color: #e8b84b;
    opacity: 0.6;
}

/* ========== ANIMATIONS ========== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounceDown {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(10px); }
}

@keyframes flicker {
    0%, 100% { opacity: 0.7; transform: scaleY(1); }
    25% { opacity: 0.9; transform: scaleY(1.1); }
    50% { opacity: 0.6; transform: scaleY(0.95); }
    75% { opacity: 0.85; transform: scaleY(1.05); }
}

@keyframes sprayPulse {
    0%, 100% { opacity: 0.4; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.5); }
}

@keyframes twinkle {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.8; }
}

@keyframes scaleRock {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(3deg); }
    75% { transform: rotate(-3deg); }
}

.flame {
    animation: flicker 2s ease-in-out infinite;
    transform-origin: bottom center;
}

.flame-1 { animation-delay: 0s; }
.flame-2 { animation-delay: 0.3s; }
.flame-3 { animation-delay: 0.6s; }

.spray-dot {
    animation: sprayPulse 3s ease-in-out infinite;
}

.spray-dot:nth-child(2) { animation-delay: 0.5s; }
.spray-dot:nth-child(3) { animation-delay: 1s; }
.spray-dot:nth-child(5) { animation-delay: 0.7s; }
.spray-dot:nth-child(6) { animation-delay: 1.2s; }

.star {
    animation: twinkle 4s ease-in-out infinite;
}

.star:nth-child(2) { animation-delay: 0.8s; }
.star:nth-child(3) { animation-delay: 1.6s; }
.star:nth-child(4) { animation-delay: 2.4s; }
.star:nth-child(5) { animation-delay: 0.4s; }
.star:nth-child(6) { animation-delay: 1.2s; }

.scale-beam {
    animation: scaleRock 4s ease-in-out infinite;
    transform-origin: center top;
}

.memorial-flame path {
    animation: flicker 3s ease-in-out infinite;
    transform-origin: bottom center;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1024px) {
    .spread-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .spread-layout-reverse {
        direction: ltr;
    }
    
    .chapter-spread {
        padding: 4rem 2rem;
    }
    
    .chapter-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }
    
    .legacy-cards {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .archive-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .timeline-content {
        width: 40%;
    }
}

@media (max-width: 768px) {
    .chapter-spread {
        padding: 3rem 1.5rem;
    }
    
    .hero-content {
        padding: 1rem;
    }
    
    .chapter-stats {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .timeline-line {
        left: 20px;
    }
    
    .timeline-event,
    .timeline-event:nth-child(even) {
        flex-direction: row;
    }
    
    .timeline-marker {
        left: 20px;
    }
    
    .timeline-content {
        width: auto;
        margin-left: 50px !important;
        margin-right: 0 !important;
    }
    
    .archive-grid {
        grid-template-columns: 1fr;
    }
    
    .graffiti-corner {
        width: 50px;
        height: 50px;
    }
    
    #site-footer {
        padding: 3rem 1.5rem;
    }
}
