/* ========================================
   interplanetary.biz — Retro-Futuristic Space Logistics
   ======================================== */

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

html {
    scrollbar-width: none;
}

html::-webkit-scrollbar {
    display: none;
}

body {
    background: #0C0E14;
    color: #C4BDA8;
    font-family: 'Work Sans', sans-serif;
    font-size: 16px;
    line-height: 1.7;
    overflow: hidden;
    height: 100vh;
}

::selection {
    background: #F5C842;
    color: #0C0E14;
}

/* --- Star Field --- */
.starfield-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 400vw;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
}

#starfield-far {
    background:
        radial-gradient(1px 1px at 10% 20%, rgba(255,255,255,0.3), transparent),
        radial-gradient(1px 1px at 25% 60%, rgba(255,255,255,0.4), transparent),
        radial-gradient(1px 1px at 40% 15%, rgba(255,255,255,0.3), transparent),
        radial-gradient(1px 1px at 55% 80%, rgba(255,255,255,0.35), transparent),
        radial-gradient(1px 1px at 70% 40%, rgba(255,255,255,0.3), transparent),
        radial-gradient(1px 1px at 85% 70%, rgba(255,255,255,0.4), transparent),
        radial-gradient(1px 1px at 15% 90%, rgba(255,255,255,0.3), transparent),
        radial-gradient(1px 1px at 50% 50%, rgba(255,255,255,0.35), transparent),
        radial-gradient(1px 1px at 90% 10%, rgba(255,255,255,0.3), transparent),
        radial-gradient(1.5px 1.5px at 5% 45%, rgba(255,255,255,0.5), transparent),
        radial-gradient(1px 1px at 35% 35%, rgba(255,255,255,0.3), transparent),
        radial-gradient(1px 1px at 65% 25%, rgba(255,255,255,0.4), transparent),
        radial-gradient(1px 1px at 80% 85%, rgba(255,255,255,0.3), transparent),
        radial-gradient(1.5px 1.5px at 20% 75%, rgba(255,255,255,0.45), transparent),
        radial-gradient(1px 1px at 45% 95%, rgba(255,255,255,0.3), transparent),
        radial-gradient(1px 1px at 92% 55%, rgba(255,255,255,0.35), transparent);
    opacity: 0.6;
}

#starfield-mid {
    background:
        radial-gradient(1.5px 1.5px at 8% 30%, rgba(255,255,255,0.5), transparent),
        radial-gradient(2px 2px at 22% 70%, rgba(255,255,255,0.6), transparent),
        radial-gradient(1.5px 1.5px at 38% 10%, rgba(255,255,255,0.5), transparent),
        radial-gradient(2px 2px at 52% 85%, rgba(255,255,255,0.55), transparent),
        radial-gradient(1.5px 1.5px at 68% 45%, rgba(255,255,255,0.5), transparent),
        radial-gradient(2px 2px at 82% 20%, rgba(255,255,255,0.6), transparent),
        radial-gradient(1.5px 1.5px at 12% 55%, rgba(255,255,255,0.5), transparent),
        radial-gradient(2px 2px at 48% 40%, rgba(255,255,255,0.55), transparent),
        radial-gradient(1.5px 1.5px at 75% 75%, rgba(255,255,255,0.5), transparent),
        radial-gradient(2px 2px at 95% 60%, rgba(255,255,255,0.6), transparent);
    opacity: 0.7;
}

#starfield-near {
    background:
        radial-gradient(2.5px 2.5px at 5% 25%, rgba(255,255,255,0.7), transparent),
        radial-gradient(3px 3px at 18% 65%, rgba(255,255,255,0.8), transparent),
        radial-gradient(2.5px 2.5px at 33% 40%, rgba(255,255,255,0.7), transparent),
        radial-gradient(3px 3px at 60% 15%, rgba(255,255,255,0.75), transparent),
        radial-gradient(2.5px 2.5px at 78% 80%, rgba(255,255,255,0.7), transparent),
        radial-gradient(3px 3px at 88% 35%, rgba(255,255,255,0.8), transparent),
        radial-gradient(2px 2px at 42% 90%, rgba(255,255,255,0.7), transparent),
        radial-gradient(3px 3px at 55% 55%, rgba(255,255,255,0.75), transparent);
    opacity: 0.8;
}

