/* martiallaw.quest - Parallax Storytelling Journey */
/* Colors: #0C0C0C, #161616, #333333, #555555, #666666, #777777, #A0A0A0, #C0392B */
/* Fonts: Oswald, Source Serif 4, Space Mono */

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

html {
    scroll-behavior: auto;
}

body {
    font-family: 'Source Serif 4', serif;
    font-weight: 400;
    font-size: 17px;
    line-height: 1.85;
    color: #A0A0A0;
    background: #0C0C0C;
    overflow-x: hidden;
}

/* Timeline Spine */
.timeline-spine {
    position: fixed;
    left: 50%;
    top: 0;
    width: 2px;
    height: 100%;
    transform: translateX(-50%);
    z-index: 5;
    pointer-events: none;
}

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

#spineLine {
    stroke-dasharray: 4000;
    stroke-dashoffset: 4000;
    opacity: 0.4;
}

#spineLine.drawn {
    animation: drawSpine 3s ease-out forwards;
}

@keyframes drawSpine {
    to {
        stroke-dashoffset: 0;
    }
}

/* Sections */
.section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
}

.void-section {
    min-height: 100vh;
}

.void-section-half {
    min-height: 50vh;
}

/* Opening Section */
.opening-section {
    min-height: 100vh;
    background: #0C0C0C;
}

.opening-content {
    text-align: center;
    z-index: 10;
}

.opening-title {
    font-family: 'Oswald', sans-serif;
    font-weight: 300;
    font-size: 64px;
    color: #E2E2E2;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    line-height: 1;
    margin-bottom: 16px;
}

.opening-subtitle {
    font-family: 'Source Serif 4', serif;
    font-weight: 400;
    font-size: 18px;
    color: #666666;
    letter-spacing: 0.04em;
}

/* Scroll Chevron */
.scroll-chevron {
    position: absolute;
    bottom: 60px;
    width: 24px;
    height: 24px;
    animation: pulseChevron 2s ease-in-out infinite;
}

.scroll-chevron svg {
    width: 100%;
    height: 100%;
}

@keyframes pulseChevron {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

/* Episode Sections */
.episode-section {
    min-height: 200vh;
    padding: 20vh 0;
    position: relative;
}

/* Episode Halo (background parallax layer) */
.episode-halo {
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(192, 57, 43, 0.04), transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 1;
}

/* Timeline Marker */
.timeline-marker {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 60px;
    z-index: 10;
}

.marker-year {
    font-family: 'Space Mono', monospace;
    font-size: 14px;
    color: #555555;
    letter-spacing: 0.1em;
    transition: color 0.6s ease;
}

.marker-year.active {
    color: #E2E2E2;
}

.marker-tick {
    width: 20px;
    height: 1px;
    background: #555555;
    position: absolute;
    left: calc(100% + 12px);
    transition: width 0.4s ease, background 0.4s ease;
}

.marker-tick.active {
    width: 40px;
    background: #C0392B;
}

/* Episode Content */
.episode-content {
    max-width: 600px;
    padding: 0 24px;
    z-index: 10;
    position: relative;
}

.episode-title {
    font-family: 'Oswald', sans-serif;
    font-weight: 300;
    font-size: 56px;
    color: #E2E2E2;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    line-height: 1;
    margin-bottom: 8px;
}

.episode-subtitle {
    font-family: 'Oswald', sans-serif;
    font-weight: 300;
    font-size: 24px;
    color: #C0392B;
    letter-spacing: 0.04em;
    margin-bottom: 40px;
}

.episode-body p {
    color: #A0A0A0;
    margin-bottom: 20px;
}

.episode-meta {
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    border-top: 1px solid #333333;
    padding-top: 24px;
}

.meta-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.meta-label {
    font-size: 10px;
    color: #555555;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.meta-value {
    font-size: 14px;
    color: #777777;
}

.mono-text {
    font-family: 'Space Mono', monospace;
}

/* Closing Section */
.closing-section {
    min-height: 100vh;
    background: #0C0C0C;
}

.closing-content {
    text-align: center;
    max-width: 600px;
    padding: 0 24px;
}

.closing-quote {
    font-family: 'Source Serif 4', serif;
    font-style: italic;
    font-size: 24px;
    color: #666666;
    line-height: 1.6;
    margin-bottom: 32px;
}

.closing-line {
    width: 60px;
    height: 1px;
    background: #333333;
    margin: 0 auto 24px;
}

.closing-domain {
    font-size: 12px;
    color: #555555;
    letter-spacing: 0.1em;
}

/* Fade Reveal */
.fade-reveal {
    opacity: 0;
    transition: opacity 800ms ease-in;
}

.fade-reveal.visible {
    opacity: 1;
}

/* Parallax layers */
.parallax-bg {
    will-change: transform;
}

.parallax-mid {
    will-change: transform;
}

.parallax-fg {
    will-change: transform;
}

/* Responsive */
@media (max-width: 768px) {
    .opening-title {
        font-size: 42px;
    }

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

    .episode-subtitle {
        font-size: 18px;
    }

    .episode-section {
        min-height: 150vh;
    }

    .episode-halo {
        width: 300px;
        height: 300px;
    }

    .timeline-spine {
        display: none;
    }

    .closing-quote {
        font-size: 20px;
    }
}
