/* ==========================================================================
   Animations — keyframes, scroll-reveal states, reduced-motion contract
   Only `transform` and `opacity` are animated.
   ========================================================================== */

/* ----------  Scroll-triggered entrance  ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity var(--dur-slow) var(--ease-out),
              transform var(--dur-slow) var(--ease-out);
  transition-delay: calc(var(--i, 0) * 75ms);
}
[data-reveal].is-visible { opacity: 1; transform: none; }

/* Directional variants */
[data-reveal='left']  { transform: translateX(-34px); }
[data-reveal='right'] { transform: translateX(34px); }
[data-reveal='scale'] { transform: scale(.94); }
[data-reveal='left'].is-visible,
[data-reveal='right'].is-visible,
[data-reveal='scale'].is-visible { transform: none; }

/* Stagger children of a revealed container */
[data-reveal-children] > * {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .8s var(--ease-out), transform .8s var(--ease-out);
  transition-delay: calc(var(--i, 0) * 70ms);
}
[data-reveal-children].is-visible > * { opacity: 1; transform: none; }

/* ----------  Keyframes  ---------- */
@keyframes spin { to { transform: rotate(360deg); } }

@keyframes bob {
  0%, 100% { transform: translateY(0); opacity: 1; }
  50%      { transform: translateY(9px); opacity: .55; }
}

@keyframes blip {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: .35; transform: scale(.8); }
}

@keyframes sweep { to { transform: rotate(360deg); } }

@keyframes pulsering {
  0%   { box-shadow: 0 0 0 0 rgba(37, 211, 102, .55); }
  70%  { box-shadow: 0 0 0 16px rgba(37, 211, 102, 0); }
  100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

@keyframes float1 {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50%      { transform: translate3d(-38px, 30px, 0) scale(1.08); }
}
@keyframes float2 {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50%      { transform: translate3d(34px, -28px, 0) scale(1.12); }
}
@keyframes float3 {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  33%      { transform: translate3d(26px, 22px, 0) scale(1.06); }
  66%      { transform: translate3d(-22px, 12px, 0) scale(.95); }
}

/* Rotating knurled cap ring in the hero */
@keyframes caproll { to { rotate: 360deg; } }

/* ----------  Custom cursor (pointer-fine devices only)  ---------- */
.cursor-dot, .cursor-ring {
  position: fixed;
  top: 0; left: 0;
  z-index: 3000;
  pointer-events: none;
  border-radius: 50%;
  opacity: 0;
  transition: opacity .3s var(--ease-out);
  will-change: transform;
}
.cursor-dot  { width: 6px;  height: 6px;  background: var(--c-brass); }
.cursor-ring { width: 34px; height: 34px; border: 1px solid rgba(217,185,120,.55);
               transition: opacity .3s var(--ease-out), width .3s var(--ease-out),
                           height .3s var(--ease-out), border-color .3s var(--ease-out); }
.cursor-on .cursor-dot, .cursor-on .cursor-ring { opacity: 1; }
.cursor-ring.is-hot { width: 54px; height: 54px; border-color: var(--c-brand-bright); }

@media (hover: none), (pointer: coarse) {
  .cursor-dot, .cursor-ring { display: none !important; }
}

/* ==========================================================================
   Reduced motion — a hard stop. JS also checks this media query and no-ops
   parallax, pointer tilt, the custom cursor and auto-advancing carousels.
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  html { scroll-behavior: auto; }

  /* Nothing may stay invisible if its reveal transition is disabled */
  [data-reveal],
  [data-reveal-children] > *,
  .reveal-words .w > span {
    opacity: 1 !important;
    transform: none !important;
  }
  .rule, .process::before { transform: scaleX(1) !important; }
  .sticky-scroll__visual img.is-on { opacity: 1 !important; }
  .orb { display: none; }
  .cursor-dot, .cursor-ring { display: none !important; }
}
