/* ============================================================================
 *  POHYB / ANIMACE
 *  Vše je progresivní vylepšení: bez JS nebo při "omezit pohyb" v systému
 *  se nic neskryje a stránka vypadá normálně. Animace se pouští jen když je
 *  na <html> třída .has-motion (nasazuje ji skript v hlavičce + motion.js).
 * ========================================================================== */

/* ---- Odkrývání při scrollu ---- */
.has-motion .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  will-change: opacity, transform;
}

.has-motion .reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Postupné zpoždění sousedních prvků (karty vedle sebe) */
.has-motion .reveal[data-delay="1"] { transition-delay: 0.08s; }
.has-motion .reveal[data-delay="2"] { transition-delay: 0.16s; }
.has-motion .reveal[data-delay="3"] { transition-delay: 0.24s; }
.has-motion .reveal[data-delay="4"] { transition-delay: 0.32s; }
.has-motion .reveal[data-delay="5"] { transition-delay: 0.40s; }

/* ---- Nástup hero sekce po načtení ---- */
.has-motion .c-hero__content > * {
  opacity: 0;
  transform: translateY(20px);
  animation: heroIn 0.7s ease forwards;
}

.has-motion .c-hero__content > *:nth-child(1) { animation-delay: 0.05s; }
.has-motion .c-hero__content > *:nth-child(2) { animation-delay: 0.15s; }
.has-motion .c-hero__content > *:nth-child(3) { animation-delay: 0.25s; }
.has-motion .c-hero__content > *:nth-child(4) { animation-delay: 0.35s; }

@keyframes heroIn {
  to { opacity: 1; transform: none; }
}

/* Zápasový pás pod hero nabíhá jako poslední */
.has-motion .c-matchstrip-wrap {
  opacity: 0;
  transform: translateY(50%) scale(0.98);
  animation: stripIn 0.6s ease 0.5s forwards;
}

@keyframes stripIn {
  to { opacity: 1; transform: translateY(50%) scale(1); }
}

/* ---- Pomalý zoom hero fotky (ken-burns) ---- */
.has-motion .c-hero__media img {
  animation: kenBurns 18s ease-out forwards;
}

@keyframes kenBurns {
  from { transform: scale(1.08); }
  to   { transform: scale(1); }
}

/* ---- 3D náklon karet za myší ---- */
.c-tilt {
  transform: perspective(700px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
  transition: transform 0.15s ease;
  transform-style: preserve-3d;
}

/* Když tažení skončí, karta se plynule vrátí */
.c-tilt.is-resetting {
  transition: transform 0.4s ease;
}

/* ---- Naskakující obrázek v kartě novinky ---- */
.has-motion .c-card-news__image {
  transition: transform 0.4s ease;
}

.has-motion .c-card-news:hover .c-card-news__image {
  transform: scale(1.05);
}
