/* ============================================
   JUDGE.QUEST - GOBLINCORE TRIBUNAL
   ============================================ */

:root {
    --deep-loam: #1A1710;
    --abyss: #0D0B08;
    --tarnished-bronze: #6B5B3E;
    --weathered-stone: #A89B85;
    --moth-wing: #C4B599;
    --topsoil: #3D3425;
    --amber-neon: #D4A34E;
    --fungal-cyan: #7AFFCB;
    --spore-pink: #C47A8F;

    --scroll-progress: 0;

    scroll-behavior: smooth;
}

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

html, body {
    width: 100%;
    height: 100%;
    overflow-x: hidden;
}

body {
    background: var(--abyss);
    color: var(--weathered-stone);
    font-family: 'Source Sans 3', sans-serif;
    font-size: 18px;
    line-height: 1.65;
    position: relative;
}

/* ============================================
   DEPTH GAUGE (LEFT EDGE)
   ============================================ */

.depth-gauge {
    position: fixed;
    left: 0;
    top: 0;
    width: 3px;
    height: 100vh;
    background: var(--abyss);
    z-index: 100;
    border-right: 1px solid var(--tarnished-bronze);
}

.depth-fill {
    position: absolute;
    left: 0;
    top: 0;
    width: 2px;
    height: 0%;
    background: var(--amber-neon);
    z-index: 101;
    transition: height 0.1s ease-out;
}

.depth-nodes {
    position: absolute;
    left: -6px;
    top: 0;
    width: 12px;
    height: 100%;
    opacity: 0.6;
}

/* ============================================
   ZONES - BASE STRUCTURE
   ============================================ */

