/* OP Digital motion layer (ux-motion pass, 20 Nov 2026). Same numbers as opdigital.com.au (PR #150).
   Load it LAST. Everything is wrapped in :where() so it has zero specificity: a site's own rule always wins,
   and the per-site fixes live in that site's stylesheet. Canonical copy: qt-os docs/agency/site-motion/. */
:root {
  --op-ease-out: cubic-bezier(.16, 1, .3, 1);   /* entering */
  --op-ease-in: cubic-bezier(.7, 0, .84, 0);    /* leaving: closes run faster than opens */
  --op-press: 120ms;                            /* hover and press feedback */
  --op-quick: 160ms;
  --op-base: 240ms;
  --op-slow: 320ms;
  --op-reveal: 400ms;                           /* scroll reveals and hero entrances, never longer */
}
:where(a, button, summary, select, input, textarea, label, [role=button]) {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
:where(a, button, summary, select, input, textarea) {
  transition: color var(--op-press) var(--op-ease-out), background-color var(--op-press) var(--op-ease-out),
    border-color var(--op-press) var(--op-ease-out), text-decoration-color var(--op-press) var(--op-ease-out),
    box-shadow var(--op-quick) var(--op-ease-out), opacity var(--op-press) var(--op-ease-out),
    transform var(--op-press) var(--op-ease-out);
}
:where(a, button, summary, select, input, textarea, [role=button], [tabindex]):focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}
:where(button, [role=button], input[type=submit], input[type=button]):active { transform: scale(.97); }
:where(summary) { min-height: 44px; padding-block: 10px; box-sizing: border-box; cursor: pointer; }  /* keeps the ▶ marker */
:where(input:not([type=checkbox]):not([type=radio]):not([type=range]), select, textarea) { min-height: 44px; }

/* Scroll reveal, used only where a site opts in with data-op-reveal (op-motion.js hides them after it loads,
   so a page without JS shows everything). 14 px rise, 400 ms, 50 ms stagger. */
:where(html.op-motion) :where([data-op-reveal]) {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity var(--op-reveal) var(--op-ease-out), transform var(--op-reveal) var(--op-ease-out);
  transition-delay: var(--op-delay, 0ms);
}
:where(html.op-motion) :where([data-op-reveal].op-in) { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  :where([data-op-reveal]) { opacity: 1 !important; transform: none !important; }
}
