/* ==========================================================
   double-standard.xyz — bifurcated anti-design experiment
   Two duotones meeting at a black seam.
   ========================================================== */

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

html, body {
    height: 100%;
    overflow: hidden;
    background: #000;
}

body {
    font-family: "Inter", sans-serif;
    color: #0E0E10;
}

/* ==========================================================
   THE SEAM — 2px black, fixed center, never moves
   ========================================================== */
.seam {
    position: fixed;
    top: 0;
    left: 50vw;
    transform: translateX(-1px) translateZ(0);
    width: 2px;
    height: 100vh;
    background: #000000;
    z-index: 999;
    pointer-events: none;
    will-change: transform;
}

/* Hairline confrontation flashes */
.hairline {
    position: fixed;
    height: 1px;
    width: 50vw;
    pointer-events: none;
    z-index: 998;
    opacity: 0;
    transition: opacity 600ms cubic-bezier(0.2, 0, 0.2, 1);
}
.hairline-a {
    left: 0;
    background: #0066FF; /* B's color crosses into A's territory */
}
.hairline-b {
    left: 50vw;
    background: #8C1B0F; /* A's color crosses into B's territory */
}
.hairline.flash {
    opacity: 0.9;
    transition: opacity 200ms cubic-bezier(0.2, 0, 0.2, 1);
}

/* Caliper readout (cursor-on-seam easter egg) */
.caliper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 1001;
    opacity: 0;
    transition: opacity 120ms linear;
}
.caliper.show { opacity: 1; }
.caliper text {
    font-family: "JetBrains Mono", monospace;
    font-size: 10px;
    letter-spacing: 0.04em;
}

/* Leader line for marginalia */
.leader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 1000;
    opacity: 0;
    transition: opacity 200ms linear;
}
.leader.show { opacity: 0.8; }

/* Marginalia tooltip */
.tip {
    position: fixed;
    z-index: 1002;
    font-family: "JetBrains Mono", monospace;
    font-size: 10px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: #000;
    color: #fff;
    padding: 4px 8px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 120ms linear;
}
.tip.show { opacity: 1; }

/* ==========================================================
   SHARED SIDE STYLES — independent scroll containers
   ========================================================== */
