/* ============================================
   mysterious.quest — Vaporwave Immersive Mystery
   Colors: #3A5060, #E090B0, #E8F0F4, #6A8090, #C0E0E8, #F0D0C0, #1A3040, #D0C0E0
   Fonts: Outfit, DM Sans, Space Mono
   ============================================ */

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'DM Sans', sans-serif;
    font-weight: 400;
    color: #3A5060;
    background-color: #E8F0F4;
    overflow-x: hidden;
    line-height: 1.85;
    font-size: clamp(0.95rem, 1.2vw, 1.1rem);
}

/* --- Parallax Layers --- */
.parallax-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    pointer-events: none;
}

.parallax-bg {
    z-index: 1;
    height: 100vh;
}

.parallax-fg {
    z-index: 3;
    height: 100vh;
}

.parallax-content {
    position: relative;
    z-index: 2;
    pointer-events: auto;
}

/* --- Bokeh Circles --- */
.bokeh-circle {
    position: absolute;
    border-radius: 50%;
    filter: blur(40px);
    opacity: 0;
    transition: opacity 2s ease;
}

body.loaded .bokeh-circle {
    opacity: 1;
}

.bokeh-1 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(224, 144, 176, 0.35) 0%, transparent 70%);
    top: 10%;
    left: -5%;
    animation: bokeh-drift-1 18s ease-in-out infinite;
}

.bokeh-2 {
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, rgba(192, 224, 232, 0.3) 0%, transparent 70%);
    top: 5%;
    right: -10%;
    animation: bokeh-drift-2 22s ease-in-out infinite;
}

.bokeh-3 {
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(208, 192, 224, 0.4) 0%, transparent 70%);
    top: 40%;
    left: 30%;
    animation: bokeh-drift-3 15s ease-in-out infinite;
}

.bokeh-4 {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(240, 208, 192, 0.3) 0%, transparent 70%);
    top: 60%;
    right: 5%;
    animation: bokeh-drift-4 20s ease-in-out infinite;
}

.bokeh-5 {
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, rgba(224, 144, 176, 0.25) 0%, transparent 70%);
    top: 75%;
    left: 10%;
    animation: bokeh-drift-5 16s ease-in-out infinite;
}

.bokeh-6 {
    width: 260px;
    height: 260px;
    background: radial-gradient(circle, rgba(192, 224, 232, 0.35) 0%, transparent 70%);
    top: 25%;
    left: 55%;
    animation: bokeh-drift-6 19s ease-in-out infinite;
}

.bokeh-7 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(208, 192, 224, 0.2) 0%, transparent 70%);
    top: 85%;
    left: 40%;
    animation: bokeh-drift-1 24s ease-in-out infinite reverse;
}

.bokeh-8 {
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, rgba(224, 144, 176, 0.3) 0%, transparent 70%);
    top: 15%;
    left: 70%;
    animation: bokeh-drift-3 17s ease-in-out infinite reverse;
}

.bokeh-9 {
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(240, 208, 192, 0.25) 0%, transparent 70%);
    top: 50%;
    left: -8%;
    animation: bokeh-drift-5 21s ease-in-out infinite;
}

.bokeh-10 {
    width: 160px;
    height: 160px;
    background: radial-gradient(circle, rgba(192, 224, 232, 0.4) 0%, transparent 70%);
    top: 35%;
    right: 20%;
    animation: bokeh-drift-2 14s ease-in-out infinite reverse;
}

.bokeh-11 {
    width: 280px;
    height: 280px;
    background: radial-gradient(circle, rgba(208, 192, 224, 0.3) 0%, transparent 70%);
    top: 70%;
    right: 30%;
    animation: bokeh-drift-4 23s ease-in-out infinite reverse;
}

.bokeh-12 {
    width: 380px;
    height: 380px;
    background: radial-gradient(circle, rgba(224, 144, 176, 0.2) 0%, transparent 70%);
    top: 90%;
    left: 60%;
    animation: bokeh-drift-6 25s ease-in-out infinite;
}

@keyframes bokeh-drift-1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -20px) scale(1.05); }
    50% { transform: translate(-15px, 25px) scale(0.95); }
    75% { transform: translate(20px, 10px) scale(1.02); }
}

@keyframes bokeh-drift-2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(-40px, 15px) scale(1.08); }
    66% { transform: translate(25px, -30px) scale(0.92); }
}

@keyframes bokeh-drift-3 {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(35px, 20px); }
}

