/* ==========================================================================================================
   GLS Brasil public site — motion (assets/js/site_motion.js adds the classes). The same vocabulary as the system
   (system/assets/css/shell.css): real springs, response on the press, things enter from where they come, nothing
   blocks reading. Only the site loads this file. Off with prefers-reduced-motion.
   ========================================================================================================== */
:root {
    /* springs sampled into linear() (Apple: damping + response); cubic-bezier first for old browsers */
    --s-spring: cubic-bezier(.2, .9, .25, 1);
    --s-spring: linear(0, 0.0262, 0.0894, 0.172, 0.2623, 0.353, 0.4395, 0.5193, 0.5911, 0.6546, 0.71, 0.7577, 0.7985, 0.833, 0.8622, 0.8865, 0.9069, 0.9237, 0.9377, 0.9492, 0.9587, 0.9664, 0.9728, 0.978, 0.9822, 0.9856, 0.9884, 0.9906, 0.9925, 0.9939, 0.9951, 0.9961, 0.9969, 0.9975, 1);
    --s-snappy: cubic-bezier(.2, .9, .25, 1.05);
    --s-snappy: linear(0, 0.0245, 0.0856, 0.1684, 0.2619, 0.3583, 0.4522, 0.5401, 0.62, 0.6909, 0.7525, 0.805, 0.8491, 0.8855, 0.9151, 0.9388, 0.9575, 0.9719, 0.9828, 0.9909, 0.9968, 1.0008, 1.0035, 1.0051, 1.006, 1.0063, 1.0062, 1.0058, 1.0053, 1.0048, 1.0042, 1.0036, 1.003, 1.0025, 1);
    --s-bouncy: cubic-bezier(.3, .7, .4, 1.3);
    --s-bouncy: linear(0, 0.0349, 0.1221, 0.2391, 0.3687, 0.4985, 0.6199, 0.7276, 0.8188, 0.8928, 0.9503, 0.9928, 1.0222, 1.0407, 1.0507, 1.0542, 1.053, 1.0487, 1.0426, 1.0356, 1.0285, 1.0218, 1.0158, 1.0107, 1.0065, 1.0032, 1.0008, 0.9991, 0.9979, 0.9973, 0.9971, 0.9971, 0.9973, 0.9976, 1);
}

@media (prefers-reduced-motion: no-preference) {
    /* page to page: a soft cross-fade, the new page rising a little (browsers with cross-document view transitions) */
    @view-transition { navigation: auto; }
    ::view-transition-old(root) { animation: smOut .18s ease-in both; }
    ::view-transition-new(root) { animation: smIn .42s var(--s-spring) both; }
    @keyframes smOut { to { opacity: 0; } }
    @keyframes smIn { from { opacity: 0; transform: translateY(12px); } }

    /* scroll reveal: what is below the fold waits faded and a little lower, then rises into place once */
    html.sm .sm-hide { opacity: 0; transform: translateY(28px) scale(.985); }
    html.sm .sm-hide.sm-img { transform: scale(1.04); }
    html.sm .sm-in { opacity: 1; transform: none; transition: opacity .7s ease-out, transform .9s var(--s-spring); transition-delay: var(--sm-d, 0ms); }

    /* cards lift a little under the pointer */
    @media (hover: hover) {
        html.sm .sm-card { transition: transform .35s var(--s-spring), box-shadow .35s ease; }
        html.sm .sm-card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(16, 42, 67, .16); }
    }

    /* keyboard focus: the ring settles in like a lens */
    :where(a, button, input, select, textarea, [tabindex]):focus-visible { animation: smFocus .35s var(--s-snappy); }
    @keyframes smFocus { from { outline-offset: 7px; outline-color: transparent; } }
}
