/* ============================================================
   MOON LIGHT - PREMIUM STARS + MOON HERO SLIDER (mh- prefix)
   Append to assets/css/style.css
============================================================ */
#moon-hero {
    position: relative;
    min-height: 96vh;
    overflow: hidden;
    background: radial-gradient(ellipse 90% 80% at 70% 40%, #111d35 0%, #0b1328 55%, #080d1b 100%);
    isolation: isolate;
}

#mh-stars {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.mh-nebula {
    position: absolute;
    border-radius: 50%;
    filter: blur(110px);
    pointer-events: none;
    z-index: 0;
}

.mh-nebula--1 {
    top: -10%;
    right: 5%;
    width: 520px;
    height: 520px;
    background: rgba(40, 120, 255, 0.13);
    animation: aurora-drift 12s ease-in-out infinite alternate;
}

.mh-nebula--2 {
    bottom: -15%;
    left: -5%;
    width: 560px;
    height: 560px;
    background: rgba(168, 199, 255, 0.14);
    animation: aurora-drift 15s ease-in-out infinite alternate-reverse;
}

.mh-grid {
    position: absolute;
    inset: 0;
    z-index: 0;
    background-image:
        linear-gradient(rgba(40, 120, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(40, 120, 255, 0.035) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse 75% 70% at 50% 45%, #000 20%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse 75% 70% at 50% 45%, #000 20%, transparent 80%);
    pointer-events: none;
}

.mh-horizon {
    position: absolute;
    left: 50%;
    bottom: -300px;
    transform: translateX(-50%);
    width: 150vw;
    height: 460px;
    border-radius: 50%;
    border-top: 2px solid rgba(40, 120, 255, 0.7);
    background: radial-gradient(ellipse at 50% 0%, rgba(40, 120, 255, 0.1), transparent 60%), #080d1b;
    box-shadow: 0 -18px 50px rgba(40, 120, 255, 0.18);
    z-index: 1;
    pointer-events: none;
}

/* Swiper */
.mh-swiper {
    position: relative;
    z-index: 2;
    width: 100%;
    min-height: 96vh;
}

.mh-swiper .swiper-slide {
    height: auto;
    display: flex;
    align-items: center;
}

.mh-slide {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 3rem;
    align-items: center;
    min-height: 96vh;
    padding: 130px 0 120px;
}

/* Content */
.mh-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 1.05rem;
    margin-bottom: 1.6rem;
    border-radius: 50px;
    border: 1px solid rgba(168, 199, 255, 0.25);
    background: rgba(40, 120, 255, 0.1);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: #2878ff;
    backdrop-filter: blur(8px);
}

.mh-badge .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #2878ff;
    animation: pulse-dot 2s infinite;
}

.mh-title {
    font-family: var(--font-display);
    font-size: clamp(2.0rem, 5.6vw, 3.9rem);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -0.04em;
    color: #f8fafc;
    margin-bottom: 1.4rem;
}

.mh-line {
    display: block;
}

.mh-accent {
    background: linear-gradient(100deg, #a8c7ff 0%, #f8fafc 55%, #a8c7ff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 40px rgba(40, 120, 255, 0.25);
}

.mh-sub {
    max-width: 520px;
    font-size: 1.08rem;
    line-height: 1.75;
    font-weight: 300;
    color: #c7d2e5;
    margin-bottom: 2.2rem;
}

.mh-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2.75rem;
}

.mh-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 2.75rem;
    padding-top: 1.75rem;
    border-top: 1px solid var(--border);
}

.mh-metrics strong {
    display: block;
    font-family: var(--font-display);
    font-size: 1.9rem;
    font-weight: 800;
    color: #f8fafc;
    letter-spacing: -0.03em;
    line-height: 1;
}

.mh-metrics span {
    display: block;
    margin-top: 0.3rem;
    font-size: 0.8rem;
    color: rgba(199, 210, 229, 0.65);
}

