/* interplanetary.quest - Space Immigration Journey */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Exo 2', sans-serif;
    font-weight: 300;
    font-size: 0.95rem;
    line-height: 1.8;
    color: #FFFFFF;
    background: #000008;
    overflow-x: hidden;
}

.section {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.section-label {
    font-family: 'Exo 2', sans-serif;
    font-weight: 600;
    font-size: 0.8rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 1rem;
}

/* =============================================
   SECTION 1: Earth Departure (120vh)
   ============================================= */

#earth-departure {
    height: 120vh;
    background: linear-gradient(
        to top,
        #0D47A1 0%,
        #0D47A1 15%,
        #1565C0 25%,
        #42A5F5 40%,
        #1A237E 60%,
        #000008 80%,
        #000008 100%
    );
    display: flex;
    align-items: center;
    justify-content: center;
}

#star-field-earth {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.8s ease;
}

#star-field-earth.visible {
    opacity: 1;
}

#earth-horizon {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 200px;
    z-index: 2;
}

#horizon-path {
    stroke-dasharray: 2000;
    stroke-dashoffset: 2000;
    transition: stroke-dashoffset 1s ease-out;
}

#horizon-path.drawn {
    stroke-dashoffset: 0;
}

#title-container {
    position: relative;
    z-index: 3;
    text-align: center;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

#title-container.visible {
    opacity: 1;
    transform: translateY(0);
}

#main-title {
    font-family: 'Exo 2', sans-serif;
    font-weight: 200;
    font-size: clamp(2rem, 5vw, 4rem);
    letter-spacing: 0.08em;
    color: #FFFFFF;
    margin-bottom: 0.5rem;
}

/* =============================================
   SECTION 2: Transit (100vh)
   ============================================= */

#transit {
    height: 100vh;
    background: #000008;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

#star-field-transit {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.transit-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3rem;
    padding: 2rem;
}

.text-container {
    max-width: 480px;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(0, 0, 8, 0.6);
}

.text-container p {
    color: rgba(255, 255, 255, 0.85);
}

.text-container .section-label {
    color: rgba(255, 255, 255, 0.5);
}

.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* Small gradient blobs for distant galaxies */
#transit::before,
#transit::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(40px);
    pointer-events: none;
}

#transit::before {
    width: 120px;
    height: 60px;
    background: radial-gradient(ellipse, rgba(66, 165, 245, 0.06), transparent);
    top: 20%;
    left: 15%;
}

#transit::after {
    width: 80px;
    height: 40px;
    background: radial-gradient(ellipse, rgba(255, 179, 0, 0.05), transparent);
    bottom: 30%;
    right: 20%;
}

/* =============================================
   SECTION 3: Mars Approach (120vh)
   ============================================= */

#mars-approach {
    height: 120vh;
    background: linear-gradient(
        to bottom,
        #000008 0%,
        #000008 20%,
        #1a0a04 40%,
        #3d1308 60%,
        #BF360C 80%,
        #E65100 100%
    );
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

#dust-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.dust-particle {
    position: absolute;
    width: 1px;
    height: 1px;
    background: #E65100;
    border-radius: 50%;
    animation: drift-dust linear infinite;
}

@keyframes drift-dust {
    0% {
        transform: translateX(-20px);
    }
    100% {
        transform: translateX(calc(100vw + 20px));
    }
}

.mars-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem;
}

/* =============================================
   SECTION 4: Colony (100vh)
   ============================================= */

#colony {
    min-height: 100vh;
    background: linear-gradient(
        to bottom,
        #BF360C 0%,
        #8B2500 30%,
        #5a1a08 60%,
        #3d1308 100%
    );
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    position: relative;
}

.colony-dome {
    width: min(600px, 90vw);
    border-radius: 50% 50% 0 0;
    background: rgba(26, 35, 126, 0.8);
    padding: 4rem 2.5rem 3rem;
    position: relative;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.colony-dome.visible {
    opacity: 1;
    transform: translateY(0);
}

.dome-content {
    text-align: center;
}

.dome-content h2 {
    font-family: 'Exo 2', sans-serif;
    font-weight: 200;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    letter-spacing: 0.08em;
    margin-bottom: 1.5rem;
    color: #FFFFFF;
}

.dome-content p {
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 1rem;
}

.dome-content .section-label {
    color: rgba(255, 255, 255, 0.5);
}

/* =============================================
   FOOTER: Horizon
   ============================================= */

#horizon {
    height: 120px;
    background: #000008;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

.horizon-glow {
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #FFB300 10%, transparent);
    opacity: 0.25;
    margin-bottom: 1.5rem;
}

.horizon-text {
    font-family: 'Exo 2', sans-serif;
    font-weight: 200;
    font-size: 0.85rem;
    letter-spacing: 0.15em;
    color: #FFB300;
    opacity: 0.4;
    text-transform: lowercase;
}

/* =============================================
   Star dots (generated via JS)
   ============================================= */

.star {
    position: absolute;
    background: #FFFFFF;
    border-radius: 50%;
    pointer-events: none;
}

/* =============================================
   Subtle lift animation for earth departure
   ============================================= */

@keyframes gentle-lift {
    0% { transform: translateY(0); }
    100% { transform: translateY(-10px); }
}

#earth-departure.lifting {
    animation: gentle-lift 3s ease-out forwards;
}
