@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500&family=Orbitron:wght@400;500;600&display=swap");

:root {
    color-scheme: dark;

    --page-background: #02060d;
    --text: #f4f7fd;
    --text-muted: #aab4c6;
    --gold: #efbd61;
    --gold-soft: rgba(239, 189, 97, 0.68);
}

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

html {
    min-width: 320px;
    min-height: 100%;
    background: var(--page-background);
}

body {
    position: relative;
    min-width: 320px;
    min-height: 100%;
    overflow-x: hidden;
    isolation: isolate;
    font-family: "Inter", Arial, sans-serif;
    color: var(--text);
    background: var(--page-background);
}

.space-scene {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
    background: var(--page-background);
}

.space-scene__image {
    position: absolute;
    inset: -2.5%;
    background-image: url("asterance-background.webp");
    background-repeat: no-repeat;
    background-position: 50% 50%;
    background-size: cover;
    filter: saturate(1.09) contrast(1.04) brightness(0.98);
    transform: scale(1.025);
    animation: scene-breathe 24s ease-in-out infinite alternate;
    will-change: transform, filter;
}

.space-scene__shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(0, 0, 0, 0.16), transparent 24%, transparent 72%, rgba(0, 0, 0, 0.22)),
        radial-gradient(circle at 50% 38%, rgba(3, 9, 19, 0.04), rgba(1, 4, 10, 0.31) 100%);
}

.space-scene__blue-nebula,
.space-scene__gold-nebula {
    position: absolute;
    width: min(58vw, 1080px);
    aspect-ratio: 1;
    border-radius: 50%;
    mix-blend-mode: screen;
    filter: blur(clamp(70px, 7vw, 125px));
    pointer-events: none;
    animation: nebula-breathe 14s ease-in-out infinite alternate;
}

.space-scene__blue-nebula {
    left: -24%;
    top: -12%;
    opacity: 0.12;
    background: radial-gradient(circle, rgba(43, 132, 255, 0.62), transparent 66%);
}

.space-scene__gold-nebula {
    right: -25%;
    top: -9%;
    opacity: 0.10;
    background: radial-gradient(circle, rgba(255, 161, 47, 0.55), transparent 65%);
    animation-delay: -7s;
}

.space-scene__sun-glow {
    position: absolute;
    left: 18%;
    bottom: 7%;
    width: clamp(190px, 24vw, 390px);
    aspect-ratio: 1;
    transform: translate(-50%, 50%);
    border-radius: 50%;
    mix-blend-mode: screen;
    background: radial-gradient(
        circle,
        rgba(255, 251, 224, 0.62) 0 2%,
        rgba(255, 197, 94, 0.34) 9%,
        rgba(255, 156, 40, 0.12) 28%,
        transparent 68%
    );
    filter: blur(2px);
    animation: sun-pulse 6s ease-in-out infinite alternate;
}

.space-scene__horizon-glow {
    position: absolute;
    left: 50%;
    bottom: 2%;
    width: min(90vw, 1500px);
    height: clamp(70px, 10vw, 160px);
    transform: translateX(-50%);
    opacity: 0.22;
    mix-blend-mode: screen;
    background: radial-gradient(ellipse at center, rgba(73, 157, 255, 0.48), transparent 69%);
    filter: blur(22px);
    animation: horizon-pulse 9s ease-in-out infinite alternate;
}

.twinkle {
    position: absolute;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #fff8dd;
    box-shadow:
        0 0 7px rgba(255, 240, 196, 0.92),
        0 0 18px rgba(255, 191, 77, 0.55);
    animation: twinkle 4.1s ease-in-out infinite;
}

.twinkle::before,
.twinkle::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.twinkle::before {
    width: 25px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 241, 201, 0.90), transparent);
}

.twinkle::after {
    width: 1px;
    height: 25px;
    background: linear-gradient(180deg, transparent, rgba(255, 241, 201, 0.90), transparent);
}

.twinkle--one {
    left: 17%;
    top: 18%;
}

.twinkle--two {
    right: 16%;
    top: 24%;
    animation-delay: -1.2s;
}

.twinkle--three {
    left: 32%;
    top: 39%;
    transform: scale(0.7);
    animation-delay: -2.3s;
}

.twinkle--four {
    right: 29%;
    top: 13%;
    transform: scale(0.82);
    animation-delay: -3.1s;
}

.shooting-star {
    position: absolute;
    width: 150px;
    height: 1px;
    opacity: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.95), transparent);
    filter: drop-shadow(0 0 7px rgba(93, 171, 255, 0.80));
    transform: rotate(-29deg);
}

