/* HMX Dynamics: motion layer. Everything here is disabled for prefers-reduced-motion. */
@media (prefers-reduced-motion: no-preference) {

  /* Page + header entrance */
  body { animation: mxFade .6s ease both; }
  #site-header { animation: mxDrop .8s cubic-bezier(.2,.8,.2,1) both; }
  .mx-hide #site-header { transform: translateY(-100%); }
  #site-header { transition: transform .4s cubic-bezier(.2,.8,.2,1), border-color .3s; }

  /* Scroll progress bar */
  .mx-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 80; transform: scaleX(0); transform-origin: 0 50%; background: linear-gradient(90deg, var(--peach-deep), var(--peach)); pointer-events: none; }

  /* Headline word-by-word reveal */
  .mx-w { display: inline-block; vertical-align: baseline; overflow: visible; }
  .mx-wi { display: inline-block; transform: translateY(110%); animation: mxWord .95s cubic-bezier(.2,.8,.2,1) forwards; animation-delay: calc(var(--i) * 70ms + 150ms); }

  /* Hero */
  .hero .kicker, .hero .lede, .hero .cta-row, .about-hero .kicker, .about-hero p, .page-head .kicker, .page-head p, .page-head .jump { animation: mxUp .9s cubic-bezier(.2,.8,.2,1) backwards; }
  .hero .kicker, .about-hero .kicker, .page-head .kicker { animation-delay: .05s; }
  .hero .lede, .about-hero p, .page-head > p { animation-delay: .55s; }
  .hero .cta-row, .page-head .jump { animation-delay: .75s; }
  .hero-art { animation: mxFloat 7s ease-in-out 1.4s infinite; }
  .hero-art .shot { animation: mxShot 1.1s cubic-bezier(.2,.8,.2,1) backwards; translate: calc(var(--mx, 0) * 14px) calc(var(--my, 0) * 10px); }
  .hero-art .shot.a { animation-delay: .35s; }
  .hero-art .shot.b { animation-delay: .6s; translate: calc(var(--mx, 0) * -20px) calc(var(--my, 0) * -14px); }
  .hero-art::before { animation: mxBlock 1.2s cubic-bezier(.2,.8,.2,1) .2s backwards, mxPulse 6s ease-in-out 1.6s infinite; transform-origin: 100% 0; }
  .hero-art::after { animation: mxLine 1.2s ease .9s backwards; transform-origin: 0 50%; }

  /* Scroll reveal (replaces the basic fade in main.js with a staggered rise) */
  .js-reveal [data-reveal] { transform: none; translate: 0 34px; transition: opacity .9s ease var(--d, 0ms), translate .9s cubic-bezier(.2,.8,.2,1) var(--d, 0ms), border-color .3s, transform .3s; }
  .js-reveal [data-reveal].in { translate: none; }
  .js-reveal .card-3d.in:hover { transform: translateY(-6px); }
  .mx-on .mx { opacity: 0; translate: 0 30px; transition: opacity .85s ease var(--d, 0ms), translate .85s cubic-bezier(.2,.8,.2,1) var(--d, 0ms), transform .3s, border-color .3s, box-shadow .3s, background .3s; }
  .mx-on .mx.mx-in { opacity: 1; translate: none; }
  .mx-on .mx--left { translate: -34px 0; }
  .mx-on .mx--zoom { translate: 0 0; scale: .94; transition-property: opacity, scale, transform, border-color, box-shadow, background; }
  .mx-on .mx--zoom.mx-in { scale: 1; }

  /* Section headings: underline sweeps in */
  .sec-head h2, .sh, .approach h2, .services h2 { position: relative; }
  .mx-on .mx-uline::after { content: ""; display: block; height: 2px; width: 0; margin-top: .9rem; background: var(--peach-deep); transition: width 1.1s cubic-bezier(.2,.8,.2,1) .25s; }
  .mx-on .mx-uline.mx-in::after { width: min(6rem, 30%); }

  /* Steps numbers pop */
  .mx-on .step .n { display: inline-block; transform: scale(.6) rotate(-8deg); opacity: 0; transition: transform .9s cubic-bezier(.3,1.6,.5,1) .2s, opacity .6s ease .2s; }
  .mx-on .step.in .n { transform: none; opacity: 1; }

  /* Services list: number slides, row line draws */
  #services-list li { transition: padding-left .35s cubic-bezier(.2,.8,.2,1), background .35s; }
  #services-list li:hover { padding-left: .8rem; background: linear-gradient(90deg, rgba(237,184,153,.22), transparent 70%); }
  #services-list li .num { transition: transform .35s; }
  #services-list li:hover .num { transform: translateX(4px) scale(1.15); }

  /* Buttons: shine sweep + lift */
  .btn { position: relative; overflow: hidden; isolation: isolate; }
  .btn::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.3) 50%, transparent 70%); transform: translateX(-130%); }
  .btn:hover::before { transform: translateX(130%); transition: transform .8s ease; }
  .btn:hover { transform: translateY(-2px); box-shadow: 0 12px 24px -12px rgba(58,14,21,.55); }
  .btn:active { transform: translateY(0) scale(.98); }
  .btn.arrow:hover::after { transform: translateX(6px); }

  /* Nav links, pills, cards */
  .jump a { transition: background .25s, color .25s, border-color .25s, transform .25s; }
  .jump a:hover { transform: translateY(-3px); }
  .mx-on .pk:hover { transform: translateY(-8px); }
  .mx-on .glass:hover { border-color: rgba(237,184,153,.6); box-shadow: 0 18px 38px -18px rgba(0,0,0,.5); transform: translateY(-4px); }
  .mx-on .wk:hover { transform: translateY(-6px) rotate(-.6deg); box-shadow: 0 22px 40px -20px rgba(0,0,0,.6); }
  .wk img { transition: transform .7s cubic-bezier(.2,.8,.2,1); }
  .wk:hover img { transform: scale(1.06); }
  .tile .shot, .card-3d .shot { transition: transform .45s cubic-bezier(.2,.8,.2,1), box-shadow .45s; }
  .tile a.shot:hover, .card-3d a.shot:hover { transform: translateY(-6px); }
  .pill-3d { animation: mxGlow 3s ease-in-out infinite; }
  .rows li { transition: padding-left .25s, background .25s; }
  .rows li:hover { padding-left: .5rem; background: rgba(237,184,153,.08); }
  .pol li { transition: transform .3s, border-color .3s, background .3s; }
  .pol li:hover { transform: translateX(6px); border-color: var(--peach); background: rgba(246,239,229,.09); }
  .tbl tbody tr { transition: background .2s; }
  .tbl tbody tr:hover { background: rgba(237,184,153,.08); }
  .badge { animation: mxBadge 2.8s ease-in-out infinite; }

  /* Wordmark letters pop in */
  .mx-on .wordmark--xl .wm-letters > span { display: inline-block; opacity: 0; transform: translateY(40px) rotate(6deg); }
  .mx-in .wordmark--xl .wm-letters > span { animation: mxPop 1s cubic-bezier(.3,1.4,.5,1) forwards; }
  .mx-in .wordmark--xl .wm-m { animation-delay: .15s; }
  .mx-in .wordmark--xl .wm-x { animation-delay: .3s; }
  .mx-on .wordmark--xl .wm-sub { opacity: 0; transition: opacity 1s ease .7s; }
  .mx-in .wordmark--xl .wm-sub { opacity: 1; }
  .wordmark--sm .wm-letters span { display: inline-block; transition: transform .35s cubic-bezier(.3,1.6,.5,1); }
  .brand:hover .wm-h { transform: translateY(-3px); }
  .brand:hover .wm-m { transform: translateY(-3px) rotate(-4deg); transition-delay: .05s; }
  .brand:hover .wm-x { transform: translateY(-3px); transition-delay: .1s; }

  /* Floating WhatsApp button */
  .fab { animation: mxFab .8s cubic-bezier(.3,1.6,.5,1) 1.2s backwards; }
  .fab::after { content: ""; position: absolute; inset: -2px; border-radius: 50%; border: 2px solid var(--peach); animation: mxRing 2.6s ease-out 2s infinite; pointer-events: none; }
  .fab:hover .ico { animation: mxWiggle .6s ease; }

  /* Form */
  input, select, textarea { transition: border-color .25s, box-shadow .25s, transform .25s, background .25s; }
  input:focus, select:focus, textarea:focus { box-shadow: 0 10px 24px -14px rgba(91,23,34,.5); transform: translateY(-2px); }
  .err:not(:empty) { animation: mxShake .4s ease; }

  /* Footer links */
  #site-footer a { transition: color .25s, transform .25s; }
  #site-footer li a:hover { color: var(--peach); }
  .foot-grid li a:hover { transform: translateX(4px); display: inline-flex; }
}