.zone {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.zone-surface {
    min-height: 100vh;
    background: linear-gradient(to bottom, #5A4A38, #3D3425, #2A2420);
    display: flex;
    align-items: center;
    justify-content: center;
}

.zone-roots {
    min-height: 150vh;
    background: linear-gradient(to bottom, #3D3425, #2A2420, #1A1710);
    position: relative;
    padding: 0 30px;
}

.zone-grotto {
    min-height: 200vh;
    background: var(--deep-loam);
    padding: 100px 40px;
    position: relative;
}

.zone-verdict {
    min-height: 100vh;
    background: var(--abyss);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.zone-deep {
    min-height: 50vh;
    background: var(--abyss);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 40px;
}

/* ============================================
   ZONE 1: THE SURFACE
   ============================================ */

.surface-content {
    text-align: center;
    z-index: 2;
}

.domain-title {
    font-family: 'Fraunces', serif;
    font-size: clamp(64px, 12vw, 120px);
    font-weight: 900;
    color: var(--amber-neon);
    text-shadow:
        0 0 10px rgba(212, 163, 78, 0.6),
        0 0 30px rgba(212, 163, 78, 0.3),
        0 0 60px rgba(212, 163, 78, 0.15),
        0 0 100px rgba(212, 163, 78, 0.05);
    letter-spacing: -0.03em;
    line-height: 0.9;
    margin-bottom: 60px;
    font-variation-settings: "SOFT" 100;
}

.scroll-indicator {
    margin-top: 80px;
    animation: float 3s ease-in-out infinite;
}

.scroll-indicator svg {
    width: 24px;
    height: 40px;
    margin: 0 auto;
    display: block;
    opacity: 0.8;
}

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

/* ============================================
   ZONE 2: THE ROOT NETWORK
   ============================================ */

.root-tendrils {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.tendril-svg {
    position: absolute;
    height: 100%;
    opacity: 0.8;
}

.tendril-left-1 {
    left: 0;
    top: 0;
    width: 25%;
}

.tendril-left-2 {
    left: 2%;
    top: 5%;
    width: 20%;
}

.tendril-right-1 {
    right: 0;
    top: 0;
    width: 25%;
}

.tendril-right-2 {
    right: 2%;
    top: 5%;
    width: 20%;
}

.root-text-fragments {
    position: relative;
    z-index: 2;
    max-width: 600px;
    margin: 100px auto;
    padding: 40px;
}

.fragment {
    font-family: 'Fraunces', serif;
    font-weight: 300;
    font-style: italic;
    font-size: 16px;
    color: var(--fungal-cyan);
    opacity: 0.6;
    line-height: 1.8;
    margin: 40px 0;
    animation: fadeInFragments 1.2s ease-out forwards;
    font-variation-settings: "SOFT" 100;
}

.fragment-1 { animation-delay: 0.2s; }
.fragment-2 { animation-delay: 0.4s; }
.fragment-3 { animation-delay: 0.6s; }
.fragment-4 { animation-delay: 0.8s; }
.fragment-5 { animation-delay: 1.0s; }

@keyframes fadeInFragments {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 0.6;
        transform: translateY(0);
    }
}

/* ============================================
   ZONE 3: THE GROTTO TRIBUNAL
   ============================================ */

.grotto-title {
    font-family: 'Fraunces', serif;
    font-size: clamp(36px, 6vw, 72px);
    font-weight: 900;
    color: var(--amber-neon);
    text-shadow:
        0 0 10px rgba(212, 163, 78, 0.6),
        0 0 30px rgba(212, 163, 78, 0.3),
        0 0 60px rgba(212, 163, 78, 0.15);
    text-align: center;
    margin-bottom: 100px;
    font-variation-settings: "SOFT" 100;
}

.specimen-cards {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    min-height: 900px;
}

.specimen {
    position: absolute;
    width: 300px;
    padding: 30px;
    background: var(--topsoil);
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' result='noise'/%3E%3C/filter%3E%3Crect width='100' height='100' fill='%233D3425' filter='url(%23noise)' opacity='0.08'/%3E%3C/svg%3E");
    border: 1px solid var(--tarnished-bronze);
    box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.5);
    clip-path: polygon(
        5% 0%, 95% 2%, 100% 8%, 98% 15%, 100% 25%, 97% 35%,
        100% 45%, 96% 55%, 100% 65%, 95% 75%, 98% 85%, 92% 93%,
        88% 98%, 78% 100%, 68% 99%, 58% 100%, 48% 98%, 38% 100%,
        28% 99%, 18% 100%, 8% 98%, 2% 95%, 0% 85%, 3% 75%,
        0% 65%, 4% 55%, 0% 45%, 3% 35%, 0% 25%, 2% 15%,
        0% 8%, 3% 2%
    );
    left: var(--card-x);
    top: var(--card-y);
    opacity: 0;
    transform: translateY(40px) scale(0.97);
    animation: cardReveal 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.specimen:nth-child(1) { animation-delay: 0s; }
.specimen:nth-child(2) { animation-delay: 0.15s; }
.specimen:nth-child(3) { animation-delay: 0.3s; }
.specimen:nth-child(4) { animation-delay: 0.45s; }
.specimen:nth-child(5) { animation-delay: 0.6s; }

@keyframes cardReveal {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.specimen h3 {
    font-family: 'Libre Franklin', sans-serif;
    font-size: 24px;
    font-weight: 600;
    color: var(--moth-wing);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 15px;
    line-height: 1.2;
}

.specimen p {
    font-family: 'Source Sans 3', sans-serif;
    font-size: 15px;
    line-height: 1.65;
    color: var(--weathered-stone);
    max-width: 65ch;
}

/* ============================================
   ZONE 4: THE VERDICT CHAMBER
   ============================================ */

.verdict-glow {
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle at 50% 50%, rgba(212, 163, 78, 0.25) 0%, transparent 60%);
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    animation: verdict-pulse 6s ease-in-out infinite;
    pointer-events: none;
}

@keyframes verdict-pulse {
    0%, 100% { transform: translate(-50%, -50%) scale(0.8); }
    50% { transform: translate(-50%, -50%) scale(1.2); }
}

.verdict-text {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
}

.verdict-text h2 {
    font-family: 'Fraunces', serif;
    font-size: clamp(48px, 8vw, 96px);
    font-weight: 900;
    color: var(--amber-neon);
    text-shadow:
        0 0 10px rgba(212, 163, 78, 0.6),
        0 0 30px rgba(212, 163, 78, 0.3),
        0 0 60px rgba(212, 163, 78, 0.15),
        0 0 100px rgba(212, 163, 78, 0.05);
    line-height: 1;
    margin-bottom: 40px;
    font-variation-settings: "SOFT" 100;
}

.verdict-text p {
    font-family: 'Source Sans 3', sans-serif;
    font-size: 20px;
    color: var(--weathered-stone);
    line-height: 1.65;
}

/* ============================================
   ZONE 5: THE DEEP EARTH
   ============================================ */

.coda-text {
    text-align: center;
    z-index: 2;
    max-width: 500px;
}

.coda-text p {
    font-family: 'Fraunces', serif;
    font-size: 14px;
    font-weight: 300;
    font-style: italic;
    color: var(--fungal-cyan);
    opacity: 0.4;
    margin: 20px 0;
    line-height: 1.8;
    font-variation-settings: "SOFT" 100;
}

.final-root {
    position: absolute;
    bottom: -50px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 200px;
    opacity: 0.4;
    z-index: 1;
}

/* ============================================
   PARTICLE SYSTEM (CURSOR-FOLLOW SPORES)
   ============================================ */

.particles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 50;
}

.spore {
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    background: radial-gradient(circle at 30% 30%, var(--color), transparent 70%);
    box-shadow: 0 0 10px var(--color);
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */

@media (max-width: 768px) {
    .specimen-cards {
        min-height: 1200px;
    }

    .specimen {
        width: 250px;
        font-size: 14px;
    }

    .specimen h3 {
        font-size: 18px;
    }

    .domain-title {
        font-size: clamp(48px, 10vw, 72px);
        margin-bottom: 40px;
    }

    .grotto-title {
        font-size: clamp(28px, 5vw, 48px);
        margin-bottom: 60px;
    }

    .verdict-text h2 {
        font-size: clamp(32px, 6vw, 64px);
    }

    .verdict-text p {
        font-size: 16px;
    }

    .root-text-fragments {
        margin: 60px auto;
        padding: 20px;
    }

    .fragment {
        font-size: 14px;
        margin: 20px 0;
    }

    .tendril-left-1, .tendril-left-2, .tendril-right-1, .tendril-right-2 {
        opacity: 0.5;
    }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url("data:image/svg+xml,%3Csvg width='100' height='100' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' result='noise'/%3E%3C/filter%3E%3Crect width='100' height='100' fill='%23000' filter='url(%23noise)' opacity='0.08'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 10;
    opacity: 0.08;
}
