/* 계엄령.com - Martial Law Memorial */

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: #D8D2C8;
    color: #2A2520;
    font-family: 'Noto Serif KR', serif;
    font-weight: 400;
    line-height: 1.8;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* === Spray Paint Text === */
.spray-text {
    font-family: 'Permanent Marker', cursive;
    filter: url(#spray-paint);
}

/* === Mountain Hero === */
#mountain {
    position: relative;
    width: 100%;
    height: 100vh;
    background-color: #D8D2C8;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

#mountain-svg {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60%;
}

.fog-layer {
    animation-timing-function: linear;
    animation-iteration-count: infinite;
}

.fog-1 { animation: fog-drift-right 45s linear infinite; }
.fog-2 { animation: fog-drift-left 60s linear infinite; }
.fog-3 { animation: fog-drift-right 55s linear infinite; }

@keyframes fog-drift-right {
    0% { transform: translateX(-300px); }
    100% { transform: translateX(1400px); }
}

@keyframes fog-drift-left {
    0% { transform: translateX(300px); }
    100% { transform: translateX(-1400px); }
}

.mountain-overlay {
    position: relative;
    z-index: 2;
    text-align: center;
}

#hero-title {
    font-size: 140px;
    color: #8B3A3A;
    letter-spacing: -0.02em;
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 2s ease, transform 2s ease;
}

#hero-title.visible {
    opacity: 1;
    transform: scale(1);
}

#hero-subtitle {
    font-family: 'Space Mono', monospace;
    font-size: 12px;
    letter-spacing: 0.2em;
    color: #4A5568;
    margin-top: 16px;
    opacity: 0;
    transition: opacity 1.5s ease;
}

#hero-subtitle.visible {
    opacity: 0.7;
}

/* === Fog Section (Progressive Disclosure) === */
.fog-section {
    position: relative;
    padding: 120px 40px;
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fog-mask {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, #D8D2C8, transparent 40%);
    pointer-events: none;
    z-index: 1;
    opacity: 1;
    transition: opacity 1.2s ease;
}

.fog-section.revealed .fog-mask {
    opacity: 0;
}

.section-inner {
    max-width: 700px;
    position: relative;
    z-index: 2;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1s ease 0.3s, transform 1s ease 0.3s;
}

.fog-section.revealed .section-inner {
    opacity: 1;
    transform: translateY(0);
}

/* === Declaration Section === */
#declaration {
    background-color: #E5DDD0;
}

#declaration .fog-mask {
    background: linear-gradient(to bottom, #D8D2C8, transparent 40%);
}

/* === Resistance Section === */
#resistance {
    background-color: #2A2520;
    color: #E5DDD0;
}

#resistance .fog-mask {
    background: linear-gradient(to bottom, #E5DDD0, transparent 40%);
}

#resistance .section-body {
    color: rgba(229, 221, 208, 0.75);
}

#resistance .marker-year {
    color: #8B3A3A;
}

/* === Memory Section === */
#memory {
    background-color: #D8D2C8;
}

#memory .fog-mask {
    background: linear-gradient(to bottom, #2A2520, transparent 40%);
}

/* === Timeline Marker === */
.timeline-marker {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.marker-year {
    font-family: 'Space Mono', monospace;
    font-size: 14px;
    letter-spacing: 0.15em;
    color: #6B7F52;
}

.marker-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #8B3A3A;
}

/* === Section Typography === */
.section-title {
    font-size: 56px;
    color: #8B3A3A;
    margin-bottom: 24px;
    letter-spacing: -0.01em;
}

#resistance .section-title {
    color: #8B3A3A;
}

.section-body {
    font-family: 'Noto Serif KR', serif;
    font-size: 16px;
    line-height: 2;
    color: rgba(42, 37, 32, 0.75);
    margin-bottom: 16px;
}

.section-body:last-child {
    margin-bottom: 0;
}

/* === Candle Section === */
#candle-section {
    background-color: #2A2520;
    padding: 100px 40px;
    text-align: center;
    min-height: 60vh;
}

.candle-inner {
    max-width: 600px;
    margin: 0 auto;
}

.candle-title {
    font-family: 'Permanent Marker', cursive;
    font-size: 48px;
    color: #E5DDD0;
    margin-bottom: 8px;
}

.candle-prompt {
    font-family: 'Space Mono', monospace;
    font-size: 12px;
    letter-spacing: 0.15em;
    color: #6B7F52;
    margin-bottom: 40px;
}

#candle-field {
    min-height: 120px;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
    margin-bottom: 30px;
}

.candle-flame {
    width: 8px;
    height: 24px;
    background: linear-gradient(to top, #8B3A3A, #E5DDD0);
    border-radius: 50% 50% 20% 20%;
    opacity: 0;
    animation: flame-appear 0.8s ease forwards, flame-flicker 2s ease-in-out infinite;
}

@keyframes flame-appear {
    from { opacity: 0; transform: scale(0.3); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes flame-flicker {
    0%, 100% { transform: scaleX(1) scaleY(1); }
    25% { transform: scaleX(0.9) scaleY(1.05); }
    50% { transform: scaleX(1.05) scaleY(0.95); }
    75% { transform: scaleX(0.95) scaleY(1.02); }
}

#light-candle-btn {
    font-family: 'Space Mono', monospace;
    font-size: 12px;
    letter-spacing: 0.1em;
    padding: 12px 28px;
    background-color: transparent;
    color: #E5DDD0;
    border: 1px solid rgba(229, 221, 208, 0.3);
    cursor: pointer;
    transition: border-color 0.3s ease, background-color 0.3s ease;
}

#light-candle-btn:hover {
    border-color: #8B3A3A;
    background-color: rgba(139, 58, 58, 0.15);
}

/* === Footer === */
#footer {
    text-align: center;
    padding: 60px 40px;
    background-color: #D8D2C8;
}

.footer-rule {
    width: 60px;
    height: 1px;
    background-color: #4A5568;
    margin: 0 auto 24px;
    opacity: 0.4;
}

.footer-text {
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    letter-spacing: 0.15em;
    color: #4A5568;
}

/* === Responsive === */
@media (max-width: 768px) {
    #hero-title {
        font-size: 72px;
    }

    .section-title {
        font-size: 36px;
    }

    .fog-section {
        padding: 80px 24px;
    }

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

    #mountain-svg {
        height: 50%;
    }
}

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

    .section-title {
        font-size: 28px;
    }

    .section-body {
        font-size: 14px;
    }

    #candle-section {
        padding: 60px 20px;
    }
}
