/* jeongchi.boo - Political Archive CSS */

:root {
    /* Color Palette - Paper Aging Gradient */
    --paper-fresh: #F5ECD7;
    --paper-aged: #D4C5A0;
    --ink-black: #2B2926;
    --ink-indigo: #2E3A5C;
    --annotation-red: #8B3A2A;
    --archive-olive: #6B7356;
    --foxing-gold: #C4963A;
    --indigo-faded: #7A89A8;
    --archive-shadow: #3D3832;
    --purple-blue: #4A4A8A;
    
    /* Typography */
    --font-display: "Commissioner", sans-serif;
    --font-body: "Lora", serif;
    --font-annotation: "Caveat", cursive;
    --font-mono: "IBM Plex Mono", monospace;
    
    /* Spacing & Sizing */
    --fold-height: 100vh;
    --gutter-left: 8%;
    --gutter-right: 6%;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--paper-aged);
    color: var(--ink-black);
    overflow-x: hidden;
    line-height: 1.72;
}

/* === VIEWPORT & LAYOUT === */

.viewport-wrapper {
    position: relative;
    width: 100vw;
    min-height: 100vh;
    overflow: hidden;
}

.broadsheet-content {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
}

/* === GRID SYSTEM === */

.content-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 0.8fr 1.4fr 0.6fr;
    gap: 2rem;
    padding: 4rem 10%;
    align-items: start;
}

.grid-col-1-3 {
    grid-column: 1 / 4;
}

.grid-col-4-5 {
    grid-column: 4 / 6;
}

/* === FOLDS & SECTIONS === */

.fold {
    position: relative;
    min-height: var(--fold-height);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.fold-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 4rem;
    z-index: 1;
}

/* Paper texture background */
.fold {
    background: linear-gradient(135deg, var(--paper-fresh) 0%, var(--paper-aged) 60%, var(--foxing-gold) 100%);
    background-attachment: fixed;
    position: relative;
}

.fold::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 2px,
            rgba(0, 0, 0, 0.01) 2px,
            rgba(0, 0, 0, 0.01) 4px
        ),
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 1px,
            rgba(0, 0, 0, 0.01) 1px,
            rgba(0, 0, 0, 0.01) 2px
        ),
        radial-gradient(ellipse at 15% 35%, rgba(139, 58, 42, 0.03) 0%, transparent 40%),
        radial-gradient(ellipse at 75% 65%, rgba(196, 150, 58, 0.02) 0%, transparent 50%),
        radial-gradient(ellipse at 90% 20%, rgba(122, 137, 168, 0.02) 0%, transparent 35%);
    pointer-events: none;
    z-index: 0;
}

.fold-content {
    position: relative;
    z-index: 2;
}

/* Asymmetric weight distribution */
.fold-left-heavy {
    padding-left: 15%;
    padding-right: 5%;
}

.fold-right-heavy {
    padding-left: 5%;
    padding-right: 15%;
}

.fold-center {
    padding-left: 10%;
    padding-right: 10%;
}

/* Fold crease lines */
.fold {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: inset 0 -8px 16px rgba(0, 0, 0, 0.05);
}

/* === HERO SECTION === */