.shooting-star--one {
    top: 18%;
    right: 7%;
    animation: shooting-star 13s ease-in-out infinite;
}

.shooting-star--two {
    top: 57%;
    left: 7%;
    animation: shooting-star 17s ease-in-out 6s infinite;
}

.page {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    padding:
        max(clamp(50px, 8vh, 108px), env(safe-area-inset-top))
        max(clamp(18px, 4vw, 64px), env(safe-area-inset-right))
        max(clamp(20px, 3.5vh, 48px), env(safe-area-inset-bottom))
        max(clamp(18px, 4vw, 64px), env(safe-area-inset-left));
}

.hero {
    width: min(980px, 100%);
    margin: 0 auto;
    display: flex;
    flex: 1 0 auto;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.hero__logo {
    display: block;
    width: clamp(270px, 31vw, 465px);
    height: auto;
    flex: 0 0 auto;
    user-select: none;
    filter:
        drop-shadow(0 18px 44px rgba(0, 0, 0, 0.42))
        drop-shadow(0 0 25px rgba(72, 150, 250, 0.18));
    animation: logo-float 7s ease-in-out infinite;
}

.eyebrow {
    width: min(610px, 92vw);
    margin-top: clamp(12px, 2vh, 25px);
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: clamp(8px, 1.3vw, 18px);
}

.eyebrow span {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold-soft));
}

.eyebrow span:last-child {
    background: linear-gradient(90deg, var(--gold-soft), transparent);
}

.eyebrow p {
    font-family: "Orbitron", sans-serif;
    font-size: clamp(0.61rem, 0.95vw, 0.78rem);
    font-weight: 500;
    letter-spacing: clamp(0.13em, 0.46vw, 0.29em);
    text-transform: uppercase;
    color: var(--gold);
    white-space: nowrap;
}

h1 {
    margin-top: clamp(23px, 3.3vh, 42px);
    font-family: "Orbitron", sans-serif;
    font-size: clamp(2.5rem, 6.1vw, 5.25rem);
    font-weight: 400;
    line-height: 1;
    letter-spacing: clamp(0.08em, 1.08vw, 0.21em);
    text-transform: uppercase;
    text-shadow:
        0 0 25px rgba(91, 164, 255, 0.13),
        0 9px 30px rgba(0, 0, 0, 0.29);
}

.hero__intro {
    width: min(750px, 92vw);
    margin-top: clamp(20px, 2.8vh, 33px);
    font-size: clamp(0.98rem, 1.35vw, 1.18rem);
    font-weight: 300;
    line-height: 1.72;
    color: var(--text-muted);
    text-shadow: 0 2px 14px rgba(0, 0, 0, 0.38);
}

.closing {
    margin-top: clamp(37px, 5.7vh, 70px);
}

.closing__ornament {
    width: min(435px, 74vw);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 14px;
}

.closing__ornament span {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(239, 189, 97, 0.63));
}

.closing__ornament span:last-child {
    background: linear-gradient(90deg, rgba(239, 189, 97, 0.63), transparent);
}

.closing__ornament i {
    width: 9px;
    height: 9px;
    display: block;
    transform: rotate(45deg);
    background: var(--gold);
    box-shadow: 0 0 17px rgba(239, 189, 97, 0.76);
}

.closing p {
    margin-top: 18px;
    font-family: "Orbitron", sans-serif;
    font-size: clamp(0.68rem, 1.05vw, 0.84rem);
    letter-spacing: clamp(0.16em, 0.41vw, 0.28em);
    text-transform: uppercase;
    color: #bdc5d4;
    text-shadow: 0 2px 13px rgba(0, 0, 0, 0.38);
}

