/* motion.css — ONE shared motion system (etoimo.gr), all pages. Owner of: hero entrance (.entrance / data-m="hero"),
   scroll reveal ([data-m]), pricing rows + category open/close (motion.js), price count-up, button/chip hover.
   Rules: transform/opacity only (height only inside an opened pricing panel) · CLS 0 · hidden pre-state ONLY under html.m-js
   (set by the tiny inline <head> script, never when prefers-reduced-motion) · html.m-safe (2.5 s, motion.js not up) shows all.
   NOT owned here (kept as their own single owner): process steps (.step.reveal + .steps-line -> script.js/style.css),
   why-us comparison cards (.wu-* -> inline script in why-us). */
:root { --m-ease: cubic-bezier(.22, 1, .36, 1); }

@keyframes mUp { from { opacity: 0; transform: translate3d(0, 24px, 0); } to { opacity: 1; transform: none; } }

/* hero entrance: pure CSS (no JS wait, no hidden flash): fade + 24px rise, 80 ms stagger. `backwards` = nothing is left on the element afterwards */
html.m-js .entrance, html.m-js [data-m="hero"] { animation: mUp 560ms var(--m-ease) var(--md, 0ms) backwards; }
html.m-js .entrance-1, html.m-js [data-m-d="0"] { --md: 0ms; }
html.m-js .entrance-2, html.m-js [data-m-d="1"] { --md: 80ms; }
html.m-js .entrance-3, html.m-js [data-m-d="2"] { --md: 160ms; }
html.m-js .entrance-4, html.m-js [data-m-d="3"] { --md: 240ms; }

/* scroll reveal: pre-state only under html.m-js; motion.js adds .m-in (+ --md stagger) and then removes data-m entirely */
html.m-js [data-m]:not([data-m="hero"]) { opacity: 0; transform: translate3d(var(--mx, 0), var(--my, 20px), 0); }
html.m-js [data-m="l"] { --mx: -24px; --my: 0px; }
html.m-js [data-m="r"] { --mx: 24px; --my: 0px; }
html.m-js [data-m].m-in {
  opacity: 1; transform: none;
  transition: opacity 520ms var(--m-ease) var(--md, 0ms), transform 560ms var(--m-ease) var(--md, 0ms);
}
html.m-js [data-m].m-now { transition: none; }

/* safety net + print + reduced motion: everything static and visible */
html.m-safe [data-m], html.m-safe .entrance { opacity: 1 !important; transform: none !important; animation: none !important; transition: none !important; }
@media print { [data-m], .entrance { opacity: 1 !important; transform: none !important; animation: none !important; } }
@media (prefers-reduced-motion: reduce) {
  [data-m], .entrance, [data-m="hero"] { opacity: 1 !important; transform: none !important; animation: none !important; transition: none !important; }
  .btn, .pr-btn, .cta-submit, .cta-chip-text, .up-pick, .up-submit { translate: none !important; scale: none !important; }
}

/* pricing: count-up number never reflows (tabular digits; width is locked by motion.js while counting) */
.pr-amt, #priceCounter, .includes-price-amount { font-variant-numeric: tabular-nums; }
.pr-chev { transition: transform 0.28s var(--m-ease); }

/* hover: `translate`/`scale` (compositor, independent of the existing transforms); existing colour transitions are kept in the lists */
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .btn:hover, .pr-btn:hover, .cta-submit:hover, .up-pick:hover, .up-submit:hover:not([disabled]) { translate: 0 -2px; }
  .cta-chip:hover .cta-chip-text { translate: 0 -2px; }
}
.btn:active, .pr-btn:active, .cta-submit:active, .up-pick:active, .up-submit:active:not([disabled]) { translate: 0 0; scale: .98; }
.cta-chip:active .cta-chip-text { scale: .96; }
.btn { transition: color 0.3s ease, border-color 0.3s ease, transform 0.2s ease, translate 0.22s var(--m-ease), scale 0.15s var(--m-ease); }
.btn-fx { transition: color 0.3s ease, box-shadow 0.3s ease, translate 0.22s var(--m-ease), scale 0.15s var(--m-ease); }
.pr-btn { transition: background 0.2s ease, color 0.2s ease, translate 0.22s var(--m-ease), scale 0.15s var(--m-ease); }
.cta-chip-text { transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, translate 0.22s var(--m-ease), scale 0.15s var(--m-ease); }
.up-pick, .up-submit { transition: background 0.2s ease, color 0.2s ease, translate 0.22s var(--m-ease), scale 0.15s var(--m-ease); }
