/* Fade up on scroll */
[data-animate] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
[data-animate].in-view {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
[data-animate] > *:nth-child(1) { transition-delay: 0.05s; }
[data-animate] > *:nth-child(2) { transition-delay: 0.15s; }
[data-animate] > *:nth-child(3) { transition-delay: 0.25s; }
[data-animate] > *:nth-child(4) { transition-delay: 0.35s; }
[data-animate] > *:nth-child(5) { transition-delay: 0.45s; }
[data-animate] > *:nth-child(6) { transition-delay: 0.55s; }

/* Keyframes */
@keyframes ticker {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@keyframes pulse {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50%       { opacity: 1;   transform: scale(1.15); }
}
@keyframes scrollLine {
  from { height: 0; }
  to   { height: 60px; }
}

/* Testimonial fade */
.t-quote,
.t-attr {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.5s ease, transform 0.5s ease;
  display: none;
  pointer-events: none;
}
.t-quote.active,
.t-attr.active {
  opacity: 1;
  transform: translateY(0);
  display: block;
  pointer-events: auto;
}

/* ─── Language switch transition ─────────────────────────────────────────── */
/* Fallback for browsers without View Transitions API (Firefox, older Safari) */
body {
  transition: opacity 0.2s ease;
}
body.lang-switching {
  opacity: 0.25;
  pointer-events: none;
}

/* Modern browsers: tune the native cross-fade crossfade length */
::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 0.35s;
  animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
}

/* Respect users who prefer less motion */
@media (prefers-reduced-motion: reduce) {
  body, body.lang-switching { transition: none; opacity: 1; }
  ::view-transition-old(root),
  ::view-transition-new(root) { animation-duration: 0.01s; }
}
