/* courthouse.stream - Pop-Art Courtroom Design */
/* Colors: #C41E3A (crimson), #FFB432 (gold), #0E0B1F (deep dark), #4A0E6B (amethyst), 
   #F5F0EA (cream), #1E1B2E (dark panel), #0A7E5F (emerald), #6B6B80 (gray) */

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

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

body {
    background-color: #0E0B1F;
    color: #F5F0EA;
    font-family: 'Libre Baskerville', Georgia, serif;
    line-height: 1.7;
    overflow-x: hidden;
}

.svg-defs {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

/* ==================== PAGE GRID ==================== */
.page-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: 100vh;
}

/* ==================== SIDEBAR (THE DOCKET) ==================== */
.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    background-color: #4A0E6B;
    display: flex;
    flex-direction: column;
    padding: 32px 20px;
    overflow-y: auto;
    z-index: 100;
    border-right: 2px solid rgba(255, 180, 50, 0.2);
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 180, 50, 0.3);
}

.sidebar-gavel {
    flex-shrink: 0;
}

.sidebar-title {
    font-family: 'Roboto Slab', serif;
    font-weight: 700;
    font-size: 18px;
    letter-spacing: 0.02em;
    color: #F5F0EA;
}

.dot-stream {
    color: #FFB432;
}

/* Docket Navigation */
.docket-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.docket-entry {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    text-decoration: none;
    color: rgba(245, 240, 234, 0.6);
    border-radius: 6px;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.docket-entry:hover {
    background-color: rgba(255, 180, 50, 0.1);
    color: #F5F0EA;
    border-left-color: #FFB432;
}

.docket-entry.active {
    background-color: rgba(196, 30, 58, 0.2);
    color: #F5F0EA;
    border-left-color: #C41E3A;
}

.docket-number {
    font-family: 'Space Grotesk', monospace;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: #6B6B80;
    min-width: 32px;
}

.docket-label {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 13px;
    font-weight: 500;
    flex: 1;
}

.docket-star {
    flex-shrink: 0;
    opacity: 0.7;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.docket-entry:hover .docket-star,
.docket-entry.active .docket-star {
    opacity: 1;
    transform: scale(1.2) rotate(15deg);
}

/* Sidebar Footer */
.sidebar-footer {
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 180, 50, 0.3);
}

.live-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
}

.live-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #C41E3A;
    animation: livePulse 1.5s ease-in-out infinite;
}

.live-text {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.2em;
    color: #C41E3A;
}

@keyframes livePulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(196, 30, 58, 0.6); }
    50% { opacity: 0.6; box-shadow: 0 0 12px 4px rgba(196, 30, 58, 0.3); }
}

/* Mobile Sidebar Toggle */
.sidebar-toggle {
    display: none;
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 200;
    background: #4A0E6B;
    border: 2px solid #FFB432;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.sidebar-toggle:hover {
    transform: scale(1.1) rotate(15deg);
}

/* ==================== MAIN CONTENT ==================== */
.courtroom-floor {
    min-height: 100vh;
}

/* ==================== SECTIONS (General) ==================== */
.section {
    position: relative;
    padding: 100px 60px;
    overflow: hidden;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-number {
    display: inline-block;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.25em;
    color: #FFB432;
    text-transform: uppercase;
    margin-bottom: 12px;
    padding: 4px 16px;
    border: 1px solid rgba(255, 180, 50, 0.4);
    border-radius: 2px;
}

.section-title {
    font-family: 'Roboto Slab', serif;
    font-weight: 700;
    font-size: clamp(36px, 5vw, 72px);
    letter-spacing: 0.03em;
    color: #F5F0EA;
    margin-top: 16px;
    margin-bottom: 20px;
    text-shadow: 0 0 40px rgba(196, 30, 58, 0.3);
}

.section-rule {
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, #C41E3A, #FFB432);
    margin: 0 auto;
    border-radius: 2px;
}

.section-rule-gold {
    background: linear-gradient(90deg, #FFB432, #C41E3A);
}

/* Halftone Overlay - Ben-Day dots effect */
.halftone-overlay {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(245, 240, 234, 0.03) 1px, transparent 1px);
    background-size: 8px 8px;
    pointer-events: none;
    z-index: 1;
}

/* ==================== HERO SECTION ==================== */
.section-hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(ellipse at 30% 40%, rgba(74, 14, 107, 0.4) 0%, transparent 60%),
                radial-gradient(ellipse at 70% 60%, rgba(196, 30, 58, 0.15) 0%, transparent 50%),
                #0E0B1F;
}