.side {
    position: fixed;
    top: 0;
    width: 50vw;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    scroll-snap-type: y proximity;
    scrollbar-width: thin;
}
.side::-webkit-scrollbar { width: 6px; }
.side-a::-webkit-scrollbar-thumb { background: #5A4A2E; }
.side-a::-webkit-scrollbar-track { background: #E8DDC4; }
.side-b::-webkit-scrollbar-thumb { background: #9AA0A6; }
.side-b::-webkit-scrollbar-track { background: #F4F4F2; }

/* ==========================================================
   STANDARD A — left half (manila + ink + dossier red)
   8px baseline grid, dense, bureaucratic
   ========================================================== */
.side-a {
    left: 0;
    background-color: #E8DDC4;
    background-image: repeating-linear-gradient(
        to bottom,
        transparent 0 7px,
        #5A4A2E 7px 8px
    );
    background-blend-mode: normal;
    color: #0E0E10;
    padding: 0 56px 80px 56px;
    font-family: "Source Serif 4", serif;
    line-height: 19px;
}
.side-a::before {
    /* dim the grid to 6% by overlaying manila with high alpha */
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 50vw;
    height: 100vh;
    background: rgba(232, 221, 196, 0.94);
    pointer-events: none;
    z-index: 0;
}
.side-a > * { position: relative; z-index: 1; }

/* Punch-card holes along outer (left) edge */
.punch-strip {
    position: fixed;
    top: 0;
    left: 0;
    width: 24px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    align-items: center;
    z-index: 5;
    pointer-events: none;
}
.punch {
    width: 8px;
    height: 14px;
    background: #0E0E10;
    border-radius: 4px / 7px;
    opacity: 0.85;
}

/* Diagonal corner watermark — left */
.watermark-a {
    position: fixed;
    top: 35vh;
    left: 4vw;
    transform: rotate(-32deg);
    transform-origin: 0 0;
    font-family: "JetBrains Mono", monospace;
    font-weight: 800;
    font-size: clamp(48px, 7vw, 96px);
    letter-spacing: -0.02em;
    color: #0E0E10;
    opacity: 0.06;
    pointer-events: none;
    z-index: 1;
    white-space: nowrap;
}

/* Header */
.head-a {
    position: sticky;
    top: 0;
    background: #E8DDC4;
    padding: 24px 0 16px 0;
    border-bottom: 1px solid #5A4A2E;
    z-index: 10;
    margin-bottom: 32px;
}
.wordmark-a {
    font-family: "JetBrains Mono", monospace;
    font-weight: 800;
    font-size: clamp(36px, 4.4vw, 56px);
    letter-spacing: -0.02em;
    line-height: 1.0;
    text-transform: uppercase;
    color: #0E0E10;
}
.wordmark-a .wm-line { display: block; }
.wordmark-a .slash {
    display: inline-block;
    margin-left: -0.55em;
    margin-right: 0.1em;
    color: #8C1B0F;
}
.nav-a {
    margin-top: 12px;
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    font-family: "JetBrains Mono", monospace;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.nav-a a {
    color: #0E0E10;
    text-decoration: none;
    border-bottom: 1px solid #5A4A2E;
    padding-bottom: 2px;
}
.nav-a a:hover { color: #8C1B0F; border-bottom-color: #8C1B0F; }
.case-stamp {
    margin-top: 12px;
    font-family: "JetBrains Mono", monospace;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #8C1B0F;
}

/* Section blocks */
.section-a {
    margin-bottom: 48px;
    scroll-snap-align: start;
    max-width: 52ch;
}
.section-num {
    font-family: "JetBrains Mono", monospace;
    font-weight: 800;
    font-size: clamp(4rem, 7vw, 6.5rem);
    letter-spacing: -0.02em;
    line-height: 1.0;
    color: #0E0E10;
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum" 1;
    margin-bottom: 8px;
    min-height: 1em;
}
.section-num.cursor::after {
    content: "_";
    color: #8C1B0F;
    animation: blink 800ms steps(2) infinite;
}
.section-a .section-title {
    font-family: "JetBrains Mono", monospace;
    font-weight: 800;
    font-size: 14px;
    letter-spacing: -0.02em;
    text-transform: uppercase;
    color: #0E0E10;
    margin-bottom: 8px;
}
.divider-a {
    height: 14px;
    background-image:
        linear-gradient(135deg, transparent 50%, #5A4A2E 50%),
        linear-gradient(225deg, transparent 50%, #5A4A2E 50%);
    background-size: 8px 14px;
    background-repeat: repeat-x;
    background-position: 0 0, 4px 0;
    margin-bottom: 16px;
    opacity: 0.7;
}
.body-a {
    font-family: "Source Serif 4", serif;
    font-weight: 400;
    font-size: 14px;
    line-height: 19px;
    color: #0E0E10;
    text-indent: 3em;
    margin: 0;
}
.body-a + .body-a { margin-top: 0; }
.body-a sup.fn-a {
    font-family: "JetBrains Mono", monospace;
    font-size: 9px;
    color: #8C1B0F;
    letter-spacing: 0.08em;
    text-transform: lowercase;
}

/* Marginalia A — float right (toward seam-side gutter) so it pulls outward */
.margin-a {
    float: left;
    width: 130px;
    margin: 4px 16px 8px -150px;
    font-family: "Caveat", cursive;
    font-size: 14px;
    line-height: 1.2;
    color: #8C1B0F;
    transform: rotate(-2deg);
    cursor: help;
}

/* Form fields */
.formfield-a {
    margin: 16px 0 16px 3em;
    font-family: "JetBrains Mono", monospace;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #0E0E10;
}
.formfield-a .ff-label { display: block; color: #5A4A2E; margin-bottom: 2px; }
.formfield-a .ff-answer {
    display: inline-block;
    border-bottom: 1px solid #0E0E10;
    padding: 2px 8px 2px 0;
    min-width: 220px;
    /* answer typed in opposite half's style */
    font-family: "Inter", sans-serif;
    font-weight: 400;
    text-transform: none;
    font-size: 12px;
    letter-spacing: 0;
    color: #0066FF;
}

/* Dossier card — strict, unstyled */
.dossier-a {
    border: 1px solid #0E0E10;
    padding: 16px;
    margin-top: 24px;
    position: relative;
    background: rgba(232, 221, 196, 0.55);
}
.dossier-a .dossier-head {
    display: flex;
    justify-content: space-between;
    font-family: "JetBrains Mono", monospace;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #0E0E10;
    margin-bottom: 12px;
}
.dossier-a .dossier-head .case-no { color: #8C1B0F; }
.dossier-a .dossier-body {
    font-family: "Source Serif 4", serif;
    font-size: 14px;
    line-height: 19px;
    color: #0E0E10;
}
.dossier-a .verdict-a {
    margin-top: 12px;
    font-family: "JetBrains Mono", monospace;
    font-weight: 800;
    font-size: 12px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #8C1B0F;
}
.stamp-round {
    position: absolute;
    right: 12px;
    bottom: 12px;
    width: 96px;
    height: 96px;
}

.end-signoff-a {
    margin-top: 32px;
    padding-top: 16px;
    border-top: 1px solid #5A4A2E;
    font-family: "JetBrains Mono", monospace;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #5A4A2E;
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 80px;
}
.end-signoff-a .sig-name { color: #8C1B0F; font-weight: 800; }

/* ==========================================================
   STANDARD B — right half (bureau white + ink + acrylic cyan)
   9px baseline grid, airy, institutional sans
   ========================================================== */
.side-b {
    left: 50vw;
    background-color: #F4F4F2;
    background-image: repeating-linear-gradient(
        to bottom,
        transparent 0 8px,
        #9AA0A6 8px 9px
    );
    color: #0E0E10;
    padding: 0 56px 80px 56px;
    font-family: "Inter", sans-serif;
    line-height: 27px;
}
.side-b::before {
    content: "";
    position: fixed;
    top: 0;
    left: 50vw;
    width: 50vw;
    height: 100vh;
    background: rgba(244, 244, 242, 0.94);
    pointer-events: none;
    z-index: 0;
}
.side-b > * { position: relative; z-index: 1; }

/* Filing tab */
.filing-tab {
    position: fixed;
    top: 0;
    right: 24px;
    width: 64px;
    height: 28px;
    background: #0066FF;
    color: #F4F4F2;
    font-family: "DM Mono", monospace;
    font-size: 11px;
    letter-spacing: 0.08em;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 6;
    pointer-events: none;
}

.watermark-b {
    position: fixed;
    bottom: 22vh;
    right: 4vw;
    transform: rotate(-32deg);
    transform-origin: 100% 100%;
    font-family: "Archivo Black", sans-serif;
    font-weight: 900;
    font-size: clamp(48px, 7vw, 96px);
    letter-spacing: 0;
    color: #0066FF;
    opacity: 0.06;
    pointer-events: none;
    z-index: 1;
    white-space: nowrap;
}

.head-b {
    position: sticky;
    top: 0;
    background: #F4F4F2;
    padding: 24px 0 16px 0;
    border-bottom: 1px solid #9AA0A6;
    z-index: 10;
    margin-bottom: 32px;
    text-align: right;
}
.wordmark-b {
    font-family: "Archivo Black", sans-serif;
    font-weight: 900;
    font-size: clamp(36px, 4.4vw, 56px);
    letter-spacing: 0;
    line-height: 1.0;
    color: #0E0E10;
}
.wordmark-b .wm-line { display: block; }
.nav-b {
    margin-top: 12px;
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: flex-end;
    font-family: "DM Mono", monospace;
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0;
}
.nav-b a {
    color: #0E0E10;
    text-decoration: underline;
    text-decoration-color: #0066FF;
    text-underline-offset: 4px;
}
.nav-b a:hover { color: #0066FF; }
.memo-stamp {
    margin-top: 12px;
    font-family: "DM Mono", monospace;
    font-size: 12px;
    color: #9AA0A6;
}

.section-b {
    margin-bottom: 96px; /* spread out, 4× normal */
    scroll-snap-align: start;
    max-width: 68ch;
    margin-left: auto;
    margin-right: 0;
}
.section-b .section-num {
    font-family: "Archivo", sans-serif;
    font-weight: 200;
    font-variant-numeric: proportional-nums;
    font-feature-settings: "pnum" 1;
    color: #0E0E10;
}
.section-b .section-num.cursor::after {
    color: #0066FF;
}
.section-b .section-title {
    font-family: "Archivo Black", sans-serif;
    font-weight: 900;
    font-size: 18px;
    letter-spacing: 0;
    color: #0E0E10;
    margin-bottom: 18px;
}
.divider-b {
    height: 1px;
    background: #9AA0A6;
    margin-bottom: 24px;
    opacity: 0.6;
}
.body-b {
    font-family: "Inter", sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 27px;
    color: #0E0E10;
    margin: 0 0 27px 0;
}
.body-b em { font-style: italic; color: #0066FF; }

.body-b sup, .body-b a {
    color: #0066FF;
}
.body-b a { text-decoration: underline; text-decoration-color: #0066FF; }

/* Marginalia B — float left so it pulls toward outer (right) gutter */
.margin-b {
    float: right;
    width: 150px;
    margin: 4px -180px 8px 18px;
    font-family: "Reenie Beanie", cursive;
    font-size: 16px;
    line-height: 1.25;
    color: #0066FF;
    transform: rotate(2deg);
    cursor: help;
}

.formfield-b {
    margin: 24px 0;
    font-family: "DM Mono", monospace;
    font-size: 12px;
    color: #0E0E10;
    display: flex;
    gap: 12px;
    align-items: baseline;
    flex-wrap: wrap;
}
.formfield-b .ff-label { color: #9AA0A6; }
.formfield-b .ff-answer {
    border-bottom: 1px solid #0066FF;
    padding: 0 8px 2px 0;
    min-width: 220px;
    /* answer typed in opposite half's style — JetBrains mono caps */
    font-family: "JetBrains Mono", monospace;
    font-weight: 800;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #8C1B0F;
}

.dossier-b {
    border: 1px solid #0E0E10;
    padding: 16px;
    margin-top: 24px;
    position: relative;
    background: rgba(244, 244, 242, 0.55);
}
.dossier-b .dossier-head {
    display: flex;
    justify-content: space-between;
    font-family: "DM Mono", monospace;
    font-size: 12px;
    color: #0E0E10;
    margin-bottom: 12px;
}
.dossier-b .dossier-head .case-no { color: #0066FF; }
.dossier-b .dossier-body {
    font-family: "Inter", sans-serif;
    font-size: 16px;
    line-height: 27px;
    color: #0E0E10;
}
.dossier-b .verdict-b {
    margin-top: 12px;
    font-family: "Archivo Black", sans-serif;
    font-weight: 900;
    font-size: 14px;
    color: #0066FF;
}
.stamp-rect {
    width: 144px;
    height: 56px;
    margin-top: 16px;
    display: block;
}

.end-signoff-b {
    margin-top: 32px;
    padding-top: 16px;
    border-top: 1px solid #9AA0A6;
    font-family: "DM Mono", monospace;
    font-size: 12px;
    color: #9AA0A6;
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 80px;
    text-align: right;
}
.end-signoff-b .sig-name { color: #0066FF; }

/* ==========================================================
   FOOTER — the only element that crosses the seam
   ========================================================== */
.footer-cross {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100vw;
    height: 32px;
    background: #000000;
    color: #F4F4F2;
    font-family: "Inter", sans-serif;
    font-weight: 200;
    font-size: 11px;
    letter-spacing: 0.4em;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    overflow: hidden;
    white-space: nowrap;
}
.footer-cross .footer-text {
    display: inline-block;
    padding: 0 24px;
}

/* Stamp animation */
@keyframes stamp-in {
    0% { transform: scale(1.06) rotate(0deg); opacity: 0; }
    40% { opacity: 1; transform: scale(1.0) rotate(2deg); }
    70% { transform: scale(1.0) rotate(-2deg); }
    100% { transform: scale(1.0) rotate(0deg); opacity: 1; }
}
.stamp.stamped {
    animation: stamp-in 120ms cubic-bezier(0.2, 0, 0.2, 1) 1;
    transform-origin: center;
}

@keyframes blink {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0; }
}

/* ==========================================================
   Below 720px — seam rotates, stack A on top, B below
   ========================================================== */
@media (max-width: 720px) {
    html, body { overflow: auto; }
    .seam {
        top: 50vh;
        left: 0;
        width: 100vw;
        height: 2px;
        transform: translateY(-1px) translateZ(0);
    }
    .side {
        position: relative;
        width: 100vw;
        height: auto;
        min-height: 50vh;
        overflow-y: visible;
        padding: 24px 24px 80px 24px;
    }
    .side-a { left: 0; padding-left: 40px; }
    .side-b { left: 0; }
    .side-a::before, .side-b::before { position: absolute; width: 100%; left: 0; }
    .punch-strip { position: absolute; }
    .filing-tab { position: absolute; }
    .watermark-a, .watermark-b { position: absolute; }
    .head-a, .head-b { position: relative; }
    .margin-a, .margin-b {
        float: none;
        width: auto;
        margin: 8px 0;
        transform: none;
    }
    .footer-cross {
        position: relative;
        height: auto;
        padding: 12px 16px;
        white-space: normal;
    }
    .hairline { display: none; }
    .caliper { display: none; }
    .leader { display: none; }
}
