/* =====================================================
   political.bar -- Styles
   Late-night political salon / declassified dossier
   Fonts: Playfair Display" (Google Fonts), Libre Baskerville, Caveat
   Intersection Observer at 0.3 threshold.
   Pull-quote: thick left border in Bourbon Amber
   ===================================================== */

/* === Color Variables === */
:root {
    --mahogany-dark: #1C1008;
    --parchment-cream: #E8DCC8;
    --bourbon-amber: #C4883A;
    --deep-ink-red: #8B1A1A;
    --newsprint-gray: #2E2519;
    --classified-black: #0A0806;
    --cigar-smoke: #6B5D4F;
    --telegram-blue: #2A4A6B;
    --dark-surface: #3D2B1F;
}

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Libre Baskerville', 'Georgia', serif;
    font-size: clamp(0.95rem, 1.1vw, 1.15rem);
    font-weight: 400;
    letter-spacing: 0.01em;
    line-height: 1.72;
    color: var(--parchment-cream);
    background-color: var(--mahogany-dark);
    overflow-x: hidden;
    /* Coffee-ring stain watermarks */
    background-image:
        radial-gradient(ellipse 160px 160px at 15% 12%, transparent 45%, var(--cigar-smoke) 46%, var(--cigar-smoke) 50%, transparent 51%),
        radial-gradient(ellipse 140px 140px at 78% 35%, transparent 45%, var(--cigar-smoke) 46%, var(--cigar-smoke) 50%, transparent 51%),
        radial-gradient(ellipse 180px 180px at 42% 60%, transparent 45%, var(--cigar-smoke) 46%, var(--cigar-smoke) 50%, transparent 51%),
        radial-gradient(ellipse 130px 130px at 88% 78%, transparent 45%, var(--cigar-smoke) 46%, var(--cigar-smoke) 50%, transparent 51%),
        radial-gradient(ellipse 150px 150px at 25% 90%, transparent 45%, var(--cigar-smoke) 46%, var(--cigar-smoke) 50%, transparent 51%);
    background-repeat: no-repeat;
    background-size: 100% 100%;
    background-attachment: fixed;
}

/* Apply coffee ring opacity */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    background-image:
        radial-gradient(ellipse 160px 160px at 15% 12%, transparent 45%, var(--cigar-smoke) 46%, var(--cigar-smoke) 50%, transparent 51%),
        radial-gradient(ellipse 140px 140px at 78% 35%, transparent 45%, var(--cigar-smoke) 46%, var(--cigar-smoke) 50%, transparent 51%),
        radial-gradient(ellipse 180px 180px at 42% 60%, transparent 45%, var(--cigar-smoke) 46%, var(--cigar-smoke) 50%, transparent 51%),
        radial-gradient(ellipse 130px 130px at 88% 78%, transparent 45%, var(--cigar-smoke) 46%, var(--cigar-smoke) 50%, transparent 51%),
        radial-gradient(ellipse 150px 150px at 25% 90%, transparent 45%, var(--cigar-smoke) 46%, var(--cigar-smoke) 50%, transparent 51%);
    opacity: 0.07;
}

/* === Desk Lamp Vignette === */
.desk-lamp-vignette {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    background: radial-gradient(ellipse at 80% 15%, rgba(196, 136, 58, 0.04) 0%, transparent 60%);
    transition: background 0.8s ease;
}

.desk-lamp-vignette.intensified {
    background: radial-gradient(ellipse at 80% 15%, rgba(196, 136, 58, 0.09) 0%, transparent 55%);
}

/* === Marginalia Sidebar === */
.marginalia-sidebar {
    display: none;
}

@media (min-width: 1200px) {
    .marginalia-sidebar {
        display: block;
        position: fixed;
        left: 0;
        top: 0;
        width: 200px;
        height: 100%;
        z-index: 100;
        padding: 20px 15px;
        background: linear-gradient(to right,
            rgba(46, 37, 25, 0.4) 0%,
            rgba(46, 37, 25, 0.15) 80%,
            transparent 100%
        );
        overflow: hidden;
    }
}

.margin-note {
    position: absolute;
    font-family: 'Caveat', cursive;
    font-size: clamp(0.85rem, 1.2vw, 1.1rem);
    font-weight: 400;
    color: var(--deep-ink-red);
    line-height: 1.4;
    padding: 6px 10px;
    max-width: 180px;
    opacity: 0.85;
}