.star-cluster {
    position: absolute;
    pointer-events: none;
    z-index: 0;
}

.star-cluster-hero {
    top: 10%;
    right: 5%;
}

.starburst-lg {
    animation: starRotateSlow 20s linear infinite;
}

.starburst-md {
    position: absolute;
    top: 120px;
    left: -30px;
    animation: starRotateSlow 15s linear infinite reverse;
}

.starburst-sm {
    position: absolute;
    top: 40px;
    left: 100px;
    animation: starPulse 3s ease-in-out infinite;
}

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

@keyframes starPulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.15); opacity: 0.8; }
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 700px;
}

.hero-overline {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.3em;
    color: #FFB432;
    margin-bottom: 24px;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeSlideUp 0.8s ease forwards 0.2s;
}

.hero-title {
    font-family: 'Roboto Slab', serif;
    font-weight: 900;
    font-size: clamp(48px, 8vw, 120px);
    line-height: 1.05;
    letter-spacing: 0.03em;
    margin-bottom: 24px;
}

.title-line {
    display: block;
}

.title-line-1 {
    color: #C41E3A;
    text-shadow: 0 0 60px rgba(196, 30, 58, 0.5), 0 0 120px rgba(196, 30, 58, 0.2);
    opacity: 0;
    transform: translateX(-40px);
    animation: fadeSlideRight 0.8s ease forwards 0.4s;
}

.title-line-2 {
    color: #F5F0EA;
    text-shadow: 0 0 40px rgba(245, 240, 234, 0.15);
    opacity: 0;
    transform: translateX(40px);
    animation: fadeSlideLeft 0.8s ease forwards 0.6s;
}

.hero-subtitle {
    font-family: 'Libre Baskerville', serif;
    font-size: 18px;
    line-height: 1.8;
    color: rgba(245, 240, 234, 0.7);
    max-width: 540px;
    margin: 0 auto 32px;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeSlideUp 0.8s ease forwards 0.8s;
}

.hero-gavel {
    opacity: 0;
    animation: fadeSlideUp 0.8s ease forwards 1s;
}

.gavel-svg {
    animation: gavelBob 3s ease-in-out infinite;
}

@keyframes gavelBob {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-4px) rotate(-2deg); }
}

@keyframes fadeSlideUp {
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeSlideRight {
    to { opacity: 1; transform: translateX(0); }
}

@keyframes fadeSlideLeft {
    to { opacity: 1; transform: translateX(0); }
}

/* ==================== EVIDENCE GALLERY ==================== */
.section-evidence {
    background: linear-gradient(180deg, #0E0B1F 0%, #1E1B2E 50%, #0E0B1F 100%);
    padding-bottom: 60px;
}

.evidence-strip {
    display: flex;
    gap: 24px;
    overflow-x: auto;
    padding: 20px 0 30px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #C41E3A #1E1B2E;
}

.evidence-strip::-webkit-scrollbar {
    height: 6px;
}

.evidence-strip::-webkit-scrollbar-track {
    background: #1E1B2E;
    border-radius: 3px;
}

.evidence-strip::-webkit-scrollbar-thumb {
    background: #C41E3A;
    border-radius: 3px;
}

.evidence-card {
    flex: 0 0 280px;
    scroll-snap-align: start;
    background: #1E1B2E;
    border: 1px solid rgba(255, 180, 50, 0.15);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
    opacity: 0;
    transform: translateY(30px);
}

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

.evidence-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: #FFB432;
    box-shadow: 0 12px 40px rgba(196, 30, 58, 0.2), 0 0 20px rgba(255, 180, 50, 0.1);
}

.card-stamp {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.2em;
    color: #C41E3A;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(196, 30, 58, 0.2);
}

.card-visual {
    padding: 16px;
    display: flex;
    justify-content: center;
}

.card-visual svg {
    border-radius: 4px;
}

.card-caption {
    font-family: 'Libre Baskerville', serif;
    font-size: 13px;
    line-height: 1.6;
    color: rgba(245, 240, 234, 0.6);
    padding: 16px;
}

.evidence-scroll-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 16px;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 12px;
    color: #6B6B80;
    letter-spacing: 0.1em;
}