.footer {
    position: fixed;
    right: max(clamp(18px, 2.4vw, 42px), env(safe-area-inset-right));
    bottom: max(clamp(14px, 2.2vh, 28px), env(safe-area-inset-bottom));
    z-index: 3;
    width: auto;
    margin: 0;
    padding: 7px 10px;
    text-align: right;
    border-radius: 6px;
    background: rgba(2, 7, 15, 0.38);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.footer p {
    font-size: clamp(0.58rem, 0.72vw, 0.69rem);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #8793a8;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.78);
    white-space: nowrap;
}

@keyframes scene-breathe {
    from {
        transform: scale(1.025) translate3d(0, 0, 0);
        filter: saturate(1.07) contrast(1.035) brightness(0.97);
    }

    to {
        transform: scale(1.055) translate3d(-0.35%, -0.25%, 0);
        filter: saturate(1.13) contrast(1.06) brightness(1.01);
    }
}

@keyframes nebula-breathe {
    from {
        transform: scale(0.94);
    }

    to {
        transform: scale(1.07);
    }
}

@keyframes sun-pulse {
    from {
        opacity: 0.62;
        transform: translate(-50%, 50%) scale(0.94);
    }

    to {
        opacity: 0.92;
        transform: translate(-50%, 50%) scale(1.08);
    }
}

@keyframes horizon-pulse {
    from {
        opacity: 0.15;
        transform: translateX(-50%) scaleX(0.94);
    }

    to {
        opacity: 0.29;
        transform: translateX(-50%) scaleX(1.04);
    }
}

@keyframes twinkle {
    0%,
    100% {
        opacity: 0.25;
    }

    50% {
        opacity: 1;
    }
}

@keyframes shooting-star {
    0%,
    80%,
    100% {
        opacity: 0;
        transform: translate3d(120px, -60px, 0) rotate(-29deg);
    }

    83% {
        opacity: 0.90;
    }

    92% {
        opacity: 0;
        transform: translate3d(-410px, 235px, 0) rotate(-29deg);
    }
}

@keyframes logo-float {
    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-7px);
    }
}

/* Tablets and portrait browser windows */
@media (max-aspect-ratio: 4/5) {
    .space-scene__image {
        background-position: 36% 50%;
    }

    .space-scene__blue-nebula {
        left: -52%;
    }

    .space-scene__gold-nebula {
        right: -57%;
    }

    .space-scene__sun-glow {
        left: 7%;
        bottom: 8%;
    }
}

/* Phones */
@media (max-width: 720px) {
    .page {
        padding-top: max(clamp(42px, 7vh, 70px), env(safe-area-inset-top));
        padding-inline: max(16px, env(safe-area-inset-left));
    }

    .space-scene__image {
        inset: -3%;
        background-position: 33% 50%;
    }

    .hero__logo {
        width: clamp(225px, 72vw, 340px);
    }

    .eyebrow {
        width: min(455px, 95vw);
    }

    .eyebrow p {
        letter-spacing: 0.12em;
    }

    h1 {
        font-size: clamp(2.14rem, 10.6vw, 3.55rem);
        letter-spacing: 0.08em;
    }

    .hero__intro {
        width: min(94vw, 520px);
        font-size: clamp(0.94rem, 3.9vw, 1.05rem);
        line-height: 1.63;
    }

    .closing {
        margin-top: 41px;
    }

    .twinkle--one {
        left: 9%;
        top: 14%;
    }

    .twinkle--two {
        right: 9%;
        top: 20%;
    }

    .twinkle--three {
        left: 20%;
        top: 39%;
    }

    .twinkle--four {
        right: 20%;
        top: 11%;
    }
}

/* Narrow phones */
@media (max-width: 460px) {
    .page {
        padding-top: max(34px, env(safe-area-inset-top));
        padding-inline: max(14px, env(safe-area-inset-left));
    }

    .space-scene__image {
        background-position: 29% 50%;
    }

    .hero__logo {
        width: min(80vw, 300px);
    }

    .eyebrow {
        grid-template-columns: 30px auto 30px;
        gap: 8px;
    }

    .eyebrow p {
        font-size: 0.55rem;
        letter-spacing: 0.085em;
    }

    h1 {
        margin-top: 23px;
        font-size: clamp(1.95rem, 11vw, 2.85rem);
    }

    .closing__ornament {
        width: min(310px, 78vw);
    }

    .shooting-star {
        width: 105px;
    }
}

/* Short desktop browser windows */
@media (max-height: 760px) and (min-width: 721px) {
    .page {
        padding-top: clamp(38px, 6vh, 62px);
    }

    .hero__logo {
        width: clamp(230px, 24vw, 345px);
    }

    .eyebrow {
        margin-top: 8px;
    }

    h1 {
        margin-top: 20px;
        font-size: clamp(2.3rem, 4.7vw, 3.9rem);
    }

    .hero__intro {
        margin-top: 16px;
        font-size: clamp(0.93rem, 1.1vw, 1.03rem);
    }

    .closing {
        margin-top: 29px;
    }
}

@media (max-width: 460px) {
    .footer {
        right: max(10px, env(safe-area-inset-right));
        bottom: max(10px, env(safe-area-inset-bottom));
        padding: 6px 8px;
    }

    .footer p {
        font-size: 0.52rem;
        letter-spacing: 0.11em;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
    }
}
