/* ============================================
   계엄령.quest - Dark Academia War Archive
   Navy Metallic Palette | Z-Pattern Layout
   ============================================ */

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: #0A1028;
    color: #D8DCE8;
    font-family: 'Spectral', Georgia, serif;
    font-size: 1rem;
    line-height: 1.85;
    font-weight: 400;
    overflow-x: hidden;
}

/* --- Typography --- */
h1, h2, .closing-title {
    font-family: 'Poiret One', sans-serif;
    font-weight: 400;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-title {
    font-size: clamp(3rem, 8vw, 5rem);
    color: #D8DCE8;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.section-heading {
    font-size: clamp(1.4rem, 3vw, 2rem);
    color: #D8DCE8;
    margin-bottom: 1.5rem;
    letter-spacing: 0.08em;
}

.section-heading.officer-accent {
    color: #3A5080;
}

.hero-subtitle {
    font-family: 'Spectral', Georgia, serif;
    font-size: 1.1rem;
    color: #A0AAC8;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
}

.hero-description {
    color: #A0AAC8;
    max-width: 420px;
    font-size: 0.95rem;
}

.body-text {
    color: #A0AAC8;
    margin-bottom: 1.2rem;
    font-size: 1rem;
    line-height: 1.85;
}

.body-text.gold-accent {
    color: #C8A050;
    font-style: italic;
    border-left: 2px solid #C8A050;
    padding-left: 1rem;
    margin-top: 1.5rem;
}

.alert-red {
    color: #A03030;
}

.closing-title {
    font-size: 2rem;
    color: #D8DCE8;
    letter-spacing: 0.08em;
    margin-bottom: 1rem;
}

.closing-text {
    color: #A0AAC8;
    max-width: 520px;
    margin: 2rem auto;
    text-align: center;
    font-style: italic;
    line-height: 1.9;
}

/* --- Gold Rule --- */
.gold-rule {
    width: 120px;
    height: 1px;
    background: linear-gradient(90deg, transparent, #C8A050, transparent);
    margin-bottom: 2rem;
}

.gold-rule-center {
    margin-left: auto;
    margin-right: auto;
}

.gold-rule-final {
    margin-top: 2rem;
    margin-left: auto;
    margin-right: auto;
    width: 80px;
    opacity: 0.5;
}

/* --- Z-Pattern Sections --- */
.z-section {
    position: relative;
    min-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
}

.dossier-border {
    border: 1px solid rgba(160, 170, 200, 0.15);
    padding: 3rem;
    width: 100%;
    max-width: 1100px;
    position: relative;
    z-index: 2;
    background: rgba(10, 16, 40, 0.6);
}

.z-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.z-left, .z-right {
    max-width: 520px;
}

.z-left {
    justify-self: start;
}

.z-right {
    justify-self: end;
}

.z-grid-reverse .z-left {
    justify-self: end;
}

.z-grid-reverse .z-right {
    justify-self: start;
}

/* --- Skeleton Loading --- */
.skeleton-group {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    transition: opacity 0.6s ease;
}

.skeleton-group.resolved {
    opacity: 0;
    position: absolute;
    pointer-events: none;
}

.skeleton-bar {
    height: 16px;
    border-radius: 2px;
    background: linear-gradient(90deg, #1A2040 25%, #2A3060 50%, #1A2040 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s linear infinite;
}

.skeleton-bar-1 { width: 90%; }
.skeleton-bar-2 { width: 75%; animation-delay: 0.2s; }
.skeleton-bar-3 { width: 85%; animation-delay: 0.4s; }
.skeleton-bar-4 { width: 60%; animation-delay: 0.6s; }
.skeleton-bar-5 { width: 70%; animation-delay: 0.8s; }

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* --- Reveal Content --- */
.reveal-content {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.8s ease 0.3s, transform 0.8s ease 0.3s;
}

.reveal-content.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Branch SVGs --- */
.branch-svg {
    position: absolute;
    z-index: 1;
    pointer-events: none;
}

.branch-left {
    left: 0;
    top: 0;
    height: 100%;
    width: 120px;
}

.branch-right {
    right: 0;
    top: 0;
    height: 100%;
    width: 120px;
}

.branch-converge-left {
    left: 0;
    bottom: 0;
    width: 200px;
    height: 400px;
}

.branch-converge-right {
    right: 0;
    bottom: 0;
    width: 200px;
    height: 400px;
}

/* --- Data Viz: Timeline --- */
.timeline-viz {
    width: 100%;
    max-width: 400px;
    height: auto;
}

.timeline-marker {
    transition: stroke-dashoffset 1.2s ease;
}

.timeline-marker.animated {
    stroke-dashoffset: 0 !important;
}

/* --- Data Viz: Bar Chart --- */
.bar-chart-viz {
    width: 100%;
    max-width: 400px;
    height: auto;
}

.bar-fill {
    transition: width 1s ease;
}

.bar-label {
    transition: opacity 0.5s ease 0.8s;
}

.bar-label.visible {
    opacity: 1;
}

/* --- Data Viz: Progress Circles --- */
.circle-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1.5rem;
}

.circle-item {
    display: flex;
    justify-content: center;
}

.progress-circle {
    width: 100%;
    max-width: 130px;
    height: auto;
}

.progress-ring {
    transition: stroke-dashoffset 1.5s ease;
}

/* --- Storm Section --- */
.section-storm {
    position: relative;
}

.storm-gradient {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 200px;
    background: linear-gradient(
        180deg,
        rgba(42, 48, 96, 0.4) 0%,
        rgba(26, 32, 64, 0.2) 40%,
        transparent 100%
    );
    z-index: 0;
    pointer-events: none;
}

.cracked-earth {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 120px;
    background:
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 30px,
            rgba(160, 170, 200, 0.03) 30px,
            rgba(160, 170, 200, 0.03) 31px
        ),
        repeating-linear-gradient(
            -30deg,
            transparent,
            transparent 40px,
            rgba(160, 170, 200, 0.02) 40px,
            rgba(160, 170, 200, 0.02) 41px
        );
    z-index: 0;
    pointer-events: none;
}

/* --- Closing Section --- */
.section-closing {
    min-height: 70vh;
}

.closing-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

.seed-illustration {
    width: 80px;
    height: 100px;
    margin: 1.5rem auto;
    display: block;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .z-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .z-left, .z-right {
        max-width: 100%;
        justify-self: center !important;
    }

    .dossier-border {
        padding: 2rem 1.5rem;
    }

    .z-section {
        padding: 3rem 1rem;
    }

    .circle-grid {
        grid-template-columns: 1fr 1fr;
    }

    .branch-svg {
        opacity: 0.5;
    }

    .hero-title {
        font-size: clamp(2rem, 8vw, 3.5rem);
    }
}

@media (max-width: 480px) {
    .circle-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }

    .dossier-border {
        padding: 1.5rem 1rem;
    }

    .branch-svg {
        display: none;
    }
}