.scroll-arrow {
    color: #FFB432;
    font-size: 16px;
    animation: scrollPulse 2s ease-in-out infinite;
}

.scroll-arrow-left {
    animation-delay: 0s;
}

.scroll-arrow-right {
    animation-delay: 1s;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.4; transform: translateX(0); }
    50% { opacity: 1; transform: translateX(3px); }
}

.scroll-arrow-left { animation-name: scrollPulseLeft; }

@keyframes scrollPulseLeft {
    0%, 100% { opacity: 0.4; transform: translateX(0); }
    50% { opacity: 1; transform: translateX(-3px); }
}

/* ==================== TESTIMONY ==================== */
.section-testimony {
    background: radial-gradient(ellipse at 50% 0%, rgba(74, 14, 107, 0.3) 0%, transparent 60%),
                #0E0B1F;
}

.testimony-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
    max-width: 1100px;
    margin: 0 auto;
}

.testimony-block {
    position: relative;
    background: #1E1B2E;
    border: 1px solid rgba(196, 30, 58, 0.2);
    border-radius: 8px;
    padding: 40px 32px 32px;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    opacity: 0;
    transform: translateY(30px);
}

.testimony-block.visible {
    opacity: 1;
    transform: translateY(0);
}

.testimony-block:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(196, 30, 58, 0.15);
}

.testimony-mark {
    font-family: 'Roboto Slab', serif;
    font-size: 72px;
    font-weight: 900;
    line-height: 1;
    color: #C41E3A;
    opacity: 0.3;
    position: absolute;
    top: 8px;
    left: 20px;
}

