/* ============================================
   lunar.quest - CSS-Only Lunar Descent
   Palette: Deep Burgundy / Retro-Futuristic
   ============================================ */

/* --- Custom Properties --- */
:root {
    --oxblood-void: #2A0A1B;
    --burgundy-core: #6B1D3A;
    --rosewood-mist: #9E4865;
    --ember-gold: #D4943A;
    --titanium-frost: #B8C6D0;
    --regolith-shadow: #1A1118;
    --lunar-ash: #E8DFE3;
    --mare-blue: #2E3A5C;

    --font-display: 'Barlow Condensed', sans-serif;
    --font-body: 'DM Sans', sans-serif;
    --font-mono: 'IBM Plex Mono', monospace;

    --zoom-ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --grain-opacity: 0.03;
}

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    background-color: var(--oxblood-void);
    color: var(--titanium-frost);
    font-family: var(--font-body);
    font-weight: 400;
    font-size: clamp(0.95rem, 1.8vw, 1.1rem);
    line-height: 1.65;
    letter-spacing: 0.01em;
    overflow-x: hidden;
    position: relative;
}

/* --- Film Grain Overlay --- */
.grain-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 9999;
    opacity: var(--grain-opacity);
    mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 200px 200px;
}

/* --- Scroll Indicator --- */
.scroll-indicator {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
    height: 120px;
}

.scroll-track {
    width: 2px;
    height: 100%;
    background: rgba(107, 29, 58, 0.3);
    border-radius: 1px;
    position: relative;
}

.scroll-pip {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--burgundy-core);
    box-shadow: 0 0 12px var(--burgundy-core), 0 0 24px rgba(107, 29, 58, 0.4);
    position: absolute;
    left: 50%;
    top: 0;
    transform: translateX(-50%);
    transition: top 0.3s ease;
}

/* --- Telemetry Text --- */
.telemetry {
    font-family: var(--font-mono);
    font-weight: 400;
    font-size: 0.75rem;
    opacity: 0.6;
    color: var(--titanium-frost);
    letter-spacing: 0.05em;
}

.telemetry-alt {
    position: absolute;
    bottom: 30px;
    left: 40px;
}

.telemetry-phase {
    display: block;
    text-align: center;
    padding: 30px 0 50px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    opacity: 0.5;
    color: var(--titanium-frost);
    letter-spacing: 0.08em;
}

.cell-coord {
    position: absolute;
    bottom: 10px;
    right: 12px;
    font-size: 0.65rem;
    opacity: 0.5;
}

.cell-label {
    position: absolute;
    top: 12px;
    left: 14px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(0.7rem, 1.5vw, 0.9rem);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--lunar-ash);
    opacity: 0.85;
}

/* --- Wave SVGs --- */
.wave-svg {
    width: 100%;
    height: 100%;
    display: block;
}

.wave-path-gold {
    fill: none;
    stroke: var(--ember-gold);
    stroke-width: 1.5;
    opacity: 0.4;
}

.wave-path-blue {
    fill: none;
    stroke: var(--mare-blue);
    stroke-width: 1.2;
    opacity: 0.2;
}

.wave-path-rose {
    fill: none;
    stroke: var(--rosewood-mist);
    stroke-width: 1;
    opacity: 0.15;
}

.wave-path-gold-2 {
    fill: none;
    stroke: var(--ember-gold);
    stroke-width: 1.2;
    opacity: 0.35;
}

.wave-path-flatline {
    fill: none;
    stroke: var(--ember-gold);
    stroke-width: 1.5;
    opacity: 0.5;
    transition: opacity 1.5s ease;
}

.wave-layer {
    position: absolute;
    left: 0;
    width: 100%;
    height: 80px;
    pointer-events: none;
    z-index: 0;
}

.wave-seismic { top: 15%; }
.wave-lifesupport { top: 55%; }
.wave-seismic-2 { top: 10%; }
.wave-comm-2 { top: 70%; }

