/* ==========================================================================
   ANIMATION LAYER — reveal utilities, keyframes, motion states
   Driven primarily by GSAP (js/animations.js) which toggles the classes
   below; this file defines the CSS side of every transition so that a
   no-JS or reduced-motion visitor still gets a correct, legible layout.
   ========================================================================== */

/* Base reveal primitive: hidden-until-animated, but NEVER hidden content
   for users/engines without JS — the .js-ready gate on <html> controls this. */
html:not(.js-ready) [data-reveal],
html:not(.js-ready) [data-reveal-group] > *{
  opacity: 1 !important;
  transform: none !important;
}

html.js-ready [data-reveal]{
  opacity: 0;
  transform: translateY(32px);
  will-change: transform, opacity;
}
html.js-ready [data-reveal].is-in{
  opacity: 1;
  transform: translateY(0);
  transition: opacity 1s var(--ease-out), transform 1s var(--ease-out);
}

html.js-ready [data-reveal="fade"]{ transform: none; }
html.js-ready [data-reveal="left"]{ transform: translateX(-40px); }
html.js-ready [data-reveal="left"].is-in{ transform: translateX(0); }
html.js-ready [data-reveal="right"]{ transform: translateX(40px); }
html.js-ready [data-reveal="right"].is-in{ transform: translateX(0); }
html.js-ready [data-reveal="scale"]{ transform: scale(.94); }
html.js-ready [data-reveal="scale"].is-in{ transform: scale(1); }

html.js-ready [data-reveal-group] > *{
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .8s var(--ease-out), transform .8s var(--ease-out);
}
html.js-ready [data-reveal-group].is-in > *{ opacity: 1; transform: translateY(0); }
html.js-ready [data-reveal-group].is-in > *:nth-child(1){ transition-delay: .03s; }
html.js-ready [data-reveal-group].is-in > *:nth-child(2){ transition-delay: .11s; }
html.js-ready [data-reveal-group].is-in > *:nth-child(3){ transition-delay: .19s; }
html.js-ready [data-reveal-group].is-in > *:nth-child(4){ transition-delay: .27s; }
html.js-ready [data-reveal-group].is-in > *:nth-child(5){ transition-delay: .35s; }
html.js-ready [data-reveal-group].is-in > *:nth-child(6){ transition-delay: .43s; }

/* Split-text lines (hero + headings) */
.split-line{ overflow: hidden; display:block; }
.split-line__inner{
  display:block;
  transform: translateY(100%);
}
html.js-ready .split-line__inner{ transform: translateY(110%); }
html.js-ready .is-in .split-line__inner{
  transform: translateY(0);
  transition: transform 1.05s var(--ease-out);
}

/* Clip-path image reveal */
html.js-ready [data-clip-reveal]{
  clip-path: inset(0 0 100% 0);
  transition: clip-path 1.1s var(--ease-out);
}
html.js-ready [data-clip-reveal].is-in{ clip-path: inset(0 0 0% 0); }

/* Loader fade for hero content */
.hero__content, .page-hero__content{ opacity: 0; }
html.js-ready .hero__content.is-in, html.js-ready .page-hero__content.is-in{
  opacity: 1;
  transition: opacity 1s var(--ease-out) .2s;
}
html:not(.js-ready) .hero__content, html:not(.js-ready) .page-hero__content{ opacity: 1; }

/* Magnetic / tilt interactive states */
[data-magnetic]{ transition: transform .35s var(--ease-out); }
[data-tilt]{ transform-style: preserve-3d; transition: transform .4s var(--ease-out); }

/* Marquee pause on hover for readability */
.marquee:hover .marquee__track{ animation-play-state: paused; }

/* Number count-up targets avoid layout shift */
[data-count]{ font-variant-numeric: tabular-nums; }

/* ---------- Reduced motion: disable everything non-essential ---------- */
@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;
  }
  html.js-ready [data-reveal],
  html.js-ready [data-reveal-group] > *,
  html.js-ready .split-line__inner,
  html.js-ready [data-clip-reveal],
  .hero__content, .page-hero__content{
    opacity: 1 !important;
    transform: none !important;
    clip-path: none !important;
  }
  .marquee__track{ animation: none !important; }
  .loader__bar::after{ animation: none !important; }
  .hero__scroll-line::after{ animation: none !important; }
  [data-magnetic], [data-tilt]{ transform: none !important; }
}
