/* judge.club — Gold-Black Luxury Cinematic */

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

:root {
    --bg-primary: #0d0b04;
    --bg-card: #1a1508;
    --accent-primary: #c4a45e;
    --accent-secondary: #8b7340;
    --accent-highlight: #e8d5a3;
    --text-primary: #d9ccb0;
    --text-secondary: #9c8e76;
    --border: #3d3424;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'EB Garamond', serif;
    font-size: clamp(1rem, 1.1vw + 0.6rem, 1.2rem);
    font-weight: 400;
    line-height: 1.72;
    letter-spacing: 0.01em;
    overflow-x: hidden;
}

/* Film Grain */
.film-grain {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 150 150' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='150' height='150' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
    background-size: 150px 150px;
    will-change: background-position;
    animation: grain 0.8s steps(6) infinite;
}

@keyframes grain {
    0% { background-position: 0 0; }
    16% { background-position: -20px -30px; }
    33% { background-position: 40px -10px; }
    50% { background-position: -10px 40px; }
    66% { background-position: 30px 20px; }
    83% { background-position: -30px -20px; }
    100% { background-position: 0 0; }
}

/* Navigation */
.nav-gavel {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 1000;
    background: none;
    border: none;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s;
}
.nav-gavel:hover { opacity: 1; }

.nav-overlay {
    position: fixed;
    inset: 0;
    z-index: 999;
    background: #0d0b04ee;
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s;
}
.nav-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.nav-links {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    text-align: center;
}
.nav-link {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(1.5rem, 4vw, 3rem);
    font-weight: 700;
    color: var(--accent-primary);
    text-decoration: none;
    letter-spacing: 0.04em;
    transition: color 0.3s;
}
.nav-link:hover { color: var(--accent-highlight); }

/* Reels */
.reel {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: clamp(2rem, 5vw, 6rem);
}

/* REEL I — THE CHAMBER */
.reel-chamber {
    flex-direction: column;
}

.ripple-container {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}
.ripple-svg {
    width: 90vmin;
    height: 90vmin;
}
.ripple-ring {
    stroke: #c4a45e;
    stroke-width: 0.5;
    fill: none;
    opacity: 0.15;
    transform-origin: center;
    animation: rippleExpand 12s ease-out infinite;
}

@keyframes rippleExpand {
    0% { transform: scale(0.8); opacity: 0.15; }
    100% { transform: scale(1.4); opacity: 0; }
}

.chamber-content {
    position: relative;
    z-index: 1;
    text-align: center;
}
.chamber-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(4rem, 10vw, 9rem);
    font-weight: 700;
    color: var(--accent-highlight);
    line-height: 1.05;
    letter-spacing: 0.02em;
}
.chamber-subtitle {
    font-family: 'EB Garamond', serif;
    font-size: 1.1rem;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    color: var(--accent-primary);
    margin-top: 1.5rem;
    opacity: 0;
    animation: fadeIn 1s ease forwards 1.5s;
}

@keyframes fadeIn {
    to { opacity: 1; }
}

.oak-leaf {
    position: absolute;
    right: 5vw;
    top: 20vh;
    width: 40px;
    height: 80px;
    opacity: 0.4;
    animation: leafDrift 20s ease-in-out infinite;
}
@keyframes leafDrift {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(30vh) rotate(5deg); }
}

/* Section Dividers */
.section-divider {
    display: flex;
    justify-content: center;
    padding: 2rem 0;
    opacity: 0.25;
}

/* REEL II — THE EVIDENCE */
.reel-evidence {
    align-items: flex-start;
    padding-top: 8vh;
    padding-bottom: 8vh;
}

.evidence-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: clamp(16px, 2vw, 32px);
    width: 100%;
    max-width: 1200px;
}

.evidence-card {
    position: relative;
    background: linear-gradient(165deg, #1a1508 0%, #0d0b04 100%);
    border: 1px solid var(--border);
    padding: 2.5rem 2rem;
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.6s, box-shadow 0.6s;
    opacity: 0;
}
.evidence-card.visible {
    animation: bounceIn 0.6s ease forwards;
}
.evidence-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent-primary);
    box-shadow: inset 0 0 30px rgba(196, 164, 94, 0.08);
}
.evidence-card:hover .guilloche { opacity: 0.08; }

.card-span-2 { grid-row: span 2; }
.card-span-col { grid-column: span 2; }

.guilloche {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0.03;
    transition: opacity 0.6s;
    pointer-events: none;
}

.card-label {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--accent-secondary);
}
.card-numeral {
    display: block;
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(2.2rem, 6vw, 5.5rem);
    font-weight: 700;
    color: var(--accent-primary);
    line-height: 1.05;
    letter-spacing: 0.02em;
    margin: 0.5rem 0;
}
.card-text {
    color: var(--text-primary);
    margin: 1rem 0;
}
.card-date {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--text-secondary);
}

/* Bounce-Enter Animation */
@keyframes bounceIn {
    0% { opacity: 0; transform: translateY(40px) scale(0.95); }
    50% { opacity: 0.8; transform: translateY(-8px) scale(1.02); }
    70% { transform: translateY(3px) scale(0.99); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* REEL III — THE DELIBERATION */
.reel-deliberation {
    flex-direction: column;
}

.balance-scale {
    position: absolute;
    width: 40vw;
    opacity: 0.04;
    pointer-events: none;
}
.scale-beam {
    transform-origin: center;
    animation: tilt 8s ease-in-out infinite;
}
@keyframes tilt {
    0%, 100% { transform: rotate(-2deg); }
    50% { transform: rotate(2deg); }
}

.deliberation-quote {
    position: relative;
    z-index: 1;
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    font-style: italic;
    font-weight: 400;
    color: var(--text-primary);
    text-align: center;
    max-width: 800px;
    line-height: 1.5;
    border: none;
}
.deliberation-quote .word {
    opacity: 0;
    transition: opacity 0.4s ease;
    display: inline-block;
    margin-right: 0.3em;
}
.deliberation-quote .word.revealed { opacity: 1; }

/* REEL IV — THE VERDICT */
.reel-verdict {
    flex-direction: column;
    gap: 2rem;
}

.verdict-word {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(5rem, 15vw, 12rem);
    font-weight: 300;
    letter-spacing: 0.08em;
    color: var(--border);
    transition: color 3s ease;
    text-align: center;
}
.verdict-word.active { color: var(--accent-primary); }

.verdict-line {
    height: 1px;
    background: var(--accent-primary);
    width: 0;
    transition: width 2s ease 0.5s;
}
.verdict-line.active { width: 60vw; }

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation: none !important;
        transition: none !important;
    }
    .film-grain { display: none; }
    .chamber-subtitle { opacity: 1; }
    .evidence-card { opacity: 1; }
    .deliberation-quote .word { opacity: 1; }
    .verdict-word { color: var(--accent-primary); }
    .verdict-line { width: 60vw; }
}

@media (max-width: 600px) {
    .card-span-col { grid-column: span 1; }
}