.margin-ref {
    display: block;
    font-size: 0.85em;
    opacity: 0.7;
    margin-top: 2px;
}

/* === Section Shared Styles === */
section {
    position: relative;
    min-height: 100vh;
    padding: 60px 20px;
}

@media (min-width: 1200px) {
    section {
        padding-left: 220px;
    }
}

/* === Section Dividers === */
.section-divider {
    text-align: center;
    padding: 30px 0 40px;
    position: relative;
}

.section-divider::before,
.section-divider::after {
    content: '';
    position: absolute;
    left: 10%;
    right: 10%;
    height: 1px;
    background: var(--cigar-smoke);
}

.section-divider::before {
    top: 15px;
}

.section-divider::after {
    bottom: 20px;
}

.dingbat {
    font-family: 'Libre Baskerville', serif;
    font-size: 1.2rem;
    color: var(--cigar-smoke);
    letter-spacing: 0.5em;
    position: relative;
    z-index: 1;
    background: var(--mahogany-dark);
    padding: 0 20px;
}

/* === Rubber Stamps === */
.rubber-stamp {
    font-family: 'Caveat', cursive;
    font-size: 1.5rem;
    color: var(--deep-ink-red);
    border: 3px solid var(--deep-ink-red);
    padding: 8px 20px;
    display: inline-block;
    position: absolute;
    z-index: 50;
    opacity: 0;
    transform: scale(1.3) rotate(-8deg);
    filter: url(#rough);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: opacity 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275),
                transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.rubber-stamp.revealed {
    opacity: 0.85;
    transform: scale(1) rotate(-8deg);
}

.stamp-1 {
    top: 40px;
    right: 60px;
    transform: scale(1.3) rotate(-5deg);
}
.stamp-1.revealed {
    transform: scale(1) rotate(-5deg);
}

.stamp-2 {
    top: 30px;
    left: 80px;
    transform: scale(1.3) rotate(-12deg);
}
.stamp-2.revealed {
    transform: scale(1) rotate(-12deg);
}

.stamp-3 {
    top: 20px;
    right: 80px;
    transform: scale(1.3) rotate(-3deg);
}
.stamp-3.revealed {
    transform: scale(1) rotate(-3deg);
}

.stamp-4 {
    top: 30px;
    right: 60px;
    font-size: 2rem;
    transform: scale(1.3) rotate(-8deg);
}
.stamp-4.revealed {
    transform: scale(1) rotate(-8deg);
}

/* === Redaction Block Mechanic === */
.redaction-block {
    position: relative;
}

.redaction-block::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--classified-black);
    clip-path: inset(0 0 0 0);
    transition: clip-path 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 10;
    pointer-events: none;
}

.redaction-block.declassified::after {
    clip-path: inset(0 50% 0 50%);
}

/* === SECTION I: MASTHEAD === */
.section-masthead {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 40px 20px;
    position: relative;
    /* Paper grain texture via SVG filter */
    filter: url(#paper-grain);
}

@media (min-width: 1200px) {
    .section-masthead {
        padding-left: 220px;
    }
}

.masthead-inner {
    text-align: center;
    max-width: 900px;
    width: 100%;
}

.masthead-topbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 30px;
    padding: 0 20px;
}

.edition-info {
    font-family: 'Libre Baskerville', serif;
    font-style: italic;
    font-size: 0.85rem;
    color: var(--cigar-smoke);
}

.political-climate {
    text-align: right;
}

.climate-label {
    font-family: 'Libre Baskerville', serif;
    font-size: 0.75rem;
    color: var(--cigar-smoke);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    display: block;
    margin-bottom: 8px;
}

.climate-gauge {
    position: relative;
    width: 80px;
    height: 44px;
    margin-left: auto;
}

.gauge-bg {
    width: 80px;
    height: 40px;
    border-radius: 40px 40px 0 0;
    background: conic-gradient(
        from 0.75turn at 50% 100%,
        var(--telegram-blue) 0deg,
        var(--bourbon-amber) 90deg,
        var(--deep-ink-red) 180deg
    );
    overflow: hidden;
    position: relative;
}

.gauge-bg::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 56px;
    height: 28px;
    border-radius: 28px 28px 0 0;
    background: var(--mahogany-dark);
}

