/* ====== Look & knobs ====== */
.ribbon-hero {
    --bg: #fff;
    --ink: #0B1220;
    --ring: rgba(255, 255, 255, .7);
    --glow: 0 18px 50px rgba(16, 24, 40, .10);
    --waveSpeed: 26s;
    --floatSpeed: 6s;
    --bob: 14px;
    position: relative;
    isolation: isolate;
    overflow: hidden;
    min-height: 540px;
    background:
        radial-gradient(80% 60% at 50% 100%, #ECFFF7 0%, transparent 60%),
        radial-gradient(80% 60% at 50% 0%, #F7F3FF 0%, transparent 65%),
        var(--bg);
    border-radius: 28px;
    box-shadow: var(--glow);
}

/* ribbons */
.ribbon-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: .9;
}

.ribbon {
    stroke-dasharray: 10 22;
    animation: wave var(--waveSpeed) linear infinite,
        breathe 9s ease-in-out infinite;
    opacity: .55;
}

.ribbon--left {
    animation-delay: 0s, 0s;
}

.ribbon--right {
    animation-delay: -6s, -2s;
}

/* avatars */
.avatars {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.avatar {
    position: absolute;
    width: 84px;
    height: 84px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: radial-gradient(120% 100% at 30% 20%, #fff, #f6f7ff);
    box-shadow: 0 10px 24px rgba(13, 18, 32, .12), inset 0 1px 0 var(--ring);
    animation: float var(--floatSpeed) ease-in-out infinite;
}

.avatar img {
    width: 74px;
    height: 74px;
    border-radius: 999px;
    object-fit: cover;
}

/* positions + unique motion */
.a1 {
    left: 22%;
    top: 34%;
    animation-duration: 7s;
}

.a2 {
    left: 46%;
    top: 48%;
    animation-duration: 6s;
    animation-delay: -.6s;
}

.a3 {
    right: 20%;
    top: 22%;
    animation-duration: 7.5s;
    animation-delay: -1s;
}

/* pedestal */
.pedestal {
    position: absolute;
    left: 50%;
    bottom: 12%;
    transform: translateX(-50%);
    width: min(540px, 60vw);
    opacity: .95;
    filter: drop-shadow(0 24px 34px rgba(13, 18, 32, .18));
}

/* sparkles */
.twinkle {
    position: absolute;
    width: 10px;
    height: 10px;
    background: radial-gradient(circle, #fff 0 35%, transparent 40%);
    animation: twinkle 2.8s ease-in-out infinite;
    opacity: .7;
}

.t1 {
    left: 14%;
    top: 72%;
    animation-delay: -.2s;
}

.t2 {
    left: 50%;
    top: 12%;
    transform: scale(1.2);
    animation-delay: -1.1s;
}

.t3 {
    right: 10%;
    top: 38%;
    transform: scale(.9);
}

/* floating dust */
.particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: .35;
}

.particles span {
    position: absolute;
    left: 50%;
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: radial-gradient(circle, #fff, rgba(163, 166, 255, .6));
    animation: rise 10s linear infinite;
    filter: blur(.3px);
}

.particles span:nth-child(1) {
    transform: translate(-320px, 360px);
    animation-delay: -1s;
}

.particles span:nth-child(2) {
    transform: translate(-180px, 380px);
    animation-delay: -4s;
}

.particles span:nth-child(3) {
    transform: translate(-40px, 400px);
    animation-delay: -2s;
}

.particles span:nth-child(4) {
    transform: translate(120px, 420px);
    animation-delay: -6s;
}

.particles span:nth-child(5) {
    transform: translate(260px, 380px);
    animation-delay: -3s;
}

.particles span:nth-child(6) {
    transform: translate(-260px, 420px);
    animation-delay: -7s;
}

.particles span:nth-child(7) {
    transform: translate(40px, 360px);
    animation-delay: -5s;
}

.particles span:nth-child(8) {
    transform: translate(200px, 400px);
    animation-delay: -8s;
}

.particles span:nth-child(9) {
    transform: translate(-120px, 440px);
    animation-delay: -9s;
}

.particles span:nth-child(10) {
    transform: translate(300px, 440px);
    animation-delay: -10s;
}

/* keyframes */
@keyframes wave {
    to {
        stroke-dashoffset: -1200;
    }
}

@keyframes breathe {

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

    50% {
        transform: translateY(6px)
    }
}

@keyframes float {

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

    50% {
        transform: translateY(calc(var(--bob, 14px) * -1))
    }
}

@keyframes twinkle {

    0%,
    100% {
        opacity: .2;
        transform: scale(.8) rotate(0.001deg)
    }

    50% {
        opacity: 1;
        transform: scale(1.2)
    }
}

@keyframes rise {
    0% {
        transform: translate(var(--x, 0), 440px);
        opacity: 0
    }

    10% {
        opacity: .6
    }

    100% {
        transform: translate(var(--x, 0), -40px);
        opacity: 0
    }
}

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

    .ribbon,
    .avatar,
    .twinkle,
    .particles span {
        animation: none !important;
    }
}