/* === ipjosim.com - Mission Control Interface === */
/* Palette: #05060B #0A0E18 #1A3A4A #1AFFD5 #FF6B2C #C8D6E0 #7A8B9A #3DFFC2 #FF4757 #ffffff */

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

body {
    background: #05060B;
    color: #C8D6E0;
    font-family: 'Fira Code', monospace;
    font-weight: 400;
    overflow: hidden;
}

/* === Grid Overlay === */
.grid-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none;
    z-index: 1;
    background:
        repeating-linear-gradient(0deg, transparent, transparent 79px, rgba(26, 58, 74, 0.08) 79px, rgba(26, 58, 74, 0.08) 80px),
        repeating-linear-gradient(90deg, transparent, transparent 79px, rgba(26, 58, 74, 0.08) 79px, rgba(26, 58, 74, 0.08) 80px);
}

/* === Navigation Dots === */
.nav-dots {
    position: fixed;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.nav-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    border: 1px solid #1A3A4A;
    background: transparent;
    cursor: pointer;
    transition: background 0.3s ease-out, border-color 0.3s ease-out, box-shadow 0.3s ease-out;
}

.nav-dot.active {
    background: #1AFFD5;
    border-color: #1AFFD5;
    box-shadow: 0 0 6px rgba(26, 255, 213, 0.4);
}

/* === Scroll Container === */
.scroll-container {
    height: 100vh;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

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

/* === Sections === */
.section {
    height: 100vh;
    scroll-snap-align: start;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    overflow: hidden;
}

/* === Section 1: Orbital View === */
#orbital-view {
    flex-direction: column;
}

.mission-id {
    position: absolute;
    top: 40px;
    left: 48px;
    display: flex;
    align-items: center;
    gap: 16px;
    width: calc(100% - 96px);
}

.domain-name {
    font-family: 'Chakra Petch', sans-serif;
    font-weight: 300;
    font-size: clamp(1.8rem, 4vw, 3.2rem);
    letter-spacing: 0.25em;
    color: #C8D6E0;
    white-space: nowrap;
}

.mission-rule {
    flex: 1;
    height: 1px;
    background: #1A3A4A;
}

.wireframe-planet {
    width: clamp(250px, 40vw, 400px);
    height: clamp(250px, 40vw, 400px);
}

.planet-svg { width: 100%; height: 100%; }

.planet-rotate {
    animation: planetSpin 120s linear infinite;
    transform-origin: 200px 200px;
}

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

.telemetry-ticker {
    position: absolute;
    bottom: 40px;
    left: 0; right: 0;
    overflow: hidden;
    height: 20px;
}

.ticker-track {
    display: flex;
    white-space: nowrap;
    animation: tickerScroll 30s linear infinite;
}

.ticker-data {
    font-family: 'Fira Code', monospace;
    font-size: 0.75rem;
    font-weight: 300;
    color: #3DFFC2;
    opacity: 0.5;
    flex-shrink: 0;
}

@keyframes tickerScroll {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

/* === Section 2: Telemetry Dashboard === */
#telemetry-dash {
    padding: 40px 48px;
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
    max-width: 1100px;
    width: 100%;
}

.instrument-panel {
    background: #0A0E18;
    position: relative;
    padding: 20px;
    box-shadow: inset 0 0 20px rgba(26, 255, 213, 0.03);
}

/* Corner brackets */
.instrument-panel::before,
.instrument-panel::after {
    content: '';
    position: absolute;
    width: 12px; height: 12px;
    border-color: #1A3A4A;
    border-style: solid;
}

.instrument-panel::before {
    top: 4px; left: 4px;
    border-width: 1px 0 0 1px;
}

.instrument-panel::after {
    bottom: 4px; right: 4px;
    border-width: 0 1px 1px 0;
}

.panel-hdr {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.status-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: #3DFFC2;
    animation: dotPulse 3s ease-in-out infinite;
}

@keyframes dotPulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

.panel-label {
    font-family: 'Chakra Petch', sans-serif;
    font-weight: 500;
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    color: #7A8B9A;
    text-transform: uppercase;
}

.readout-text {
    font-family: 'Fira Code', monospace;
    font-size: clamp(0.8rem, 1vw, 0.95rem);
    font-weight: 400;
    color: #C8D6E0;
    line-height: 1.7;
}

/* === Section 3: Trajectory === */
#trajectory {
    padding: 40px 80px;
}

.trajectory-svg {
    width: 100%;
    max-width: 1000px;
    height: auto;
}

#transfer-arc {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    transition: stroke-dashoffset 0.5s ease-out;
}

.pulse-dot {
    animation: pulseDot 2s ease-in-out infinite;
}

@keyframes pulseDot {
    0%, 100% { opacity: 0.5; r: 4; }
    50% { opacity: 1; r: 6; }
}

/* === Section 4: Transmission === */
.transmission-section {
    flex-direction: column;
    background: #030408;
    padding: 60px 80px;
}

.tx-active {
    position: absolute;
    top: 32px;
    right: 48px;
    font-family: 'Chakra Petch', sans-serif;
    font-weight: 400;
    font-size: 0.65rem;
    letter-spacing: 0.15em;
    color: #3DFFC2;
    animation: txBlink 2s ease-in-out infinite;
}

@keyframes txBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.transmission-content {
    max-width: 600px;
    width: 100%;
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    font-weight: 400;
    color: #C8D6E0;
    line-height: 1.8;
    min-height: 200px;
}

.tx-cursor {
    color: #1AFFD5;
    animation: cursorBlink 0.53s step-end infinite;
}

@keyframes cursorBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.signal-waveform {
    position: absolute;
    bottom: 0;
    left: 0; right: 0;
    height: 80px;
}

.waveform-svg {
    width: 100%;
    height: 100%;
}

.wave {
    animation: waveShift 4s ease-in-out infinite alternate;
}

.wave-2 { animation-delay: 0.5s; animation-duration: 3s; }
.wave-3 { animation-delay: 1s; animation-duration: 5s; }

@keyframes waveShift {
    from { transform: translateX(0); }
    to { transform: translateX(-20px); }
}

/* === Responsive === */
@media (max-width: 768px) {
    .bento-grid {
        grid-template-columns: 1fr;
        gap: 1px;
    }

    .nav-dots {
        left: auto;
        top: auto;
        bottom: 12px;
        left: 50%;
        transform: translateX(-50%);
        flex-direction: row;
    }

    .section { padding: 40px 24px; }
    .mission-id { left: 24px; width: calc(100% - 48px); }
    #trajectory { padding: 40px 24px; }
    .transmission-section { padding: 40px 24px; }
}
