/* =============================================
   martial.quest — Memorial Chronicle Styles
   ============================================= */

/* CSS Custom Properties */
:root {
    --memorial-black: #0A0808;
    --memorial-gold: #D4A040;
    --warm-silver: #C8C0B8;
    --muted-stone: #8A8078;
    --solemn-red: #8A3040;
    --deep-navy: #1A1A2A;
    --crystalline-white: #E8E4E0;

    --font-display: 'DM Serif Display', serif;
    --font-body: 'Noto Serif KR', serif;
    --font-mono: 'IBM Plex Mono', monospace;

    --content-width: 60ch;
    --section-spacing: 120px;
    --fade-duration: 800ms;
}

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background-color: var(--memorial-black);
    color: var(--warm-silver);
    font-family: var(--font-body);
    font-size: clamp(1rem, 1.3vw, 1.15rem);
    line-height: 1.9;
    font-weight: 300;
    overflow-x: hidden;
}

/* =============================================
   Timeline Thread
   ============================================= */

.timeline-thread {
    position: fixed;
    left: clamp(20px, 5vw, 80px);
    top: 0;
    bottom: 0;
    width: 1px;
    z-index: 10;
    pointer-events: none;
}

.timeline-line {
    width: 1px;
    height: 0%;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        var(--memorial-gold) 5%,
        var(--memorial-gold) 95%,
        transparent 100%
    );
    opacity: 0.4;
    transition: height 0.1s linear;
}

/* =============================================
   Hero Section
   ============================================= */

.hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.hero-content {
    text-align: center;
    position: relative;
    z-index: 2;
}

.chrysanthemum-hero {
    width: 180px;
    height: 180px;
    margin: 0 auto 40px;
    opacity: 0;
}

.chrysanthemum-svg {
    width: 100%;
    height: 100%;
}

.chrysanthemum-svg .petal {
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 4.5vw, 3.8rem);
    font-weight: 400;
    color: var(--memorial-gold);
    letter-spacing: 0.15em;
    opacity: 0;
    transform: translateY(10px);
}

.hero-subtitle {
    font-family: var(--font-mono);
    font-size: clamp(0.75rem, 1.2vw, 0.95rem);
    color: var(--muted-stone);
    letter-spacing: 0.4em;
    text-transform: uppercase;
    margin-top: 16px;
    opacity: 0;
    transform: translateY(10px);
}

.hero-description {
    font-family: var(--font-body);
    font-size: clamp(0.85rem, 1.1vw, 1rem);
    color: var(--muted-stone);
    margin-top: 8px;
    opacity: 0;
    transform: translateY(10px);
    font-weight: 300;
    letter-spacing: 0.1em;
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    opacity: 0;
}

.scroll-text {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--muted-stone);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    display: block;
    margin-bottom: 12px;
    opacity: 0.6;
}

.scroll-arrow {
    width: 1px;
    height: 30px;
    background: var(--memorial-gold);
    margin: 0 auto;
    opacity: 0.4;
    animation: scrollPulse 2.5s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.2; transform: scaleY(0.7); }
    50% { opacity: 0.5; transform: scaleY(1); }
}

/* =============================================
   Crystal Dividers
   ============================================= */

.crystal-divider {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 0;
    opacity: 0;
    transition: opacity var(--fade-duration) ease;
}

.crystal-divider.visible {
    opacity: 1;
}

.crystal-svg {
    width: 120px;
    height: auto;
}

/* =============================================
   Content Sections
   ============================================= */

.content-section {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: var(--section-spacing) 24px;
    position: relative;
}

.fade-section {
    opacity: 0;
    transform: translateY(15px);
    transition: opacity var(--fade-duration) ease, transform var(--fade-duration) ease;
}

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

/* Timeline Markers */
.timeline-marker {
    position: relative;
    margin-bottom: 32px;
    padding-left: 0;
}

.timeline-marker::before {
    content: '';
    position: absolute;
    left: calc(clamp(20px, 5vw, 80px) - 50% - 4px);
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--memorial-gold);
    opacity: 0.6;
}

.timeline-date {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--muted-stone);
    letter-spacing: 0.15em;
}

.marker-solemn .timeline-date {
    color: var(--solemn-red);
}

/* Section Content */
.section-content {
    position: relative;
}

