/* okurairi.com - Deep Space Research Vessel Bridge */

/* ============================================
   RESET & BASE
   ============================================ */

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

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

body {
    background: #03070d;
    color: #8fa7bf;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 300;
    font-size: clamp(0.95rem, 1.8vw, 1.2rem);
    line-height: 1.75;
    letter-spacing: 0.02em;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ============================================
   STAR FIELD
   ============================================ */

#star-field {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.star {
    position: absolute;
    width: 1px;
    height: 1px;
    border-radius: 50%;
    background: #ffffff;
}

@keyframes twinkle {
    0%, 100% { opacity: var(--star-opacity); }
    50% { opacity: calc(var(--star-opacity) * 0.3); }
}

/* ============================================
   DATA TICKER
   ============================================ */

#data-ticker {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 28px;
    z-index: 100;
    overflow: hidden;
    background: linear-gradient(to bottom, transparent, rgba(3, 7, 13, 0.9));
}

.ticker-track {
    display: flex;
    width: max-content;
    animation: marquee 60s linear infinite;
}

.ticker-content {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.65rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #4a6fa5;
    opacity: 0.5;
    white-space: nowrap;
    padding: 6px 0;
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ============================================
   CHAMBERS (SECTIONS)
   ============================================ */

.chamber {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 1000px;
}

#airlock {
    min-height: 100vh;
}

#navigation-console {
    min-height: 100vh;
}

#cartography {
    min-height: 150vh;
}

#archive {
    min-height: 150vh;
}

#signal-room {
    min-height: 100vh;
    background: radial-gradient(ellipse at center, #0d1b2a 0%, #03070d 70%);
}

.chamber-content {
    position: relative;
    width: 100%;
    max-width: 1400px;
    padding: 0 min(8vw, 120px);
}

/* ============================================
   DEPTH FOG
   ============================================ */

