/* ============================================================
   causality.club - Styles
   Dark-academia meets legal-authoritative
   ============================================================ */

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

:root {
    --primary-dark: #1a1510;
    --secondary-dark: #151a1a;
    --gold-divider: #c5a55a;
    --amber-light: #d4a843;
    --surface: #2a2218;
    --text: #e8dcc8;
    --citation: #8b7d6b;
    --thesis-green: #4a6741;
    --antithesis-red: #6b3a3a;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Crimson Text', Georgia, serif;
    background: var(--primary-dark);
    color: var(--text);
    line-height: 1.8;
    font-size: 1rem;
    font-weight: 400;
    overflow-x: hidden;
}

/* --- Typography --- */
h1, h2, h3 {
    font-family: 'Playfair Display', 'Georgia', serif;
    font-weight: 700;
}

.citation-list,
.argument-label,
details summary,
.footer-meta {
    font-family: 'Source Sans 3', 'Helvetica Neue', sans-serif;
    font-weight: 400;
}

/* ============================================================
   HERO / THE FORUM
   ============================================================ */
#hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    overflow: hidden;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1px 1fr;
    height: 100%;
    width: 100%;
}

.hero-left {
    background: var(--primary-dark);
}

.hero-divider {
    background: var(--gold-divider);
}

.hero-right {
    background: var(--secondary-dark);
}

.hero-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 2;
    pointer-events: none;
}

.hero-title {
    font-size: clamp(2.2rem, 6vw, 4.5rem);
    color: var(--text);
    letter-spacing: 0.04em;
    margin-bottom: 0.4em;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
}

.hero-subtitle {
    font-family: 'Crimson Text', Georgia, serif;
    font-style: italic;
    font-size: clamp(1rem, 2.5vw, 1.4rem);
    color: var(--gold-divider);
    letter-spacing: 0.08em;
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll-bob 2s ease-in-out infinite;
    opacity: 0.7;
    z-index: 2;
}

@keyframes scroll-bob {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(8px); }
}

/* ============================================================
   DEBATE SECTIONS
   ============================================================ */
