/* ============================================================
   causality.club v2 — Adversarial Debate Split-Screen
   ============================================================ */

/* --- Palette --- */
:root {
    --prosecution-midnight: #0b1426;
    --defense-burgundy: #2a0a1a;
    --verdict-gold: #d4a849;
    --parchment-white: #f0ece4;
    --steel-witness: #7a8b9a;
    --objection-red: #c4314b;
    --sustained-green: #2d8a5e;
    --gavel-black: #0a0a0e;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background: var(--gavel-black);
    color: var(--parchment-white);
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 300;
    font-size: clamp(14px, 1.4vw, 18px);
    line-height: 1.65;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* --- Typography --- */
h2 {
    font-family: 'Libre Baskerville', serif;
    font-weight: 700;
    font-size: clamp(24px, 5vw, 72px);
    letter-spacing: 0.02em;
    line-height: 1.25;
    color: var(--parchment-white);
}

.argument-heading-rebuttal {
    font-weight: 400;
    font-style: italic;
}

.section-label {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
    font-size: 12px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--steel-witness);
    display: block;
    margin-bottom: 16px;
}

/* --- Navigation --- */
#main-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 32px;
    background: linear-gradient(180deg, rgba(10, 10, 14, 0.9) 0%, rgba(10, 10, 14, 0) 100%);
    pointer-events: none;
}

.nav-link {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
    font-size: 12px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--parchment-white);
    pointer-events: all;
    position: relative;
    padding-bottom: 4px;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    right: 50%;
    height: 1px;
    background: var(--verdict-gold);
    transition: left 300ms ease, right 300ms ease;
}

.nav-link:hover::after {
    left: 0;
    right: 0;
}

.nav-for {
    color: var(--parchment-white);
}

.nav-against {
    color: var(--parchment-white);
}

.nav-verdict {
    color: var(--verdict-gold);
}

/* --- The Fault Line --- */
#fault-line {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 100vh;
    background: var(--verdict-gold);
    z-index: 500;
    box-shadow: 0 0 12px rgba(212, 168, 73, 0.2);
    animation: faultline-breathe 4s ease-in-out infinite;
    pointer-events: none;
}

@keyframes faultline-breathe {
    0%, 100% { width: 2px; box-shadow: 0 0 12px rgba(212, 168, 73, 0.2); }
    50% { width: 3px; box-shadow: 0 0 18px rgba(212, 168, 73, 0.35); }
}

#fault-line.flare {
    animation: faultline-flare 0.3s ease-out;
}

@keyframes faultline-flare {
    0% { width: 2px; box-shadow: 0 0 12px rgba(212, 168, 73, 0.2); }
    50% { width: 5px; box-shadow: 0 0 30px rgba(212, 168, 73, 0.6); }
    100% { width: 2px; box-shadow: 0 0 12px rgba(212, 168, 73, 0.2); }
}

/* --- Full Viewport Sections --- */
.full-viewport {
    min-height: 100vh;
    position: relative;
    display: flex;
    overflow: hidden;
}

/* --- Hero Section --- */
#hero {
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-left {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 4px;
}

.hero-right {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding-left: 0;
}

.hero-title-part {
    font-family: 'Libre Baskerville', serif;
    font-weight: 700;
    font-size: clamp(32px, 7vw, 96px);
    letter-spacing: 0.02em;
    line-height: 1;
    color: var(--parchment-white);
}

.hero-title-club {
    color: var(--verdict-gold);
}

.hero-provocation {
    position: absolute;
    bottom: 15vh;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
    font-size: 12px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--steel-witness);
    text-align: center;
    white-space: nowrap;
}

/* --- Split Screen Common --- */
.split-left,
.split-right {
    width: 50%;
    min-height: 100%;
    padding: 80px 48px;
}

.split-left {
    background: var(--prosecution-midnight);
    padding-right: 36px;
}

.split-right {
    background: var(--defense-burgundy);
    padding-left: 36px;
}

/* --- Argument Sections --- */
.argument-section {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    min-height: 80vh;
}