/* --- Scroll Container --- */
#scroll-container {
    display: flex;
    width: 400vw;
    height: 100vh;
    overflow-x: scroll;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    position: relative;
    z-index: 1;
}

#scroll-container::-webkit-scrollbar {
    display: none;
}

/* --- Sector --- */
.sector {
    width: 100vw;
    height: 100vh;
    flex-shrink: 0;
    scroll-snap-align: start;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.sector-inner {
    max-width: 680px;
    width: 100%;
    padding: 40px 32px;
    text-align: center;
}

/* --- Logo Badge --- */
#logo-badge {
    margin: 0 auto 32px auto;
    transform: scale(0);
    transition: transform 600ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

#logo-badge.visible {
    transform: scale(1);
}

/* --- Hero --- */
#hero-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 64px;
    color: #F5F0E0;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    min-height: 80px;
    margin-bottom: 16px;
}

#hero-subtitle {
    font-family: 'Work Sans', sans-serif;
    font-weight: 300;
    font-size: 16px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #C4BDA8;
    opacity: 0;
    transition: opacity 1s ease;
    margin-bottom: 48px;
}

#hero-subtitle.visible {
    opacity: 1;
}

/* --- Scroll Arrow --- */
#scroll-arrow {
    position: fixed;
    right: 40px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    opacity: 0;
    transition: opacity 0.5s ease;
    animation: pulseArrow 1.5s ease-in-out infinite;
}

#scroll-arrow.visible {
    opacity: 1;
}

@keyframes pulseArrow {
    0%, 100% { transform: translateY(-50%) translateX(0); }
    50% { transform: translateY(-50%) translateX(8px); }
}

/* --- Sector Titles --- */
.sector-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 48px;
    color: #F5F0E0;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 40px;
}

.sector-body {
    font-family: 'Work Sans', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.7;
    color: #C4BDA8;
    margin-top: 40px;
    text-align: left;
}

/* --- Manifest Stamp --- */
.manifest-stamp {
    display: inline-flex;
    gap: 16px;
    border: 1px solid #3A3D48;
    padding: 8px 20px;
    margin-bottom: 32px;
    font-family: 'Cousine', monospace;
    font-size: 13px;
    color: #E87040;
    transition: transform 200ms ease;
}

.manifest-stamp:hover {
    transform: perspective(600px) rotateY(5deg);
}

.manifest-num {
    color: #F5C842;
    font-weight: bold;
}

.manifest-date,
.manifest-route {
    color: #E87040;
}

/* --- Route Map --- */
.route-map {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 32px 0;
    flex-wrap: wrap;
}