@keyframes bokeh-drift-4 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    40% { transform: translate(-20px, -35px) scale(1.06); }
    80% { transform: translate(15px, 20px) scale(0.97); }
}

@keyframes bokeh-drift-5 {
    0%, 100% { transform: translate(0, 0); }
    30% { transform: translate(25px, -15px); }
    70% { transform: translate(-30px, 10px); }
}

@keyframes bokeh-drift-6 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-20px, -25px) scale(1.04); }
}

/* --- Sharp Angle Lines --- */
.angle-line {
    position: absolute;
    opacity: 0;
    transition: opacity 3s ease 1s;
}

body.loaded .angle-line {
    opacity: 1;
}

.angle-line-1 {
    width: 120%;
    height: 100vh;
    top: 0;
    left: -10%;
}

.angle-line-2 {
    width: 80%;
    height: 60vh;
    top: 20%;
    right: -5%;
    left: auto;
}

.angle-line-3 {
    width: 90%;
    height: 80vh;
    top: 40%;
    left: 5%;
}

.angle-line-4 {
    width: 110%;
    height: 50vh;
    bottom: 10%;
    top: auto;
    left: -5%;
}

.angle-line-5 {
    width: 70%;
    height: 70vh;
    top: 15%;
    left: 15%;
}

/* --- Sections --- */
.section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 6vh 8vw;
}

.section-content {
    max-width: 900px;
    width: 100%;
}

/* --- Hero Section --- */
.section-hero {
    min-height: 100vh;
    flex-direction: column;
    background: transparent;
}

.hero-inner {
    text-align: center;
    position: relative;
}

.kinetic-heading {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    color: #1A3040;
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    line-height: 1.1;
    letter-spacing: -0.02em;
    will-change: transform, opacity;
}

#main-title {
    font-size: clamp(3rem, 8vw, 6rem);
    opacity: 0;
    transform: scale(0.9) translateY(20px);
    transition: opacity 1.5s ease, transform 1.5s ease;
}

body.loaded #main-title {
    opacity: 1;
    transform: scale(1) translateY(0);
}

.title-line {
    display: inline-block;
}

.title-dot {
    display: inline-block;
    color: #E090B0;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    margin: 0 0.05em;
}

.hero-subtitle {
    margin-top: 2rem;
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 1.8s ease 0.5s, transform 1.8s ease 0.5s;
}

body.loaded .hero-subtitle {
    opacity: 1;
    transform: translateY(0);
}

.quest-label {
    font-family: 'Space Mono', monospace;
    font-weight: 400;
    font-size: clamp(0.7rem, 0.9vw, 0.85rem);
    color: #6A8090;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    display: block;
    margin-bottom: 0.75rem;
}

.scroll-indicator {
    position: absolute;
    bottom: 5vh;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 2s ease 1.5s;
}

body.loaded .scroll-indicator {
    opacity: 0.5;
}

.scroll-line {
    width: 1px;
    height: 60px;
    background: linear-gradient(to bottom, #6A8090, transparent);
    animation: scroll-pulse 2s ease-in-out infinite;
}

@keyframes scroll-pulse {
    0%, 100% { opacity: 0.3; transform: scaleY(1); }
    50% { opacity: 0.8; transform: scaleY(1.2); }
}

/* --- Section: Mist --- */
.section-mist {
    background: linear-gradient(180deg, transparent 0%, rgba(192, 224, 232, 0.1) 50%, transparent 100%);
}

.section-heading {
    margin-bottom: 2.5rem;
}

.body-text {
    font-family: 'DM Sans', sans-serif;
    font-weight: 300;
    color: #3A5060;
    font-size: clamp(0.95rem, 1.2vw, 1.1rem);
    line-height: 1.85;
    margin-bottom: 1.5rem;
}

.sharp-divider {
    width: 200px;
    height: 2px;
    margin: 2.5rem 0;
    opacity: 0.6;
}

.sharp-divider svg {
    width: 100%;
    height: 100%;
}

.fade-in-text {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* --- Section: Depth --- */
.section-depth {
    background: linear-gradient(180deg, transparent 0%, rgba(26, 48, 64, 0.04) 50%, transparent 100%);
}

.depth-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    margin: 2rem 0;
}

.depth-marker {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-top: 3rem;
    opacity: 0.6;
}

.marker-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, #E090B0, #C0E0E8, #D0C0E0);
}

/* --- Section: Signal --- */
.section-signal {
    background: linear-gradient(180deg, transparent 0%, rgba(208, 192, 224, 0.08) 50%, transparent 100%);
}

.signal-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

