.scroll-to-top {
    position: fixed;
    right: clamp(16px, 2.2vw, 36px);
    bottom: clamp(16px, 2.2vw, 36px);
    z-index: 90;
    width: 56px;
    height: 56px;
    display: grid;
    place-items: center;
    padding: 0;
    color: #fff;
    background: transparent;
    border: 0;
    border-radius: 16px;
    box-shadow: none;
    overflow: hidden;
    appearance: none;
    -webkit-appearance: none;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(14px);
    transition:
        opacity .2s ease,
        visibility .2s ease,
        transform .2s ease,
        box-shadow .2s ease,
        filter .2s ease;
}

.scroll-to-top::before {
    position: absolute;
    inset: -1px;
    z-index: 0;
    content: "";
    background: var(--brand-gradient-action);
    border-radius: inherit;
    pointer-events: none;
}

.scroll-to-top.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

.scroll-to-top svg {
    position: relative;
    z-index: 1;
    width: 25px;
    height: 25px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.scroll-to-top:hover {
    background: transparent;
    box-shadow: none;
    filter: none;
    transform: translateY(-2px);
}

.scroll-to-top:hover::before {
    background: var(--brand-gradient-action-hover);
}

.scroll-to-top:focus-visible {
    outline: 3px solid rgba(253, 91, 3, .48);
    outline-offset: 4px;
}

body.menu-open .scroll-to-top,
body.search-open .scroll-to-top,
body.callback-modal-open .scroll-to-top {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

@media (max-width: 640px) {
    .scroll-to-top {
        right: 12px;
        bottom: calc(12px + env(safe-area-inset-bottom, 0px));
        width: 48px;
        height: 48px;
        border-radius: 14px;
    }

    .scroll-to-top svg {
        width: 22px;
        height: 22px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .scroll-to-top {
        transition: none;
    }
}