.argument-section .split-left,
.argument-section .split-right {
    padding-top: 100px;
    padding-bottom: 100px;
}

.argument-heading {
    font-size: clamp(22px, 3.5vw, 52px);
    margin-bottom: 24px;
}

.argument-body {
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 300;
    color: var(--parchment-white);
    opacity: 0.9;
    max-width: 520px;
    margin-bottom: 32px;
}

.split-right .argument-body,
.split-right .argument-heading {
    margin-left: auto;
    text-align: left;
}

/* --- Slide Reveal Animations --- */
.slide-from-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 600ms cubic-bezier(0.16, 1, 0.3, 1),
                transform 600ms cubic-bezier(0.16, 1, 0.3, 1);
}

.slide-from-right {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 600ms cubic-bezier(0.16, 1, 0.3, 1),
                transform 600ms cubic-bezier(0.16, 1, 0.3, 1);
}

.slide-from-left.revealed,
.slide-from-right.revealed {
    opacity: 1;
    transform: translateX(0);
}

/* --- Blur Focus on Previous Section --- */
.argument-section.blurred .split-left,
.argument-section.blurred .split-right {
    filter: blur(3px);
    transition: filter 500ms ease;
}

.argument-section .split-left,
.argument-section .split-right {
    transition: filter 500ms ease;
}

/* --- Evidence Blocks (Broken-Grid Tilt) --- */
.evidence-block {
    position: relative;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(212, 168, 73, 0.15);
    padding: 20px 24px;
    margin-top: 24px;
    max-width: 520px;
    cursor: pointer;
    overflow: hidden;
}

.split-left .evidence-block {
    transform: rotate(-2deg);
}

.split-right .evidence-block {
    transform: rotate(2deg);
}

.exhibit-tag {
    position: absolute;
    top: -1px;
    right: -1px;
    width: 40px;
    height: 20px;
    border: 1px solid var(--verdict-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px;
    font-weight: 400;
    color: var(--verdict-gold);
    letter-spacing: 0.05em;
    background: rgba(10, 10, 14, 0.8);
    transition: transform 200ms ease;
}

.evidence-block:hover .exhibit-tag {
    transform: rotate(3deg);
}

.evidence-summary {
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 300;
    font-size: clamp(13px, 1.2vw, 16px);
    color: var(--steel-witness);
    line-height: 1.5;
}

.evidence-full {
    max-height: 0;
    overflow: hidden;
    transition: max-height 400ms ease;
}

.evidence-block.expanded .evidence-full {
    max-height: 400px;
}

.evidence-full p {
    padding-top: 16px;
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 300;
    font-size: clamp(13px, 1.2vw, 16px);
    color: var(--parchment-white);
    opacity: 0.8;
    line-height: 1.65;
}

/* --- Cause-Effect Arrows --- */
.cause-effect-arrow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60%;
    max-width: 500px;
    height: auto;
    pointer-events: none;
    z-index: 10;
    opacity: 0;
    transition: opacity 600ms ease;
}

.cause-effect-arrow.visible {
    opacity: 1;
}

.arrow-path {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    transition: stroke-dashoffset 1200ms ease;
}

.cause-effect-arrow.visible .arrow-path {
    stroke-dashoffset: 0;
}

/* --- Gavel Strike Dividers --- */
.gavel-divider {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 0;
    background: var(--gavel-black);
}

.gavel-svg {
    width: 100px;
    height: 30px;
    overflow: visible;
}

.gavel-head {
    transform-origin: 100px 28px;
    transition: transform 400ms cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

.gavel-divider.struck .gavel-head {
    transform: translateY(6px) rotate(-8deg);
}

.gavel-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 0;
    height: 0;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(212, 168, 73, 0.1) 0%, transparent 70%);
    opacity: 0;
    pointer-events: none;
}

.gavel-divider.struck .gavel-pulse {
    animation: gavel-radial-pulse 600ms ease-out forwards;
}