.debate-section {
    padding: 4rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.debate-header {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.debate-header::after {
    content: '';
    display: block;
    width: 80px;
    height: 1px;
    background: var(--gold-divider);
    margin: 1.2rem auto 0;
}

.debate-topic {
    font-size: clamp(1.8rem, 4vw, 3rem);
    color: var(--text);
    line-height: 1.3;
}

/* --- Debate Grid (Split Screen) --- */
.debate-grid {
    display: grid;
    grid-template-columns: 1fr 1px 1fr;
    gap: 0;
    margin-bottom: 2rem;
}

.debate-divider {
    background: var(--gold-divider);
    width: 1px;
    min-height: 100%;
}

/* --- Argument Columns --- */
.argument-column {
    padding: 2rem 2.5rem;
    position: relative;
}

.thesis-column {
    background: var(--primary-dark);
    border-left: 3px solid var(--thesis-green);
}

.antithesis-column {
    background: var(--secondary-dark);
    border-right: 3px solid var(--antithesis-red);
}

.argument-label {
    font-size: 0.7rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    margin-bottom: 1rem;
    font-weight: 600;
}

.thesis-column .argument-label {
    color: var(--thesis-green);
}

.antithesis-column .argument-label {
    color: var(--antithesis-red);
}

.argument-heading {
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    color: var(--amber-light);
    margin-bottom: 1.2rem;
    line-height: 1.4;
}

.argument-text {
    margin-bottom: 1rem;
    color: var(--text);
    font-size: 1rem;
    line-height: 1.8;
}

.argument-text.emphasis {
    font-style: italic;
    font-weight: 600;
    color: var(--amber-light);
    border-left: 2px solid var(--gold-divider);
    padding-left: 1.2rem;
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
}

/* --- Footnotes --- */
.footnote {
    position: relative;
    display: inline;
    cursor: pointer;
    color: var(--gold-divider);
    font-family: 'Source Sans 3', sans-serif;
    font-size: 0.75rem;
    vertical-align: super;
    line-height: 0;
    margin-left: 1px;
    font-weight: 600;
}

.footnote::after {
    content: attr(data-citation);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--surface);
    color: var(--text);
    font-family: 'Source Sans 3', sans-serif;
    font-size: 0.8rem;
    font-style: normal;
    font-weight: 400;
    line-height: 1.5;
    padding: 0.8rem 1rem;
    border: 1px solid var(--gold-divider);
    border-radius: 2px;
    width: 280px;
    white-space: normal;
    visibility: hidden;
    opacity: 0;
    transition: visibility 200ms, opacity 200ms ease;
    z-index: 10;
    pointer-events: none;
    margin-bottom: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.footnote:hover::after {
    visibility: visible;
    opacity: 1;
}

/* --- Evidence Drawer --- */
.evidence-drawer {
    margin-top: 2rem;
    border-top: 1px solid var(--gold-divider);
}

.evidence-drawer summary {
    padding: 0.8rem 0;
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--gold-divider);
    letter-spacing: 0.06em;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.evidence-drawer summary::before {
    content: '\25B6';
    font-size: 0.6rem;
    transition: transform 300ms ease;
    display: inline-block;
}

.evidence-drawer[open] summary::before {
    transform: rotate(90deg);
}

.evidence-drawer summary::-webkit-details-marker {
    display: none;
}

.evidence-content {
    padding: 0.5rem 0 1rem;
    animation: fadeIn 400ms ease;
}

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

.citation-list {
    list-style: none;
    padding: 0;
}

.citation-item {
    font-size: 0.8rem;
    color: var(--citation);
    line-height: 1.6;
    padding: 0.4rem 0;
    border-bottom: 1px solid rgba(197, 165, 90, 0.15);
}

.citation-item:last-child {
    border-bottom: none;
}

.citation-item em {
    font-style: italic;
}

/* ============================================================
   SYNTHESIS
   ============================================================ */
.synthesis-section {
    text-align: center;
    padding: 3rem 2rem;
    background: var(--surface);
    border: 1px solid rgba(197, 165, 90, 0.2);
    border-radius: 2px;
    margin-bottom: 2rem;
    position: relative;
}

.gavel-icon {
    margin-bottom: 1rem;
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 500ms ease, transform 500ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

.synthesis-heading {
    font-size: 1.3rem;
    color: var(--gold-divider);
    margin-bottom: 1rem;
    letter-spacing: 0.06em;
}

.synthesis-text {
    max-width: 700px;
    margin: 0 auto;
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text);
}

/* ============================================================
   TALLY BAR
   ============================================================ */
.tally-bar {
    display: flex;
    height: 6px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.tally-thesis {
    background: var(--thesis-green);
    height: 100%;
    transition: width 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border-radius: 3px 0 0 3px;
}

.tally-antithesis {
    background: var(--antithesis-red);
    height: 100%;
    transition: width 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    margin-left: auto;
    border-radius: 0 3px 3px 0;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--secondary-dark);
}

.footer-divider {
    width: 60px;
    height: 1px;
    background: var(--gold-divider);
    margin: 0 auto 2rem;
}

.footer-text {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.1rem;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.footer-meta {
    font-size: 0.85rem;
    color: var(--citation);
    letter-spacing: 0.04em;
}

/* ============================================================
   RESPONSIVE (Mobile < 768px)
   ============================================================ */
@media (max-width: 768px) {
    .debate-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .debate-divider {
        width: 100%;
        height: 1px;
        min-height: 1px;
    }

    .argument-column {
        padding: 1.5rem 1.2rem;
    }

    .thesis-column {
        border-left: 3px solid var(--thesis-green);
        border-bottom: none;
    }

    .antithesis-column {
        border-right: 3px solid var(--antithesis-red);
        border-top: none;
    }

    .hero-title {
        font-size: clamp(1.8rem, 8vw, 3rem);
    }

    .debate-section {
        padding: 3rem 1rem;
    }

    .synthesis-section {
        padding: 2rem 1.2rem;
    }

    .footnote::after {
        left: 0;
        transform: translateX(-20%);
        width: 220px;
    }

    .argument-text.emphasis {
        padding-left: 0.8rem;
    }
}

/* ============================================================
   SCROLLBAR STYLING
   ============================================================ */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--primary-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--surface);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--citation);
}