.section-heading {
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 4.5vw, 3.8rem);
    font-weight: 400;
    color: var(--memorial-gold);
    margin-bottom: 8px;
    line-height: 1.2;
}

.heading-solemn {
    color: var(--solemn-red);
}

.section-subheading {
    font-family: var(--font-body);
    font-size: clamp(1rem, 1.5vw, 1.25rem);
    font-weight: 300;
    color: var(--muted-stone);
    margin-bottom: 32px;
    letter-spacing: 0.05em;
}

.body-text {
    font-family: var(--font-body);
    font-size: clamp(1rem, 1.3vw, 1.15rem);
    line-height: 1.9;
    color: var(--warm-silver);
    font-weight: 300;
    margin-bottom: 24px;
}

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

/* Quote Block */
.quote-block {
    border-left: 2px solid var(--memorial-gold);
    padding: 24px 32px;
    margin: 40px 0;
    background: rgba(26, 26, 42, 0.3);
}

.quote-text {
    font-family: var(--font-body);
    font-size: clamp(1.05rem, 1.4vw, 1.2rem);
    line-height: 1.8;
    color: var(--crystalline-white);
    font-weight: 400;
    font-style: italic;
}

/* Memorial Names */
.memorial-names {
    margin-top: 48px;
    text-align: center;
}

.memorial-label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--solemn-red);
    letter-spacing: 0.3em;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.memorial-line {
    width: 60px;
    height: 1px;
    background: var(--solemn-red);
    margin: 0 auto;
    opacity: 0.5;
}

/* Botanical Ornaments */
.botanical-ornament {
    display: flex;
    justify-content: center;
    margin-top: 48px;
    opacity: 0.8;
}

.ornament-svg {
    width: 60px;
    height: auto;
}

.ornament-large .ornament-svg {
    width: 100px;
}

/* Closing Ornament */
.closing-ornament {
    display: flex;
    justify-content: center;
    margin-top: 60px;
}

.closing-chrysanthemum {
    width: 160px;
    height: auto;
}

/* =============================================
   Gwangju Section Special Styling
   ============================================= */

.gwangju-section .section-content {
    border-left: 2px solid rgba(138, 48, 64, 0.3);
    padding-left: 24px;
}

/* =============================================
   December 2024 Section
   ============================================= */

.december-section .section-content::after {
    content: '';
    display: block;
    width: 100%;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--memorial-gold), transparent);
    margin-top: 48px;
    opacity: 0.2;
}

/* =============================================
   Reflection Section
   ============================================= */

.reflection-section {
    padding-bottom: 80px;
}

.reflection-section .section-heading {
    color: var(--crystalline-white);
}

/* =============================================
   Footer
   ============================================= */

.site-footer {
    background: var(--deep-navy);
    padding: 80px 24px;
    text-align: center;
}

.footer-content {
    max-width: var(--content-width);
    margin: 0 auto;
}

.footer-domain {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--memorial-gold);
    letter-spacing: 0.3em;
    text-transform: lowercase;
    margin-bottom: 8px;
}

.footer-text {
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: var(--muted-stone);
    font-weight: 300;
    margin-bottom: 24px;
}

.footer-line {
    width: 40px;
    height: 1px;
    background: var(--memorial-gold);
    margin: 0 auto 24px;
    opacity: 0.3;
}

.footer-note {
    font-family: var(--font-body);
    font-size: 1.1rem;
    color: var(--warm-silver);
    font-weight: 400;
    margin-bottom: 4px;
}

.footer-translation {
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: var(--muted-stone);
    font-weight: 300;
    font-style: italic;
}

/* =============================================
   Responsive
   ============================================= */

@media (max-width: 768px) {
    :root {
        --section-spacing: 80px;
    }

    .timeline-thread {
        left: 16px;
    }

    .timeline-marker::before {
        display: none;
    }

    .content-section {
        padding-left: 16px;
        padding-right: 16px;
    }

    .chrysanthemum-hero {
        width: 140px;
        height: 140px;
    }

    .quote-block {
        padding: 16px 20px;
    }

    .gwangju-section .section-content {
        padding-left: 16px;
    }
}

@media (max-width: 480px) {
    :root {
        --section-spacing: 60px;
    }

    .hero-title {
        letter-spacing: 0.08em;
    }

    .hero-subtitle {
        letter-spacing: 0.2em;
    }

    .crystal-svg {
        width: 80px;
    }
}
