/* ============================================
   double-standard.xyz
   A tribunal of contradictions
   ============================================ */

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

html {
    scroll-behavior: smooth;
}

body {
    background: #f2ede4;
    color: #1a1a1a;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* --- PALETTE VARIABLES --- */
:root {
    --bone-paper: #f2ede4;
    --cold-pulp: #e0ddd6;
    --tribunal-black: #1a1a1a;
    --dried-blood: #8b2500;
    --slate-notation: #6b6560;
    --parchment-edge: #d4c9b8;
    --extinguished: #3d3832;
    --divide-position: 55%;
}

/* --- TITLE SCREEN --- */
#title-screen {
    position: relative;
    width: 100vw;
    height: 100vh;
    background: var(--bone-paper);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

#divide-line-container {
    position: absolute;
    left: var(--divide-position);
    top: 0;
    width: 3px;
    height: 100%;
    transform: translateX(-50%);
    z-index: 2;
}

#divide-line-svg {
    width: 100%;
    height: 100%;
}

#divide-draw {
    stroke: var(--tribunal-black);
    stroke-width: 2;
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
}

#title-left {
    position: absolute;
    right: calc(100% - var(--divide-position) + 40px);
    top: 50%;
    transform: translateY(-50%);
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 8vw;
    letter-spacing: 0.08em;
    color: var(--tribunal-black);
    text-align: right;
    opacity: 0;
    transition: opacity 800ms ease-out;
    z-index: 3;
}

#title-right {
    position: absolute;
    left: calc(var(--divide-position) + 40px);
    top: 50%;
    transform: translateY(-50%);
    font-family: 'Roboto Slab', serif;
    font-weight: 400;
    font-size: 4vw;
    letter-spacing: 0.02em;
    color: var(--dried-blood);
    opacity: 0;
    transition: opacity 800ms ease-out;
    z-index: 3;
}

#title-subtitle {
    position: absolute;
    left: var(--divide-position);
    top: calc(50% + 6vw);
    transform: translateX(-50%);
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 500;
    font-size: 12px;
    letter-spacing: 0.15em;
    color: var(--slate-notation);
    opacity: 0;
    transition: opacity 600ms ease-out;
    z-index: 3;
}

#scroll-chevron {
    position: absolute;
    bottom: 48px;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 600ms ease-out;
    z-index: 3;
}

#scroll-chevron.visible {
    animation: chevron-pulse 2s ease-in-out infinite;
}

@keyframes chevron-pulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

/* --- PROCEEDINGS --- */
.proceeding {
    position: relative;
    width: 100%;
    min-height: 100vh;
    overflow: hidden;
}

.proceeding-inner {
    position: relative;
    display: flex;
    width: 100%;
    min-height: calc(100vh - 60px);
}

/* --- THE DIVIDE (in proceedings) --- */
.proceeding::before {
    content: '';
    position: absolute;
    left: var(--divide-position);
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--tribunal-black);
    transform: translateX(-50%);
    z-index: 5;
    transition: width 0.3s ease;
}

/* --- ZONES --- */
.zone {
    position: relative;
    min-height: calc(100vh - 60px);
}

.zone-left {
    width: 55%;
    background: var(--bone-paper);
    padding: 80px 80px 80px 80px;
}

.zone-right {
    width: 45%;
    background: var(--cold-pulp);
    padding: 24px 24px 24px 36px;
}

/* --- LEFT ZONE CONTENT --- */
.zone-content-left {
    position: relative;
    max-width: 520px;
}

.heading-left {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: clamp(2rem, 4vw, 3.5rem);
    letter-spacing: 0.02em;
    line-height: 1.15;
    color: var(--tribunal-black);
    margin-bottom: 32px;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 400ms ease-out, transform 400ms ease-out;
}

.body-left {
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.7;
    color: var(--tribunal-black);
    margin-bottom: 20px;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 400ms ease-out, transform 400ms ease-out;
}

.emphasis-left {
    color: var(--dried-blood);
    font-weight: 500;
}

/* --- RIGHT ZONE CONTENT --- */
.zone-content-right {
    position: relative;
    margin-top: auto;
    padding-top: 40%;
}

.heading-right {
    font-family: 'Roboto Slab', serif;
    font-weight: 400;
    font-size: clamp(1rem, 2vw, 1.5rem);
    letter-spacing: -0.01em;
    line-height: 1.2;
    color: var(--tribunal-black);
    margin-bottom: 16px;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 400ms ease-out 200ms, transform 400ms ease-out 200ms;
}

.body-right {
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 400;
    font-size: 13px;
    line-height: 1.5;
    color: var(--tribunal-black);
    margin-bottom: 12px;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 400ms ease-out 200ms, transform 400ms ease-out 200ms;
}

/* --- REDACTION BARS --- */
.redacted {
    position: relative;
    display: inline;
}

.redacted::after {
    content: '';
    position: absolute;
    left: -2px;
    right: -2px;
    top: 0;
    bottom: 0;
    background: var(--tribunal-black);
    opacity: 0;
    transition: opacity 200ms ease-out;
    pointer-events: none;
}

.redacted.visible::after {
    opacity: 0.6;
}

/* --- CASE NUMBERS --- */
.case-number-left {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 500;
    font-size: 18px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--tribunal-black);
    margin-bottom: 48px;
    opacity: 0;
    transition: opacity 400ms ease-out;
}