.fold-hero {
    background: linear-gradient(135deg, var(--paper-fresh) 0%, var(--paper-aged) 50%, var(--archive-shadow) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.masthead {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 7vw, 6rem);
    font-weight: 900;
    color: var(--ink-black);
    letter-spacing: -0.02em;
    margin: 2rem 0;
    text-transform: lowercase;
}

.subtitle {
    font-family: var(--font-body);
    font-size: 1.25rem;
    color: var(--ink-indigo);
    font-style: italic;
    margin: 1rem 0 2rem;
}

/* === NAVIGATION: MANILA FOLDER TABS === */

.folder-tabs {
    position: fixed;
    right: -20px;
    top: 20vh;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    z-index: 100;
}

.folder-tab {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    padding: 1rem 0.75rem;
    background: var(--paper-aged);
    border: 2px solid var(--ink-black);
    color: var(--ink-black);
    font-family: var(--font-mono);
    font-size: 0.875rem;
    cursor: pointer;
    transform: rotateZ(1deg);
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-radius: 2px;
}

.folder-tab:nth-child(2) {
    transform: rotateZ(-2deg);
}

.folder-tab:nth-child(3) {
    transform: rotateZ(3deg);
}

.folder-tab:nth-child(4) {
    transform: rotateZ(-1deg);
}

.folder-tab:hover {
    background: var(--foxing-gold);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    transform: translateX(-8px) rotateZ(0deg);
}

.folder-tab.active {
    background: var(--archive-olive);
    color: var(--paper-fresh);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* === ANNOTATION GUTTERS === */

.annotation-gutter {
    position: fixed;
    top: 0;
    height: 100vh;
    width: var(--gutter-left);
    z-index: 50;
    pointer-events: none;
}

.annotation-gutter.right {
    right: 0;
    width: var(--gutter-right);
    left: auto;
}

.annotation-note {
    position: absolute;
    opacity: 0.6;
    transition: opacity 0.3s ease;
    font-family: var(--font-annotation);
    font-size: 0.875rem;
}

.annotation-date {
    display: block;
    color: var(--annotation-red);
    font-weight: 700;
    font-size: 0.875rem;
}

.annotation-text {
    display: block;
    color: var(--ink-black);
    font-size: 0.75rem;
}

/* === TYPOGRAPHY === */

h1, h2, h3 {
    font-family: var(--font-display);
    color: var(--ink-black);
    margin: 1.5rem 0 1rem;
}

h2 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    letter-spacing: -0.01em;
}

h3 {
    font-size: 1.75rem;
    font-weight: 600;
}

.section-title {
    font-size: clamp(1.8rem, 4vw, 3rem);
    font-weight: 800;
    color: var(--annotation-red);
}

.document-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--ink-indigo);
    margin-top: 1rem;
}

.body-text {
    font-size: 1rem;
    line-height: 1.72;
    margin: 1.25rem 0;
    max-width: 65ch;
}

/* === PULL QUOTES === */

.pullquote-box {
    background: linear-gradient(135deg, var(--paper-fresh) 0%, var(--indigo-faded) 100%);
    border-left: 4px solid var(--annotation-red);
    padding: 2rem;
    margin: 2rem 0;
    position: relative;
    box-shadow: -4px 4px 12px rgba(0, 0, 0, 0.1);
}

.pullquote {
    font-family: var(--font-body);
    font-size: 1.25rem;
    font-style: italic;
    color: var(--ink-black);
    line-height: 1.6;
    margin: 0 0 1rem 0;
}

.attribution {
    font-family: var(--font-annotation);
    font-size: 0.875rem;
    color: var(--purple-blue);
    margin: 0;
}

/* === DOCUMENT SPECIMENS === */

.document-specimen {
    background: linear-gradient(180deg, var(--paper-fresh) 0%, var(--paper-aged) 100%);
    padding: 2.5rem;
    margin: 2rem 0;
    border: 2px solid var(--ink-black);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    position: relative;
}

.document-specimen::before {
    content: '';
    position: absolute;
    top: -8px;
    left: -8px;
    right: -8px;
    bottom: -8px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    pointer-events: none;
}

.document-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px dashed var(--ink-indigo);
}

.file-code {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--ink-indigo);
    letter-spacing: 0.08em;
    font-weight: 700;
}

.stamp-mark {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    color: var(--annotation-red);
}

.document-body {
    font-size: 0.95rem;
    line-height: 1.72;
    color: var(--ink-black);
}

.document-body p {
    margin: 1rem 0;
}

/* === RUBBER STAMPS === */

.stamp-container {
    margin: 2rem 0;
}

.rubber-stamp {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--annotation-red);
    border-radius: 50%;
    font-family: var(--font-mono);
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--annotation-red);
    text-align: center;
    transform: rotateZ(-15deg);
    opacity: 0.6;
    letter-spacing: 0.05em;
}

/* === WAVE DIVIDERS === */

.wave-divider {
    width: 100%;
    height: 60px;
    margin: 2rem 0;
    position: relative;
    opacity: 0.4;
}

.wave-divider::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg viewBox="0 0 1000 100" xmlns="http://www.w3.org/2000/svg"><defs><filter id="turbulence"><feTurbulence type="fractalNoise" baseFrequency="0.02" numOctaves="3" result="noise" /></filter></defs><path d="M0,50 Q50,20 100,50 T200,50 T300,50 T400,50 T500,50 T600,50 T700,50 T800,50 T900,50 T1000,50" stroke="%237A89A8" stroke-width="3" fill="none" filter="url(%23turbulence)" /><path d="M0,60 Q75,35 150,60 T300,60 T450,60 T600,60 T750,60 T900,60 T1000,60" stroke="%238B3A2A" stroke-width="2" fill="none" opacity="0.6" filter="url(%23turbulence)" /></svg>') no-repeat center;
    background-size: contain;
}