.gauge-needle {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 2px;
    height: 30px;
    background: var(--parchment-cream);
    transform-origin: bottom center;
    transform: rotate(-30deg);
    animation: gauge-swing 3s ease-out forwards;
    z-index: 2;
}

.gauge-needle::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: -3px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--parchment-cream);
}

@keyframes gauge-swing {
    0% { transform: rotate(-70deg); }
    60% { transform: rotate(45deg); }
    80% { transform: rotate(30deg); }
    100% { transform: rotate(38deg); }
}

.gauge-labels {
    display: flex;
    justify-content: space-between;
    font-family: 'Libre Baskerville', serif;
    font-size: 0.55rem;
    color: var(--cigar-smoke);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 2px;
}

.masthead-rules {
    height: 3px;
    margin: 0 auto;
    max-width: 100%;
    border-top: 1px solid var(--cigar-smoke);
    border-bottom: 1px solid var(--cigar-smoke);
}

.masthead-rules-top {
    margin-bottom: 20px;
}

.masthead-rules-bottom {
    margin-top: 20px;
}

.masthead-title {
    font-family: 'Playfair Display', serif;
    font-weight: 900;
    font-size: clamp(3rem, 8vw, 9rem);
    letter-spacing: 0.02em;
    line-height: 1.05;
    text-transform: uppercase;
    color: var(--parchment-cream);
}

.dateline {
    font-family: 'Libre Baskerville', serif;
    font-size: 0.85rem;
    color: var(--cigar-smoke);
    margin-top: 15px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.masthead-subtitle {
    font-family: 'Libre Baskerville', serif;
    font-style: italic;
    font-size: 0.9rem;
    color: var(--bourbon-amber);
    margin-top: 12px;
    letter-spacing: 0.03em;
}

/* Fold Crease */
.fold-crease {
    position: absolute;
    left: 0;
    right: 0;
    top: 55%;
    height: 4px;
    background: linear-gradient(
        to bottom,
        rgba(10, 8, 6, 0.08) 0%,
        rgba(10, 8, 6, 0.03) 50%,
        rgba(232, 220, 200, 0.02) 51%,
        transparent 100%
    );
    pointer-events: none;
    z-index: 5;
}

/* === SECTION II: LEAD STORY === */
.section-lead {
    padding-top: 30px;
}

.lead-columns {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    max-width: 1100px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .lead-columns {
        grid-template-columns: 3fr 5fr 4fr;
        gap: 0;
    }
}

.lead-col {
    padding: 20px;
    position: relative;
}

@media (min-width: 768px) {
    .lead-col + .lead-col {
        border-left: 1px solid var(--dark-surface);
    }
}

/* Pull Quote */
.pull-quote {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.2rem, 2vw, 1.8rem);
    font-weight: 700;
    line-height: 1.35;
    color: var(--parchment-cream);
    border-left: 4px solid var(--bourbon-amber);
    padding-left: 20px;
    font-style: italic;
}

/* Article */
.article-header {
    margin-bottom: 20px;
}

.article-headline {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.8rem, 3.5vw, 3.5rem);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: 0.02em;
    color: var(--parchment-cream);
    margin-bottom: 12px;
}

.byline {
    font-family: 'Libre Baskerville', serif;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--cigar-smoke);
}

.redacted-inline {
    background: var(--classified-black);
    color: var(--classified-black);
    padding: 1px 8px;
    user-select: none;
}

.article-body {
    text-align: justify;
    hyphens: auto;
    -webkit-hyphens: auto;
    margin-bottom: 16px;
    color: var(--parchment-cream);
}

.strike-through {
    position: relative;
    display: inline;
}

.strike-through::after {
    content: '';
    position: absolute;
    left: -2px;
    right: -2px;
    top: 50%;
    height: 2px;
    background: var(--deep-ink-red);
    transform: translateY(-50%) rotate(-0.5deg);
    opacity: 0;
    transition: opacity 0.6s ease;
}

.strike-through.drawn::after {
    opacity: 1;
}

/* Sidebar Intel */
.sidebar-intel {
    padding: 10px 0;
}

.sidebar-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--bourbon-amber);
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.intel-list {
    list-style: none;
}

