/*
 * Author:  The Vi
 * Created: 2026-09-09
 * Purpose: Page-scoped styles for the "home" page ONLY. Auto-loaded alongside the
 *          global styles (public/pages/home/page.css). Keep rules that must not leak.
 *          Currently styles the floating "back to top" button injected by page.js
 *          (HomePage.backToTop); its --color-primary vars come from the layout theme.
 */

/* Floating "back to top" button injected by HomePage.backToTop(). Hidden by
   default; .is-visible is toggled on scroll. */
#back-to-top {
    position: fixed;
    right: 1.5rem;
    bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    border: 0;
    border-radius: 9999px;
    background-color: var(--color-primary, #1A74E5);
    color: #fff;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, .1), 0 4px 6px -4px rgba(0, 0, 0, .1);
    opacity: 0;
    transform: translateY(0.5rem);
    pointer-events: none;
    transition: opacity .2s ease, transform .2s ease, background-color .2s ease;
    z-index: 50;
}

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

#back-to-top:hover {
    background-color: var(--color-primary-dark, #1560bd);
}

@media (prefers-reduced-motion: reduce) {
    #back-to-top {
        transition: opacity .2s ease;
        transform: none;
    }
}
