/* 계엄령.com — Brutalist Anti-Design */

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

html {
    scroll-behavior: smooth;
}

body {
    background: #000000;
    color: #FFFFFF;
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

/* ===== SECTION 1: DECLARATION (Hero) ===== */
.hero {
    background: #000000;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    overflow: hidden;
    position: relative;
}

.hero-inner {
    max-width: 900px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.hero-title-container {
    overflow: hidden;
    margin-bottom: 1.5rem;
    padding: 0 1rem;
}

.hero-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    font-size: clamp(48px, 10vw, 96px);
    color: #FFFFFF;
    letter-spacing: -0.03em;
    line-height: 1;
    white-space: nowrap;
    transform: scale(1.15);
}

.red-line {
    width: 160px;
    height: 2px;
    background: #CC0000;
    margin: 0 auto 1.5rem;
}

.hero-subtitle {
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    font-size: 14px;
    color: #CC0000;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.hero-date {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 16px;
    color: #E0E0E0;
    margin-bottom: 1.25rem;
    font-variant-numeric: tabular-nums;
}

.hero-desc {
    font-size: 16px;
    color: #E0E0E0;
    max-width: 640px;
    margin: 0 auto;
    line-height: 1.65;
}

/* ===== HEAVY RULES ===== */
.heavy-rule {
    border: none;
    border-top: 4px solid #FFFFFF;
    margin: 0;
}

/* ===== SHARED SECTION STYLES ===== */
.section-inner {
    max-width: 900px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

.section-heading {
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    font-size: 40px;
    color: #FFFFFF;
    letter-spacing: -0.03em;
    margin-bottom: 1rem;
}

.subsection-heading {
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    font-size: 24px;
    color: #FFFFFF;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
}

.section-subtext {
    font-size: 15px;
    color: #666666;
    margin-bottom: 2rem;
    max-width: 640px;
}

.section-divider {
    border: none;
    border-top: 2px solid #CC0000;
    margin: 3rem 0;
}

/* ===== SECTION 2: CHRONICLE ===== */
.chronicle {
    background: #000000;
}

.entry {
    border-bottom: 1px solid #333333;
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
}

.entry:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.entry-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.5rem;
    align-items: baseline;
}

.entry-date {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 14px;
    color: #CC0000;
    font-variant-numeric: tabular-nums;
    font-feature-settings: 'tnum';
}

.entry-country {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 14px;
    color: #666666;
}

.entry-title {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 18px;
    color: #FFFFFF;
    margin-bottom: 0.35rem;
}

.entry-detail {
    font-size: 14px;
    color: #E0E0E0;
    margin-bottom: 0.35rem;
}

.entry-impact {
    font-size: 14px;
    color: #E0E0E0;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.warn-icon {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
    margin-top: 4px;
}

/* ===== SECTION 3: ANALYSIS ===== */
.analysis {
    background: #1A1A1A;
}

/* Timeline */
.timeline-container {
    margin-bottom: 1rem;
}

.timeline-controls {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.timeline-btn {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.5rem 1rem;
    background: #333333;
    color: #666666;
    border: 1px solid #333333;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.timeline-btn:hover {
    color: #FFFFFF;
    border-color: #666666;
}

.timeline-btn.active {
    color: #CC0000;
    border-color: #CC0000;
    background: #000000;
}

.timeline {
    position: relative;
    padding: 2rem 0;
    overflow-x: auto;
}

.timeline-track {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-width: 700px;
    height: 60px;
    padding: 0 1rem;
}

.timeline-line {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: #333333;
    transform: translateY(-50%);
}

.timeline-node {
    position: relative;
    width: 14px;
    height: 14px;
    background: #CC0000;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
    z-index: 2;
}

.timeline-node:hover {
    transform: scale(1.6);
    background: #FFCC00;
}

.timeline-node.active {
    background: #FFCC00;
    transform: scale(1.6);
}

.timeline-node.hidden {
    opacity: 0.15;
    pointer-events: none;
}

.node-year {
    position: absolute;
    bottom: -22px;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    color: #666666;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
    font-feature-settings: 'tnum';
}

.timeline-detail {
    margin-top: 1rem;
    padding: 1rem;
    border-left: 4px solid #CC0000;
    background: #000000;
    min-height: 40px;
}

.timeline-detail-text {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 14px;
    color: #E0E0E0;
}

/* Constitutional Comparison Table */
.comparison-table-wrapper {
    overflow-x: auto;
    margin-bottom: 1rem;
}

.comparison-table {
    width: 100%;
    min-width: 700px;
}

.comp-row {
    display: grid;
    grid-template-columns: 120px 160px 1fr 110px 1fr;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid #333333;
    font-size: 14px;
    align-items: start;
}

.comp-header {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12px;
    color: #666666;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid #FFFFFF;
    position: sticky;
    top: 0;
    background: #1A1A1A;
    z-index: 5;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.comp-country {
    font-family: 'IBM Plex Mono', monospace;
    color: #CC0000;
    font-feature-settings: 'tnum';
}

.comp-header .comp-country {
    color: #666666;
}

.comp-authority {
    color: #FFFFFF;
    font-weight: 600;
}

.comp-header .comp-authority {
    color: #666666;
    font-weight: 400;
}

.comp-legislative,
.comp-duration,
.comp-judicial {
    color: #E0E0E0;
}

.comp-header .comp-legislative,
.comp-header .comp-duration,
.comp-header .comp-judicial {
    color: #666666;
}

/* Impact Metrics Dashboard */
.metrics-dashboard {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-top: 1rem;
}

.metric-card {
    background: #000000;
    padding: 1.5rem;
    border-top: 3px solid #CC0000;
}

.metric-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    color: #666666;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

.metric-value {
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    font-size: 36px;
    color: #FFCC00;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
    font-feature-settings: 'tnum';
    display: inline;
}

.metric-value.metric-red {
    color: #CC0000;
}

.metric-suffix {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 14px;
    color: #666666;
    margin-top: 0.25rem;
}

.metric-context {
    font-size: 12px;
    color: #666666;
    margin-top: 0.5rem;
    line-height: 1.4;
}

/* ===== SECTION 4: PRIMARY SOURCES ===== */
.documents {
    background: #1A1A1A;
}

.doc-quote {
    border-left: 4px solid #CC0000;
    padding-left: 24px;
    margin-bottom: 2rem;
    font-style: italic;
    color: #E0E0E0;
    line-height: 1.65;
}

.doc-quote:last-child {
    margin-bottom: 0;
}

.doc-cite {
    font-family: 'IBM Plex Mono', monospace;
    font-style: normal;
    font-size: 13px;
    color: #666666;
    display: block;
    margin-top: 0.75rem;
}

/* ===== SECTION 5: COMPARATIVE DATA ===== */
.stats {
    background: #000000;
}

.table-sort-controls {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.sort-btn {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.5rem 1rem;
    background: #1A1A1A;
    color: #666666;
    border: 1px solid #333333;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
}

.sort-btn:hover {
    color: #FFFFFF;
    border-color: #666666;
}

.sort-btn.active {
    color: #CC0000;
    border-color: #CC0000;
}

.data-table {
    width: 100%;
}

.table-row {
    display: grid;
    grid-template-columns: 120px 1fr 120px 100px 100px;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid #333333;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 14px;
    font-variant-numeric: tabular-nums;
    font-feature-settings: 'tnum';
    transition: background 0.15s;
}

.table-row:not(.table-header):hover {
    background: #1A1A1A;
}

.table-header {
    color: #666666;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom-color: #FFFFFF;
    border-bottom-width: 2px;
    border-bottom-style: solid;
    position: sticky;
    top: 0;
    background: #000000;
    z-index: 5;
}

.col-date {
    color: #CC0000;
}

.col-country {
    color: #FFFFFF;
}

.col-duration {
    color: #E0E0E0;
}

.col-detained {
    color: #FFCC00;
}

.col-killed {
    color: #CC0000;
}

.table-header .col-date,
.table-header .col-country,
.table-header .col-duration,
.table-header .col-detained,
.table-header .col-killed {
    color: #666666;
}

/* ===== SECTION 6: FOOTER / ARCHIVE ===== */
.footer {
    background: #000000;
    border-top: 2px solid #CC0000;
}

.footer-inner {
    max-width: 900px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

.footer-heading {
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    font-size: 40px;
    color: #FFFFFF;
    letter-spacing: -0.03em;
    margin-bottom: 1rem;
}

.footer-statement {
    font-size: 15px;
    color: #E0E0E0;
    max-width: 600px;
    margin-bottom: 2.5rem;
    line-height: 1.65;
}

.footer-columns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 3rem;
}

.footer-col-heading {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12px;
    color: #CC0000;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

.footer-list {
    list-style: none;
    padding: 0;
}

.footer-list li {
    font-size: 13px;
    color: #666666;
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.footer-list em {
    font-style: italic;
    color: #E0E0E0;
}

.footer-bottom {
    border-top: 1px solid #333333;
    padding-top: 1.5rem;
}

.footer-copy {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 13px;
    color: #333333;
}

/* ===== ANIMATIONS ===== */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .section-inner,
    .footer-inner {
        padding: 3rem 1.5rem;
    }

    .section-heading,
    .footer-heading {
        font-size: 32px;
    }

    .metrics-dashboard {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .metric-value {
        font-size: 28px;
    }

    .footer-columns {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .table-row {
        grid-template-columns: 90px 1fr 80px 70px 70px;
        font-size: 12px;
        gap: 0.5rem;
    }

    .comp-row {
        grid-template-columns: 90px 120px 1fr 80px 1fr;
        font-size: 12px;
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: clamp(36px, 12vw, 72px);
    }

    .metrics-dashboard {
        grid-template-columns: 1fr;
    }

    .table-row {
        grid-template-columns: 80px 1fr 70px 60px 60px;
        font-size: 11px;
        gap: 0.35rem;
    }
}
