/* Madaris Landing Motion v3.2.0
   Video reference: staged entrance, independent cards, zoomed dashboard, on-scroll sequences.
   Loaded on / only. Uses native CSS animation + optional IntersectionObserver.
*/
@keyframes md320-badge-in{from{opacity:0;transform:translateY(-22px) scale(.83);filter:blur(7px)}to{opacity:1;transform:translateY(0) scale(1);filter:blur(0)}}
@keyframes md320-hero-title{0%{opacity:0;transform:translateY(54px);filter:blur(15px);clip-path:inset(0 0 100% 0)}65%{opacity:1;filter:blur(0)}100%{opacity:1;transform:translateY(0);clip-path:inset(0 0 0 0);filter:blur(0)}}
@keyframes md320-title-accent{0%{opacity:0;transform:translateY(24px);clip-path:inset(100% 0 0 0)}100%{opacity:1;transform:translateY(0);clip-path:inset(0 0 0 0)}}
@keyframes md320-fade-rise{0%{opacity:0;transform:translateY(46px);filter:blur(9px)}100%{opacity:1;transform:translateY(0);filter:blur(0)}}
@keyframes md320-slide-rtl{from{opacity:0;transform:translateX(100px) scale(.92);filter:blur(6px)}to{opacity:1;transform:translateX(0) scale(1);filter:blur(0)}}
@keyframes md320-slide-ltr{from{opacity:0;transform:translateX(-100px) scale(.92);filter:blur(6px)}to{opacity:1;transform:translateX(0) scale(1);filter:blur(0)}}
@keyframes md320-card-zoom{0%{opacity:0;transform:translateY(70px) scale(.72) rotate(2deg);filter:blur(12px)}72%{opacity:1;filter:blur(0)}100%{opacity:1;transform:translateY(0) scale(1) rotate(0);filter:blur(0)}}
@keyframes md320-item-pop{0%{opacity:0;transform:translateY(20px) scale(.64)}75%{opacity:1;transform:translateY(-4px) scale(1.055)}100%{opacity:1;transform:none}}
@keyframes md320-bar-rise{0%{transform:scaleY(.05)}100%{transform:scaleY(1)}}
@keyframes md320-float{0%,100%{translate:0 0}50%{translate:0 -8px}}
@keyframes md320-note-in{0%{opacity:0;transform:translate(-45px,26px) scale(.66) rotate(-8deg)}100%{opacity:1;transform:translate(0,0) scale(1) rotate(2deg)}}
@keyframes md320-reveal-up{0%{opacity:0;transform:translateY(76px) scale(.96);filter:blur(8px)}100%{opacity:1;transform:translateY(0) scale(1);filter:blur(0)}}
@keyframes md320-reveal-right{0%{opacity:0;transform:translateX(100px) scale(.94);filter:blur(6px)}100%{opacity:1;transform:translateX(0) scale(1);filter:blur(0)}}
@keyframes md320-reveal-left{0%{opacity:0;transform:translateX(-100px) scale(.94);filter:blur(6px)}100%{opacity:1;transform:translateX(0) scale(1);filter:blur(0)}}
@keyframes md320-reveal-zoom{0%{opacity:0;transform:translateY(42px) scale(.68);filter:blur(9px)}100%{opacity:1;transform:translateY(0) scale(1);filter:blur(0)}}
@keyframes md320-reveal-heading{0%{opacity:0;transform:translateY(33px);clip-path:inset(0 0 100% 0);filter:blur(7px)}100%{opacity:1;transform:translateY(0);clip-path:inset(0 0 0 0);filter:blur(0)}}

/* Hero is CSS-owned and guaranteed to animate on first load without observer timing. */
.hero-copy > .pill-top{animation:md320-badge-in .85s .12s cubic-bezier(.17,1,.3,1) both}
.hero-copy > h1{animation:md320-hero-title 1.28s .26s cubic-bezier(.16,1,.3,1) both}
.hero-copy > h1 em{display:inline-block;animation:md320-title-accent .85s .71s cubic-bezier(.16,1,.3,1) both}
.hero-copy > .hero-lead{animation:md320-fade-rise 1s .85s cubic-bezier(.16,1,.3,1) both}
.hero-copy .hero-ctas > :first-child{animation:md320-slide-rtl .96s 1.09s cubic-bezier(.16,1,.3,1) both}
.hero-copy .hero-ctas > :nth-child(2){animation:md320-slide-ltr .96s 1.28s cubic-bezier(.16,1,.3,1) both}
.hero-copy > .hero-trust{animation:md320-fade-rise .94s 1.43s cubic-bezier(.16,1,.3,1) both}
.hero-art{animation:md320-card-zoom 1.45s .42s cubic-bezier(.16,1,.3,1) both}
.hero-art .mock-top{animation:md320-fade-rise .65s 1.31s cubic-bezier(.16,1,.3,1) both}
.hero-art .mock-kpis > div:first-child{animation:md320-slide-rtl .67s 1.43s cubic-bezier(.16,1,.3,1) both}
.hero-art .mock-kpis > div:nth-child(2){animation:md320-slide-ltr .67s 1.58s cubic-bezier(.16,1,.3,1) both}
.hero-art .mock-chart{animation:md320-fade-rise .72s 1.73s cubic-bezier(.16,1,.3,1) both}
.hero-art .bars i{transform-origin:bottom center;animation:md320-bar-rise .85s calc(2.07s + var(--md320-bar-delay,0ms)) cubic-bezier(.15,.9,.2,1) both}
.hero-art .mock-bottom{animation:md320-fade-rise .71s 2.09s cubic-bezier(.16,1,.3,1) both}
.hero-art .floating-note{animation:md320-note-in .8s 2.30s cubic-bezier(.16,1,.3,1) both}
/* Sequential counter entry without overriding the existing number-counting script. */
.stats-grid > div{animation:md320-fade-rise .9s calc(1.2s + var(--md320-stat-delay,0ms)) cubic-bezier(.16,1,.3,1) both}

