:root {
    --bg: #F2F0EB;
    --text-a: #1A1A1A;
    --text-b: #1A1A1A;
    --text-b-faded: #2E2E2E;
    --seam: #6B6B6B;
    --redaction: #C13028;
    --void: #0D0D0D;
    --baseline-ghost: #D8D5CE;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg);
    color: var(--text-a);
    font-family: 'IBM Plex Serif', Georgia, serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.65;
    overflow-x: hidden;
}

/* ============================================
   SEAM WATERMARK
   ============================================ */

.seam-watermark {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(90deg);
    font-family: 'JetBrains Mono', monospace;
    font-weight: 400;
    font-size: 11px;
    letter-spacing: 0.3em;
    color: #3A3A3A;
    white-space: nowrap;
    z-index: 50;
    pointer-events: none;
    opacity: 0.3;
}

/* ============================================
   DEVIATION COUNTER
   ============================================ */

.deviation-counter {
    position: fixed;
    bottom: 16px;
    left: 16px;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 400;
    font-size: 14px;
    color: var(--redaction);
    z-index: 100;
}

/* ============================================
   EXHIBIT SECTIONS
   ============================================ */

.exhibit {
    display: grid;
    grid-template-columns: 46% 8% 46%;
    min-height: 100vh;
    position: relative;
}

.seam {
    grid-column: 2;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    position: relative;
    padding-top: 3rem;
}

.seam::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 1px;
    background-color: var(--seam);
    transform: translateX(-50%);
}

.seam-fractured::before {
    background: repeating-linear-gradient(
        to bottom,
        var(--seam) 0px,
        var(--seam) 12px,
        transparent 12px,
        transparent 20px
    );
}

.seam-annotation {
    position: relative;
    z-index: 2;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 400;
    font-size: 10px;
    letter-spacing: 0.08em;
    color: var(--seam);
    text-transform: uppercase;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    white-space: nowrap;
    background-color: var(--bg);
    padding: 0.5rem 0;
}

/* ============================================
   COLUMN A (THE RULE)
   ============================================ */

.col-a {
    grid-column: 1;
    padding: 3rem 2rem 3rem 48px;
    text-align: left;
    position: relative;
}

.baseline-visible::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: repeating-linear-gradient(
        to bottom,
        transparent 0px,
        transparent 25px,
        var(--baseline-ghost) 25px,
        var(--baseline-ghost) 25.5px
    );
    pointer-events: none;
    z-index: -1;
}

.section-num {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    font-size: 14px;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--seam);
    display: block;
    margin-bottom: 1rem;
}

.heading-a {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 36px;
    letter-spacing: -0.01em;
    color: var(--text-a);
    margin-bottom: 1.25rem;
    line-height: 1.15;
}

.body-a {
    font-family: 'IBM Plex Serif', Georgia, serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.65;
    color: var(--text-a);
}

/* ============================================
   COLUMN B (THE PRACTICE)
   ============================================ */

.col-b {
    grid-column: 3;
    padding: 3rem 48px 3rem 2rem;
    text-align: right;
    position: relative;
}

.heading-b {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 36px;
    letter-spacing: -0.01em;
    color: var(--text-a);
    margin-bottom: 1.25rem;
    line-height: 1.15;
}

.body-b {
    font-family: 'IBM Plex Serif', Georgia, serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.65;
    color: var(--text-a);
    position: relative;
}

.red-rule {
    display: block;
    height: 1px;
    background-color: var(--redaction);
    margin-top: 0.75rem;
    width: 0;
    transition: width 0.3s linear;
}

.red-rule.visible {
    width: 100%;
}

/* Section-specific deviations */

.section-01-b .heading-b {
    font-weight: 400;
}

.section-02-b .body-b {
    line-height: 1.72;
}

.section-03-b {
    padding-right: 56px;
}

.section-04-b .heading-b-scaled {
    font-size: 38px;
}

.section-04-b .body-b-scaled {
    font-size: 17px;
    line-height: 1.72;
}

.section-05-b .heading-b-faded {
    color: var(--text-b-faded);
}

.section-05-b .body-b-faded {
    color: var(--text-b-faded);
}

.section-06-b .heading-b-faded {
    color: var(--text-b-faded);
}

.section-06-b .body-b-ragged {
    text-align: left;
    color: var(--text-b-faded);
    font-size: 17px;
    line-height: 1.72;
}

/* ============================================
   SECTION 07: DISSOLUTION
   ============================================ */

.void-bg {
    background-color: var(--void);
    position: relative;
    min-height: 100vh;
}

.fragment {
    position: absolute;
    font-family: 'IBM Plex Serif', Georgia, serif;
    font-weight: 400;
    font-size: 16px;
    color: var(--bg);
    opacity: 0;
    transition: opacity 0.4s ease;
    white-space: nowrap;
}

.fragment.visible {
    opacity: 1;
}

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

@media (max-width: 768px) {
    .exhibit {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
    }

    .seam {
        grid-column: 1;
        grid-row: 2;
        height: 40px;
    }

    .seam::before {
        top: 50%;
        bottom: auto;
        left: 0;
        right: 0;
        width: 100%;
        height: 1px;
        transform: none;
    }

    .seam-annotation {
        writing-mode: horizontal-tb;
    }

    .col-a {
        grid-column: 1;
        grid-row: 1;
        padding: 2rem 1.25rem;
        text-align: left;
    }

    .col-b {
        grid-column: 1;
        grid-row: 3;
        padding: 2rem 1.25rem;
        text-align: left;
    }

    .section-03-b {
        padding-right: 1.25rem;
    }

    .seam-watermark {
        display: none;
    }

    .heading-a, .heading-b {
        font-size: 28px;
    }
}
