.hero-motion {
    --motion-progress: 0;
    --motion-copy-out: 0;
    --motion-route-in: 0;
    position: relative;
    height: 280svh;
    min-height: 0;
    overflow: visible;
    background: #020817;
    color: #fff;
    isolation: isolate;
}

.hero-motion-stage {
    position: sticky;
    top: 0;
    display: grid;
    width: 100%;
    height: 100svh;
    min-height: 680px;
    overflow: hidden;
    place-items: center;
    background:
        radial-gradient(circle at 50% 46%, rgba(20, 39, 66, .34), transparent 33%),
        linear-gradient(180deg, #020817 0%, #020817 62%, #020817 100%);
    isolation: isolate;
}

.hero-motion-canvas,
.hero-motion-atmosphere,
.hero-motion-grid {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.hero-motion-canvas {
    z-index: -2;
    opacity: calc(1 - min(1, max(0, (var(--motion-progress) - .9) * 10)));
    transition: opacity .12s linear;
}

.hero-motion-atmosphere {
    z-index: -1;
    background:
        radial-gradient(circle at calc(17% + var(--motion-progress) * 26%) 24%, rgba(139, 215, 232, .1), transparent 24%),
        radial-gradient(circle at calc(84% - var(--motion-progress) * 18%) 68%, rgba(217, 104, 174, .1), transparent 27%),
        radial-gradient(circle at 50% 50%, transparent 24%, rgba(2, 8, 23, .18) 65%, rgba(2, 8, 23, .72) 100%);
    pointer-events: none;
}

.hero-motion-atmosphere::before,
.hero-motion-atmosphere::after {
    position: absolute;
    border: 1px solid rgba(139, 215, 232, .16);
    border-radius: 50%;
    content: '';
    filter: blur(.1px);
    opacity: calc(.34 + var(--motion-progress) * .35);
}

.hero-motion-atmosphere::before {
    top: 14%;
    left: 50%;
    width: min(74vw, 990px);
    aspect-ratio: 1;
    transform: translateX(-50%) scale(calc(.68 + var(--motion-progress) * .48));
}

.hero-motion-atmosphere::after {
    right: 9%;
    bottom: 8%;
    width: min(21vw, 290px);
    aspect-ratio: 1;
    border-color: rgba(217, 104, 174, .18);
    transform: rotate(calc(var(--motion-progress) * 90deg));
}

.hero-motion-grid {
    z-index: -1;
    opacity: .28;
    background-image:
        linear-gradient(rgba(120, 201, 208, .055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(120, 201, 208, .055) 1px, transparent 1px);
    background-position: center;
    background-size: 74px 74px;
    mask-image: radial-gradient(circle at center, #000 0%, transparent 68%);
    transform: perspective(900px) rotateX(calc(66deg - var(--motion-progress) * 28deg)) scale(calc(1.4 + var(--motion-progress) * .25));
    transform-origin: center 72%;
}

.hero-motion-layout {
    position: relative;
    z-index: 2;
    display: grid;
    width: 100%;
    height: 100%;
    align-items: center;
    padding-top: 90px;
    pointer-events: none;
}

.hero-motion-copy {
    width: min(970px, 100%);
    margin-inline: auto;
    text-align: center;
    opacity: calc(1 - var(--motion-copy-out));
    filter: blur(calc(var(--motion-copy-out) * 10px));
    transform: translateY(calc(var(--motion-copy-out) * -76px)) scale(calc(1 - var(--motion-copy-out) * .065));
    transform-origin: center;
    will-change: opacity, filter, transform;
    pointer-events: auto;
}

.hero-motion .hero-kicker {
    min-height: 40px;
    padding-inline: 16px;
    border-color: rgba(216, 222, 234, .2);
    background: rgba(13, 19, 41, .58);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .025), 0 12px 40px rgba(0, 0, 0, .16);
    backdrop-filter: blur(16px);
}

.hero-motion .hero-kicker b { color: #8bd7e8; }

.hero-motion-eyebrow {
    margin: 28px 0 0;
    color: #8bd7e8;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .17em;
    text-transform: uppercase;
}

.hero-motion h1 {
    max-width: none;
    margin: 13px auto 0;
    font-size: clamp(34px, 3.6vw, 52px);
    font-weight: 500;
    letter-spacing: -.06em;
    line-height: 1;
    text-wrap: balance;
}

.hero-motion-phrase-stage {
    position: relative;
    display: block;
    height: 1.22em;
    min-height: 0;
    align-items: center;
    justify-items: center;
    overflow: hidden;
    line-height: 1.12;
    margin: 0;
    padding: 0;
}

.hero-motion-phrase {
    position: absolute;
    inset: 0 0 .08em;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 400;
    line-height: 1.12;
    opacity: 0;
    white-space: nowrap;
    animation-duration: 6s;
    animation-timing-function: cubic-bezier(.65, 0, .35, 1);
    animation-iteration-count: infinite;
    animation-fill-mode: both;
}

.hero-motion-copy .hero-motion-phrase--cross {
    color: #fff;
    animation-name: hero-phrase-cross;
}

.hero-motion-copy .hero-motion-phrase--bangladesh {
    color: #fff;
    animation-name: hero-phrase-bangladesh;
}

.hero-motion-phrase--bangladesh b {
    display: inline-block;
    background: linear-gradient(96deg, #8bd7e8 0%, #a7b7ff 52%, #d6a6dc 100%);
    background-clip: text;
    color: transparent;
    font: inherit;
    font-weight: 500;
    line-height: inherit;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

@keyframes hero-phrase-cross {
    0%, 42% { opacity: 1; transform: translateX(0); }
    50%, 92% { opacity: 0; transform: translateX(-32px); }
    100% { opacity: 1; transform: translateX(0); }
}

@keyframes hero-phrase-bangladesh {
    0%, 42% { opacity: 0; transform: translateX(32px); }
    50%, 92% { opacity: 1; transform: translateX(0); }
    100% { opacity: 0; transform: translateX(-32px); }
}

.hero-motion-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 25px;
    margin-top: 32px;
}

.hero-motion-actions .button {
    min-height: 52px;
    border-color: rgba(255, 255, 255, .76);
    background: rgba(5, 3, 33, .36);
    color: #fff;
    backdrop-filter: blur(12px);
}

.hero-motion-actions .button:hover {
    border-color: #fff;
    background: rgba(255, 255, 255, .08);
    color: #fff;
}

.hero-motion-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
}

.hero-motion-link span {
    color: #fff;
    transition: transform .25s ease;
}

.hero-motion-link:hover span { transform: translateX(4px); }

.hero-motion-transition {
    position: absolute;
    z-index: 3;
    top: 50%;
    left: 50%;
    width: min(1180px, calc(100% - 48px));
    text-align: center;
    opacity: var(--motion-route-in);
    filter: blur(calc((1 - var(--motion-route-in)) * 9px));
    pointer-events: none;
    transform: translate(-50%, calc(-50% + (1 - var(--motion-route-in)) * 46px)) scale(calc(.94 + var(--motion-route-in) * .06));
    will-change: opacity, filter, transform;
}

.hero-motion-transition > span {
    color: #8bd7e8;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.hero-motion-transition > p {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(15px, 2.2vw, 30px);
    margin: 15px 0 0;
    color: #fff;
    font-size: clamp(22px, 2.4vw, 36px);
    font-weight: 500;
    letter-spacing: -.055em;
    line-height: .94;
}

.hero-motion-transition p > strong {
    min-width: 0;
    color: inherit;
    font: inherit;
    white-space: nowrap;
}

.hero-motion-transition i {
    width: clamp(52px, 9vw, 130px);
    height: 1px;
    background: linear-gradient(90deg, #8bd7e8, #a7b7ff);
    box-shadow: 0 0 16px rgba(139, 215, 232, .28);
}

.hero-motion-index {
    position: absolute;
    z-index: 5;
    bottom: 27px;
    left: 50%;
    display: flex;
    width: min(390px, 40vw);
    align-items: center;
    gap: 13px;
    color: rgba(216, 222, 234, .56);
    font-size: 9px;
    letter-spacing: .12em;
    transform: translateX(-50%);
}

.hero-motion-index > i {
    height: 1px;
    overflow: hidden;
    background: rgba(216, 222, 234, .18);
    flex: 1;
}

.hero-motion-index b {
    display: block;
    width: calc(var(--motion-progress) * 100%);
    height: 100%;
    background: linear-gradient(90deg, #8bd7e8, #a7b7ff, #d6a6dc);
    box-shadow: 0 0 10px rgba(139, 215, 232, .38);
}

.hero-motion .hero-scroll {
    opacity: calc(1 - min(1, var(--motion-progress) * 5));
    transition: opacity .1s linear;
}

.hero-motion .hero-scroll i { color: #8bd7e8; }

@media (max-width: 760px) {
    .hero-motion {
        height: 240svh;
        min-height: 0;
    }

    .hero-motion-stage {
        height: 100svh;
        min-height: 620px;
    }

    .hero-motion-layout {
        min-height: 0;
        padding: 108px 20px 60px;
    }

    .hero-motion-copy {
        align-self: center;
    }

    .hero-motion .hero-kicker {
        min-height: 37px;
        padding-inline: 11px;
        font-size: 11px;
    }

    .hero-motion-eyebrow { margin-top: 22px; }

    .hero-motion h1 {
        margin-top: 12px;
        font-size: clamp(28px, 7.8vw, 36px);
        line-height: 1;
    }

    .hero-motion-actions {
        gap: 17px;
        margin-top: 24px;
    }

    .hero-motion-actions .button { min-height: 48px; padding-inline: 19px; }
    .hero-motion-link { font-size: 12px; }
    .hero-motion .hero-scroll { display: none; }

    .hero-motion-transition > p {
        flex-direction: column;
        font-size: clamp(23px, 7vw, 32px);
    }

    .hero-motion-transition p > strong { white-space: normal; }

    .hero-motion-transition i {
        width: 1px;
        height: 48px;
        background: linear-gradient(180deg, #8bd7e8, #a7b7ff);
    }

    .hero-motion-index {
        bottom: 20px;
        width: min(280px, 62vw);
    }

    .hero-motion-grid { background-size: 54px 54px; }
}

@media (max-width: 430px) {
    .hero-motion-layout { padding-inline: 16px; }
    .hero-motion h1 { font-size: clamp(27px, 7.8vw, 33px); }
    .hero-motion-actions { flex-direction: column; gap: 13px; }
}

@media (max-height: 700px) and (min-width: 761px) {
    .hero-motion-stage { min-height: 620px; }
    .hero-motion-layout { padding-top: 78px; }
    .hero-motion h1 { font-size: clamp(32px, 3.8vw, 48px); }
    .hero-motion-actions { margin-top: 22px; }
}

@media (prefers-reduced-motion: reduce) {
    .hero-motion { height: 100svh; }
    .hero-motion-copy { opacity: 1; filter: none; transform: none; }
    .hero-motion-transition, .hero-motion-index { display: none; }
    .hero-motion-canvas { opacity: .72; }
    .hero-motion-phrase { animation: none; }
    .hero-motion-phrase--cross { opacity: 1; transform: none; }
    .hero-motion-phrase--bangladesh { display: none; }
}