/* Scroll targets: JS adds classes only to homepage elements. No JS = no hidden content. */
.md320-watch{opacity:0;visibility:visible}
.md320-watch.md320-visible{animation:md320-reveal-up 1.05s var(--md320-delay,0ms) cubic-bezier(.16,1,.3,1) both}
.md320-watch.md320-visible[data-md320-motion="right"]{animation-name:md320-reveal-right}
.md320-watch.md320-visible[data-md320-motion="left"]{animation-name:md320-reveal-left}
.md320-watch.md320-visible[data-md320-motion="zoom"]{animation-name:md320-reveal-zoom}
.md320-watch.md320-visible[data-md320-motion="heading"]{animation-name:md320-reveal-heading}
/* Smaller content animates independently AFTER the parent enters, as in the reference video. */
.md320-watch.md320-visible.feature-card > .feature-icon{animation:md320-item-pop .66s calc(.40s + var(--md320-delay,0ms)) cubic-bezier(.12,1,.28,1) both}
.md320-watch.md320-visible.feature-card > h3{animation:md320-fade-rise .66s calc(.47s + var(--md320-delay,0ms)) cubic-bezier(.16,1,.3,1) both}
.md320-watch.md320-visible.feature-card > p{animation:md320-fade-rise .65s calc(.54s + var(--md320-delay,0ms)) cubic-bezier(.16,1,.3,1) both}
.md320-watch.md320-visible.step-card > span:first-child{animation:md320-item-pop .72s calc(.37s + var(--md320-delay,0ms)) cubic-bezier(.12,1,.28,1) both}
.md320-watch.md320-visible.step-card > h3{animation:md320-fade-rise .62s calc(.44s + var(--md320-delay,0ms)) cubic-bezier(.16,1,.3,1) both}
.md320-watch.md320-visible.step-card > p{animation:md320-fade-rise .62s calc(.53s + var(--md320-delay,0ms)) cubic-bezier(.16,1,.3,1) both}
.md320-watch.md320-visible.customer-card > img{animation:md320-item-pop .72s calc(.31s + var(--md320-delay,0ms)) cubic-bezier(.12,1,.28,1) both}
.md320-watch.md320-visible.plan-card > .plan-tag{animation:md320-item-pop .62s calc(.32s + var(--md320-delay,0ms)) cubic-bezier(.12,1,.28,1) both}
.md320-watch.md320-visible.plan-card > h3{animation:md320-fade-rise .72s calc(.36s + var(--md320-delay,0ms)) cubic-bezier(.16,1,.3,1) both}
/* Existing hover affordances remain once entrances finish (JS removes watch class). */
@media(hover:hover){.feature-card:hover,.plan-card:hover,.customer-card:hover{transition:transform .28s cubic-bezier(.16,1,.3,1),box-shadow .28s ease}}

@media(max-width:760px){
 .hero-copy .hero-ctas > :first-child,.hero-copy .hero-ctas > :nth-child(2){animation-name:md320-fade-rise}
 .hero-art{animation-duration:1.1s}
 .md320-watch.md320-visible{animation-duration:.77s}
 .md320-watch.md320-visible[data-md320-motion="right"],.md320-watch.md320-visible[data-md320-motion="left"]{animation-name:md320-reveal-up}
}


/* v3.2.1 — Site motion enabled independently of Windows / OS reduced-motion.
   Users can opt out through the footer control; this HTML class is set before first paint. */
:root{--madaris-motion-css-version:321}
html.md321-motion-off .hero-copy > .pill-top,
html.md321-motion-off .hero-copy > h1,
html.md321-motion-off .hero-copy > h1 em,
html.md321-motion-off .hero-copy > .hero-lead,
html.md321-motion-off .hero-copy .hero-ctas > *,
html.md321-motion-off .hero-copy > .hero-trust,
html.md321-motion-off .hero-art,
html.md321-motion-off .hero-art *,
html.md321-motion-off .stats-grid > div,
html.md321-motion-off .md320-watch,
html.md321-motion-off .md320-watch.md320-visible,
html.md321-motion-off .md320-watch.md320-visible *{
  animation:none!important;
  opacity:1!important;
  filter:none!important;
  clip-path:none!important;
  transition:none!important;
}
html.md321-motion-off .md320-watch{opacity:1!important}
.md321-motion-pref{display:flex;align-items:center;gap:8px;margin-block-start:10px;font-family:inherit}
.md321-motion-pref button{appearance:none;background:transparent;color:inherit;border:1px solid currentColor;border-radius:8px;opacity:.82;padding:7px 11px;font:inherit;font-size:12px;line-height:1.3;cursor:pointer}
.md321-motion-pref button:hover,.md321-motion-pref button:focus-visible{opacity:1;outline-offset:3px}
