/* ==========================================================================
   r2-motion.css: one motion system for the whole site (round 2, motion pass)
   Loaded after site.css / theme-polish.css / round1.css and overrides them.

   Two curves, four durations. Everything that moves should use these:
     --ease          entrances, reveals, hovers that settle (fast out, long soft tail)
     --ease-io       two-way state changes: menus, tabs, the header hiding
     --dur-1  160ms  colour, background, opacity of small controls
     --dur-2  280ms  hover transforms, menu open/close, tab switch
     --dur-3  560ms  scroll reveals, panel entrances
     --dur-4  800ms  large one-off entrances (headline lines, hero art)
   Reveal travel is 12px; group stagger is capped at 50ms a step (parts.REVEAL_JS).
   ========================================================================== */
:root {
  --ease: cubic-bezier(.22, 1, .36, 1);
  --ease-io: cubic-bezier(.65, 0, .35, 1);
  --ease-back: var(--ease); /* no overshoot anywhere: it read as playful, not precise */
  --dur-1: 160ms;
  --dur-2: 280ms;
  --dur-3: 560ms;
  --dur-4: 800ms;
  --rise: 12px;
}

/* ---------- Scroll reveals: short travel, quick settle ---------- */
.js [data-reveal] { transform: translateY(var(--rise)); }
.js [data-reveal="fade"] { transform: none; }
.js [data-reveal="scale"] { transform: scale(.985); }
.js [data-reveal].is-in {
  transition: opacity var(--dur-3) var(--ease), transform var(--dur-3) var(--ease);
  transition-delay: var(--d, 0s);
}
/* hero copy waits for the loading screen, then rises the same 12px as everything else */
@media (prefers-reduced-motion: no-preference) {
  .js:not(.splash-done) .hero [data-reveal],
  .js:not(.splash-done) .page-hero [data-reveal] { transform: translateY(var(--rise)) !important; }
}
.split-line > span { transition-duration: var(--dur-4) !important; }
/* site.js has taken over this headline's lines (it plays them as the splash leaves): the 1.8 s line failsafe
   would otherwise snap them into place mid-animation on a slow first load */
.js h1[data-split].sl-live .sl { animation: none; }

/* ---------- Data figures (Izod bars, cycle bars, draw-on strokes): same curve, shorter ---------- */
.js .izod.is-in .izod-bar i, .js .cycle.is-in .cycle-bar i { transition-duration: var(--dur-4); }
.draw path, .draw line, .draw polyline, .draw polygon, .draw circle.stroke, .draw ellipse { transition-duration: 1.6s; }

/* ---------- Buttons and arrows: one hover, same timing everywhere ---------- */
.btn { transition: color var(--dur-2) var(--ease), border-color var(--dur-2) var(--ease), background-color var(--dur-2) var(--ease), box-shadow var(--dur-2) var(--ease), transform var(--dur-1) var(--ease); }
.btn::before { transition: transform var(--dur-3) var(--ease); }
.btn .arrow, .link-arrow svg, .pd-tech-go .arrow { transition: transform var(--dur-2) var(--ease), background-color var(--dur-2) var(--ease); }
.btn:hover .arrow, .btn:focus-visible .arrow { transform: translateX(3px); }
.btn:active { transform: scale(.98); transition-duration: 80ms; }
.link-arrow::after { transition: transform var(--dur-3) var(--ease); }
.tile::after { transition: transform var(--dur-3) var(--ease); }
.tile .idx i { transition: background-color var(--dur-2) var(--ease), color var(--dur-2) var(--ease), border-color var(--dur-2) var(--ease), transform var(--dur-2) var(--ease); }
a.marquee-item { transition: opacity var(--dur-2) var(--ease); }

/* ---------- Focus: a crisp ring that appears at once (no transition on outlines) ---------- */
:focus-visible { outline-offset: 3px; transition: none; }
.btn:focus-visible { outline-offset: 4px; }
[role="tab"]:focus-visible { outline-offset: 2px; }

/* ---------- Header: hide/show and the solid backdrop on one curve ---------- */
.site-header { transition: transform var(--dur-3) var(--ease-io), background-color var(--dur-2) var(--ease), box-shadow var(--dur-2) var(--ease), color var(--dur-2) var(--ease); }
.site-header::before { transition: opacity var(--dur-2) var(--ease); }
.nav-caret { transition: background-color var(--dur-1) var(--ease), color var(--dur-1) var(--ease); }
.nav-caret svg { transition: transform var(--dur-2) var(--ease); }

/* the floating pill and its shadow sit below the header box: hide it far enough that no strip peeks in */
.site-header.is-hidden { transform: translateY(calc(-100% - 40px)); }
.site-header.menu-open { transform: none; }
.nav-logo .logo-light { opacity: 1; }

/* ---------- Products mega menu: 6px drop + fade, closes a touch faster than it opens ---------- */
.mega { transition: opacity var(--dur-1) var(--ease-io), transform var(--dur-2) var(--ease), visibility 0s linear var(--dur-1); }
.nav-item.is-open .mega { transition: opacity var(--dur-2) var(--ease), transform var(--dur-2) var(--ease), visibility 0s; }
@media (hover: hover) and (min-width: 1081px) {
  .nav-item:hover .mega { transition: opacity var(--dur-2) var(--ease), transform var(--dur-2) var(--ease), visibility 0s; }
}
.mega-col li a { transition: background-color var(--dur-1) var(--ease); }

/* ---------- Tabs (APEX-519 processing): colour on --dur-1, the new pane settles in ---------- */
.ax-tablist [role="tab"] { transition: background-color var(--dur-1) var(--ease), color var(--dur-1) var(--ease); }
[data-tabs].is-live [role="tabpanel"]:not([hidden]) { animation: r2-pane var(--dur-2) var(--ease) both; }
@keyframes r2-pane { from { opacity: 0; transform: translateY(6px); } }

/* ---------- Marquee: calmer drift (was 48s); pause while hovered or focused ---------- */
.marquee-track { animation-duration: 64s; }
.marquee:focus-within .marquee-track { animation-play-state: paused; }

/* ---------- Mobile menu: same curve, a shorter wipe and stagger ---------- */
.mobile-menu.is-open { transition: clip-path var(--dur-3) var(--ease-io), visibility 0s; }

/* ---------- Hero art (inner pages) ----------
   The fluted-glass refraction filter re-renders the whole scene on every animation frame. Phones and
   tablets (no fine pointer, or narrower than 900px) already get a plain blur instead; under that blur
   the ambient loops are invisible detail that still forces a full re-blur 60 times a second, so they stop
   after the entrance there. Desktop keeps everything. */
@media not all and (min-width: 900px) and (pointer: fine) {
  .ha-glass .ha-scene * { animation: none !important; }
  .ha-shoot, .ha-sweepband { display: none; }
}
.ha-scene { animation-duration: 1.6s; animation-timing-function: var(--ease); }

/* ---------- Reduced motion: everything readable and still ---------- */
@media (prefers-reduced-motion: reduce) {
  .js [data-reveal], .js [data-reveal].is-in { transform: none !important; opacity: 1 !important; transition: none !important; }
  [data-tabs].is-live [role="tabpanel"]:not([hidden]) { animation: none; }
  /* no transitions at all on the menu: it is either fully open or fully hidden, never caught mid-fade */
  .mega, .nav-item.is-open .mega, .nav-item:hover .mega { transition: none !important; }
  .nav-item:not(.is-open):not(:hover) .mega { opacity: 0; visibility: hidden; pointer-events: none; }
  .btn::before, .btn .arrow, .site-header { transition-duration: 1ms; }
}
