/* Deep modern editorial theme */
html,
body {
    background: #08080a;
    color: #e5e5e5;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

    max-width: 100vw;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    /* Ensures smooth vertical scrolling on mobile */
    -webkit-font-smoothing: antialiased;
}

/* Hard boundary wrapper. Crops anything extending past screen edges */
.viewport-clip {
    position: relative;
    width: 100%;
    overflow-x: hidden;
    overflow-y: visible;
    /* Explicitly forces vertical scrolling to work perfectly */
    background: radial-gradient(circle at 50% 0%, #1a1a1e 0%, #08080a 100%);
}

::selection {
    background: #E55934;
    color: #FFF;
}

#random-stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
}

@keyframes twinkle {
    0% {
        opacity: 0.1;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.1;
    }
}

.star {
    animation: twinkle 3s infinite ease-in-out;
}

.star-fast {
    animation: twinkle 1.5s infinite ease-in-out;
}

.star-slow {
    animation: twinkle 4.5s infinite ease-in-out;
}

/* Grid Layout (Base Desktop) */
.editorial-layout {
    display: grid;
    grid-template-columns: 280px minmax(400px, 550px) 280px;
    gap: 60px;
    justify-content: center;
    max-width: 1400px;
    margin: 100px auto;
    padding: 0 30px;
    position: relative;
    z-index: 1;
}

/* Left Column */
.left-column {
    position: sticky;
    top: 100px;
    height: fit-content;
    z-index: 10;
}

.meta-tag {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #E55934;
    margin-bottom: 30px;
    font-weight: 600;
}

.headline {
    font-family: "Didot", "Bodoni MT", serif;
    font-size: 55px;
    line-height: 1.05;
    margin: 0 0 25px 0;
    letter-spacing: -1px;
    color: #ffffff;
}

.headline span {
    color: #E55934;
    font-style: italic;
    font-size: 45px;
}

#deck-wrapper {
    position: relative;
    margin-bottom: 30px;
}

#satellite-container {
    position: absolute;
    width: 80px;
    height: 80px;
    z-index: 20;
    pointer-events: none;
    filter: drop-shadow(0 10px 10px rgba(0, 0, 0, 0.5));
    will-change: transform;
}

@keyframes flash-red {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

.blinker {
    animation: flash-red 1.2s infinite step-start;
}

#deck-text-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
}

.deck-text-line {
    position: absolute;
    top: 0;
    left: 0;
    font-size: 15px;
    line-height: 26px;
    color: #9a9a9f;
    white-space: nowrap;
    will-change: transform, width;
    transition: none;
}

.author-block {
    border-top: 1px solid #2a2a30;
    padding-top: 20px;
    margin-bottom: 40px;
}

.author-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #6a6a70;
    margin-bottom: 5px;
}

.author-name {
    font-size: 14px;
    color: #d1d1d6;
    font-weight: 500;
}

.barcode-graphic {
    width: 60px;
    height: 30px;
    opacity: 0.8;
}

/* Center Stage */
.center-stage {
    position: relative;
    width: 100%;
    padding-bottom: 30px;
}

/* JS governs min-height now */
#space-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

#mars-bg {
    position: absolute;
    width: 600px;
    height: 600px;
    z-index: 1;
    pointer-events: none;
    will-change: transform;
}

@keyframes slow-pulse {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }

    50% {
        transform: scale(1.05);
        opacity: 1;
    }

    100% {
        transform: scale(1);
        opacity: 0.8;
    }
}

.pulse-glow {
    animation: slow-pulse 8s infinite ease-in-out;
}

#flight-path-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
    z-index: 2;
    pointer-events: none;
}

#starship-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 0;
    z-index: 10;
    pointer-events: none;
    will-change: transform;
}

#starship-svg {
    position: absolute;
    top: -90px;
    left: -225px;
    width: 350px;
    height: 180px;
    overflow: visible;
}

/* Ship Exhaust Animation classes */
@keyframes flicker-outer {
    0% {
        transform: scaleX(1);
        opacity: 1;
    }

    100% {
        transform: scaleX(0.9);
        opacity: 0.8;
    }
}

@keyframes flicker-inner {
    0% {
        transform: scaleX(1) scaleY(1);
        opacity: 1;
    }

    100% {
        transform: scaleX(0.8) scaleY(0.9);
        opacity: 0.9;
    }
}

