/* ============================================
   Immersive Parallax — Continuous Cosmic Journey
   Single sky/aurora background extends behind
   entire page. Content sections float over it
   with glassmorphism overlays.
   Respects prefers-reduced-motion.
   ============================================ */

/* ─── Global Cosmic Background ─── */
/* These layers sit behind the ENTIRE page, not just the hero */
.cosmic-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
    background-color: #050810;
}

.cosmic-bg .parallax-layer {
    position: absolute;
    top: -10%;
    left: -5%;
    width: 110%;
    height: 120%;
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
    will-change: transform;
}

/* Deep space sky — base layer */
.cosmic-bg .parallax-layer-sky {
    z-index: 1;
    background-image: url('../assets/generated/parallax-layer-6-sky.jpg');
}

/* Aurora — screen blended on top */
.cosmic-bg .parallax-layer-aurora {
    z-index: 2;
    background-image: url('../assets/generated/parallax-layer-5-aurora.jpg');
    mix-blend-mode: screen;
    opacity: 0.4;
}

/* Subtle geometry — barely visible, adds depth */
.cosmic-bg .parallax-layer-geometry {
    z-index: 3;
    background-image: url('../assets/generated/parallax-layer-4-geometry.jpg');
    mix-blend-mode: screen;
    opacity: 0;
    transition: opacity 2s ease;
}

/* ─── Hero Section ─── */
.parallax-hero {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 600px;
    overflow: hidden;
    z-index: 1;
    /* Hero is transparent — cosmic bg shows through */
    background: transparent;
}

/* ─── Hero Content ─── */
.parallax-hero-content {
    position: relative;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    height: 100%;
    padding: 0 max(2rem, 8vw);
    max-width: var(--container-max, 72rem);
    margin: 0 auto;
}

.parallax-hero-content .hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: #f1f5f9;
    text-shadow: 0 2px 30px rgba(0, 0, 0, 0.8), 0 0 80px rgba(0, 0, 0, 0.5);
}

.parallax-hero-content .hero-highlight {
    color: #60a5fa;
    text-shadow: 0 0 60px rgba(96, 165, 250, 0.25), 0 2px 30px rgba(0, 0, 0, 0.8);
}

.parallax-hero-content .hero-subtitle {
    font-size: clamp(1.125rem, 2.5vw, 1.5rem);
    color: #e2e8f0;
    font-family: Georgia, 'Times New Roman', serif;
    font-style: italic;
    margin-bottom: 1rem;
    text-shadow: 0 1px 20px rgba(0, 0, 0, 0.7);
}

.parallax-hero-content .hero-description {
    font-size: 1.125rem;
    color: #cbd5e1;
    max-width: 40rem;
    margin-bottom: 2.5rem;
    text-shadow: 0 1px 15px rgba(0, 0, 0, 0.7);
}

.parallax-hero-content .hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

/* ─── Scroll indicator (removed — not needed) ─── */

/* ─── Content Sections — Glassmorphism over cosmic bg ─── */
.scene-section {
    position: relative;
    z-index: 1;
}

/* Semi-transparent dark overlay so text stays readable */
.scene-section::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

/* Default dark section bg — lets cosmic bg peek through */
.scene-section::before {
    background: rgba(10, 14, 23, 0.62);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

/* Alternate sections slightly more transparent to create rhythm */
.scene-section.section-alt::before {
    background: rgba(17, 24, 39, 0.55);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

/* Transition strip between hero and first content section */
.scene-section:first-of-type::after {
    content: '';
    position: absolute;
    top: -80px;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(to bottom, transparent, rgba(10, 14, 23, 0.75));
    pointer-events: none;
    z-index: 0;
}

/* CTA section — more transparent, cosmic shines through */
.scene-section.section-cta-block::before {
    background: rgba(10, 14, 23, 0.45);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

/* Content stays above overlays */
.scene-section > .container {
    position: relative;
    z-index: 1;
}

/* ─── Footer needs solid bg to cap the cosmic background ─── */
.site-footer {
    position: relative;
    z-index: 2;
    background: var(--bg-primary);
}

/* ─── Responsive ─── */
@media (max-width: 768px) {
    .parallax-hero {
        min-height: 100vh;
        min-height: 100svh;
    }

    .parallax-hero-content {
        padding: 0 1.5rem;
        justify-content: flex-end;
        padding-bottom: 6rem;
    }

    .parallax-hero-content .hero-title {
        font-size: clamp(2rem, 8vw, 3rem);
    }

    /* Stronger overlay on mobile for readability */
    .scene-section::before {
        background: rgba(10, 14, 23, 0.75);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
    }

    .scene-section.section-alt::before {
        background: rgba(17, 24, 39, 0.7);
    }
}

/* ─── Reduced Motion ─── */
@media (prefers-reduced-motion: reduce) {
    .cosmic-bg .parallax-layer {
        will-change: auto;
    }

    .parallax-hero::before {
        animation: none;
        opacity: 0.4;
    }
}

/* ─── Light theme ─── */
[data-theme="light"] .cosmic-bg {
    /* Keep cosmic bg even in light mode — it's the visual identity */
    background-color: #050810;
}

[data-theme="light"] .scene-section::before {
    background: rgba(250, 251, 252, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

[data-theme="light"] .scene-section.section-alt::before {
    background: rgba(241, 245, 249, 0.8);
}

[data-theme="light"] .scene-section.section-cta-block::before {
    background: rgba(241, 245, 249, 0.7);
}
