:root {
    --newsprint: #F5F0E8;
    --ink-black: #1A1A1A;
    --steel-blue: #4A5568;
    --degraded-grey: #E2DDD3;
    --coral: #C4614E;
    --navy: #1E3A5F;
    --redaction: #0D0D0D;
    --parchment-shadow: #D4C9B8;
    --crop-grey: #7A7A7A;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--newsprint);
    color: var(--ink-black);
    font-family: 'Source Serif 4', Georgia, serif;
    font-weight: 400;
    font-size: 17px;
    line-height: 1.7;
    overflow-x: hidden;
}

/* ============================================
   NAVIGATION
   ============================================ */

.nav-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 200;
    background-color: var(--newsprint);
    border-bottom: 1px solid var(--ink-black);
    padding: 0.6rem 2rem;
    display: flex;
    justify-content: center;
    gap: 2.5rem;
}

.nav-link {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 300;
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--navy);
    text-decoration: none;
    position: relative;
    padding-bottom: 2px;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--navy);
    transition: width 0.4s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* ============================================
   FOLD LINE
   ============================================ */

.fold-line {
    position: fixed;
    top: 0;
    left: 50%;
    width: 1px;
    height: 100vh;
    background-color: #3A3A3A;
    z-index: 150;
    pointer-events: none;
    transform: translateX(-50%);
}

.fold-line.pulse {
    animation: foldPulse 0.3s ease-in-out;
}

@keyframes foldPulse {
    0%, 100% { background-color: #3A3A3A; }
    50% { background-color: var(--coral); box-shadow: 0 0 8px var(--coral); }
}

.fold-label {
    position: absolute;
    top: 50%;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 300;
    font-size: 10px;
    color: var(--crop-grey);
    letter-spacing: 0.05em;
    opacity: 0;
    transition: opacity 0.6s ease;
    white-space: nowrap;
}

.fold-label.visible {
    opacity: 1;
}

.fold-label-left {
    right: 12px;
    transform: translateY(-50%);
}

.fold-label-right {
    left: 12px;
    transform: translateY(-50%);
}

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

.watermark {
    position: fixed;
    top: 50%;
    left: 25%;
    transform: translate(-50%, -50%) rotate(-15deg);
    font-family: 'Playfair Display', serif;
    font-weight: 900;
    font-size: clamp(100px, 25vw, 300px);
    color: #F0EBE3;
    z-index: 0;
    pointer-events: none;
    white-space: nowrap;
    user-select: none;
}

/* ============================================
   MASTHEAD
   ============================================ */

.masthead-section {
    min-height: 100vh;
    padding-top: 3.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
}

.masthead-header {
    text-align: center;
    padding: 2rem 2rem 1.5rem;
    width: 100%;
    max-width: 900px;
}

.masthead-rule {
    height: 1px;
    background-color: var(--ink-black);
    width: 100%;
}

.masthead-meta {
    padding: 1rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.meta-date {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 300;
    font-size: 11px;
    color: var(--steel-blue);
    letter-spacing: 0.05em;
}

.masthead-title {
    font-family: 'Playfair Display', serif;
    font-weight: 900;
    font-size: clamp(32px, 6vw, 72px);
    letter-spacing: -0.03em;
    color: var(--ink-black);
    line-height: 1.1;
}

.scale-container {
    margin: 1rem 0 2rem;
}

.balance-scale {
    display: block;
    margin: 0 auto;
}

.scale-right {
    transform-origin: 100px 50px;
    animation: tiltScale 2s ease-in-out 0.5s forwards;
}

@keyframes tiltScale {
    from { transform: rotate(0deg); }
    to { transform: rotate(8deg); }
}

.masthead-columns {
    display: flex;
    width: 100%;
    max-width: 900px;
    padding: 0 2rem;
    gap: 0;
    position: relative;
}

.col-left {
    flex: 1;
    padding-right: 2rem;
    background-color: var(--newsprint);
}

.col-right {
    flex: 1;
    padding-left: 2rem;
    background-color: var(--degraded-grey);
}

.body-standard {
    font-family: 'Source Serif 4', Georgia, serif;
    font-weight: 400;
    font-size: 17px;
    line-height: 1.7;
    color: var(--ink-black);
}

.body-compressed {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 15px;
    line-height: 1.35;
    color: var(--ink-black);
}

/* ============================================
   LEDGER
   ============================================ */

.ledger-section {
    position: relative;
    z-index: 1;
    padding: 2rem 0;
}

.torn-edge {
    width: 100%;
    line-height: 0;
    margin: 1rem 0;
}

.torn-edge svg {
    width: 100%;
    height: 40px;
    display: block;
}

.ledger-case {
    display: flex;
    max-width: 900px;
    margin: 2rem auto;
    padding: 0 2rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.ledger-case.visible {
    opacity: 1;
    transform: translateY(0);
}

.case-left {
    flex: 1;
    padding-right: 2rem;
    position: relative;
}

.case-right {
    flex: 1;
    padding-left: 2rem;
    position: relative;
}

.case-border-left {
    height: 3px;
    background-color: var(--navy);
    margin-bottom: 1rem;
}

.case-border-right {
    height: 3px;
    background-color: var(--coral);
    margin-bottom: 1rem;
}

.case-heading-left {
    font-family: 'Playfair Display', serif;
    font-weight: 900;
    font-size: clamp(24px, 4vw, 36px);
    letter-spacing: -0.03em;
    color: var(--ink-black);
    margin-bottom: 0.75rem;
}

.case-heading-right {
    font-family: 'Bebas Neue', sans-serif;
    font-weight: 400;
    font-size: clamp(24px, 4vw, 36px);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ink-black);
    margin-bottom: 0.75rem;
}

/* ============================================
   REDACTION
   ============================================ */

.redaction-wrapper {
    position: relative;
    display: inline;
}

.redaction-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--redaction);
    z-index: 2;
    transition: transform 0.4s ease-out;
}

