/* Motion controls are independent of content; the interface is visible by default. */
html.lenis.lenis-smooth {
    scroll-behavior: auto !important;
}

/* GSAP owns these properties until a reveal completes; CSS must not interpolate
 * the same frame-by-frame writes a second time. */
.gac-app [data-gac-reveal] {
    transition: none !important;
}

.gac-app .gac-scroll-progress {
    position: fixed;
    z-index: 81;
    inset: 0 0 auto;
    height: 2px;
    background: linear-gradient(90deg, #1e5fd8, #29b6ef);
    transform: scaleX(0);
    transform-origin: 0 50%;
    pointer-events: none;
}

.gac-app .gac-back-to-top {
    position: fixed;
    z-index: 38;
    right: max(18px, calc((100vw - 480px) / 2 + 18px));
    bottom: calc(112px + env(safe-area-inset-bottom, 0px));
    display: grid;
    width: 46px;
    height: 46px;
    padding: 12px;
    place-items: center;
    border: 1px solid rgba(196, 212, 232, 0.9);
    border-radius: 50%;
    color: #215cca;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 6px 22px rgba(22, 58, 102, 0.14);
    visibility: hidden;
    opacity: 0;
    transform: translateY(8px);
    pointer-events: none;
    transition: opacity 180ms ease, transform 180ms ease, visibility 180ms ease, box-shadow 180ms ease;
}

.gac-app .gac-back-to-top.is-visible {
    visibility: visible;
    opacity: 1;
    transform: none;
    pointer-events: auto;
}

.gac-app .gac-back-to-top svg {
    width: 22px;
    height: 22px;
}

@media (min-width: 768px) and (max-width: 1023px) {
    .gac-app .gac-back-to-top {
        right: max(22px, calc((100vw - 860px) / 2 + 22px));
    }
}

@media (min-width: 1024px) {
    .gac-app .gac-back-to-top {
        right: 26px;
        bottom: 26px;
    }
}

@media (hover: hover) and (pointer: fine) {
    .gac-app .gac-back-to-top:hover {
        color: #ffffff;
        background: #215cca;
        box-shadow: 0 8px 28px rgba(33, 92, 202, 0.23);
    }
}

@media (prefers-reduced-motion: reduce) {
    html,
    .gac-app .gac-scroll,
    .gac-app .gac-rich-text {
        scroll-behavior: auto !important;
    }
    .gac-app .gac-back-to-top {
        transition: none;
        transform: none;
    }
}

@media (forced-colors: active) {
    .gac-app .gac-back-to-top {
        border: 1px solid ButtonText;
        color: ButtonText;
        background: ButtonFace;
    }
}