.depth-fog {
    position: fixed;
    left: 0;
    width: 100%;
    height: 30vh;
    pointer-events: none;
    z-index: 2;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.fog-1 { top: 85vh; background: linear-gradient(to bottom, transparent 0%, #03070d 40%, #03070d 60%, transparent 100%); }
.fog-2 { top: 175vh; background: linear-gradient(to bottom, transparent 0%, #03070d 40%, #03070d 60%, transparent 100%); }
.fog-3 { top: 310vh; background: linear-gradient(to bottom, transparent 0%, #03070d 40%, #03070d 60%, transparent 100%); }
.fog-4 { top: 460vh; background: linear-gradient(to bottom, transparent 0%, #03070d 40%, #03070d 60%, transparent 100%); }

/* ============================================
   SECTION 1: AIRLOCK
   ============================================ */

.airlock-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    animation: airlock-breathe 6s ease-in-out infinite;
}

@keyframes airlock-breathe {
    0%, 100% { transform: scale(1.0); }
    50% { transform: scale(1.005); }
}

.airlock-title {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(3.5rem, 9vw, 8rem);
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #c0cfdb;
    opacity: 0;
    animation: airlock-fade-in 2s cubic-bezier(0.16, 1, 0.3, 1) 1.5s forwards;
}

@keyframes airlock-fade-in {
    0% { opacity: 0; transform: translateY(10px); }
    100% { opacity: 1; transform: translateY(0); }
}

.airlock-metadata {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 1.5rem;
    opacity: 0;
    animation: airlock-fade-in 2s cubic-bezier(0.16, 1, 0.3, 1) 2.5s forwards;
}

.amber-indicator {
    display: inline-block;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #ffb300;
    animation: amber-pulse 2s ease-in-out infinite;
}

@keyframes amber-pulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 4px #ffb300; }
    50% { opacity: 0.3; box-shadow: 0 0 1px #ffb300; }
}

.metadata-text {
    font-family: 'IBM Plex Mono', monospace;
    font-size: clamp(0.7rem, 1.2vw, 0.85rem);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #4a6fa5;
    opacity: 0.7;
}

/* ============================================
   SECTION 2: NAVIGATION CONSOLE
   ============================================ */

.nav-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: min(4vw, 60px);
    min-height: 100vh;
    padding-top: 10vh;
    padding-bottom: 10vh;
}

.nav-panel {
    position: relative;
    width: 42%;
    background: #0d1b2a;
    border: 1px solid #4a6fa5;
    clip-path: polygon(3% 0, 100% 0, 97% 100%, 0 100%);
    box-shadow: 0 0 20px rgba(74, 111, 165, 0.15);
    padding: clamp(1.5rem, 3vw, 2.5rem);
    opacity: 0;
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-panel-left {
    transform: translateX(-100%);
}

.nav-panel-right {
    transform: translateX(100%);
}

.nav-panel.revealed {
    opacity: 1;
    transform: translateX(0);
}

.nav-panel-right.revealed {
    transition-delay: 200ms;
}

.panel-header {
    margin-bottom: 1.2rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid rgba(74, 111, 165, 0.3);
}

.panel-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: clamp(0.6rem, 1vw, 0.75rem);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #4a6fa5;
    opacity: 0.7;
}

.panel-body {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 300;
    font-size: clamp(0.95rem, 1.8vw, 1.2rem);
    line-height: 1.75;
    color: #8fa7bf;
}

/* Panel Corner Brackets */
.panel-corner {
    position: absolute;
    width: 16px;
    height: 16px;
}

.corner-tl {
    top: -1px;
    left: -1px;
    border-top: 2px solid #00e5ff;
    border-left: 2px solid #00e5ff;
}

.corner-tr {
    top: -1px;
    right: -1px;
    border-top: 2px solid #00e5ff;
    border-right: 2px solid #00e5ff;
}

.corner-bl {
    bottom: -1px;
    left: -1px;
    border-bottom: 2px solid #00e5ff;
    border-left: 2px solid #00e5ff;
}

.corner-br {
    bottom: -1px;
    right: -1px;
    border-bottom: 2px solid #00e5ff;
    border-right: 2px solid #00e5ff;
}

/* Targeting Reticle */
.targeting-reticle {
    width: clamp(60px, 8vw, 120px);
    height: clamp(60px, 8vw, 120px);
    flex-shrink: 0;
}

.targeting-reticle svg {
    width: 100%;
    height: 100%;
    animation: reticle-rotate 20s linear infinite;
}

@keyframes reticle-rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Sensor Grid */
.sensor-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 3px;
    padding: 0.5rem 0;
}

.sensor-cell {
    aspect-ratio: 1;
    background: #4a6fa5;
    border-radius: 1px;
    border: 1px solid #1b2838;
}

/* ============================================
   SECTION 3: CARTOGRAPHY
   ============================================ */

.cartography-content {
    display: flex;
    justify-content: center;
    min-height: 100vh;
    padding-top: 15vh;
    padding-bottom: 15vh;
}

.cartography-panel {
    position: relative;
    width: 80%;
    max-width: 1000px;
    background: #0d1b2a;
    border: 1px solid #4a6fa5;
    clip-path: polygon(2% 0, 100% 0, 98% 100%, 0 100%);
    box-shadow: 0 0 30px rgba(74, 111, 165, 0.1);
    padding: clamp(2rem, 4vw, 3.5rem);
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1), transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.cartography-panel.revealed {
    opacity: 1;
    transform: translateY(0);
}

.orbital-display {
    width: 100%;
    margin: 2rem 0;
}

.orbital-display svg {
    width: 100%;
    height: auto;
}

.orbit {
    transition: stroke-dashoffset 3s cubic-bezier(0.16, 1, 0.3, 1);
}

.orbit.drawn {
    stroke-dashoffset: 0 !important;
}

.waypoint {
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.waypoint.visible {
    opacity: 0.8 !important;
}

.central-body.visible {
    opacity: 1 !important;
}

.cartography-log {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(74, 111, 165, 0.3);
}

.log-text {
    font-family: 'IBM Plex Mono', monospace;
    font-size: clamp(0.7rem, 1.2vw, 0.85rem);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #4a6fa5;
    opacity: 0.7;
    line-height: 1.8;
}

/* ============================================
   SECTION 4: ARCHIVE
   ============================================ */

.archive-content {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: min(3vw, 40px);
    min-height: 100vh;
    padding-top: 15vh;
    padding-bottom: 15vh;
}

.archive-panel {
    position: relative;
    flex: 1;
    max-width: 340px;
    background: #0d1b2a;
    border: 1px solid #4a6fa5;
    clip-path: polygon(3% 0, 100% 0, 97% 100%, 0 100%);
    box-shadow: 0 0 20px rgba(74, 111, 165, 0.1);
    padding: clamp(1.5rem, 2.5vw, 2rem);
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

.archive-panel-1 { margin-top: 0; }
.archive-panel-2 { margin-top: -40px; }
.archive-panel-3 { margin-top: 20px; }

.archive-panel.revealed {
    opacity: 1;
    transform: translateY(0);
}

.archive-text {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 300;
    font-size: clamp(0.85rem, 1.5vw, 1rem);
    line-height: 1.8;
    color: #8fa7bf;
}

.drop-cap {
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    font-size: 2.2em;
    float: left;
    line-height: 0.85;
    margin-right: 0.1em;
    color: #00e5ff;
}

/* Scan Line */
.scan-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, #00e5ff, transparent);
    opacity: 0;
    transform: translateY(0);
    pointer-events: none;
}

.scan-line.active {
    opacity: 0.2;
    animation: scan-sweep 2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes scan-sweep {
    0% { transform: translateY(0); opacity: 0.2; }
    100% { transform: translateY(var(--panel-height, 400px)); opacity: 0; }
}

/* ============================================
   SECTION 5: SIGNAL ROOM
   ============================================ */

.signal-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    text-align: center;
    padding-top: 10vh;
    padding-bottom: 10vh;
}

.signal-transmission {
    max-width: 700px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1.5s cubic-bezier(0.16, 1, 0.3, 1), transform 1.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.signal-transmission.revealed {
    opacity: 1;
    transform: translateY(0);
}

.signal-text {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 400;
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    line-height: 1.8;
    color: #c0cfdb;
}

.end-transmission {
    margin-top: 6rem;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 2s cubic-bezier(0.16, 1, 0.3, 1) 1s, transform 2s cubic-bezier(0.16, 1, 0.3, 1) 1s;
}

.end-transmission.revealed {
    opacity: 1;
    transform: translateY(0);
}

.end-text {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(1.5rem, 4vw, 3rem);
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #c0cfdb;
    opacity: 0.6;
}

/* ============================================
   HUD RETICLES (Fixed Corner Decorations)
   ============================================ */

.hud-reticle {
    position: fixed;
    width: 160px;
    height: 160px;
    z-index: 3;
    pointer-events: none;
    opacity: 0.5;
}

.hud-reticle svg {
    width: 100%;
    height: 100%;
    animation: reticle-rotate 30s linear infinite;
}

.hud-reticle-tl {
    top: -40px;
    left: -40px;
}

.hud-reticle-br {
    bottom: -40px;
    right: -40px;
}

/* ============================================
   VIEWPORT GRADIENT OVERLAY
   ============================================ */

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, transparent 40%, #03070d 100%);
    z-index: 1;
    pointer-events: none;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .nav-content {
        flex-direction: column;
        gap: 2rem;
    }

    .nav-panel {
        width: 90%;
    }

    .targeting-reticle.reticle-center {
        display: none;
    }

    .archive-content {
        flex-direction: column;
        align-items: center;
    }

    .archive-panel {
        max-width: 90%;
    }

    .archive-panel-1,
    .archive-panel-2,
    .archive-panel-3 {
        margin-top: 0;
    }

    .cartography-panel {
        width: 95%;
    }

    .chamber-content {
        padding: 0 5vw;
    }

    .hud-reticle {
        display: none;
    }
}
