/* ===================================
   daitoua.quest - Holographic Pastoral
   Horizontal scroll mountain landscape
   =================================== */

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

html {
    overflow-x: scroll;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
}

body {
    width: 600vw;
    height: 100vh;
    overflow-x: scroll;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    background: linear-gradient(90deg, #1e2028 0%, #3a3f4d 16.6%, #6b7280 33.3%, #b8c5d0 50%, #e8edf2 75%, #f5f7fa 100%);
    font-family: 'Source Sans 3', 'Source Sans Pro', sans-serif;
    font-weight: 300;
    color: #e8edf2;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* === Typography === */
.title-main {
    font-family: 'Libre Baskerville', Georgia, serif;
    font-weight: 700;
    font-size: clamp(3rem, 6vw, 5rem);
    color: #f5f7fa;
    letter-spacing: 0.01em;
    line-height: 1.15;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.5s forwards;
}

.title-sub {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 300;
    font-style: italic;
    font-size: clamp(1.25rem, 3vw, 2.5rem);
    color: #b8c5d0;
    letter-spacing: 0.02em;
    line-height: 1.4;
    margin-top: 1rem;
    opacity: 0;
    transform: translateY(15px);
    animation: fadeInUp 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) 1s forwards;
}

.trail-text {
    font-family: 'Source Sans 3', 'Source Sans Pro', sans-serif;
    font-weight: 300;
    font-size: clamp(0.875rem, 1.5vw, 1.125rem);
    color: #e8edf2;
    letter-spacing: 0.02em;
    line-height: 1.65;
}

.ridge-heading {
    font-family: 'Libre Baskerville', Georgia, serif;
    font-weight: 400;
    font-size: clamp(2.5rem, 5vw, 4rem);
    color: #1e2028;
    letter-spacing: 0.01em;
    line-height: 1.15;
    text-align: center;
}

.lake-text {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 300;
    font-style: italic;
    font-size: clamp(1.25rem, 3vw, 2.5rem);
    color: #e8edf2;
    letter-spacing: 0.02em;
}

.mist-text {
    font-family: 'Source Sans 3', 'Source Sans Pro', sans-serif;
    font-weight: 300;
    font-size: 0.875rem;
    color: #6b7280;
    letter-spacing: 0.02em;
}

/* === Layout: Scroll Container === */
#scroll-container {
    display: flex;
    flex-direction: row;
    width: 600vw;
    height: 100vh;
    position: relative;
    z-index: 10;
}

.scene {
    width: 100vw;
    height: 100vh;
    scroll-snap-align: start;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

/* === Mountain Layers (Fixed Parallax) === */
#landscape-layers {
    position: fixed;
    top: 0;
    left: 0;
    width: 600vw;
    height: 100vh;
    z-index: 1;
    pointer-events: none;
}

.mountain-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 600vw;
    height: 100vh;
    will-change: transform;
}

.tree-layer {
    z-index: 5;
}

.ridge-holo-stroke {
    transition: stroke-opacity 3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Holographic gradient animation */
@keyframes holoFlow {
    0% { stroke-dashoffset: 0; }
    100% { stroke-dashoffset: -200; }
}

.ridge-holo-stroke {
    stroke-dasharray: 100 100;
    animation: holoFlow 8s linear infinite;
}

/* === Scene 1: The Approach === */
#scene-approach {
    z-index: 10;
}

#scene-approach .scene-content {
    position: absolute;
    top: 30%;
    left: 10%;
    z-index: 20;
}

/* === Scene 2: The Ascent === */
#scene-ascent .scene-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 20;
}

.trail-marker {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    max-width: 380px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.trail-marker.visible {
    opacity: 1;
    transform: translateY(0);
}

.trail-marker-1 {
    position: absolute;
    top: 28%;
    left: 12%;
}

.trail-marker-2 {
    position: absolute;
    top: 48%;
    right: 15%;
    left: auto;
}

.marker-icon {
    flex-shrink: 0;
    margin-top: 3px;
}

/* === Scene 3: The Ridge === */
#scene-ridge .scene-content {
    position: absolute;
    top: 25%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
    width: 80%;
    text-align: center;
    opacity: 0;
    transition: opacity 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

#scene-ridge .scene-content.visible {
    opacity: 1;
}