.intel-list li {
    padding: 10px 0;
    border-bottom: 1px solid rgba(107, 93, 79, 0.3);
    font-size: 0.88rem;
}

.intel-link {
    color: var(--bourbon-amber);
    text-decoration: none;
    transition: color 0.3s ease;
}

.intel-link:hover {
    color: var(--parchment-cream);
}

.caveat-tag {
    font-family: 'Caveat', cursive;
    font-size: 0.8rem;
    color: var(--deep-ink-red);
    margin-left: 6px;
    transform: rotate(-2deg);
    display: inline-block;
}

/* === SECTION III: EVIDENCE BOARD === */
.section-evidence {
    min-height: 120vh;
    padding-bottom: 80px;
}

.evidence-container {
    position: relative;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    min-height: 80vh;
}

.connection-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

/* Card Flip */
.evidence-card {
    position: absolute;
    width: 280px;
    perspective: 1000px;
    z-index: 10;
}

/* Responsive: stack on mobile */
@media (max-width: 767px) {
    .evidence-card {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        width: 100% !important;
        max-width: 320px;
        margin: 20px auto;
        transform: none !important;
    }
}

.card-inner {
    position: relative;
    width: 100%;
    min-height: 180px;
    transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-style: preserve-3d;
}

.card-flip.flipped .card-inner {
    transform: rotateY(180deg);
}

.card-back, .card-front {
    position: absolute;
    width: 100%;
    min-height: 180px;
    backface-visibility: hidden;
    border-radius: 2px;
}

.card-back {
    background: var(--classified-black);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--dark-surface);
}

.classified-seal {
    font-family: 'Playfair Display', serif;
    font-size: 0.9rem;
    color: var(--dark-surface);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    opacity: 0.4;
}

.card-front {
    background: var(--newsprint-gray);
    padding: 20px;
    transform: rotateY(180deg);
    border: 1px solid var(--dark-surface);
}

.evidence-text {
    font-family: 'Libre Baskerville', serif;
    font-size: 0.88rem;
    color: var(--parchment-cream);
    line-height: 1.65;
    font-style: italic;
}

.evidence-source {
    display: block;
    font-family: 'Libre Baskerville', serif;
    font-size: 0.75rem;
    color: var(--cigar-smoke);
    margin-top: 10px;
}

/* Polaroid Card */
.polaroid-card .card-front {
    background: var(--parchment-cream);
    padding: 12px;
}

.polaroid-frame {
    background: white;
    padding: 10px 10px 30px;
    box-shadow: 2px 3px 10px rgba(0,0,0,0.4);
}

.polaroid-image {
    width: 100%;
    height: 140px;
    background: linear-gradient(135deg, var(--newsprint-gray) 0%, var(--dark-surface) 40%, var(--cigar-smoke) 100%);
}

.polaroid-image-2 {
    background: linear-gradient(200deg, var(--dark-surface) 0%, var(--mahogany-dark) 50%, var(--cigar-smoke) 100%);
}

.polaroid-caption {
    font-family: 'Caveat', cursive;
    font-size: 0.9rem;
    color: var(--dark-surface);
    margin-top: 8px;
    text-align: center;
}

/* Sticky Note */
.sticky-note .card-front {
    background: #D4C67A;
    padding: 18px;
    box-shadow: 3px 4px 12px rgba(0,0,0,0.35);
    border: none;
}

.sticky-text {
    font-family: 'Caveat', cursive;
    font-size: 1.05rem;
    color: var(--dark-surface);
    line-height: 1.5;
}

/* === SECTION IV: EDITORIAL === */
.section-editorial {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.editorial-container {
    max-width: 1100px;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    margin: 0 auto;
    position: relative;
}

@media (min-width: 900px) {
    .editorial-container {
        grid-template-columns: 160px 1fr;
        gap: 30px;
    }
}

/* Editorial Marginalia */
.editorial-marginalia {
    position: relative;
    display: none;
}

@media (min-width: 900px) {
    .editorial-marginalia {
        display: block;
        min-height: 400px;
    }
}

.margin-annotation {
    position: absolute;
    font-family: 'Caveat', cursive;
    font-size: 0.95rem;
    color: var(--deep-ink-red);
    line-height: 1.3;
    max-width: 150px;
    opacity: 0.8;
}

.annotation-line {
    display: block;
    width: 40px;
    height: 1px;
    background: var(--deep-ink-red);
    margin-top: 4px;
    opacity: 0.5;
}

/* Editorial Column */
.editorial-column {
    max-width: 700px;
    padding: 20px;
    position: relative;
}

.editorial-pulsing-rule {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--bourbon-amber);
    animation: pulse-rule 4s ease-in-out infinite;
    display: none;
}

