/* =====================================================
   Motion layer — calm, premium movement for the site.
   Everything is disabled for users who prefer reduced motion.
   ===================================================== */
@media (prefers-reduced-motion: no-preference) {

  /* ---------- scroll progress bar + nav ---------- */
  .m-progress {
    position: fixed; top: 0; right: 0; left: 0; height: 3px; z-index: 70;
    transform-origin: right; transform: scaleX(var(--p, 0));
    background: linear-gradient(to left, var(--peach), var(--mauve-deep));
    pointer-events: none;
  }
  header.nav { transition: box-shadow .4s ease, background .4s ease; }
  header.nav.m-scrolled {
    background: rgba(251, 244, 238, .96);
    box-shadow: 0 12px 30px -22px rgba(108, 53, 72, .45);
  }

  /* ---------- hero entrance ---------- */
  .hero-inner > div:first-child > * {
    opacity: 0; transform: translateY(18px);
    animation: m-rise .9s cubic-bezier(.2, .7, .2, 1) forwards;
  }
  .hero-inner > div:first-child > *:nth-child(1) { animation-delay: .10s; }
  .hero-inner > div:first-child > *:nth-child(2) { animation-delay: .22s; }
  .hero-inner > div:first-child > *:nth-child(3) { animation-delay: .34s; }
  .hero-inner > div:first-child > *:nth-child(4) { animation-delay: .46s; }
  .hero-inner > div:first-child > *:nth-child(5) { animation-delay: .58s; }
  .hero-portrait { opacity: 0; animation: m-pop 1.2s cubic-bezier(.2, .7, .2, 1) .3s forwards; }

  /* breathing arch behind the portrait */
  .hero-arch { animation: m-breathe 14s ease-in-out infinite; }

  /* portrait floats gently */
  .portrait-frame { animation: m-float 7s ease-in-out infinite; }

  /* sparkles twinkle */
  .spark { animation: m-twinkle 3.2s ease-in-out infinite; }
  .spark.s2 { animation-delay: 1.1s; }
  .spark.s3 { animation-delay: 2.2s; }

  /* soft glowing particles drifting up in the hero */
  .m-glow {
    position: absolute; border-radius: 50%; pointer-events: none; z-index: 0;
    background: radial-gradient(circle, rgba(255, 255, 255, .95), rgba(248, 223, 206, 0) 70%);
    animation: m-drift linear infinite;
  }

  /* ---------- shining buttons ---------- */
  .btn-primary, .btn-white, .nav-cta { position: relative; overflow: hidden; isolation: isolate; }
  .btn-primary::after, .btn-white::after, .nav-cta::after {
    content: ""; position: absolute; top: 0; bottom: 0; width: 45%; left: -60%;
    background: linear-gradient(105deg, transparent, rgba(255, 255, 255, .45), transparent);
    transform: skewX(-20deg); pointer-events: none;
  }
  .btn-primary::after { animation: m-sheen 4.5s ease-in-out 1.6s infinite; }
  .btn-white::after {
    background: linear-gradient(105deg, transparent, rgba(231, 154, 120, .35), transparent);
    animation: m-sheen 5s ease-in-out 1s infinite;
  }
  .nav-cta:hover::after { animation: m-sheen .9s ease; }

  /* ---------- final CTA: slowly moving gradient ---------- */
  .cta {
    background-image: linear-gradient(135deg, var(--peach) 0%, var(--mauve-deep) 50%, var(--peach) 100%);
    background-size: 220% 220%;
    animation: m-grad 12s ease-in-out infinite;
  }

  /* ---------- service cards: soft spotlight + icon motion ---------- */
  .service-card.reveal {
    transition: opacity .7s ease, transform .5s cubic-bezier(.2, .7, .2, 1),
                box-shadow .3s ease, border-color .3s ease;
  }
  .service-card { position: relative; overflow: hidden; }
  .service-card::before {
    content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0;
    background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), rgba(231, 154, 120, .18), transparent 60%);
    transition: opacity .3s ease;
  }
  .service-card:hover::before { opacity: 1; }
  .service-icon { transition: transform .4s cubic-bezier(.2, .7, .2, 1), background .4s ease; }
  .service-icon svg { transition: stroke .4s ease; }
  .service-card:hover .service-icon {
    transform: translateY(-3px) rotate(-6deg);
    background: linear-gradient(135deg, var(--peach), var(--mauve-deep));
  }
  .service-card:hover .service-icon svg { stroke: #fff; }

  /* ---------- section eyebrow line grows in ---------- */
  .m-ready .reveal.pre .eyebrow::before { width: 0; transition: width .8s ease .3s; }
  .m-ready .reveal.in .eyebrow::before { width: 22px; }

  /* ---------- process: dashed line draws + number rings pulse ---------- */
  .m-ready .process-inner::before { transform: scaleX(0); transform-origin: right; transition: transform 1.6s ease .2s; }
  .m-ready .process-inner.m-in::before { transform: scaleX(1); }
  .step .n::after {
    content: ""; position: absolute; inset: -6px; border-radius: 50%;
    border: 2px solid var(--peach); opacity: 0;
    animation: m-ring 3s ease-out infinite;
  }
  .step:nth-child(2) .n::after { animation-delay: 1s; }
  .step:nth-child(3) .n::after { animation-delay: 2s; }

  /* ---------- testimonials: shimmering stars ---------- */
  .t-card .stars {
    background: linear-gradient(90deg, var(--peach) 0%, #ffe8d8 50%, var(--peach) 100%);
    background-size: 200% 100%;
    -webkit-background-clip: text; background-clip: text; color: transparent;
    animation: m-shimmer 3s linear infinite;
  }
  .t-card { transition: transform .4s ease, border-color .4s ease, background .4s ease, opacity .7s ease; }
  .t-card:hover { transform: translateY(-4px); border-color: rgba(231, 154, 120, .45); background: rgba(255, 255, 255, .08); }

  /* ---------- FAQ answer fades in ---------- */
  .faq-item[open] p { animation: m-fade .45s ease; }

  /* ---------- WhatsApp button: soft pulse ---------- */
  .whatsapp-fab::before {
    content: ""; position: absolute; inset: 0; border-radius: 50%;
    background: var(--mauve-deep); z-index: -1;
    animation: m-pulse 2.6s ease-out infinite;
  }

  /* ---------- keyframes ---------- */
  @keyframes m-rise { to { opacity: 1; transform: none; } }
  @keyframes m-pop { from { opacity: 0; transform: scale(.92); } to { opacity: 1; transform: none; } }
  @keyframes m-fade { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
  @keyframes m-breathe {
    0%, 100% { transform: translateX(-50%) scale(1); border-radius: 50% 50% 45% 45% / 55% 55% 40% 40%; }
    50% { transform: translateX(-50%) scale(1.05); border-radius: 46% 54% 42% 48% / 52% 58% 42% 38%; }
  }
  @keyframes m-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
  @keyframes m-twinkle {
    0%, 100% { opacity: .35; transform: scale(.8) rotate(0deg); }
    50% { opacity: 1; transform: scale(1.18) rotate(20deg); }
  }
  @keyframes m-drift {
    0% { transform: translate(0, 0); opacity: 0; }
    15% { opacity: .9; }
    85% { opacity: .5; }
    100% { transform: translate(var(--dx, 0px), -280px); opacity: 0; }
  }
  @keyframes m-sheen { 0% { left: -60%; } 30%, 100% { left: 130%; } }
  @keyframes m-grad { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
  @keyframes m-ring { 0% { opacity: .7; transform: scale(.9); } 100% { opacity: 0; transform: scale(1.45); } }
  @keyframes m-shimmer { to { background-position: -200% 0; } }
  @keyframes m-pulse { 0% { opacity: .55; transform: scale(1); } 100% { opacity: 0; transform: scale(1.6); } }
}

/* ---------- testimonials: decorative animated background ---------- */
@media (prefers-reduced-motion: no-preference) {
  .testimonials { position: relative; overflow: hidden; }
  .testimonials > .wrap { position: relative; z-index: 1; }
  .m-tbg { position: absolute; inset: 0; pointer-events: none; z-index: 0; }

  /* blurred glowing orbs */
  .m-orb { position: absolute; border-radius: 50%; filter: blur(70px); animation: m-orb 18s ease-in-out infinite; }
  .m-orb.o1 { width: 440px; height: 440px; background: var(--mauve); top: -140px; right: -90px; opacity: .45; }
  .m-orb.o2 { width: 380px; height: 380px; background: var(--peach); bottom: -160px; left: -70px; opacity: .22; animation-delay: -6s; }
  .m-orb.o3 { width: 260px; height: 260px; background: var(--peach-deep); top: 38%; left: 42%; opacity: .14; animation-delay: -12s; }

  /* slowly rotating dashed ring */
  .m-tring {
    position: absolute; width: 640px; height: 640px; top: 50%; left: 50%;
    margin: -320px 0 0 -320px; border-radius: 50%;
    border: 1px dashed rgba(231, 154, 120, .14);
    animation: m-spin 90s linear infinite;
  }
  .m-tring.r2 { width: 900px; height: 900px; margin: -450px 0 0 -450px; border-color: rgba(255, 255, 255, .05); animation-duration: 140s; animation-direction: reverse; }

  /* large faint quote marks */
  .m-quote {
    position: absolute; font-family: 'Aref Ruqaa', serif; line-height: 1;
    color: rgba(231, 154, 120, .09);
    animation: m-qfloat 10s ease-in-out infinite;
  }
  .m-quote.q1 { font-size: 280px; top: -20px; left: 5%; }
  .m-quote.q2 { font-size: 200px; bottom: -40px; right: 7%; --r: 180deg; animation-delay: -5s; }

  /* twinkling stars */
  .m-star { position: absolute; width: 3px; height: 3px; border-radius: 50%; background: #fff; box-shadow: 0 0 6px rgba(255, 232, 216, .9); animation: m-star 4s ease-in-out infinite; }

  @keyframes m-orb {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(40px, -30px) scale(1.08); }
    66% { transform: translate(-30px, 25px) scale(.94); }
  }
  @keyframes m-spin { to { transform: rotate(360deg); } }
  @keyframes m-qfloat {
    0%, 100% { transform: translateY(0) rotate(var(--r, 0deg)); }
    50% { transform: translateY(-18px) rotate(var(--r, 0deg)); }
  }
  @keyframes m-star { 0%, 100% { opacity: .1; transform: scale(.6); } 50% { opacity: .9; transform: scale(1.3); } }
}

/* ---------- FAQ: decorative animated background (light) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .faq { position: relative; overflow: hidden; }
  .faq > .wrap { position: relative; z-index: 1; }
  .m-fbg { position: absolute; inset: 0; pointer-events: none; z-index: 0; }

  .m-fbg .m-orb.f1 { width: 420px; height: 420px; background: var(--peach-tint); top: -120px; left: -100px; opacity: .9; }
  .m-fbg .m-orb.f2 { width: 360px; height: 360px; background: var(--peach); bottom: -150px; right: -80px; opacity: .28; animation-delay: -7s; }
  .m-fbg .m-orb.f3 { width: 240px; height: 240px; background: var(--mauve); top: 45%; right: 30%; opacity: .08; animation-delay: -12s; }

  .m-fbg .m-tring { border-color: rgba(143, 74, 92, .12); }

  .m-fq {
    position: absolute; font-family: 'Aref Ruqaa', serif; line-height: 1;
    color: rgba(143, 74, 92, .07);
    animation: m-qfloat 11s ease-in-out infinite;
  }
  .m-fq.a { font-size: 260px; top: 4%; left: 6%; --r: -12deg; }
  .m-fq.b { font-size: 170px; bottom: 6%; right: 5%; --r: 10deg; animation-delay: -4s; }
  .m-fq.c { font-size: 110px; top: 42%; left: 18%; --r: 6deg; animation-delay: -8s; color: rgba(231, 154, 120, .14); }

  .m-fspark { position: absolute; color: var(--peach); font-size: 14px; animation: m-twinkle 3.6s ease-in-out infinite; }
}

/* ---------- Services: decorative animated background (stars) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .services { position: relative; overflow: hidden; }
  .services > .wrap { position: relative; z-index: 1; }
  .m-sbg { position: absolute; inset: 0; pointer-events: none; z-index: 0; }

  /* fine dot grid that drifts slowly and fades at the edges */
  .m-dots {
    position: absolute; inset: -40px;
    background-image: radial-gradient(rgba(143, 74, 92, .16) 1.2px, transparent 1.6px);
    background-size: 26px 26px;
    -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
    mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
    animation: m-dots 40s linear infinite;
  }

  /* glows */
  .m-sbg .m-orb.s1 { width: 480px; height: 480px; background: var(--peach); top: -160px; right: 10%; opacity: .22; }
  .m-sbg .m-orb.s2 { width: 400px; height: 400px; background: var(--mauve); bottom: -180px; left: 5%; opacity: .12; animation-delay: -9s; }

  /* twinkling glowing stars */
  .m-sstar {
    position: absolute; line-height: 1;
    animation: m-sstar ease-in-out infinite;
  }
  .m-sstar.p { color: var(--peach); text-shadow: 0 0 10px rgba(231, 154, 120, .8), 0 0 22px rgba(231, 154, 120, .45); }
  .m-sstar.m { color: var(--mauve); text-shadow: 0 0 10px rgba(143, 74, 92, .45); }

  @keyframes m-dots { to { background-position: 26px 52px; } }
  @keyframes m-sstar {
    0%, 100% { opacity: .15; transform: scale(.55) rotate(0deg); }
    50% { opacity: 1; transform: scale(1.15) rotate(25deg); }
  }
}
