/* jeongchi.boo — Political Archive Design */

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

:root {
    --bg-primary: #0d0d0d;
    --bg-warm: #1a1a1a;
    --bg-paper: #f5f2ed;
    --bg-aged: #e8e5e0;
    --text-primary: #e8e5e0;
    --text-secondary: #b8b4ae;
    --text-muted: #6b6b6b;
    --text-dark: #4a4a4a;
    --accent: #8b0000;
    --font-display: 'Zilla Slab', serif;
    --font-body: 'Source Serif 4', serif;
    --font-mono: 'IBM Plex Mono', monospace;
    --font-korean: 'Noto Serif KR', serif;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-body);
    overflow-x: hidden;
}

/* Sections */
.section {
    min-height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 8vw;
    overflow: hidden;
}

/* Z-Pattern Layout */
.z-pattern {
    width: 100%;
    max-width: 1200px;
    display: grid;
    grid-template-rows: auto 1fr auto;
    min-height: 70vh;
    position: relative;
    z-index: 2;
}

.z-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding-bottom: 3rem;
    border-bottom: 1px solid var(--text-muted);
}

.z-center {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 4rem 0;
}

.z-bottom {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding-top: 3rem;
    border-top: 1px solid var(--text-muted);
}

/* Typography */
.doc-number,
.date-stamp,
.section-label,
.classification,
.reference,
.scroll-indicator,
.return-top {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    color: var(--text-muted);
    text-transform: uppercase;
}

.scroll-indicator,
.return-top {
    cursor: pointer;
    transition: color 0.3s ease;
}

.scroll-indicator:hover,
.return-top:hover {
    color: var(--accent);
}

.declaration-title {
    font-family: var(--font-display);
    font-size: clamp(3rem, 8vw, 7rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 0.95;
    text-transform: uppercase;
    color: var(--text-primary);
}

.declaration-subtitle {
    font-family: var(--font-korean);
    font-size: clamp(1.2rem, 2.5vw, 2rem);
    color: var(--text-secondary);
    margin-top: 1.5rem;
    font-weight: 400;
}

.section-heading {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 4vw, 3.5rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.1;
    text-transform: uppercase;
    margin-bottom: 2rem;
}

.body-text p {
    font-family: var(--font-body);
    font-size: clamp(1rem, 1.5vw, 1.25rem);
    line-height: 1.7;
    color: var(--text-secondary);
    max-width: 60ch;
    margin-bottom: 1.5rem;
}

.korean-text {
    font-family: var(--font-korean);
    color: var(--text-muted) !important;
    font-style: italic;
}

/* Collage Fragments */
.collage {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}

.fragment {
    position: absolute;
    opacity: 0.07;
    transition: opacity 0.6s ease;
}

.section:hover .fragment {
    opacity: 0.12;
}

.fragment-1 {
    width: 300px;
    height: 400px;
    background: var(--bg-paper);
    top: 10%;
    right: 5%;
    transform: rotate(3deg);
}

.fragment-2 {
    width: 200px;
    height: 280px;
    background: var(--bg-warm);
    border: 1px solid var(--text-muted);
    top: 30%;
    right: 15%;
    transform: rotate(-2deg);
}

.fragment-3 {
    width: 250px;
    height: 150px;
    background: var(--accent);
    bottom: 15%;
    left: 5%;
    transform: rotate(1.5deg);
}

.fragment-4 {
    width: 350px;
    height: 250px;
    background: var(--bg-paper);
    top: 15%;
    left: -5%;
    transform: rotate(-3deg);
}

.fragment-5 {
    width: 180px;
    height: 320px;
    background: var(--bg-warm);
    border: 1px solid var(--text-muted);
    bottom: 10%;
    right: 8%;
    transform: rotate(2.5deg);
}

.fragment-6 {
    width: 280px;
    height: 200px;
    background: var(--bg-paper);
    top: 20%;
    right: 10%;
    transform: rotate(-1.5deg);
}

.fragment-7 {
    width: 220px;
    height: 350px;
    background: var(--accent);
    bottom: 5%;
    left: 10%;
    transform: rotate(4deg);
    opacity: 0.04;
}

.fragment-8 {
    width: 160px;
    height: 160px;
    background: var(--bg-aged);
    top: 5%;
    left: 30%;
    transform: rotate(-2.5deg);
}

/* Seals */
.seal {
    position: absolute;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 2px solid var(--accent);
    opacity: 0.15;
    z-index: 1;
}

.seal::after {
    content: '';
    position: absolute;
    inset: 10px;
    border-radius: 50%;
    border: 1px solid var(--accent);
}

.seal-1 {
    bottom: 15%;
    right: 10%;
}

.seal-2 {
    top: 10%;
    left: 8%;
}

/* Redaction Bars */
.redaction-bar {
    position: absolute;
    height: 1.5rem;
    background: var(--accent);
    opacity: 0.2;
    z-index: 1;
}

.bar-1 {
    width: 40%;
    top: 20%;
    left: 55%;
    transform: rotate(-0.5deg);
}

.bar-2 {
    width: 25%;
    top: 65%;
    left: 5%;
    transform: rotate(0.3deg);
}

.bar-3 {
    width: 30%;
    bottom: 25%;
    right: 10%;
    transform: rotate(-0.8deg);
}

/* Amendment Lines */
.amendment-lines {
    margin-top: 2rem;
    padding: 2rem;
    border-left: 3px solid var(--accent);
    background: rgba(139, 0, 0, 0.03);
}

.struck-text {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-muted);
    text-decoration: line-through;
    margin-bottom: 0.5rem;
    opacity: 0.6;
}

.new-text {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-primary);
    margin-top: 1rem;
    padding-left: 1rem;
    border-left: 2px solid var(--accent);
}

/* Section-specific backgrounds */
.section-declaration {
    background: var(--bg-primary);
}

.section-archive {
    background: var(--bg-warm);
}

.section-debate {
    background: var(--bg-primary);
}

.section-amendment {
    background: var(--bg-warm);
}

.section-record {
    background: var(--bg-primary);
}

/* Scroll-driven reveal */
.section .z-pattern {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.section.visible .z-pattern {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 768px) {
    .section {
        padding: 3rem 5vw;
    }

    .z-top,
    .z-bottom {
        flex-direction: column;
        gap: 0.5rem;
    }

    .fragment {
        display: none;
    }
}