/* --- Sections --- */
.section {
    position: relative;
    width: 100%;
}

/* -- Orbital View -- */
.section-orbital {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--oxblood-void);
    overflow: hidden;
}

.orbital-content {
    text-align: center;
    position: relative;
    z-index: 2;
}

.hero-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(2.2rem, 7vw, 4.8rem);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--lunar-ash);
    margin-bottom: 40px;
}

.letter {
    display: inline-block;
    opacity: 0;
    transform: translateY(15px);
    animation: letterFade 0.5s var(--zoom-ease) forwards;
    animation-delay: calc(var(--i) * 120ms);
}

@keyframes letterFade {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.comm-wave {
    width: 80%;
    max-width: 700px;
    height: 60px;
    margin: 0 auto 60px;
}

.planetary-horizon {
    width: 600px;
    height: 600px;
    border: 1px solid rgba(107, 29, 58, 0.3);
    border-radius: 50%;
    position: absolute;
    bottom: -400px;
    left: 50%;
    transform: translateX(-50%);
    pointer-events: none;
}

/* -- Descent Phase -- */
.section-descent {
    min-height: 200vh;
    padding: 80px 0;
    background: linear-gradient(
        180deg,
        var(--oxblood-void) 0%,
        var(--regolith-shadow) 40%,
        var(--oxblood-void) 100%
    );
    position: relative;
}

/* -- Surface Approach -- */
.section-surface {
    min-height: 200vh;
    padding: 80px 0;
    background: linear-gradient(
        180deg,
        var(--oxblood-void) 0%,
        #2A0E1E 30%,
        #30122A 60%,
        var(--regolith-shadow) 100%
    );
    position: relative;
}

/* -- Landing -- */
.section-landing {
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--regolith-shadow);
    position: relative;
    overflow: hidden;
}

.section-landing .grain-intensity {
    opacity: 0.06;
}

.landing-wave-container {
    width: 80%;
    max-width: 700px;
    height: 40px;
    margin-bottom: 80px;
}

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

.landing-coords {
    margin-bottom: 24px;
}

.landing-coords .telemetry {
    font-size: 0.85rem;
    opacity: 0.7;
}

.landing-domain {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: clamp(0.95rem, 2vw, 1.2rem);
    color: var(--rosewood-mist);
    letter-spacing: 0.05em;
}

/* --- Grid System --- */
.grid-container {
    display: grid;
    gap: 2px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
    position: relative;
    z-index: 1;
}

.grid-descent {
    grid-template-columns: 1fr 1fr;
}

.grid-descent-2 {
    grid-template-columns: 1fr 1.2fr 0.8fr;
}

.grid-surface {
    grid-template-columns: 1fr 1.2fr 0.8fr 1fr;
}

.grid-surface-2 {
    grid-template-columns: 1fr 1fr 1fr;
}

/* --- Grid Cells --- */
.grid-cell {
    background: var(--regolith-shadow);
    position: relative;
    overflow: hidden;
    min-height: 280px;
    transform: scale(0.92);
    filter: saturate(0.7);
    transition: transform 600ms var(--zoom-ease), filter 600ms var(--zoom-ease);
    border: 1px solid rgba(107, 29, 58, 0.12);
}

.grid-cell.in-view {
    transform: scale(1.0);
    filter: saturate(1);
}

.cell-wide {
    min-height: 300px;
}

.cell-tall {
    min-height: 380px;
}

.cell-large {
    grid-column: span 2;
    min-height: 340px;
}

.cell-standard {
    min-height: 280px;
}

