/* ===========================================================================
   Digital Menu — scroll reveals.

   Replaces WOW.js, which set inline `visibility:hidden` on every `.wow` element
   and left whole sections blank whenever its scroll callback did not fire.
   Here the hidden state exists ONLY while `html.dm-motion` is set, and that
   class is only added by JS that has already proven IntersectionObserver works.
   With no JS, slow JS, or reduced-motion preference, content is simply visible.
   =========================================================================== */

/* Undo WOW's inline hiding if a cached copy of the old script ever runs. */
.wow { visibility: visible !important; }

html.dm-motion .wow,
html.dm-motion .dm-reveal {
    opacity: 0;
    transform: translateY(26px);
    /* the theme's own fade-in-* keyframes fight the transition — drop them */
    animation: none !important;
    transition: opacity .7s ease, transform .7s cubic-bezier(.22, .68, .28, 1);
    will-change: opacity, transform;
}

html.dm-motion .wow.dm-seen,
html.dm-motion .dm-reveal.dm-seen {
    opacity: 1;
    transform: none;
    will-change: auto;
}

/* Stagger cards within a row so a grid resolves as a wave, not a slab. */
html.dm-motion .row > [class*="col-"]:nth-child(2) .wow { transition-delay: .09s; }
html.dm-motion .row > [class*="col-"]:nth-child(3) .wow { transition-delay: .18s; }
html.dm-motion .row > [class*="col-"]:nth-child(4) .wow { transition-delay: .27s; }

@media (prefers-reduced-motion: reduce) {
    html.dm-motion .wow,
    html.dm-motion .dm-reveal {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
}

/* --- Hover polish (shared by both directions) ----------------------------- */
.rt-single-icon-box.shdoaw-style {
    transition: transform .3s ease, box-shadow .3s ease;
}
.rt-single-icon-box.shdoaw-style:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 40px rgba(11, 24, 95, .12);
}
.rt-btn { transition: transform .2s ease, box-shadow .2s ease, filter .2s ease; }
.rt-btn:hover { transform: translateY(-2px); filter: brightness(1.04); }
.rt-btn:active { transform: translateY(0); }

/* --- Accessibility: never remove the focus ring without replacing it ------ */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.rt-btn:focus-visible {
    outline: 3px solid #e8453c;
    outline-offset: 2px;
    border-radius: 4px;
}