/* Entry animation on active slide */
.mh-content>*,
.mh-visual {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.swiper-slide-active .mh-content>*,
.swiper-slide-active .mh-visual {
    opacity: 1;
    transform: none;
}

.swiper-slide-active .mh-content>*:nth-child(1) {
    transition-delay: 0.1s;
}

.swiper-slide-active .mh-content>*:nth-child(2) {
    transition-delay: 0.22s;
}

.swiper-slide-active .mh-content>*:nth-child(3) {
    transition-delay: 0.34s;
}

.swiper-slide-active .mh-content>*:nth-child(4) {
    transition-delay: 0.46s;
}

.swiper-slide-active .mh-content>*:nth-child(5) {
    transition-delay: 0.58s;
}

.swiper-slide-active .mh-visual {
    transition-delay: 0.25s;
}

/* Visual / Moon */
.mh-visual {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 560px;
}

.mh-moon {
    --dark: #03090c;
    position: relative;
    z-index: 3;
    width: clamp(260px, 30vw, 400px);
    aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(circle at 34% 30%, #ffffff 0%, #f1ffc4 22%, #d7ef93 55%, #a9c25c 100%);
    box-shadow:
        0 0 60px rgba(40, 120, 255, 0.4),
        0 0 140px rgba(40, 120, 255, 0.2),
        0 0 260px rgba(40, 120, 255, 0.1),
        inset -24px -24px 60px rgba(168, 199, 255, 0.35);
    overflow: hidden;
    animation: mh-moon-float 7s ease-in-out infinite;
}

.mh-moon::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background:
        radial-gradient(circle at 28% 36%, rgba(168, 199, 255, 0.24) 0 7%, transparent 7.6%),
        radial-gradient(circle at 64% 60%, rgba(168, 199, 255, 0.2) 0 10%, transparent 10.6%),
        radial-gradient(circle at 50% 20%, rgba(168, 199, 255, 0.16) 0 4.5%, transparent 5%),
        radial-gradient(circle at 76% 28%, rgba(168, 199, 255, 0.14) 0 4%, transparent 4.5%),
        radial-gradient(circle at 36% 74%, rgba(168, 199, 255, 0.16) 0 6%, transparent 6.5%),
        radial-gradient(circle at 84% 72%, rgba(168, 199, 255, 0.12) 0 3.5%, transparent 4%);
    z-index: 1;
}

.mh-moon::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    z-index: 2;
}

.mh-moon--full::after {
    display: none;
}

.mh-moon--gibbous::after {
    box-shadow: inset 70px 0 0 0 var(--dark);
}

.mh-moon--gibbous {
    box-shadow: 0 0 50px rgba(40, 120, 255, 0.3), 0 0 120px rgba(40, 120, 255, 0.14);
}

.mh-moon--crescent::after {
    box-shadow: inset 210px 0 0 0 var(--dark);
}

.mh-moon--crescent {
    box-shadow: 0 0 40px rgba(40, 120, 255, 0.22), 0 0 100px rgba(40, 120, 255, 0.1);
}

/* ---- Image moon (overrides the CSS-drawn look) ---- */
.mh-moon {
    background: transparent;
}

.mh-moon::before {
    display: none;
}

.mh-moon img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    z-index: 1;
    user-select: none;
    -webkit-user-drag: none;
    filter: brightness(1.05) contrast(1.05);
}

/* soften the phase shadow so it blends with the photo */
.mh-moon::after {
    opacity: 0.94;
}

