/* ==========================================================================
   CRETIFY — animations & micro-interactions
   Transform / opacity only. Reduced-motion respected at the bottom.
   ========================================================================== */

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: none; }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideRight {
  from { opacity: 0; transform: translateX(-26px); }
  to { opacity: 1; transform: none; }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: none; }
}

@keyframes navItemIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

@keyframes drift {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  50%  { transform: translate3d(38px, -30px, 0) scale(1.08); }
  100% { transform: translate3d(0, 0, 0) scale(1); }
}

@keyframes driftAlt {
  0%   { transform: translate3d(0, 0, 0) scale(1.05); }
  50%  { transform: translate3d(-32px, 26px, 0) scale(1); }
  100% { transform: translate3d(0, 0, 0) scale(1.05); }
}

@keyframes revealMask {
  from { clip-path: inset(0 100% 0 0); }
  to { clip-path: inset(0 0 0 0); }
}

/* Ambient orbs ------------------------------------------------------------ */
.ambient__orb--a { animation: drift 26s ease-in-out infinite; }
.ambient__orb--b { animation: driftAlt 32s ease-in-out infinite; }
.ambient__orb--c { animation: drift 38s ease-in-out infinite reverse; }

/* Scroll reveal ----------------------------------------------------------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.75s var(--ease), transform 0.75s var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: transform, opacity;
}
[data-reveal="left"] { transform: translateX(-26px); }
[data-reveal="scale"] { transform: scale(0.97); }
[data-reveal].is-visible { opacity: 1; transform: none; }

/* Image / block reveal ---------------------------------------------------- */
[data-reveal-mask] { clip-path: inset(0 100% 0 0); }
[data-reveal-mask].is-visible { animation: revealMask 0.9s var(--ease) forwards; }

/* Hero entrance ----------------------------------------------------------- */
.hero__content > * { animation: fadeUp 0.85s var(--ease) both; }
.hero__content > *:nth-child(1) { animation-delay: 0.1s; }
.hero__content > *:nth-child(2) { animation-delay: 0.2s; }
.hero__content > *:nth-child(3) { animation-delay: 0.3s; }
.hero__content > *:nth-child(4) { animation-delay: 0.4s; }
.hero__content > *:nth-child(5) { animation-delay: 0.5s; }
.hero__visual { animation: scaleIn 1s var(--ease) 0.25s both; }

/* Mobile nav item stagger -------------------------------------------------- */
.mobile-nav__links a:nth-child(1) { animation-delay: 0.08s; }
.mobile-nav__links a:nth-child(2) { animation-delay: 0.14s; }
.mobile-nav__links a:nth-child(3) { animation-delay: 0.2s; }
.mobile-nav__links a:nth-child(4) { animation-delay: 0.26s; }
.mobile-nav__links a:nth-child(5) { animation-delay: 0.32s; }
.mobile-nav__links a:nth-child(6) { animation-delay: 0.38s; }

/* Button sheen ------------------------------------------------------------ */
.btn--primary::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 -60%;
  width: 45%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.42), transparent);
  transform: skewX(-18deg);
  transition: transform 0.7s var(--ease);
}
.btn--primary:hover::before { transform: translateX(340%) skewX(-18deg); }

/* Reduced motion ---------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  [data-reveal],
  [data-reveal-mask] { opacity: 1 !important; transform: none !important; clip-path: none !important; }
}
