/* 계엄령.quest — Parallax Storytelling */

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

html {
    scroll-behavior: smooth;
}

body {
    background: #0D1117;
    color: #E8E8E8;
    font-family: 'Lora', serif;
    font-weight: 400;
    font-size: 17px;
    line-height: 1.75;
    overflow-x: hidden;
}

/* ===== Timeline Sidebar ===== */
#timeline-sidebar {
    position: fixed;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
    display: flex;
    align-items: center;
}

.timeline-track {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    position: relative;
}

.timeline-track::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 1px;
    background: rgba(160, 174, 192, 0.2);
    transform: translateX(-50%);
}

.timeline-node {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    text-decoration: none;
    z-index: 1;
}

.timeline-node::after {
    content: attr(data-label);
    position: absolute;
    right: 36px;
    white-space: nowrap;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    color: #A0AEC0;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.timeline-node:hover::after {
    opacity: 1;
}

.node-dot {
    display: block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(160, 174, 192, 0.3);
    border: 1px solid rgba(160, 174, 192, 0.4);
    transition: all 0.3s ease;
}

.timeline-node.active .node-dot {
    background: #E53E3E;
    border-color: #E53E3E;
    box-shadow: 0 0 8px rgba(229, 62, 62, 0.4);
}

/* ===== Hero Zone ===== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    perspective: 1000px;
}

.parallax-container {
    position: absolute;
    inset: 0;
    z-index: 0;
    transform-style: preserve-3d;
}

.parallax-layer {
    position: absolute;
    inset: 0;
    will-change: transform;
}

.layer-sky {
    background: linear-gradient(180deg, #070B10 0%, #0D1117 40%, #1A2332 100%);
    transform: translateZ(-200px) scale(1.2);
}

.layer-buildings {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    transform: translateZ(-100px) scale(1.1);
}

.buildings-svg {
    width: 100%;
    height: 100%;
    position: absolute;
    bottom: 0;
    opacity: 0.7;
}

.layer-foreground {
    display: flex;
    align-items: flex-end;
    transform: translateZ(0px);
}

.barricade-svg {
    width: 100%;
    height: 200px;
    position: absolute;
    bottom: 0;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 640px;
    padding: 2rem;
    animation: heroFadeIn 2s ease forwards;
}

@keyframes heroFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-date {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 14px;
    color: #A0AEC0;
    margin-bottom: 1rem;
    letter-spacing: 0.05em;
}

.hero-title {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 40px;
    color: #E8E8E8;
    margin-bottom: 0.5rem;
    letter-spacing: 0.02em;
}

.hero-subtitle {
    font-size: 17px;
    color: #A0AEC0;
    margin-bottom: 2.5rem;
}

/* ===== Perspective Selector ===== */
.perspective-selector {
    margin-bottom: 2rem;
}

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

.selector-options {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

.perspective-btn {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 13px;
    color: #A0AEC0;
    background: rgba(45, 55, 72, 0.6);
    border: 1px solid rgba(160, 174, 192, 0.2);
    padding: 0.5rem 1.25rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.perspective-btn:hover {
    background: rgba(45, 55, 72, 0.9);
    border-color: rgba(160, 174, 192, 0.5);
    color: #E8E8E8;
}

.perspective-btn.active {
    color: #E8E8E8;
    background: #E53E3E;
    border-color: #E53E3E;
}

/* ===== Scroll Indicator ===== */
.scroll-indicator {
    margin-top: 1.5rem;
}

.scroll-arrow {
    display: inline-block;
    width: 20px;
    height: 20px;
    border-right: 2px solid #A0AEC0;
    border-bottom: 2px solid #A0AEC0;
    transform: rotate(45deg);
    opacity: 0.4;
    animation: scrollBounce 2s ease infinite;
}

@keyframes scrollBounce {
    0%, 100% { transform: rotate(45deg) translateY(0); opacity: 0.4; }
    50% { transform: rotate(45deg) translateY(6px); opacity: 0.8; }
}

/* ===== Haze Overlay ===== */
.haze-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 200px;
    background: linear-gradient(transparent 0%, rgba(13, 17, 23, 0.8) 100%);
    pointer-events: none;
    z-index: 1;
}

.haze-overlay.top {
    top: 0;
    bottom: auto;
    height: 120px;
    background: linear-gradient(rgba(13, 17, 23, 0.8) 0%, transparent 100%);
}

/* ===== Chapters ===== */
.chapter {
    position: relative;
    padding: 6rem 2rem 4rem;
    min-height: 80vh;
}

.chapter-inner {
    max-width: 680px;
    margin: 0 auto;
}

.chapter-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12px;
    color: #A0AEC0;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
}

.chapter-title {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 28px;
    color: #E8E8E8;
    margin-bottom: 2rem;
}

/* ===== Narrative Panel ===== */
.narrative-panel {
    background: rgba(45, 55, 72, 0.4);
    backdrop-filter: blur(8px);
    padding: 1.75rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    position: relative;
}

.narrative-text {
    color: #E8E8E8;
    margin-bottom: 1rem;
}

.narrative-text:last-child {
    margin-bottom: 0;
}

/* ===== Live Marker ===== */
.live-marker {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    color: #E53E3E;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.live-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #E53E3E;
    animation: livePulse 1.5s ease infinite;
}

@keyframes livePulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(229, 62, 62, 0.6); }
    50% { opacity: 0.6; box-shadow: 0 0 0 6px rgba(229, 62, 62, 0); }
}

/* ===== Perspective Content ===== */
.perspective-content {
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: opacity 0.5s ease, max-height 0.5s ease;
    pointer-events: none;
}

.perspective-content.visible {
    opacity: 1;
    max-height: 1000px;
    pointer-events: auto;
}