@keyframes mh-moon-float {

    0%,
    100% {
        transform: translateY(0);
    }

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

/* Orbits */
.mh-orbit {
    position: absolute;
    top: 50%;
    left: 50%;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.mh-orbit--1 {
    width: clamp(330px, 38vw, 500px);
    aspect-ratio: 1;
    border: 1px dashed rgba(40, 120, 255, 0.3);
    animation: mh-spin 60s linear infinite;
}

.mh-orbit--2 {
    width: clamp(400px, 46vw, 600px);
    aspect-ratio: 1;
    border: 1px solid rgba(255, 255, 255, 0.07);
    animation: mh-spin 90s linear infinite reverse;
}

.mh-orbit--2::after {
    content: '';
    position: absolute;
    top: 8%;
    left: 14%;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #2878ff;
    box-shadow: 0 0 16px #2878ff;
}

@keyframes mh-spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Floating data chips */
.mh-chip {
    position: absolute;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.75rem 1.1rem;
    border-radius: 16px;
    background: rgba(17, 29, 53, 0.72);
    border: 1px solid rgba(40, 120, 255, 0.22);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.45);
}

.mh-chip i {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    background: #2878ff;
    color: #f8fafc;
    font-size: 1rem;
}

.mh-chip small {
    display: block;
    font-family: var(--font-mono);
    font-size: 9px;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: rgba(199, 210, 229, 0.65);
}

.mh-chip b {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 800;
    color: #f8fafc;
    line-height: 1.1;
}

.mh-chip--1 {
    top: 10%;
    right: 2%;
    animation: mh-chip-float 5s ease-in-out infinite;
}

.mh-chip--2 {
    bottom: 22%;
    left: -2%;
    animation: mh-chip-float 6s ease-in-out infinite 1s;
}

.mh-chip--3 {
    bottom: 6%;
    right: 8%;
    animation: mh-chip-float 5.5s ease-in-out infinite 2s;
}

@keyframes mh-chip-float {

    0%,
    100% {
        transform: translateY(0);
    }

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

/* Controls */
.mh-controls {
    position: absolute;
    left: 50%;
    bottom: 38px;
    transform: translateX(-50%);
    z-index: 6;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 0.5rem 0.6rem;
    border-radius: 999px;
    background: rgba(8, 13, 27, 0.78);
    border: 1px solid rgba(40, 120, 255, 0.2);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.mh-arrow {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1.5px solid #2878ff;
    color: #2878ff;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}

.mh-arrow:hover {
    background: #2878ff;
    color: #f8fafc;
    box-shadow: 0 0 20px rgba(40, 120, 255, 0.45);
}

.mh-counter {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: rgba(199, 210, 229, 0.65);
}

.mh-counter b {
    font-size: 1.1rem;
    color: #2878ff;
}

.mh-sep {
    width: 34px;
    height: 1px;
    background: rgba(255, 255, 255, 0.25);
}

.mh-bar {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.06);
    z-index: 6;
}

.mh-bar-fill {
    display: block;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #111d35, #2878ff);
    box-shadow: 0 0 12px rgba(40, 120, 255, 0.45);
}

.mh-scroll {
    position: absolute;
    right: 40px;
    bottom: 48px;
    z-index: 6;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(199, 210, 229, 0.65);
}

.mh-scroll span {
    width: 1px;
    height: 34px;
    background: linear-gradient(180deg, #2878ff, transparent);
    animation: mh-scroll 1.8s ease-in-out infinite;
    transform-origin: top;
}

@keyframes mh-scroll {

    0%,
    100% {
        transform: scaleY(0.3);
    }

    50% {
        transform: scaleY(1);
    }
}

/* ============================================================
   PHOTO MOONS: full image + aura, per-slide colour theme
   (overrides the phase-shadow / circle-crop rules above)
============================================================ */
.mh-visual {
    --tone: 40, 120, 255;
    min-height: 620px;
}

.mh-visual:has(.mh-moon--full) {
    --tone: 168, 199, 255;
}

.mh-visual:has(.mh-moon--gibbous) {
    --tone: 40, 120, 255;
}

.mh-visual:has(.mh-moon--crescent) {
    --tone: 168, 199, 255;
}

/* coloured halo behind the moon */
.mh-visual::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 78%;
    aspect-ratio: 1;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(var(--tone), 0.28) 0%, rgba(var(--tone), 0.1) 45%, transparent 70%);
    filter: blur(30px);
    z-index: 1;
    pointer-events: none;
}

#moon-hero .mh-moon {
    width: clamp(300px, 37vw, 540px);
    border-radius: 0;
    background: none;
    box-shadow: none;
    overflow: visible;
}

#moon-hero .mh-moon::before,
#moon-hero .mh-moon::after {
    display: none;
}

#moon-hero .mh-moon img {
    position: static;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 0;
    filter: none;
    /* feather the square so the photo's own background melts into the hero */
    -webkit-mask-image: radial-gradient(circle closest-side, #000 78%, transparent 100%);
    mask-image: radial-gradient(circle closest-side, #000 78%, transparent 100%);
}

.mh-orbit--1 {
    width: clamp(370px, 43vw, 580px);
    border-color: rgba(var(--tone), 0.4);
}

.mh-orbit--2 {
    width: clamp(450px, 52vw, 680px);
}

.mh-orbit--2::after {
    background: rgb(var(--tone));
    box-shadow: 0 0 16px rgb(var(--tone));
}

.mh-chip {
    border-color: rgba(var(--tone), 0.4);
}

.mh-chip i {
    background: rgb(var(--tone));
    color: #fff;
    box-shadow: 0 0 18px rgba(var(--tone), 0.55);
}

.mh-chip--1 {
    top: 8%;
    right: 0;
}

.mh-chip--2 {
    bottom: 24%;
    left: -4%;
}

.mh-chip--3 {
    bottom: 4%;
    right: 6%;
}

/* Responsive */
@media (max-width: 991px) {
    .mh-visual {
        min-height: 460px;
    }

    #moon-hero .mh-moon {
        width: clamp(260px, 62vw, 420px);
    }

    .mh-slide {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 120px 0 130px;
        gap: 1rem;
    }

    .mh-sub {
        margin-left: auto;
        margin-right: auto;
    }

    .mh-cta,
    .mh-metrics {
        justify-content: center;
    }

    .mh-visual {
        min-height: 430px;
    }

    .mh-scroll {
        display: none;
    }
}

@media (max-width: 575px) {
    .mh-metrics {
        gap: 1.5rem;
    }

    .mh-chip--2 {
        left: 0;
    }

    .mh-chip--1 {
        right: 0;
    }

    .mh-chip {
        padding: 0.55rem 0.8rem;
    }

    .mh-chip i {
        width: 30px;
        height: 30px;
    }
}

@media (prefers-reduced-motion: reduce) {

    .mh-moon,
    .mh-orbit,
    .mh-chip,
    .mh-nebula {
        animation: none !important;
    }
}
