/* ==========================================================================
   RESMA — motion layer.  Everything here is switched off for visitors who
   prefer reduced motion (see the media query at the bottom).
   ========================================================================== */

@keyframes ticker {
  to { transform: translateX(-50%); }
}
@keyframes panelIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
@keyframes riseIn {
  from { opacity: 0; transform: translateY(32px); }
  to { opacity: 1; transform: none; }
}
@keyframes clipIn {
  from { clip-path: polygon(0 100%, 0 100%, 0 100%, 0 100%, 0 100%); }
}
@keyframes drawLine {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

/* Scroll reveal — only hidden when JS is running (html.js) */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
  transition-delay: var(--d, 0s);
}
.js [data-reveal="fade"] { transform: none; }
.js [data-reveal="left"] { transform: translateX(-36px); }
.js [data-reveal="right"] { transform: translateX(36px); }
.js [data-reveal].is-in {
  opacity: 1;
  transform: none;
}
/* staggered children */
.js [data-stagger] > * {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
  transition-delay: calc(var(--i, 0) * 70ms);
}
.js [data-stagger].is-in > * {
  opacity: 1;
  transform: none;
}

/* Hero entrance (CSS only so it works before main.js loads) */
.hero__copy > *,
.page-hero .container > * {
  animation: riseIn 1s var(--ease) both;
}
.hero__copy > :nth-child(1), .page-hero .container > :nth-child(1) { animation-delay: 0.05s; }
.hero__copy > :nth-child(2), .page-hero .container > :nth-child(2) { animation-delay: 0.15s; }
.hero__copy > :nth-child(3), .page-hero .container > :nth-child(3) { animation-delay: 0.3s; }
.hero__copy > :nth-child(4), .page-hero .container > :nth-child(4) { animation-delay: 0.42s; }
.hero__copy > :nth-child(5) { animation-delay: 0.54s; }
.hero__frame { animation: clipIn 1.3s var(--ease) 0.2s both; }
.hero__outline { animation: riseIn 1.4s var(--ease) 0.5s both; }
.hero__tag, .hero__media .shape-tri { animation: riseIn 1s var(--ease) 0.9s both; }

/* gentle parallax target (transform set by JS) */
[data-parallax] { will-change: transform; }

@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;
  }
  .ticker__track { animation: none; flex-wrap: wrap; width: auto; }
  .ticker__group[aria-hidden="true"] { display: none; }
  .js [data-reveal],
  .js [data-stagger] > * { opacity: 1; transform: none; }
}
