/* DAVZON – motion layer (motion.js). Small hooks only: the motion itself
   lives in GSAP. */

/* Reading progress: a thin Saffron line along the top of the page */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  height: 3px;
  background: var(--saffron);
  transform: scaleX(0);
  transform-origin: left;
  pointer-events: none;
}

/* SplitText masks: lines clip their words while they rise */
.split-line { padding-bottom: 0.08em; margin-bottom: -0.08em; }

/* Magnetic buttons: GSAP owns the transform, so CSS only animates colour
   and shadow (otherwise the two would fight on every frame) */
.is-magnetic { transition: background-color 0.25s var(--ease), box-shadow 0.25s var(--ease), color 0.25s var(--ease); }
.is-magnetic:hover { transform: none; }
/* Anything GSAP moves every frame (reveals, tilt) must not also have a CSS
   transform transition, or the two fight and the element shakes */
.gs-owned { transition-property: background-color, color, border-color, box-shadow, filter !important; }
.gs-owned:hover { transform: none; }

.btn__label { display: inline-flex; align-items: center; gap: 8px; pointer-events: none; }

@media (prefers-reduced-motion: reduce) {
  .scroll-progress { display: none; }
}

/* =================================================================
   Site-wide finishing touches (with the polish layer in motion.js)
   ================================================================= */
html { scroll-padding-top: 110px; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; }
::selection { background: rgba(242, 169, 59, 0.38); color: var(--ink); }
h1, h2, h3 { text-wrap: balance; }
p, li { text-wrap: pretty; }

/* One focus ring everywhere (specific rules elsewhere still win) */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible { outline: 3px solid var(--saffron); outline-offset: 3px; border-radius: 6px; }

/* Arrows nudge forward when their link or button is hovered */
.pl-arrow { display: inline-block; transition: transform 0.4s var(--ease); }
a:hover .pl-arrow, button:hover .pl-arrow, a:focus-visible .pl-arrow { transform: translateX(4px); }

/* Linked cards lift gently */
.pl-card { transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease); }
.pl-card:hover { transform: translateY(-4px); box-shadow: 0 26px 50px -30px rgba(12, 27, 42, 0.35); }
/* While GSAP reveals an element it owns the transform: no CSS transition */
.pl-run { transition: none !important; }

/* Hero highlight: the Saffron block sweeps in behind its words */
/* (!important: page stylesheets load later and set a plain Saffron fill) */
.us-mark { background-color: transparent !important; background-image: linear-gradient(var(--saffron), var(--saffron)) !important; background-repeat: no-repeat !important; background-size: var(--pl-sweep, 100%) 100% !important; }
.pl-line { will-change: transform; }

@media (prefers-reduced-motion: reduce) {
  .pl-arrow, .pl-card { transition: none; }
  .pl-card:hover { transform: none; }
}

/* Page transitions (smooth.js): content fades in on arrival and out when
   leaving for another page; the header stays put for continuity.
   Opacity only, never a transform, so fixed and pinned parts are unaffected.
   "backwards" fill: after arriving, nothing holds the opacity, so the
   leaving fade can take over. */
@keyframes dz-page-in { from { opacity: 0; } to { opacity: 1; } }
main, .site-footer { animation: dz-page-in 0.6s cubic-bezier(0.22, 1, 0.36, 1) backwards; }
html.is-leaving main, html.is-leaving .site-footer { opacity: 0; transition: opacity 0.26s ease; }
@media (prefers-reduced-motion: reduce) {
  main, .site-footer { animation: none; }
  html.is-leaving main, html.is-leaving .site-footer { opacity: 1; transition: none; }
}