/* === Scene 4: The Lake === */
#scene-lake .scene-content {
    position: absolute;
    top: 30%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 25;
    text-align: center;
    opacity: 0;
    transition: opacity 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

#scene-lake .scene-content.visible {
    opacity: 1;
}

.lake-surface {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40%;
    z-index: 20;
    overflow: hidden;
}

.lake-water {
    width: 100%;
    height: 100%;
}

/* Ripple animation */
@keyframes rippleWave {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0.6;
    }
    100% {
        transform: translate(-50%, -50%) scale(3);
        opacity: 0;
    }
}

.ripple-effect {
    position: absolute;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(103, 232, 249, 0.3) 0%, rgba(103, 232, 249, 0.1) 40%, transparent 70%);
    pointer-events: none;
    animation: rippleWave 1.2s cubic-bezier(0, 0.55, 0.45, 1) forwards;
}

/* Water ripple animation */
@keyframes waterRipple {
    0% { transform: translateX(0); }
    50% { transform: translateX(10px); }
    100% { transform: translateX(0); }
}

.ripple-line {
    animation: waterRipple 4s ease-in-out infinite;
}

.ripple-line:nth-child(odd) {
    animation-delay: -1s;
    animation-duration: 5s;
}

.ripple-line:nth-child(even) {
    animation-delay: -2.5s;
    animation-duration: 3.5s;
}

#ripple-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* === Scene 5: The Mist === */
#scene-mist {
    position: relative;
}

#scene-mist .scene-content {
    position: absolute;
    top: 45%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 25;
    opacity: 0;
    transition: opacity 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

#scene-mist .scene-content.visible {
    opacity: 1;
}

.mist-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 15;
    pointer-events: none;
}

/* === Scene 6: The Horizon === */
#scene-horizon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.horizon-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 15;
}

@keyframes horizonGlow {
    0% { stroke-opacity: 0.3; filter: blur(0px); }
    50% { stroke-opacity: 0.6; filter: blur(2px); }
    100% { stroke-opacity: 0.3; filter: blur(0px); }
}

.horizon-glow {
    animation: horizonGlow 5s cubic-bezier(0.25, 0.46, 0.45, 0.94) infinite;
}

/* === Progress Bar === */
#progress-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100vw;
    height: 2px;
    background: rgba(30, 32, 40, 0.2);
    z-index: 100;
}

#progress-fill {
    height: 100%;
    width: 0%;
    background: #b8c5d0;
    transition: width 0.1s linear;
}

/* === Atmospheric Particles === */
#particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 50;
    pointer-events: none;
    overflow: hidden;
}

.particle {
    position: absolute;
    border-radius: 50%;
    opacity: 0;
    will-change: transform, opacity;
}

@keyframes particleDrift {
    0% {
        transform: translate(0, 0);
        opacity: 0;
    }
    15% {
        opacity: 0.6;
    }
    85% {
        opacity: 0.6;
    }
    100% {
        transform: translate(var(--drift-x), var(--drift-y));
        opacity: 0;
    }
}

/* === Animations === */
@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

/* === Holographic color shift on mountain edges === */
@keyframes holoColorShift {
    0% {
        stop-color: #a78bfa;
    }
    33% {
        stop-color: #67e8f9;
    }
    66% {
        stop-color: #f0abfc;
    }
    100% {
        stop-color: #a78bfa;
    }
}

/* === Mobile/Touch adjustments === */
@media (max-width: 768px) {
    .title-main {
        font-size: clamp(2rem, 8vw, 3rem);
    }

    .title-sub {
        font-size: clamp(1rem, 4vw, 1.5rem);
    }

    .trail-marker {
        max-width: 260px;
    }

    .trail-text {
        font-size: 0.85rem;
    }

    .ridge-heading {
        font-size: clamp(1.5rem, 6vw, 2.5rem);
    }
}

/* === Scrollbar styling === */
body::-webkit-scrollbar {
    display: none;
}

body {
    -ms-overflow-style: none;
    scrollbar-width: none;
}