@keyframes gavel-radial-pulse {
    0% {
        width: 0;
        height: 0;
        opacity: 1;
    }
    100% {
        width: 300px;
        height: 300px;
        opacity: 0;
    }
}

/* --- Verdict Zone --- */
.verdict-zone {
    background: var(--gavel-black);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    min-height: 100vh;
    overflow: hidden;
}

.verdict-panel {
    position: absolute;
    top: 0;
    bottom: 0;
    z-index: 1;
}

.verdict-panel-left {
    left: 0;
    right: 50%;
    background: var(--prosecution-midnight);
    clip-path: inset(0 50% 0 0);
    transition: clip-path 800ms cubic-bezier(0.16, 1, 0.3, 1);
}

.verdict-panel-right {
    left: 50%;
    right: 0;
    background: var(--defense-burgundy);
    clip-path: inset(0 0 0 50%);
    transition: clip-path 800ms cubic-bezier(0.16, 1, 0.3, 1) 200ms;
}

.verdict-zone.merged .verdict-panel-left {
    clip-path: inset(0 0 0 0);
}

.verdict-zone.merged .verdict-panel-right {
    clip-path: inset(0 0 0 0);
}

.verdict-content {
    position: relative;
    z-index: 10;
    max-width: 680px;
    padding: 60px 32px;
    text-align: center;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 800ms ease 600ms, transform 800ms ease 600ms;
}

.verdict-zone.merged .verdict-content {
    opacity: 1;
    transform: translateY(0);
}

.verdict-label {
    color: var(--verdict-gold);
    font-size: 14px;
    letter-spacing: 0.2em;
    margin-bottom: 32px;
}

.verdict-heading {
    color: var(--verdict-gold);
    font-size: clamp(26px, 4vw, 60px);
    margin-bottom: 32px;
    line-height: 1.2;
}

.verdict-body {
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 300;
    color: var(--parchment-white);
    opacity: 0.85;
    line-height: 1.75;
    margin-bottom: 48px;
}

.verdict-sigil {
    margin: 0 auto 32px;
    width: 60px;
    height: 60px;
    opacity: 0.6;
}

.verdict-coda {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
    font-size: 12px;
    letter-spacing: 0.15em;
    color: var(--steel-witness);
    text-transform: uppercase;
}

/* --- Mobile Responsive --- */
@media (max-width: 767px) {
    .full-viewport {
        flex-direction: column;
    }

    .split-left,
    .split-right {
        width: 100%;
        padding: 60px 24px;
    }

    #hero {
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

    .hero-left {
        justify-content: center;
        padding-right: 0;
        padding-bottom: 0;
    }

    .hero-right {
        justify-content: center;
        padding-left: 0;
        padding-top: 0;
    }

    .hero-provocation {
        white-space: normal;
        padding: 0 24px;
        font-size: 11px;
    }

    .argument-section {
        flex-direction: column;
    }

    .argument-section .split-left,
    .argument-section .split-right {
        padding-top: 60px;
        padding-bottom: 60px;
    }

    #fault-line {
        display: none;
    }

    /* Mobile fault line replacement between stacked blocks */
    .argument-section .split-right::before {
        content: '';
        display: block;
        width: 60%;
        height: 2px;
        background: var(--verdict-gold);
        box-shadow: 0 0 12px rgba(212, 168, 73, 0.2);
        margin: 0 auto 40px;
    }

    .split-left .evidence-block {
        transform: rotate(-1deg);
    }

    .split-right .evidence-block {
        transform: rotate(1deg);
    }

    .cause-effect-arrow {
        display: none;
    }

    .verdict-content {
        padding: 40px 20px;
    }

    #main-nav {
        padding: 12px 16px;
    }

    .nav-link {
        font-size: 10px;
    }
}

/* --- Selection color --- */
::selection {
    background: rgba(212, 168, 73, 0.3);
    color: var(--parchment-white);
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--gavel-black);
}

::-webkit-scrollbar-thumb {
    background: rgba(212, 168, 73, 0.3);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(212, 168, 73, 0.5);
}