.redaction-wrapper:hover .redaction-bar {
    transform: translateX(110%);
}

.redaction-text {
    color: var(--coral);
    position: relative;
    z-index: 1;
}

/* ============================================
   AUDIT
   ============================================ */

.audit-section {
    position: relative;
    z-index: 1;
    padding: 4rem 2rem;
    background-color: var(--newsprint);
}

.audit-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: auto;
    gap: 20px;
    max-width: 1000px;
    margin: 0 auto;
}

.audit-card {
    background-color: var(--newsprint);
    border: 1px solid var(--parchment-shadow);
    box-shadow: 2px 2px 0 var(--parchment-shadow);
    padding: 2rem;
    position: relative;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.audit-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.audit-card:hover {
    transform: translateY(-4px);
    box-shadow: 4px 4px 0 var(--parchment-shadow);
}

.audit-card:hover .crop-mark {
    border-color: var(--steel-blue);
}

.crop-mark {
    position: absolute;
    width: 12px;
    height: 12px;
    border-color: var(--crop-grey);
    border-style: solid;
    transition: border-color 0.3s ease;
}

.crop-tl { top: -1px; left: -1px; border-width: 1px 0 0 1px; }
.crop-tr { top: -1px; right: -1px; border-width: 1px 1px 0 0; }
.crop-bl { bottom: -1px; left: -1px; border-width: 0 0 1px 1px; }
.crop-br { bottom: -1px; right: -1px; border-width: 0 1px 1px 0; }

.registration-mark {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 12px;
    height: 12px;
    border: 1px solid var(--crop-grey);
    border-radius: 50%;
}

.registration-mark::before,
.registration-mark::after {
    content: '';
    position: absolute;
    background-color: var(--crop-grey);
}

.registration-mark::before {
    top: 50%;
    left: 1px;
    right: 1px;
    height: 1px;
    transform: translateY(-50%);
}

.registration-mark::after {
    left: 50%;
    top: 1px;
    bottom: 1px;
    width: 1px;
    transform: translateX(-50%);
}

.audit-heading {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 18px;
    color: var(--navy);
    margin-bottom: 0.75rem;
    letter-spacing: -0.01em;
}

.audit-body {
    font-family: 'Source Serif 4', Georgia, serif;
    font-weight: 400;
    font-size: 15px;
    line-height: 1.6;
    color: var(--ink-black);
}

/* ============================================
   MIRROR
   ============================================ */

.mirror-section {
    position: relative;
    z-index: 1;
    padding: 4rem 2rem;
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.mirror-label-left,
.mirror-label-right {
    position: absolute;
    top: 50%;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 300;
    font-size: 10px;
    color: var(--crop-grey);
    letter-spacing: 0.05em;
    transform: translateY(-50%);
}

.mirror-label-left {
    left: calc(50% - 80px);
}

.mirror-label-right {
    left: calc(50% + 20px);
}

.mirror-columns {
    display: flex;
    max-width: 900px;
    width: 100%;
    gap: 0;
}

.mirror-left {
    flex: 1;
    padding-right: 2rem;
    background-color: var(--degraded-grey);
    padding: 2rem;
}

.mirror-right {
    flex: 1;
    padding-left: 2rem;
    background-color: var(--newsprint);
    padding: 2rem;
}

.mirror-heading-left {
    font-family: 'Bebas Neue', sans-serif;
    font-weight: 400;
    font-size: 32px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--coral);
    margin-bottom: 0.75rem;
}

.mirror-heading-right {
    font-family: 'Playfair Display', serif;
    font-weight: 900;
    font-size: 32px;
    letter-spacing: -0.03em;
    color: var(--navy);
    margin-bottom: 0.75rem;
}

.mirror-body-left {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 15px;
    line-height: 1.35;
    color: var(--ink-black);
}

.mirror-body-right {
    font-family: 'Source Serif 4', Georgia, serif;
    font-weight: 400;
    font-size: 17px;
    line-height: 1.7;
    color: var(--ink-black);
}

.mirror-coda {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: clamp(18px, 3vw, 28px);
    color: var(--steel-blue);
    text-align: center;
    margin-top: 3rem;
    font-style: italic;
}

/* ============================================
   SCROLL REVEAL
   ============================================ */

.scroll-reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.scroll-reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

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

@media (max-width: 768px) {
    .fold-line {
        display: none;
    }

    .watermark {
        display: none;
    }

    .masthead-columns,
    .ledger-case,
    .mirror-columns {
        flex-direction: column;
    }

    .col-left, .col-right,
    .case-left, .case-right,
    .mirror-left, .mirror-right {
        padding: 1rem;
    }

    .audit-grid {
        grid-template-columns: 1fr;
    }

    .audit-card {
        grid-column: auto !important;
        grid-row: auto !important;
    }

    .nav-bar {
        gap: 1rem;
        padding: 0.5rem 1rem;
    }

    .mirror-label-left,
    .mirror-label-right {
        display: none;
    }
}
