.back-to-top {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 100;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--primary);
    color: var(--black);
    box-shadow: 0 10px 25px rgba(0, 0, 0, .16);
    font-size: 25px;
    font-weight: 800;
    line-height: 1;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(10px);
    transition:
        opacity .25s,
        visibility .25s,
        transform .25s,
        background .25s;
}

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

.back-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
}

.back-to-top:focus-visible {
    outline: 3px solid var(--black);
    outline-offset: 3px;
}

@media (max-width: 480px) {
    .back-to-top {
        right: 16px;
        bottom: 16px;
    }
}

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