/* nebula lost — 404 banner under the overlay header: cosmic sky, glow arc, outlined status number (no colors) */
.nebula-lost {
    padding: 160px 0 200px;
}

/* sky layers: every colour is the layer's own Tailwind / Bootstrap text colour (currentColor) */
.nebula-lost__wash {
    background-image: linear-gradient(180deg, currentColor 0%, transparent 90%);
}

.nebula-lost__nebula {
    background-image:
        radial-gradient(45% 55% at 0% 35%, currentColor 0%, transparent 70%),
        radial-gradient(40% 45% at 100% 10%, currentColor 0%, transparent 70%),
        radial-gradient(40% 35% at 50% 100%, currentColor 0%, transparent 75%);
}

.nebula-lost__stars {
    background-image:
        radial-gradient(circle at 20% 30%, currentColor 0, currentColor 1px, transparent 1.5px),
        radial-gradient(circle at 70% 60%, currentColor 0, currentColor 1px, transparent 1.5px);
    background-size: 140px 140px, 90px 90px;
    -webkit-mask-image: linear-gradient(180deg, currentColor 0%, transparent 95%);
    mask-image: linear-gradient(180deg, currentColor 0%, transparent 95%);
    animation: nebula-lost-drift 60s linear infinite;
}

@keyframes nebula-lost-drift {
    to {
        background-position: 140px -140px, -90px 90px;
    }
}

/* glow arc: the rim of a planet rising under the message */
.nebula-lost__arc {
    width: 980px;
    height: 640px;
    border-radius: 50%;
    border-top: 2px solid currentColor;
    box-shadow:
        0 -6px 40px -6px currentColor,
        inset 0 30px 60px -30px currentColor;
    transform: translate(-50%, 540px);
    clip-path: inset(-120px -120px 50% -120px);
}

.nebula-lost__code {
    max-width: 100%;
    overflow: hidden;
    white-space: nowrap;
    font-size: 120px;
    letter-spacing: 0.04em;
    -webkit-text-stroke: 1.5px currentColor;
    -webkit-text-fill-color: transparent;
}

.nebula-lost__badge {
    padding: 10px 0 0 10px;
    margin: -10px 0 0 -10px;
}

.nebula-lost__tick--v {
    width: 1px;
    height: 36px;
}

.nebula-lost__tick--h {
    width: 36px;
    height: 1px;
}

.nebula-lost__label {
    font-size: 13px;
    letter-spacing: 0.06em;
    padding-top: 9px;
}

.nebula-lost__title {
    font-size: 38px;
    line-height: 1.12;
    letter-spacing: -0.01em;
    text-wrap: balance;
    overflow-wrap: break-word;
}

.nebula-lost__lead {
    max-width: 65ch;
    font-size: 16px;
    line-height: 1.7;
}

.nebula-lost__btn {
    min-height: 52px;
    font-size: 16px;
    line-height: 1.2;
}

.nebula-lost__btn:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 3px;
}

.nebula-lost__chip {
    width: 36px;
    height: 36px;
}

/* the right arrow tilted up gives the reference ↗ mark; it levels out on hover */
.nebula-lost__arrow {
    font-size: 13px;
    transform: rotate(-45deg);
    transition: transform 0.3s ease;
}

.nebula-lost__btn:hover .nebula-lost__arrow,
.nebula-lost__btn:focus-visible .nebula-lost__arrow {
    transform: rotate(0deg);
}

/* split-text headline: characters slide in from the right (armed by script.js only) */
.nebula-lost__sr {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.nebula-lost__word {
    display: inline-block;
    white-space: nowrap;
}

.nebula-lost__char {
    display: inline-block;
}

.nebula-lost--armed .nebula-lost__char {
    opacity: 0;
    transform: translateX(50px);
    transition: opacity 0.8s cubic-bezier(0.34, 1.56, 0.64, 1), transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.nebula-lost--armed .is-in .nebula-lost__char {
    opacity: 1;
    transform: none;
}

/* fade-up blocks */
.nebula-lost--armed [data-nebula-reveal] {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.9s ease, transform 0.9s ease;
}

.nebula-lost--armed [data-nebula-reveal].is-in {
    opacity: 1;
    transform: none;
}

@media (min-width: 768px) {
    .nebula-lost {
        padding: 190px 0 240px;
    }

    .nebula-lost__code {
        font-size: 180px;
    }

    .nebula-lost__title {
        font-size: 54px;
    }

    .nebula-lost__lead {
        font-size: 16px;
    }
}

@media (min-width: 1024px) {
    .nebula-lost {
        padding: 210px 0 280px;
    }

    .nebula-lost__arc {
        width: 1900px;
        height: 900px;
        transform: translate(-50%, 760px);
    }

    .nebula-lost__code {
        font-size: 240px;
    }

    .nebula-lost__title {
        font-size: 66px;
        line-height: 1.08;
    }

    .nebula-lost__lead {
        font-size: 17px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .nebula-lost__stars {
        animation: none;
    }

    .nebula-lost--armed .nebula-lost__char,
    .nebula-lost--armed [data-nebula-reveal] {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .nebula-lost__arrow {
        transition: none;
    }
}

