.btn-to-top {
    position: fixed;
    right: clamp(16px, 2vw, 28px);
    bottom: clamp(16px, 2vw, 28px);
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(14px) scale(.92);
    background:
        radial-gradient(circle at 32% 24%, rgba(255, 255, 255, .38), transparent 28%),
        linear-gradient(135deg, #0ea5e9 0%, #2563eb 54%, #7c3aed 100%);
    box-shadow: 0 16px 34px rgba(37, 99, 235, .34), 0 4px 12px rgba(15, 23, 42, .18);
    transition: opacity .25s ease, visibility .25s ease, transform .25s ease, box-shadow .25s ease;
}

.btn-to-top::before {
    content: "";
    position: absolute;
    inset: 5px;
    border-radius: inherit;
    border: 1px solid rgba(255, 255, 255, .42);
    pointer-events: none;
}

.btn-to-top__icon {
    width: 13px;
    height: 13px;
    border-top: 3px solid currentColor;
    border-left: 3px solid currentColor;
    transform: translateY(4px) rotate(45deg);
}

.btn-to-top.is-visible {
    display: inline-flex;
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.btn-to-top:hover {
    transform: translateY(-4px) scale(1.04);
    box-shadow: 0 20px 42px rgba(37, 99, 235, .42), 0 8px 18px rgba(15, 23, 42, .2);
}

.btn-to-top:focus-visible {
    outline: 3px solid rgba(14, 165, 233, .35);
    outline-offset: 4px;
}

.btn-to-top:active {
    transform: translateY(-1px) scale(.98);
}

@media (max-width: 575.98px) {
    .btn-to-top {
        width: 44px;
        height: 44px;
        right: 14px;
        bottom: 14px;
    }
}
