/* ============================================================
   WedYara — Motion system (pairs with animations.js)
   Rules:
   • hidden states exist only under .wy-anim (added by JS), so content
     is never invisible if scripts fail
   • transform / opacity / clip-path only; no layout-property animation
   • one shared easing + duration scale, overridable per element via
     --wy-dur / --wy-delay / --wy-ease (set from data-* attributes)
   ============================================================ */

:root {
    --wy-ease: cubic-bezier(0.22, 1, 0.36, 1);
    --wy-t-hover: 220ms;      /* buttons 180–250 */
    --wy-t-card: 300ms;       /* cards 250–350 */
    --wy-t-text: 600ms;       /* text 400–650 */
    --wy-t-section: 650ms;    /* sections 500–750 */
    --wy-t-mask: 800ms;       /* image masks 650–900 */
}

@keyframes wyRise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes wyFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes wyDrop { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: none; } }

/* ---------- PageTransition ---------- */
.wy-anim main, .wy-anim .app-content, .wy-anim .cp-content, .wy-anim .partner-content {
    animation: wyFade .45s var(--wy-ease) both;
}
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: 180ms ease both wyFadeOut; }
::view-transition-new(root) { animation: 320ms var(--wy-ease) both wyFade; }
@keyframes wyFadeOut { to { opacity: 0; } }

/* ---------- ScrollProgress ---------- */
.wy-progress {
    position: fixed; top: 0; left: 0; height: 3px; width: 100%;
    background: var(--wy-pink, #E03068);
    transform: scaleX(0); transform-origin: 0 50%;
    z-index: 9999; pointer-events: none;
}

/* ---------- Header hide / show ---------- */
.site-header { transition: transform .4s var(--wy-ease), box-shadow .3s ease, background-color .3s ease; }
.site-header.wy-hidden { transform: translateY(-100%); }

/* ---------- FadeIn / FadeUp / Stagger item ---------- */
.wy-anim .wy-reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity var(--wy-dur, var(--wy-t-section)) var(--wy-ease),
                transform var(--wy-dur, var(--wy-t-section)) var(--wy-ease);
    transition-delay: var(--wy-delay, 0ms);
    will-change: opacity, transform;
}
.wy-anim .wy-reveal.wy-zoom { transform: translateY(16px) scale(.96); }
.wy-anim .wy-reveal.wy-in { opacity: 1; transform: none; }

/* ---------- ImageReveal (mask + settle zoom) ---------- */
.wy-anim img.wy-img {
    clip-path: inset(0 0 100% 0);
    scale: 1.08;
    opacity: 0;
    transition: clip-path var(--wy-dur, var(--wy-t-mask)) var(--wy-ease),
                scale 1.1s var(--wy-ease),
                opacity .5s ease;
    transition-delay: var(--wy-delay, 0ms);
}
.wy-anim img.wy-img.wy-in { clip-path: inset(0 0 0 0); scale: 1; opacity: 1; }

/* ---------- TextReveal (line by line) ---------- */
.wy-w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .14em; margin-bottom: -.14em; }
.wy-wi { display: inline-block; }
.wy-anim .wy-split .wy-wi {
    transform: translateY(112%);
    transition: transform var(--wy-dur, var(--wy-t-text)) var(--wy-ease);
    transition-delay: calc(var(--wy-base, 0ms) + var(--wy-line, 0) * 110ms);
}
.wy-anim .wy-split.wy-in .wy-wi { transform: none; }

/* ---------- Hero sequence (≈1.6 s total, never blocks the CTAs) ---------- */
@keyframes wyHeroBg { from { transform: scale(1.06); opacity: 0; } to { transform: none; opacity: 1; } }
.wy-anim .hm-hero__media { animation: wyHeroBg 1.4s var(--wy-ease) backwards; }
.wy-anim .hm-hero__eyebrow { animation: wyRise .5s .10s var(--wy-ease) backwards; }
.wy-anim .hm-hero__text { animation: wyRise .6s .85s var(--wy-ease) backwards; }
.wy-anim .hm-hero .hm-actions .wy-btn:nth-child(1) { animation: wyRise .5s 1.00s var(--wy-ease) backwards; }
.wy-anim .hm-hero .hm-actions .wy-btn:nth-child(2) { animation: wyRise .5s 1.08s var(--wy-ease) backwards; }
.wy-anim .hm-hero__foot { animation: wyFade .6s 1.2s ease backwards; }
.wy-anim .hm-hero__scroll { animation: wyFade .6s 1.6s ease backwards; }

/* ---------- Hover primitives ---------- */
.card, .cp-card, .ap-card, .kpi-card, .svc-feature-card, .svc-dest-card, .lead-card {
    transition: transform var(--wy-t-card) var(--wy-ease), box-shadow var(--wy-t-card) ease, border-color var(--wy-t-card) ease;
}
@media (hover: hover) {
    .card:hover, .svc-feature-card:hover, .svc-dest-card:hover, .kpi-card:hover, .cp-card:hover, .wy-lift:hover {
        transform: translateY(-4px);
        box-shadow: 0 14px 32px rgba(36, 28, 36, .12);
    }
}
.btn, .cp-btn, button[type="submit"], .wy-btn {
    transition: transform var(--wy-t-hover) var(--wy-ease), translate .25s var(--wy-ease), box-shadow var(--wy-t-hover) ease,
                background-color var(--wy-t-hover) ease, color var(--wy-t-hover) ease, border-color var(--wy-t-hover) ease;
}
@media (hover: hover) { .btn:hover, .cp-btn:hover, .wy-btn:hover { transform: translateY(-2px); } }
.btn:active, .cp-btn:active, button[type="submit"]:active, .wy-btn:active { transform: scale(.98); }
.card img, .svc-dest-card-img img { transition: transform .6s var(--wy-ease); }
.card:hover img, .svc-dest-card:hover .svc-dest-card-img img { transform: scale(1.04); }
input, select, textarea { transition: border-color .2s ease, box-shadow .2s ease; }

/* Legacy button sheen (non-redesigned pages only) */
.btn { position: relative; overflow: hidden; }
.btn::after {
    content: ""; position: absolute; top: 0; left: -75%; width: 50%; height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255,255,255,.3), transparent);
    transform: skewX(-20deg); pointer-events: none;
}
@media (hover: hover) { .btn:hover::after { left: 130%; transition: left .7s ease; } }

/* Alerts / modals / progress */
.alert { animation: wyDrop .4s var(--wy-ease) both; }
@keyframes wyModal { from { opacity: 0; transform: translateY(16px) scale(.97); } to { opacity: 1; transform: none; } }
.modal.show .modal-content, .modal.show .modal-dialog { animation: wyModal .3s var(--wy-ease) both; }
.progress-bar, .progress-fill { transition: width 1s var(--wy-ease); }

/* ---------- Reduced motion: static page ---------- */
@media (prefers-reduced-motion: reduce) {
    .wy-progress { display: none; }
    .site-header.wy-hidden { transform: none; }
    .wy-anim *, .wy-anim *::before, .wy-anim *::after,
    .card, .btn, .wy-btn, .alert { animation: none !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
    .wy-anim .wy-reveal, .wy-anim img.wy-img { opacity: 1 !important; transform: none !important; scale: 1 !important; clip-path: none !important; }
    .wy-anim .wy-split .wy-wi { transform: none !important; }
    .card:hover, .btn:hover, .wy-btn:hover { transform: none; }
    ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}