@keyframes mxFade { from { opacity: 0; } }
@keyframes mxDrop { from { transform: translateY(-100%); opacity: 0; } }
@keyframes mxUp { from { opacity: 0; transform: translateY(26px); } }
@keyframes mxWord { to { transform: translateY(0); } }
@keyframes mxShot { from { opacity: 0; transform: translateY(60px) scale(.92) rotate(2deg); } }
@keyframes mxBlock { from { transform: scale(0); } }
@keyframes mxPulse { 50% { transform: scale(1.05); } }
@keyframes mxLine { from { transform: scaleX(0); } }
@keyframes mxFloat { 50% { transform: translateY(-10px); } }
@keyframes mxGlow { 50% { box-shadow: 0 0 18px rgba(237,184,153,.45); } }
@keyframes mxBadge { 50% { transform: translateY(-3px); } }
@keyframes mxPop { from { opacity: 0; transform: translateY(40px) rotate(6deg); } to { opacity: 1; transform: none; } }
@keyframes mxFab { from { opacity: 0; transform: scale(0) rotate(-90deg); } }
@keyframes mxRing { 0% { transform: scale(1); opacity: .8; } 70%, 100% { transform: scale(1.7); opacity: 0; } }
@keyframes mxWiggle { 25% { transform: rotate(-14deg); } 55% { transform: rotate(12deg); } 80% { transform: rotate(-6deg); } }
@keyframes mxShake { 25% { transform: translateX(-5px); } 60% { transform: translateX(5px); } }