/* ===== Journalist Radio Static Effect ===== */
.journalist-static {
    position: relative;
    overflow: hidden;
}

.journalist-static::before {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(236, 201, 75, 0.02) 2px,
        rgba(236, 201, 75, 0.02) 4px
    );
    pointer-events: none;
    animation: staticFlicker 0.15s steps(2) infinite;
    z-index: 1;
}

@keyframes staticFlicker {
    0% { opacity: 0.5; }
    50% { opacity: 0.8; }
    100% { opacity: 0.5; }
}

.journalist-static::after {
    content: '/// BROADCAST';
    position: absolute;
    top: 8px;
    right: 12px;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 9px;
    color: #ECC94B;
    opacity: 0.5;
    letter-spacing: 0.1em;
    z-index: 2;
}

/* ===== Document Overlay ===== */
.document-overlay {
    background: #1A2332;
    border: 1px solid #A0AEC0;
    padding: 1.5rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
}

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

.doc-text {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 14px;
    color: #A0AEC0;
    line-height: 1.6;
}

/* ===== Decision Points ===== */
.decision-point {
    border: 2px solid #E53E3E;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    margin-bottom: 1.5rem;
}

.decision-prompt {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 20px;
    color: #E53E3E;
    margin-bottom: 1.25rem;
}

.decision-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.decision-btn {
    font-family: 'Lora', serif;
    font-size: 15px;
    color: #E8E8E8;
    background: rgba(229, 62, 62, 0.08);
    border: 1px solid rgba(229, 62, 62, 0.3);
    padding: 0.75rem 1.25rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
}

.decision-btn:hover {
    background: rgba(229, 62, 62, 0.18);
    border-color: rgba(229, 62, 62, 0.6);
}

.decision-btn.chosen {
    background: rgba(229, 62, 62, 0.2);
    border-color: #E53E3E;
    cursor: default;
}

.decision-btn.dimmed {
    opacity: 0.3;
    cursor: default;
}

.consequence-reveal {
    margin-top: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.6s ease, margin-top 0.6s ease;
}

.consequence-reveal.visible {
    margin-top: 1.25rem;
    max-height: 300px;
}

.consequence-text {
    font-size: 15px;
    color: #A0AEC0;
    font-style: italic;
    line-height: 1.7;
    text-align: left;
    padding: 1rem;
    background: rgba(45, 55, 72, 0.3);
    border-radius: 4px;
    border-left: 3px solid #E53E3E;
}

/* ===== Historian Note ===== */
.historian-note {
    background: rgba(45, 55, 72, 0.3);
    border-left: 3px solid #ECC94B;
    padding: 1.25rem;
    border-radius: 0 8px 8px 0;
    margin-bottom: 1.5rem;
}

.note-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    color: #ECC94B;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
}

.note-text {
    font-size: 15px;
    color: #A0AEC0;
    line-height: 1.7;
}

/* ===== Resolution Marker ===== */
.resolution-marker {
    background: rgba(72, 187, 120, 0.08);
    border: 1px solid rgba(72, 187, 120, 0.3);
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    margin-bottom: 1.5rem;
}

.resolution-icon {
    display: inline-block;
    font-size: 32px;
    color: #48BB78;
    margin-bottom: 0.75rem;
}

.resolution-text {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 20px;
    color: #48BB78;
    margin-bottom: 0.5rem;
}

.resolution-sub {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 13px;
    color: #A0AEC0;
}

/* ===== Reflection ===== */
.reflection {
    background: linear-gradient(180deg, #0D1117 0%, #1A2332 50%, #2D3748 100%);
    padding: 6rem 2rem;
}

.reflection-inner {
    max-width: 680px;
    margin: 0 auto;
    text-align: center;
}

.reflection-title {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 28px;
    color: #E8E8E8;
    margin-bottom: 2rem;
}

.reflection-questions {
    margin-bottom: 3rem;
}

.reflection-text {
    color: #A0AEC0;
    margin-bottom: 1.25rem;
    font-size: 17px;
}

.reflection-text:last-child {
    color: #E8E8E8;
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 20px;
    margin-top: 1rem;
}

.resources {
    text-align: left;
}

.resources-heading {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 13px;
    color: #A0AEC0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

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

.resource-list li {
    padding: 0.6rem 0;
    border-bottom: 1px solid rgba(160, 174, 192, 0.15);
}

.resource-list li:last-child {
    border-bottom: none;
}

.resource-link {
    color: #48BB78;
    text-decoration: none;
    font-size: 15px;
    transition: color 0.2s ease;
}

.resource-link:hover {
    color: #68D391;
    text-decoration: underline;
}

/* ===== Footer ===== */
.site-footer {
    background: #0D1117;
    border-top: 1px solid rgba(160, 174, 192, 0.15);
    padding: 2.5rem 2rem;
    text-align: center;
}

.footer-inner {
    max-width: 680px;
    margin: 0 auto;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.footer-link {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 13px;
    color: #A0AEC0;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-link:hover {
    color: #E8E8E8;
}

.footer-copy {
    font-size: 13px;
    color: #A0AEC0;
}

/* ===== Fade-in Sections ===== */
.fade-section {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* ===== Responsive ===== */
@media (max-width: 768px) {
    #timeline-sidebar {
        display: none;
    }

    .hero-title {
        font-size: 32px;
    }

    .chapter-title {
        font-size: 24px;
    }

    .selector-options {
        flex-direction: column;
        align-items: center;
    }

    .chapter {
        padding: 4rem 1.5rem 3rem;
    }

    .decision-point {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 28px;
    }

    body {
        font-size: 16px;
    }

    .narrative-panel {
        padding: 1.25rem;
    }
}