.testimony-block-2 .testimony-mark { color: #FFB432; }
.testimony-block-3 .testimony-mark { color: #0A7E5F; }

.testimony-text {
    font-family: 'Libre Baskerville', serif;
    font-size: 16px;
    line-height: 1.8;
    color: rgba(245, 240, 234, 0.85);
    font-style: italic;
    margin-bottom: 20px;
}

.testimony-cite {
    display: block;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 13px;
    font-style: normal;
    color: #FFB432;
    letter-spacing: 0.05em;
}

.testimony-starburst {
    position: absolute;
    bottom: 12px;
    right: 12px;
    opacity: 0.6;
    animation: starPulse 4s ease-in-out infinite;
}

.testimony-block-2 .testimony-starburst { animation-delay: 1.3s; }
.testimony-block-3 .testimony-starburst { animation-delay: 2.6s; }

/* ==================== PROCEEDINGS TIMELINE ==================== */
.section-proceedings {
    background: linear-gradient(180deg, #0E0B1F 0%, #1E1B2E 100%);
}

.proceedings-timeline {
    position: relative;
    max-width: 700px;
    margin: 0 auto;
    padding-left: 60px;
}

.timeline-line {
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, #C41E3A, #FFB432, #0A7E5F, #4A0E6B);
}

.proceeding-item {
    position: relative;
    display: flex;
    gap: 20px;
    margin-bottom: 48px;
    opacity: 0;
    transform: translateX(-20px);
}

.proceeding-item.visible {
    opacity: 1;
    transform: translateX(0);
}

.proceeding-marker {
    position: absolute;
    left: -60px;
    top: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.proceeding-content {
    flex: 1;
}

.proceeding-item-3 .proceeding-title { color: #1B4DDB; }

.proceeding-title {
    font-family: 'Roboto Slab', serif;
    font-weight: 700;
    font-size: 22px;
    color: #F5F0EA;
    margin-bottom: 8px;
    letter-spacing: 0.02em;
}

.proceeding-desc {
    font-family: 'Libre Baskerville', serif;
    font-size: 15px;
    line-height: 1.7;
    color: rgba(245, 240, 234, 0.65);
}

/* ==================== VERDICT SECTION ==================== */
.section-verdict {
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: radial-gradient(ellipse at 50% 50%, rgba(196, 30, 58, 0.15) 0%, transparent 50%),
                radial-gradient(ellipse at 30% 70%, rgba(255, 180, 50, 0.1) 0%, transparent 40%),
                #0E0B1F;
    text-align: center;
}

.verdict-starfield {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.verdict-star {
    position: absolute;
    animation: starFloat 6s ease-in-out infinite;
}

@keyframes starFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.3; }
    50% { transform: translateY(-15px) rotate(180deg); opacity: 0.7; }
}

.verdict-title {
    text-shadow: 0 0 60px rgba(255, 180, 50, 0.4), 0 0 120px rgba(196, 30, 58, 0.2);
}

.verdict-content {
    position: relative;
    z-index: 2;
    max-width: 600px;
}

.verdict-gavel-animation {
    margin-bottom: 40px;
    opacity: 0;
    transform: translateY(20px);
}

.verdict-gavel-animation.visible {
    opacity: 1;
    transform: translateY(0);
}

.verdict-gavel-svg .gavel-head {
    transform-origin: 60px 45px;
    animation: gavelStrike 2s ease-in-out infinite;
}

@keyframes gavelStrike {
    0%, 70%, 100% { transform: rotate(0deg); }
    80% { transform: rotate(-15deg); }
    85% { transform: rotate(5deg); }
    90% { transform: rotate(0deg); }
}

.verdict-statement {
    font-family: 'Libre Baskerville', serif;
    font-size: 18px;
    line-height: 1.9;
    color: rgba(245, 240, 234, 0.85);
    font-style: italic;
    margin-bottom: 40px;
}

.verdict-seal {
    opacity: 0;
    transform: scale(0.8);
}

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

.seal-svg {
    animation: sealGlow 4s ease-in-out infinite;
}

@keyframes sealGlow {
    0%, 100% { filter: drop-shadow(0 0 10px rgba(255, 180, 50, 0.3)); }
    50% { filter: drop-shadow(0 0 25px rgba(255, 180, 50, 0.6)); }
}

/* ==================== FOOTER ==================== */
.court-footer {
    background: #1E1B2E;
    border-top: 2px solid rgba(196, 30, 58, 0.3);
    padding: 32px 60px;
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-name {
    font-family: 'Roboto Slab', serif;
    font-weight: 700;
    font-size: 16px;
    color: #F5F0EA;
}

.footer-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 12px;
    color: #6B6B80;
    letter-spacing: 0.1em;
}

.footer-divider {
    color: rgba(107, 107, 128, 0.4);
}

.footer-stars {
    display: flex;
    gap: 8px;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
    .page-grid {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: fixed;
        left: -280px;
        top: 0;
        width: 280px;
        transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: none;
    }

    .sidebar.open {
        left: 0;
        box-shadow: 4px 0 20px rgba(0, 0, 0, 0.5);
    }

    .sidebar-toggle {
        display: flex;
    }

    .section {
        padding: 60px 24px;
    }

    .section-hero {
        min-height: 90vh;
    }

    .hero-title {
        font-size: clamp(36px, 10vw, 64px);
    }

    .testimony-grid {
        grid-template-columns: 1fr;
    }

    .proceedings-timeline {
        padding-left: 50px;
    }

    .proceeding-marker {
        left: -50px;
    }

    .evidence-card {
        flex: 0 0 240px;
    }

    .court-footer {
        padding: 24px;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .star-cluster-hero {
        top: 5%;
        right: -20px;
        transform: scale(0.6);
    }
}

@media (max-width: 480px) {
    .section {
        padding: 40px 16px;
    }
    
    .section-title {
        font-size: clamp(28px, 8vw, 48px);
    }

    .evidence-card {
        flex: 0 0 220px;
    }
}

/* ==================== STAGGER ANIMATION DELAYS ==================== */
.evidence-card:nth-child(1) { transition-delay: 0.1s; }
.evidence-card:nth-child(2) { transition-delay: 0.2s; }
.evidence-card:nth-child(3) { transition-delay: 0.3s; }
.evidence-card:nth-child(4) { transition-delay: 0.4s; }
.evidence-card:nth-child(5) { transition-delay: 0.5s; }

.testimony-block-1 { transition-delay: 0.1s; }
.testimony-block-2 { transition-delay: 0.3s; }
.testimony-block-3 { transition-delay: 0.5s; }

.proceeding-item-1 { transition-delay: 0.1s; }
.proceeding-item-2 { transition-delay: 0.25s; }
.proceeding-item-3 { transition-delay: 0.4s; }
.proceeding-item-4 { transition-delay: 0.55s; }