.wave-top {
    margin-top: 0;
}

.wave-bottom {
    margin-bottom: 0;
}

/* === CHRONOLOGY ITEMS === */

.chronology-items {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin: 2rem 0;
    padding-left: 4rem;
}

.chrono-item {
    position: relative;
    padding-left: 2rem;
}

.chrono-item::before {
    content: '';
    position: absolute;
    left: -2rem;
    top: 0.5rem;
    width: 1rem;
    height: 1rem;
    background: var(--foxing-gold);
    border: 2px solid var(--ink-black);
    border-radius: 50%;
}

.chrono-year {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--annotation-red);
    display: block;
    margin-bottom: 0.5rem;
}

.chrono-text {
    font-size: 0.95rem;
    color: var(--ink-black);
    line-height: 1.6;
}

/* === TESTIMONY BLOCK === */

.testimony-block {
    background: linear-gradient(to right, transparent 0%, var(--indigo-faded) 100%);
    border-left: 6px solid var(--annotation-red);
    padding: 3rem;
    margin: 2rem 0;
}

.testimony-text {
    font-size: 1.1rem;
    line-height: 1.8;
    font-style: italic;
    color: var(--ink-black);
    margin: 0 0 1.5rem 0;
}

.testimony-attribution {
    font-family: var(--font-annotation);
    font-size: 0.95rem;
    color: var(--ink-indigo);
    margin: 0;
}

/* === CLOSING STATEMENT === */

.closing-statement {
    text-align: center;
    max-width: 70ch;
    margin: 0 auto;
}

.closing-statement h2 {
    color: var(--annotation-red);
    margin-bottom: 2rem;
}

.closing-text {
    font-size: 1.05rem;
    line-height: 1.8;
    margin: 1.5rem 0;
    color: var(--ink-black);
}

/* === SCROLL INDICATOR === */

.scroll-indicator {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
}

.wave-pulse {
    width: 3rem;
    height: 3rem;
    background: url('data:image/svg+xml,<svg viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><path d="M10,50 Q25,30 40,50 T70,50" stroke="%238B3A2A" stroke-width="2" fill="none" /><path d="M15,60 Q30,40 45,60 T75,60" stroke="%237A89A8" stroke-width="2" fill="none" opacity="0.6" /></svg>') center no-repeat;
    background-size: contain;
    animation: pulse-wave 2s ease-in-out infinite;
}

@keyframes pulse-wave {
    0%, 100% {
        opacity: 0.6;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.1);
    }
}

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

@media (max-width: 1200px) {
    .content-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
        padding: 3rem 5%;
    }
    
    .grid-col-1-3,
    .grid-col-4-5 {
        grid-column: 1 / -1;
    }
    
    .fold-left-heavy,
    .fold-right-heavy {
        padding-left: 10%;
        padding-right: 10%;
    }
}

@media (max-width: 768px) {
    :root {
        --gutter-left: 5%;
        --gutter-right: 5%;
    }
    
    .folder-tabs {
        right: 0;
        top: auto;
        bottom: 1rem;
        flex-direction: row;
        left: 50%;
        transform: translateX(-50%);
    }
    
    .folder-tab {
        writing-mode: horizontal-tb;
        text-orientation: auto;
        padding: 0.5rem 0.75rem;
        font-size: 0.75rem;
    }
    
    .masthead {
        font-size: clamp(2rem, 6vw, 3.5rem);
    }
    
    .fold-content {
        padding: 2rem;
    }
    
    .chronology-items {
        padding-left: 2rem;
    }
    
    .testimony-block {
        padding: 2rem;
    }
}

@media (max-width: 480px) {
    .fold {
        min-height: auto;
        padding: 2rem 1rem;
    }
    
    .masthead {
        font-size: clamp(1.75rem, 5vw, 2.5rem);
    }
    
    .body-text {
        font-size: 0.95rem;
    }
    
    .document-specimen {
        padding: 1.5rem;
    }
    
    .annotation-gutter {
        display: none;
    }
}

/* === PRINT STYLES === */

@media print {
    .folder-tabs,
    .scroll-indicator,
    .annotation-gutter {
        display: none;
    }
    
    .fold {
        page-break-inside: avoid;
    }
}