/* --- CSS-Only 3D Rendered Modules --- */
.css-render {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* -- Dome Structure -- */
.dome-structure {
    position: relative;
}

.dome-base {
    width: 200px;
    height: 60px;
    background: linear-gradient(180deg, var(--burgundy-core) 0%, #3D0F24 100%);
    border-radius: 4px;
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    box-shadow: 0 8px 30px rgba(26, 17, 24, 0.7), inset 0 -2px 10px rgba(0, 0, 0, 0.5);
}

.dome-cap {
    width: 180px;
    height: 90px;
    background: radial-gradient(ellipse at 40% 80%, var(--rosewood-mist) 0%, var(--burgundy-core) 45%, #3D0F24 100%);
    border-radius: 90px 90px 0 0;
    position: absolute;
    bottom: 138px;
    left: 50%;
    transform: translateX(-50%);
    box-shadow: 0 -4px 20px rgba(158, 72, 101, 0.15), inset 0 5px 15px rgba(232, 223, 227, 0.08);
}

.dome-light {
    width: 12px;
    height: 12px;
    background: var(--ember-gold);
    border-radius: 50%;
    position: absolute;
    bottom: 200px;
    left: 50%;
    transform: translateX(-50%);
    box-shadow: 0 0 20px var(--ember-gold), 0 0 40px rgba(212, 148, 58, 0.3);
    animation: beaconPulse 3s ease-in-out infinite;
}

@keyframes beaconPulse {
    0%, 100% { opacity: 0.7; box-shadow: 0 0 20px var(--ember-gold), 0 0 40px rgba(212, 148, 58, 0.3); }
    50% { opacity: 1; box-shadow: 0 0 30px var(--ember-gold), 0 0 60px rgba(212, 148, 58, 0.5); }
}

/* -- Cylinder Module -- */
.cylinder-module {
    position: relative;
}

.cylinder-body {
    width: 240px;
    height: 80px;
    background: linear-gradient(180deg,
        rgba(158, 72, 101, 0.3) 0%,
        var(--burgundy-core) 20%,
        #3D0F24 50%,
        var(--burgundy-core) 80%,
        rgba(158, 72, 101, 0.3) 100%
    );
    border-radius: 8px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 12px 40px rgba(26, 17, 24, 0.8), inset 0 2px 8px rgba(232, 223, 227, 0.05);
}

.cylinder-cap-left, .cylinder-cap-right {
    width: 20px;
    height: 70px;
    background: radial-gradient(ellipse at center, var(--rosewood-mist) 0%, var(--burgundy-core) 80%);
    border-radius: 50%;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

.cylinder-cap-left { left: calc(50% - 130px); }
.cylinder-cap-right { right: calc(50% - 130px); }

.cylinder-stripe {
    width: 240px;
    height: 2px;
    background: rgba(184, 198, 208, 0.1);
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: calc(50% - 15px);
}

.cylinder-stripe.s2 { top: 50%; }
.cylinder-stripe.s3 { top: calc(50% + 15px); }

/* -- Solar Array -- */
.solar-array {
    position: relative;
}

.solar-mast {
    width: 3px;
    height: 200px;
    background: linear-gradient(180deg, var(--titanium-frost) 0%, rgba(184, 198, 208, 0.3) 100%);
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.solar-panel {
    width: 80px;
    height: 35px;
    background: repeating-linear-gradient(
        90deg,
        var(--mare-blue) 0px,
        var(--mare-blue) 8px,
        #1E2B45 8px,
        #1E2B45 10px
    );
    position: absolute;
    left: calc(50% + 8px);
    border: 1px solid rgba(184, 198, 208, 0.15);
    box-shadow: 0 2px 10px rgba(46, 58, 92, 0.4);
}

.solar-panel { top: calc(50% - 95px); }
.solar-panel.p2 { top: calc(50% - 50px); }
.solar-panel.p3 { top: calc(50% + 5px); }
.solar-panel.p4 { top: calc(50% + 60px); }

/* -- Comm Dish -- */
.comm-dish {
    position: relative;
}

.dish-base {
    width: 6px;
    height: 80px;
    background: linear-gradient(180deg, var(--titanium-frost), rgba(184, 198, 208, 0.2));
    position: absolute;
    left: 50%;
    bottom: 60px;
    transform: translateX(-50%);
}

.dish-arc {
    width: 100px;
    height: 50px;
    border: 2px solid var(--titanium-frost);
    border-bottom: none;
    border-radius: 50px 50px 0 0;
    position: absolute;
    left: 50%;
    bottom: 138px;
    transform: translateX(-50%);
    opacity: 0.7;
}

.dish-signal {
    width: 60px;
    height: 30px;
    border: 1px solid rgba(212, 148, 58, 0.3);
    border-bottom: none;
    border-radius: 30px 30px 0 0;
    position: absolute;
    left: 50%;
    bottom: 155px;
    transform: translateX(-50%);
    animation: signalPulse 2s ease-in-out infinite;
}

.dish-signal.sig2 {
    width: 90px;
    height: 45px;
    bottom: 155px;
    border-radius: 45px 45px 0 0;
    animation-delay: 0.5s;
    opacity: 0.5;
}

@keyframes signalPulse {
    0%, 100% { opacity: 0.2; }
    50% { opacity: 0.7; }
}

/* -- Tower Structure -- */
.tower-structure {
    position: relative;
}

.tower-shaft {
    width: 6px;
    height: 160px;
    background: linear-gradient(180deg, var(--titanium-frost), rgba(184, 198, 208, 0.3));
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.tower-beacon {
    width: 14px;
    height: 14px;
    background: var(--ember-gold);
    border-radius: 50%;
    position: absolute;
    left: 50%;
    top: calc(50% - 85px);
    transform: translateX(-50%);
    box-shadow: 0 0 20px var(--ember-gold), 0 0 50px rgba(212, 148, 58, 0.4);
    animation: beaconPulse 2.5s ease-in-out infinite;
}

.tower-strut {
    width: 2px;
    height: 100px;
    background: rgba(184, 198, 208, 0.2);
    position: absolute;
    top: calc(50% - 20px);
    transform-origin: bottom center;
}

.tower-strut.left {
    left: calc(50% - 30px);
    transform: rotate(15deg);
}

.tower-strut.right {
    right: calc(50% - 30px);
    transform: rotate(-15deg);
}

/* -- Habitat Complex -- */
.habitat-complex {
    position: relative;
}

.hab-ring {
    width: 180px;
    height: 180px;
    border: 3px solid var(--burgundy-core);
    border-radius: 50%;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 30px rgba(107, 29, 58, 0.2), inset 0 0 20px rgba(107, 29, 58, 0.1);
}

.hab-core {
    width: 40px;
    height: 40px;
    background: radial-gradient(circle, var(--rosewood-mist), var(--burgundy-core));
    border-radius: 50%;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 20px rgba(158, 72, 101, 0.4);
}

.hab-arm {
    width: 70px;
    height: 3px;
    background: linear-gradient(90deg, var(--burgundy-core), rgba(107, 29, 58, 0.2));
    position: absolute;
    left: 50%;
    top: 50%;
    transform-origin: 0 50%;
}

.hab-arm.arm1 { transform: rotate(0deg); }
.hab-arm.arm2 { transform: rotate(90deg); }
.hab-arm.arm3 { transform: rotate(180deg); }
.hab-arm.arm4 { transform: rotate(270deg); }

/* -- Lab Module -- */
.lab-module {
    position: relative;
}

.lab-shell {
    width: 140px;
    height: 90px;
    background: linear-gradient(160deg, var(--burgundy-core) 0%, #3D0F24 60%, var(--regolith-shadow) 100%);
    border-radius: 12px;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 10px 30px rgba(26, 17, 24, 0.8), inset 0 2px 6px rgba(232, 223, 227, 0.06);
}

.lab-window {
    width: 20px;
    height: 12px;
    background: rgba(212, 148, 58, 0.15);
    border: 1px solid rgba(212, 148, 58, 0.3);
    border-radius: 3px;
    position: absolute;
    top: calc(50% - 6px);
}

.lab-window.w1 { left: calc(50% - 50px); }
.lab-window.w2 { left: calc(50% - 10px); }
.lab-window.w3 { left: calc(50% + 30px); }

/* -- Storage Unit -- */
.storage-unit {
    position: relative;
}

.store-floor {
    width: 160px;
    height: 4px;
    background: rgba(184, 198, 208, 0.15);
    position: absolute;
    left: 50%;
    bottom: 70px;
    transform: translateX(-50%);
}

.store-crate {
    background: linear-gradient(135deg, var(--mare-blue) 0%, #1E2B45 100%);
    position: absolute;
    left: 50%;
    border: 1px solid rgba(184, 198, 208, 0.1);
}

.store-crate.c1 {
    width: 50px;
    height: 40px;
    bottom: 74px;
    transform: translateX(-70px);
}

.store-crate.c2 {
    width: 60px;
    height: 50px;
    bottom: 74px;
    transform: translateX(-15px);
}

.store-crate.c3 {
    width: 40px;
    height: 30px;
    bottom: 74px;
    transform: translateX(50px);
}

/* -- Terrain View -- */
.terrain-view {
    position: relative;
    overflow: hidden;
}

.terrain-layer {
    position: absolute;
    left: 0;
    width: 100%;
    height: 25%;
}

.terrain-layer.t1 {
    bottom: 0;
    background: linear-gradient(180deg, #1A1118 0%, #221420 100%);
}

.terrain-layer.t2 {
    bottom: 25%;
    background: linear-gradient(180deg, #150E14 0%, #1A1118 100%);
}

.terrain-layer.t3 {
    bottom: 50%;
    background: linear-gradient(180deg, #120C11 0%, #150E14 100%);
}

.terrain-layer.t4 {
    bottom: 75%;
    background: linear-gradient(180deg, var(--regolith-shadow) 0%, #120C11 100%);
}

.terrain-crater {
    width: 80px;
    height: 30px;
    border-radius: 50%;
    background: radial-gradient(ellipse, #0F0A0E 30%, transparent 70%);
    position: absolute;
    bottom: 30px;
    left: 35%;
    box-shadow: inset 0 -3px 8px rgba(158, 72, 101, 0.1);
}

/* -- Refinery Unit -- */
.refinery-unit {
    position: relative;
}

.ref-tank {
    width: 60px;
    height: 100px;
    background: linear-gradient(90deg, #3D0F24 0%, var(--burgundy-core) 30%, #3D0F24 60%, var(--burgundy-core) 90%, #3D0F24 100%);
    border-radius: 30px 30px 4px 4px;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 8px 25px rgba(26, 17, 24, 0.7);
}

.ref-pipe {
    height: 3px;
    background: rgba(184, 198, 208, 0.25);
    position: absolute;
    top: 50%;
}

.ref-pipe.p1 {
    width: 50px;
    left: calc(50% + 30px);
}

.ref-pipe.p2 {
    width: 50px;
    right: calc(50% + 30px);
}

.ref-valve {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid var(--titanium-frost);
    position: absolute;
    left: 50%;
    top: calc(50% - 20px);
    transform: translateX(-50%);
    opacity: 0.5;
}

/* -- Antenna Array -- */
.antenna-array {
    position: relative;
}

.ant-mast {
    width: 4px;
    height: 220px;
    background: linear-gradient(180deg, var(--titanium-frost) 0%, rgba(184, 198, 208, 0.15) 100%);
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.ant-base {
    width: 50px;
    height: 8px;
    background: var(--mare-blue);
    border-radius: 2px;
    position: absolute;
    left: 50%;
    bottom: 50px;
    transform: translateX(-50%);
}

.ant-dish {
    width: 30px;
    height: 15px;
    border: 1.5px solid var(--titanium-frost);
    border-bottom: none;
    border-radius: 15px 15px 0 0;
    position: absolute;
    left: 50%;
    opacity: 0.6;
}

.ant-dish.d1 {
    transform: translateX(-50%) rotate(-20deg);
    top: calc(50% - 80px);
}

.ant-dish.d2 {
    transform: translateX(-50%) rotate(10deg);
    top: calc(50% - 40px);
}

.ant-dish.d3 {
    transform: translateX(-50%) rotate(-5deg);
    top: calc(50%);
}

/* -- Airlock Module -- */
.airlock-module {
    position: relative;
}

.airlock-frame {
    width: 80px;
    height: 120px;
    border: 3px solid var(--burgundy-core);
    border-radius: 40px 40px 0 0;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    box-shadow: inset 0 0 15px rgba(107, 29, 58, 0.2);
}

.airlock-door {
    width: 50px;
    height: 80px;
    background: linear-gradient(180deg, var(--regolith-shadow) 0%, #0F0A0E 100%);
    border-radius: 25px 25px 0 0;
    position: absolute;
    left: 50%;
    top: calc(50% + 10px);
    transform: translate(-50%, -50%);
    border: 1px solid rgba(107, 29, 58, 0.3);
}

.airlock-light {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--ember-gold);
    position: absolute;
    left: 50%;
    top: calc(50% - 55px);
    transform: translateX(-50%);
    box-shadow: 0 0 10px var(--ember-gold);
    animation: beaconPulse 4s ease-in-out infinite;
}

/* --- Landing Zone Markers --- */
.landing-markers {
    display: none;
}

.target-ring {
    position: fixed;
    border: 1px solid rgba(107, 29, 58, 0.08);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

.target-ring.ring-1 {
    width: 200px;
    height: 200px;
    top: 20%;
    left: 10%;
}

.target-ring.ring-2 {
    width: 120px;
    height: 120px;
    top: 50%;
    right: 15%;
}

.target-ring.ring-3 {
    width: 300px;
    height: 300px;
    bottom: 10%;
    left: 40%;
}

/* --- Trajectory Lines (decorative) --- */
.section-descent::before,
.section-surface::before {
    content: '';
    position: absolute;
    width: 1px;
    height: 100%;
    top: 0;
    background: linear-gradient(
        180deg,
        transparent 0%,
        rgba(107, 29, 58, 0.1) 20%,
        rgba(107, 29, 58, 0.05) 80%,
        transparent 100%
    );
    transform: rotate(15deg);
    transform-origin: top center;
    pointer-events: none;
    z-index: 0;
}

.section-descent::before {
    left: 20%;
}

.section-surface::before {
    right: 25%;
}

/* --- Responsive: Tablet --- */
@media (max-width: 1024px) {
    .grid-descent,
    .grid-descent-2,
    .grid-surface,
    .grid-surface-2 {
        grid-template-columns: 1fr 1fr;
        gap: 3px;
    }

    .cell-large {
        grid-column: span 2;
    }

    .hero-title {
        letter-spacing: 0.12em;
    }
}

/* --- Responsive: Mobile --- */
@media (max-width: 640px) {
    .grid-descent,
    .grid-descent-2,
    .grid-surface,
    .grid-surface-2 {
        grid-template-columns: 1fr;
        gap: 0;
        padding: 20px 0;
    }

    .grid-cell {
        width: 100vw;
        margin-left: calc(-50vw + 50%);
        border: none;
        border-bottom: 1px solid rgba(107, 29, 58, 0.15);
        min-height: 260px;
    }

    .cell-large {
        grid-column: span 1;
    }

    .hero-title {
        letter-spacing: 0.08em;
        font-size: clamp(1.8rem, 8vw, 3rem);
    }

    .scroll-indicator {
        right: 10px;
    }

    .telemetry-alt {
        left: 20px;
        bottom: 20px;
    }

    .planetary-horizon {
        width: 400px;
        height: 400px;
        bottom: -280px;
    }
}

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
    .letter {
        animation: none;
        opacity: 1;
        transform: none;
    }

    .grid-cell {
        transition: none;
        transform: scale(1);
        filter: saturate(1);
    }

    .dome-light,
    .tower-beacon,
    .airlock-light,
    .dish-signal {
        animation: none;
    }
}