@keyframes shock-flicker {
    0% {
        transform: translateX(0);
        opacity: 1;
    }

    100% {
        transform: translateX(-2px);
        opacity: 0.6;
    }
}

.flame-outer {
    animation: flicker-outer 0.08s infinite alternate;
    transform-origin: 75px 60px;
}

.flame-inner {
    animation: flicker-inner 0.05s infinite alternate-reverse;
    transform-origin: 75px 60px;
}

.sd-1 {
    animation: shock-flicker 0.04s infinite alternate;
}

.sd-2 {
    animation: shock-flicker 0.06s infinite alternate-reverse;
}

.sd-3 {
    animation: shock-flicker 0.05s infinite alternate;
}

@keyframes billow {
    0% {
        transform: translateX(0) scale(0.6);
        opacity: 0.8;
    }

    100% {
        transform: translateX(-80px) scale(2.2);
        opacity: 0;
    }
}

.smoke-1 {
    animation: billow 0.4s infinite linear;
}

.smoke-2 {
    animation: billow 0.6s infinite linear;
    animation-delay: 0.15s;
}

.smoke-3 {
    animation: billow 0.8s infinite linear;
    animation-delay: 0.3s;
}

#text-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 5;
}

.text-line {
    position: absolute;
    top: 0;
    left: 0;
    font-family: 'Georgia', "Times New Roman", serif;
    font-size: 17px;
    line-height: 30px;
    color: #c4c4c8;
    white-space: nowrap;
    will-change: transform, width;
    transition: none;
}

/* Right Column */
.right-column {
    position: sticky;
    top: 100px;
    height: fit-content;
    z-index: 10;
}

.telemetry-box {
    background: rgba(21, 21, 24, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid #2a2a30;
    padding: 20px;
    border-radius: 4px;
    margin-bottom: 40px;
    position: relative;
    z-index: 20;
}

.telemetry-title {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #9a9a9f;
    margin-bottom: 15px;
    border-bottom: 1px solid #2a2a30;
    padding-bottom: 10px;
}

.telemetry-row {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    font-family: 'Courier New', Courier, monospace;
    color: #e5e5e5;
    margin-bottom: 8px;
}

.telemetry-row span:last-child {
    color: #E55934;
}

.pull-quote {
    font-family: "Didot", "Bodoni MT", serif;
    font-size: 22px;
    line-height: 1.4;
    color: #ffffff;
    font-style: italic;
    margin: 0 0 40px 0;
    padding-left: 20px;
    border-left: 2px solid #E55934;
    position: relative;
    z-index: 20;
}

.index-list {
    position: relative;
    z-index: 20;
}

.index-list h3 {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #6a6a70;
    margin-bottom: 20px;
}

.index-list ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.index-list li {
    font-size: 14px;
    color: #9a9a9f;
    margin-bottom: 15px;
    border-bottom: 1px solid #1f1f24;
    padding-bottom: 15px;
}

.index-list li span {
    color: #E55934;
    margin-right: 10px;
    font-weight: 600;
}

/* =========================================================
   RESPONSIVE MEDIA QUERIES 
   ========================================================= */

/* Tablets / Small Laptops */
@media (max-width: 1250px) {
    .editorial-layout {
        grid-template-columns: 1fr 1fr;
        gap: 50px;
        margin-top: 60px;
    }

    .left-column {
        grid-column: 1 / 2;
        position: static;
    }

    .right-column {
        grid-column: 2 / 3;
        position: static;
    }

    .center-stage {
        grid-column: 1 / 3;
        grid-row: 2;
        margin-top: 20px;
    }
}

/* Mobile Screens */
@media (max-width: 768px) {
    .editorial-layout {
        display: flex;
        flex-direction: column;
        gap: 30px;
        padding: 0 20px;
        margin-top: 40px;
    }

    .left-column {
        order: 1;
    }

    .right-column {
        order: 2;
    }

    .center-stage {
        order: 3;
    }

    .headline {
        font-size: 40px;
        margin-bottom: 15px;
    }

    .headline span {
        font-size: 32px;
    }

    .pull-quote {
        font-size: 18px;
        margin-bottom: 25px;
        padding-left: 15px;
    }

    #deck-wrapper {
        margin-bottom: 10px;
    }

    .telemetry-box,
    .author-block {
        margin-bottom: 20px;
    }
}