.planet-system {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.planet {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    position: relative;
}

.planet-earth {
    background: #7EB8DA;
}

.planet-mars {
    background: #E87040;
}

.planet-jupiter {
    background: #C4BDA8;
    width: 64px;
    height: 64px;
}

.planet-saturn {
    background: #F5C842;
    width: 56px;
    height: 56px;
}

.orbital-ring {
    position: absolute;
    top: -8px;
    left: -8px;
    right: -8px;
    bottom: -8px;
    border: 1px solid #3A3D48;
    border-radius: 50%;
    transition: transform 0s;
}

.planet-system:hover .orbital-ring {
    animation: orbitSpin 20s linear infinite;
}

@keyframes orbitSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.planet-label {
    font-family: 'Cousine', monospace;
    font-size: 11px;
    color: #F5F0E0;
    letter-spacing: 0.1em;
}

.planet-data {
    font-family: 'Cousine', monospace;
    font-size: 11px;
    color: #E87040;
}

.trajectory-line {
    flex-shrink: 0;
}

.trajectory-line:hover path {
    animation: dashTravel 2s linear infinite;
}

@keyframes dashTravel {
    from { stroke-dashoffset: 0; }
    to { stroke-dashoffset: -24; }
}

/* --- Fleet Grid --- */
.fleet-grid {
    display: flex;
    gap: 32px;
    justify-content: center;
    margin: 32px 0;
    flex-wrap: wrap;
}

.fleet-card {
    background: #1C1F28;
    border: 1px solid #3A3D48;
    padding: 32px 24px;
    text-align: center;
    width: 200px;
    transition: border-color 300ms ease;
}

.fleet-card:hover {
    border-color: #F5C842;
}

.fleet-icon {
    margin-bottom: 16px;
}

.fleet-name {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 24px;
    color: #F5F0E0;
    letter-spacing: 0.06em;
    margin-bottom: 8px;
}

.fleet-spec {
    font-family: 'Work Sans', sans-serif;
    font-size: 14px;
    color: #C4BDA8;
    margin-bottom: 12px;
}

.fleet-data {
    font-family: 'Cousine', monospace;
    font-size: 12px;
    color: #E87040;
}

/* --- Contact --- */
.contact-info {
    display: flex;
    flex-direction: column;
    gap: 32px;
    text-align: left;
    margin: 32px 0;
}

.contact-block {
    border-left: 2px solid #F5C842;
    padding-left: 20px;
}

.contact-label {
    display: block;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 24px;
    color: #F5F0E0;
    letter-spacing: 0.06em;
    margin-bottom: 4px;
}

.contact-data {
    display: block;
    font-family: 'Cousine', monospace;
    font-size: 13px;
    color: #7EB8DA;
    line-height: 1.6;
}

.sector-footer {
    font-family: 'Cousine', monospace;
    font-size: 11px;
    color: #3A3D48;
    margin-top: 60px;
}

/* --- Bottom Nav --- */
#bottom-nav {
    position: fixed;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 100;
    background: rgba(12, 14, 20, 0.85);
    padding: 8px 16px;
    border: 1px solid #3A3D48;
}

.nav-tab {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px 16px;
    display: flex;
    gap: 8px;
    align-items: center;
    position: relative;
}

.tab-num {
    font-family: 'Cousine', monospace;
    font-size: 11px;
    color: #3A3D48;
}

.tab-name {
    font-family: 'Work Sans', sans-serif;
    font-weight: 300;
    font-size: 12px;
    letter-spacing: 0.15em;
    color: #C4BDA8;
    transition: color 300ms ease;
}

.nav-tab.active .tab-name {
    color: #F5C842;
}

.nav-tab.active .tab-num {
    color: #E87040;
}

#nav-underline {
    position: absolute;
    bottom: 4px;
    height: 2px;
    background: #F5C842;
    transition: left 300ms ease, width 300ms ease;
}

/* --- Progress Bar --- */
#progress-bar {
    position: fixed;
    bottom: 16px;
    left: 10%;
    width: 80%;
    height: 2px;
    z-index: 100;
}

#progress-line {
    width: 100%;
    height: 100%;
    border-top: 1px dashed #3A3D48;
}

#progress-dot {
    width: 8px;
    height: 8px;
    background: #E87040;
    border-radius: 50%;
    position: absolute;
    top: -3px;
    left: 0;
    transition: left 300ms ease;
}

/* --- Reveal Animation --- */
.slide-reveal {
    opacity: 0;
    transform: translateX(60px);
    transition: opacity 500ms ease, transform 500ms ease;
}

.slide-reveal.revealed {
    opacity: 1;
    transform: translateX(0);
}

/* --- Mobile --- */
@media (max-width: 768px) {
    #hero-title {
        font-size: 42px;
    }

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

    .route-map {
        flex-direction: column;
    }

    .trajectory-line {
        transform: rotate(90deg);
        width: 80px;
    }

    .fleet-grid {
        flex-direction: column;
        align-items: center;
    }

    .fleet-card {
        width: 100%;
        max-width: 280px;
    }

    #bottom-nav {
        bottom: 24px;
        padding: 6px 10px;
        gap: 4px;
    }

    .nav-tab {
        padding: 6px 10px;
    }

    .tab-name {
        font-size: 10px;
    }

    #scroll-arrow {
        right: 16px;
    }

    .sector-inner {
        padding: 40px 20px;
    }
}