.case-number-right {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 500;
    font-size: 11px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--slate-notation);
    text-align: right;
    margin-bottom: 16px;
    opacity: 0;
    transition: opacity 400ms ease-out 200ms;
}

/* --- STAMP MARKS (left zone only) --- */
.stamp {
    position: absolute;
    top: 80px;
    right: 80px;
    width: 100px;
    height: 72px;
    border: 1.5px solid var(--dried-blood);
    transform: rotate(-15deg);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 400ms ease-out;
    z-index: 4;
}

.stamp-inner {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 500;
    font-size: 9px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--dried-blood);
    text-align: center;
    line-height: 1.6;
}

/* --- MARGIN SPINE --- */
.margin-spine {
    position: absolute;
    left: var(--divide-position);
    top: 0;
    bottom: 0;
    width: 20px;
    transform: translateX(-50%);
    z-index: 6;
    overflow: hidden;
    pointer-events: none;
}

.spine-text {
    position: absolute;
    top: 50%;
    left: 50%;
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 500;
    font-size: 8px;
    letter-spacing: 0.1em;
    color: var(--slate-notation);
    white-space: nowrap;
    transform: translate(-50%, -50%) rotate(90deg);
    transform-origin: center center;
}

/* --- FOLD MARKS (right zone only) --- */
.fold-marks {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.fold-mark {
    position: absolute;
    left: 0;
    right: 0;
    height: 0;
    border-top: 1px dashed var(--parchment-edge);
}

.fold-25 { top: 25%; }
.fold-50 { top: 50%; }
.fold-75 { top: 75%; }

/* --- RULING BAR --- */
.ruling-bar {
    width: 100%;
    background: var(--parchment-edge);
    padding: 18px 40px;
    text-align: center;
    opacity: 0;
    transform: translateX(-100%);
    transition: opacity 600ms cubic-bezier(0.16, 1, 0.3, 1), transform 600ms cubic-bezier(0.16, 1, 0.3, 1);
}

.ruling-bar.visible {
    opacity: 1;
    transform: translateX(0);
}

.ruling-text {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
    font-style: italic;
    font-size: 14px;
    letter-spacing: 0.25em;
    color: var(--dried-blood);
    text-transform: none;
}

/* --- PROCEEDING VISIBLE STATES --- */
.proceeding.in-view .case-number-left,
.proceeding.in-view .stamp,
.proceeding.in-view .heading-left,
.proceeding.in-view .body-left {
    opacity: 1;
    transform: translateY(0);
}

.proceeding.in-view .case-number-right,
.proceeding.in-view .heading-right,
.proceeding.in-view .body-right {
    opacity: 1;
    transform: translateY(0);
}

/* --- DIVIDE THICKENING ON SCROLL --- */
body.scrolled-deep .proceeding::before {
    width: 5px;
}

/* --- FOOTER --- */
#site-footer {
    background: var(--extinguished);
    padding: 80px 40px;
    text-align: center;
    position: relative;
}

.divide-terminal {
    width: 8px;
    height: 8px;
    background: var(--dried-blood);
    margin: 0 auto 40px;
}

.footer-text {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 500;
    font-size: 14px;
    letter-spacing: 0.15em;
    color: var(--parchment-edge);
    text-transform: uppercase;
    margin-bottom: 12px;
}

.footer-meta {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
    font-style: italic;
    font-size: 13px;
    letter-spacing: 0.1em;
    color: var(--slate-notation);
}

/* --- LINKS --- */
a {
    color: var(--tribunal-black);
    text-decoration: none;
    transition: color 200ms ease;
}

a:hover {
    color: var(--extinguished);
}

/* --- MOBILE: < 768px --- */
@media (max-width: 768px) {
    :root {
        --divide-position: 50%;
    }

    #title-left {
        position: relative;
        right: auto;
        top: auto;
        transform: none;
        text-align: center;
        font-size: 12vw;
        width: 100%;
        padding: 0 20px;
    }

    #title-right {
        position: relative;
        left: auto;
        top: auto;
        transform: none;
        text-align: center;
        font-size: 6vw;
        width: 100%;
        padding: 0 20px;
        margin-top: 8px;
    }

    #title-screen {
        flex-direction: column;
    }

    #divide-line-container {
        display: none;
    }

    #title-subtitle {
        position: relative;
        left: auto;
        top: auto;
        transform: none;
        text-align: center;
        margin-top: 16px;
    }

    .proceeding-inner {
        flex-direction: column;
    }

    .proceeding::before {
        display: none;
    }

    .zone-left,
    .zone-right {
        width: 100%;
        min-height: auto;
    }

    .zone-left {
        padding: 48px 24px;
    }

    .zone-right {
        padding: 24px 24px 48px;
        border-top: 3px solid var(--tribunal-black);
    }

    .zone-content-right {
        padding-top: 0;
    }

    .stamp {
        position: relative;
        top: auto;
        right: auto;
        margin-bottom: 24px;
    }

    .margin-spine {
        display: none;
    }

    .ruling-bar {
        padding: 16px 20px;
    }

    .ruling-text {
        font-size: 12px;
        letter-spacing: 0.15em;
    }

    .heading-left {
        font-size: clamp(1.5rem, 6vw, 2.5rem);
    }
}
