.motion-hero {
    overflow: hidden;
    color: #f5f8ff;
    background:
        radial-gradient(ellipse at 79% 42%, #1a3b61 0%, transparent 48%),
        linear-gradient(128deg, #0b1323 10%, #0f1d34 68%, #102540);
    padding: clamp(7rem, 13vh, 9rem) 0 clamp(2.5rem, 6vh, 4.5rem);
}

.motion-hero__layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.94fr);
    align-items: center;
    gap: clamp(1.5rem, 3vw, 3rem);
}

.motion-hero__eyebrow {
    color: #a3d4ff;
    font-size: .75rem;
    font-weight: 750;
    letter-spacing: .17em;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.motion-hero h1 {
    color: #f5f8ff;
    font-size: clamp(2.1rem, 3.78vw, 3.55rem);
    font-weight: 700;
    letter-spacing: -.055em;
    line-height: 1.07;
    margin-bottom: 1.35rem;
}

.motion-hero h1 span { color: #8ec9ff; }

.motion-hero__intro {
    color: #ced9ec;
    max-width: 43ch;
    font-size: clamp(1rem, 1.4vw, 1.16rem);
    line-height: 1.65;
}

.motion-hero__actions,
.motion-hero__benefits {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .65rem;
}

.motion-hero__actions { margin-top: 1.8rem; }

.motion-hero__actions .btn {
    font-size: .9rem;
    padding: .75rem 1.06rem;
}
.motion-hero__actions .btn svg { width: 1rem; height: 1rem; flex-shrink: 0; }

.motion-hero__actions .btn-primary { background: #175eaf; }
.motion-hero__actions .btn-primary:hover { background: #1a6bc7; }
.motion-hero__actions .btn-secondary {
    border: 1px solid #6380a3;
    color: #edf5ff;
    background: #1b304b;
}
.motion-hero__actions .btn-secondary:hover { background: #294566; }

.motion-hero__benefits {
    list-style: none;
    margin: 1.45rem 0 0;
    padding: 0;
    gap: .45rem 1rem;
    color: #c3d1e5;
    font-size: .81rem;
}

.motion-hero__benefits li::before {
    content: "✓";
    color: #8fd9bd;
    margin-right: .35rem;
}

.hero-demo {
    --phone-width: clamp(164px, 19vw, 223px);
    --case-light: #6daaff;
    min-width: 0;
    margin: 0;
}

.hero-demo__stage {
    position: relative;
    isolation: isolate;
    perspective: 900px;
    height: clamp(340px, 42vw, 488px);
    display: grid;
    place-items: center;
}

.hero-demo__light, .hero-demo__shadow {
    position: absolute;
    pointer-events: none;
}

.hero-demo__light {
    inset: 4% -5% 2%;
    background: radial-gradient(ellipse at 50% 46%, var(--case-light), transparent 64%);
    opacity: .25;
}

.hero-demo__light--amber, .hero-demo__light--green { opacity: 0; }
.hero-demo__light--amber { --case-light: #ffbd67; }
.hero-demo__light--green { --case-light: #5fe9ce; }

.hero-demo__shadow {
    inset: auto 12% 0;
    height: 20%;
    background: radial-gradient(ellipse, #050a13d9, transparent 70%);
}

.hero-demo__tilt {
    position: relative;
    display: grid;
    width: 100%;
    place-items: center;
    transform-style: preserve-3d;
    transform: rotateX(var(--pointer-x, 0deg)) rotateY(var(--pointer-y, 0deg));
    transition: transform .35s ease-out;
}

.hero-demo__phone {
    width: var(--phone-width);
    aspect-ratio: .496;
    position: relative;
    padding: 6px;
    border: 1px solid #a1b5ce;
    border-radius: 16% / 8%;
    background: linear-gradient(135deg, #aeb9c9, #1b2634 27%, #060912 69%, #8da1ba);
    box-shadow: 3px 3px #33455c, 6px 5px 2px #111a29, 12px 18px 32px #050a13ba;
    transform: rotateY(-12deg) rotateX(4deg) rotateZ(5deg);
}

.hero-demo__phone::before, .hero-demo__phone::after {
    content: "";
    position: absolute;
    top: 24%;
    right: -4px;
    height: 10%;
    width: 3px;
    border-radius: 2px;
    background: linear-gradient(#a9b9ce, #405876);
}

.hero-demo__phone::after {
    top: 14%;
    height: 5%;
}

.hero-demo__camera {
    position: absolute;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    top: 11px;
    left: calc(50% - 3.5px);
    background: radial-gradient(at 35% 35%, #48648d, #101520 48%, #05070c);
}

.hero-demo__display {
    height: 100%;
    position: relative;
    overflow: hidden;
    border-radius: 14% / 7%;
    background: #0f1c2d;
}

.hero-chat, .hero-demo__review, .hero-demo__preview { position: absolute; inset: 0; }
.hero-demo__preview img { display: block; width: 100%; height: 100%; object-fit: cover; }
.hero-demo__preview { background: #faf8fe; }
.hero-demo.is-animated .hero-demo__preview { opacity: 0; }

.hero-chat {
    display: grid;
    grid-template-rows: auto 1fr auto;
    color: #eef5ff;
    padding-top: 1rem;
    font-size: .74rem;
    font-size: clamp(.68rem, 1.16vw, .76rem);
    line-height: 1.37;
    background: linear-gradient(150deg, #192b42, #0f1c2c 62%, #142943);
}

.hero-chat__header {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .5rem .65rem;
    border-bottom: 1px solid #344d68;
}

.hero-chat__avatar {
    display: grid;
    place-items: center;
    width: 1.6rem;
    height: 1.6rem;
    border-radius: 50%;
    background: #375878;
    color: #e3f2ff;
    font-size: .59rem;
    font-weight: 750;
}

.hero-chat__body { position: relative; padding: .8rem .62rem; }
.hero-chat__incoming, .hero-chat__reply { padding: .53rem .56rem; border-radius: .65rem; }
.hero-chat__incoming { background: #334b67; margin-right: .6rem; border-top-left-radius: .15rem; }

.hero-chat__reply {
    position: absolute;
    right: .62rem;
    bottom: 12%;
    max-width: calc(100% - 1.24rem);
    background: #214c73;
    border-bottom-right-radius: .15rem;
    opacity: 0;
}

.hero-chat__reply svg { display: block; width: min(82px, 100%); margin-bottom: .26rem; }
.hero-chat__file { display: flex; gap: .35rem; align-items: center; }
.hero-chat__pdf {
    font-size: .51rem;
    font-weight: 800;
    background: #dceeff;
    color: #22415f;
    border-radius: .2rem;
    padding: .17rem;
}
.hero-chat__receipt { color: #90efca; opacity: 0; }

.hero-chat__composer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: .5rem .58rem .8rem;
    border-radius: 2rem;
    padding: .22rem .22rem .22rem .62rem;
    background: #213950;
    color: #bdcfe1;
}

.hero-chat__send {
    display: grid;
    place-items: center;
    padding: .31rem;
    border-radius: 50%;
    background: #29577e;
    color: #ecf6ff;
    opacity: .55;
}
.hero-chat__send svg { width: .85rem; height: .85rem; }

.hero-demo__review {
    display: flex;
    flex-direction: column;
    padding: 1.5rem .7rem .85rem;
    background: linear-gradient(155deg, #233f63, #111e32 65%, #172b43);
    color: #e0edff;
    opacity: 0;
    font-size: .74rem;
}

.hero-demo__review-brand { display: flex; align-items: center; gap: .32rem; }
.hero-demo__review p { margin-top: .6rem; color: #c1d6ee; }
.hero-demo__apply {
    align-self: center;
    margin-top: auto;
    background: #25629d;
    border: 1px solid #7abaff;
    border-radius: 1rem;
    padding: .27rem .6rem;
    font-weight: 700;
}

.hero-demo__document {
    position: absolute;
    width: min(72%, 330px);
    left: 50%;
    top: 52%;
    opacity: 0;
    transform: translate(-50%, -50%);
    filter: drop-shadow(0 12px 14px #050811a0);
}

.hero-demo__document svg { width: 100%; display: block; font-family: var(--font-primary); }
.hero-id__highlight { opacity: 0; fill: #ffbf4877; stroke: #a75213; stroke-width: 1.3; }
.hero-id__cover { opacity: 0; fill: #253951; transform-box: fill-box; transform-origin: left center; }
.hero-id__scan { opacity: 0; stroke: #fff; stroke-width: 2.4; filter: drop-shadow(0 0 4px #2382df); }
.hero-id__stamp { opacity: 0; transform-box: fill-box; transform-origin: center; }
.hero-id__stamp rect { fill: #e6f3feeb; stroke: #214d76; stroke-width: 1.5; }
.hero-id__stamp text { fill: #163c64; font-size: 10px; font-weight: 800; }

.hero-demo__shield {
    position: absolute;
    top: 61%;
    left: calc(50% + var(--phone-width) * .39);
    display: grid;
    place-items: center;
    border: 1px solid #7ad7ba;
    border-radius: .9rem;
    width: 3rem;
    height: 3rem;
    background: #153e3a;
    color: #abf0d4;
    box-shadow: 0 8px 26px #051a1ccc;
    opacity: 0;
}
.hero-demo__shield svg { width: 1.65rem; }

.hero-demo__caption {
    display: grid;
    min-height: 2rem;
    text-align: center;
    color: #e3efff;
    font-size: clamp(.81rem, 1.4vw, 1rem);
    font-weight: 600;
}

.hero-demo__captions { display: grid; align-items: center; }
.hero-demo__captions > span {
    grid-area: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    opacity: 0;
}
.hero-demo__caption .hero-demo__tagline { opacity: 1; }
.hero-demo.is-animated .hero-demo__tagline { opacity: 0; }

.hero-demo__controls {
    min-height: 2.75rem;
    display: flex;
    justify-content: center;
    gap: .4rem;
    margin-top: .2rem;
}
.hero-demo__controls[hidden] { visibility: hidden; }

.hero-demo__controls select, .hero-demo__pause {
    color: #e3efff;
    background: #172c47;
    border: 1px solid #637fa0;
    border-radius: .65rem;
    font: inherit;
}
.hero-demo__controls select { padding: .32rem .52rem; font-size: .78rem; max-width: 100%; }
.hero-demo__pause { width: 2.75rem; display: grid; place-items: center; cursor: pointer; }
.hero-demo__pause:hover { background: #294566; }
.hero-demo__pause svg { width: 1rem; height: 1rem; }
.hero-demo__play-icon, .hero-demo.is-paused .hero-demo__pause-icon { display: none; }
.hero-demo.is-paused .hero-demo__play-icon { display: initial; }
.motion-hero :focus-visible { outline: 2px solid #a7d9ff; outline-offset: 3px; }

.motion-hero .visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

@media (max-width: 800px) {
    .motion-hero {
        padding: 6.4rem 0 2rem;
        background: radial-gradient(ellipse at 55% 74%, #1a3b61 0%, transparent 55%), #0e1a2e;
    }
    .motion-hero__layout { grid-template-columns: minmax(0, 1fr); max-width: 37rem; gap: 1.1rem; }
    .motion-hero h1 { font-size: clamp(2rem, 7.8vw, 3.7rem); }
    .hero-demo { --phone-width: clamp(154px, 43vw, 196px); }
    .hero-demo__stage { height: clamp(330px, 94vw, 417px); }
}

@media (prefers-reduced-motion: reduce) {
    .hero-demo__tilt { transition: none; }
}