.signal-card {
    position: relative;
    padding: 2.5rem 2rem;
    background: rgba(232, 240, 244, 0.6);
    border: 1px solid rgba(192, 224, 232, 0.4);
    overflow: hidden;
    transition: transform 0.4s ease, border-color 0.4s ease;
}

.signal-card:hover {
    transform: translateY(-4px);
    border-color: rgba(224, 144, 176, 0.4);
}

.card-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, transparent 30%, transparent 100%);
    opacity: 0;
    transition: opacity 0.6s ease;
    pointer-events: none;
}

.signal-card-1:hover .card-glow {
    background: radial-gradient(circle at center, rgba(224, 144, 176, 0.08) 0%, transparent 60%);
    opacity: 1;
}

.signal-card-2:hover .card-glow {
    background: radial-gradient(circle at center, rgba(192, 224, 232, 0.1) 0%, transparent 60%);
    opacity: 1;
}

.signal-card-3:hover .card-glow {
    background: radial-gradient(circle at center, rgba(208, 192, 224, 0.1) 0%, transparent 60%);
    opacity: 1;
}

.signal-card .quest-label {
    margin-bottom: 1rem;
}

.signal-card .body-text {
    margin-bottom: 0;
    font-size: clamp(0.85rem, 1vw, 0.95rem);
}

/* --- Section: Horizon --- */
.section-horizon {
    background: linear-gradient(180deg, transparent 0%, rgba(240, 208, 192, 0.08) 50%, transparent 100%);
}

.horizon-line {
    display: flex;
    gap: 8px;
    margin: 3rem 0;
    align-items: center;
}

.horizon-segment {
    height: 1px;
    transition: width 1.2s ease;
}

.horizon-seg-1 {
    flex: 3;
    background: linear-gradient(to right, transparent, #E090B0);
}

.horizon-seg-2 {
    flex: 2;
    background: #C0E0E8;
}

.horizon-seg-3 {
    flex: 1;
    background: linear-gradient(to right, #D0C0E0, transparent);
}

.horizon-final {
    font-style: italic;
    color: #6A8090;
    font-weight: 300;
}

/* --- Section: Echo --- */
.section-echo {
    min-height: 100vh;
    background: linear-gradient(180deg, transparent 0%, rgba(26, 48, 64, 0.06) 60%, rgba(26, 48, 64, 0.1) 100%);
}

.echo-rings {
    position: relative;
    width: 300px;
    height: 300px;
    margin: 3rem auto;
}

.echo-ring {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(224, 144, 176, 0.3);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
}

.echo-ring.animate {
    animation: ring-expand 3s ease-out forwards;
}

.echo-ring-1 {
    width: 80px;
    height: 80px;
    border-color: rgba(224, 144, 176, 0.5);
    animation-delay: 0s;
}

.echo-ring-2 {
    width: 150px;
    height: 150px;
    border-color: rgba(192, 224, 232, 0.4);
    animation-delay: 0.4s;
}

.echo-ring-3 {
    width: 230px;
    height: 230px;
    border-color: rgba(208, 192, 224, 0.3);
    animation-delay: 0.8s;
}

.echo-ring-4 {
    width: 300px;
    height: 300px;
    border-color: rgba(240, 208, 192, 0.2);
    animation-delay: 1.2s;
}

@keyframes ring-expand {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0;
    }
    30% {
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.6;
    }
}

.echo-text {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 3rem;
}

.domain-stamp {
    text-align: center;
    padding: 2rem 0;
    opacity: 0.4;
}

.domain-stamp .quest-label {
    font-size: clamp(0.6rem, 0.8vw, 0.75rem);
    letter-spacing: 0.3em;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .section {
        padding: 4vh 6vw;
    }

    .depth-columns {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .signal-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .depth-marker {
        flex-direction: column;
        gap: 0.75rem;
    }

    .marker-line {
        width: 100%;
    }

    .bokeh-circle {
        filter: blur(30px);
    }

    .angle-line {
        display: none;
    }
}

@media (max-width: 480px) {
    #main-title {
        font-size: clamp(2.2rem, 10vw, 3.5rem);
    }

    .signal-card {
        padding: 2rem 1.5rem;
    }

    .echo-rings {
        width: 200px;
        height: 200px;
    }

    .echo-ring-1 { width: 50px; height: 50px; }
    .echo-ring-2 { width: 100px; height: 100px; }
    .echo-ring-3 { width: 150px; height: 150px; }
    .echo-ring-4 { width: 200px; height: 200px; }
}