@media (min-width: 900px) {
    .editorial-pulsing-rule {
        display: block;
        left: 160px;
    }
}

@keyframes pulse-rule {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.7; }
}

.editorial-dropcap::first-letter {
    font-family: 'Playfair Display', serif;
    font-weight: 900;
    font-size: 5em;
    float: left;
    line-height: 0.8;
    margin-right: 10px;
    margin-top: 5px;
    color: var(--bourbon-amber);
}

.editorial-body {
    text-align: justify;
    hyphens: auto;
    -webkit-hyphens: auto;
    margin-bottom: 18px;
    color: var(--parchment-cream);
}

.editorial-signature {
    font-family: 'Libre Baskerville', serif;
    font-style: italic;
    font-size: 0.95rem;
    color: var(--bourbon-amber);
    margin-top: 30px;
    text-align: right;
}

/* === SECTION V: CLASSIFIED APPENDIX === */
.section-classified {
    background: var(--classified-black);
    padding-bottom: 80px;
}

.appendix-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
}

.appendix-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.4rem, 3vw, 2.2rem);
    font-weight: 700;
    color: var(--parchment-cream);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
    text-align: center;
}

.appendix-subtitle {
    font-family: 'Libre Baskerville', serif;
    font-size: 0.75rem;
    color: var(--deep-ink-red);
    text-align: center;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-bottom: 40px;
}

.appendix-block {
    margin-bottom: 28px;
    padding: 15px 0;
    border-bottom: 1px solid rgba(107, 93, 79, 0.15);
}

.appendix-text {
    font-family: 'Libre Baskerville', serif;
    font-size: 0.95rem;
    line-height: 1.8;
    color: var(--parchment-cream);
}

.appendix-visible {
    color: var(--parchment-cream);
}

.appendix-redacted {
    background: var(--classified-black);
    color: var(--classified-black);
    padding: 2px 4px;
    position: relative;
    display: inline;
    border-bottom: 1px solid rgba(107, 93, 79, 0.1);
    user-select: none;
    transition: color 0.15s ease, background 0.15s ease;
    cursor: default;
}

.hoverable-redaction {
    cursor: pointer;
}

.hoverable-redaction:hover {
    color: rgba(232, 220, 200, 0.3);
    background: rgba(10, 8, 6, 0.7);
}

/* On mobile, use tap instead */
.hoverable-redaction.tapped {
    color: rgba(232, 220, 200, 0.3);
    background: rgba(10, 8, 6, 0.7);
}

.appendix-footer {
    display: flex;
    justify-content: space-between;
    margin-top: 50px;
    padding-top: 20px;
    border-top: 1px solid rgba(107, 93, 79, 0.2);
}

.footer-classification {
    font-family: 'Libre Baskerville', serif;
    font-size: 0.7rem;
    color: var(--deep-ink-red);
    text-transform: uppercase;
    letter-spacing: 0.15em;
}

.footer-page {
    font-family: 'Libre Baskerville', serif;
    font-size: 0.7rem;
    color: var(--cigar-smoke);
}

/* === FOOTER === */
.site-footer {
    background: var(--mahogany-dark);
    padding: 40px 20px;
    text-align: center;
}

.footer-rules {
    width: 200px;
    margin: 0 auto 20px;
    height: 3px;
    border-top: 1px solid var(--cigar-smoke);
    border-bottom: 1px solid var(--cigar-smoke);
}

.footer-content {
    font-family: 'Libre Baskerville', serif;
    font-size: 0.85rem;
    color: var(--cigar-smoke);
}

.footer-domain {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 1rem;
    color: var(--parchment-cream);
    letter-spacing: 0.05em;
}

.footer-separator {
    margin: 0 10px;
    color: var(--bourbon-amber);
}

.footer-tagline {
    font-style: italic;
    color: var(--cigar-smoke);
}

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

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

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

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

/* === Selection === */
::selection {
    background: var(--bourbon-amber);
    color: var(--mahogany-dark);
}
