/* ==========================================================================
   MUNIQUE PERFORMANCE – Animations-Variante
   Ergänzt style.css. Alles respektiert "Bewegung reduzieren" im Betriebssystem.
   ========================================================================== */

:root {
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-io: cubic-bezier(.65, 0, .35, 1);
}

/* 1 · Scroll-Fortschritt oben ------------------------------------------- */
.progress {
  position: fixed; inset: 0 0 auto; z-index: 101; height: 3px;
  background: var(--c-orange);
  transform-origin: 0 50%; transform: scaleX(var(--p, 0));
  pointer-events: none;
}
.progress--yellow { background: var(--c-yellow); }

/* 2 · Navigation: verschwindet beim Runterscrollen, kommt beim Hochscrollen */
.nav { transition: transform .5s var(--ease-out); }
.nav.is-hidden:not(.is-open) { transform: translateY(-110%); }

/* 3 · Hero-Intro: Video zoomt langsam aus, Headline Wort für Wort ---------- */
.hero__media { overflow: hidden; }
.hero__media video { animation: heroZoom 14s var(--ease-out) both; }
@keyframes heroZoom { from { transform: scale(1.14); } to { transform: scale(1); } }

.hero__title .w { display: inline-block; overflow: clip; vertical-align: top; padding-bottom: .04em; margin-bottom: -.04em; }
.hero__title .w > span { display: inline-block; animation: wordUp 1.1s var(--ease-out) both; animation-delay: calc(.25s + var(--i) * .09s); }
@keyframes wordUp { from { transform: translateY(105%); } to { transform: none; } }

.hero .t-2xl { animation: fadeUp .9s var(--ease-out) .15s both; }
.hero__row > * { animation: fadeUp .9s var(--ease-out) both; }
.hero__row > :first-child { animation-delay: .75s; }
.hero__row > :last-child { animation-delay: .9s; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
/* Hero-Elemente nicht doppelt über data-reveal animieren */
.js .hero [data-reveal] { opacity: 1; transform: none; transition: none; }

/* 4 · Überschriften: Masken-Reveal von unten ------------------------------ */
.js h2[data-reveal] { opacity: 1; transform: none; overflow: clip; padding-block: .15em; margin-block: -.15em; } /* Platz für Ä/Ü-Punkte */
.js h2[data-reveal] > .rv { display: block; transform: translateY(105%); transition: transform 1.1s var(--ease-out); transition-delay: var(--d, 0s); }
.js h2[data-reveal].is-visible > .rv { transform: none; }
.js .timeline > h2[data-reveal] { margin-bottom: var(--tl-head-gap, 4.5rem); }

/* Gestaffelte Einblendungen (Verzögerung setzt motion.js) */
.js [data-reveal] { transition-delay: var(--d, 0s); transition-duration: .9s; }

/* 5 · Leistungen-Timeline: Linie füllt sich beim Scrollen ---------------- */
.timeline__track {
  position: absolute; z-index: 1; left: calc(1.25rem - 1px); width: 2px;
  top: var(--track-top, 0); height: var(--track-h, 0);
  background: rgba(255, 255, 255, .08); pointer-events: none;
}
.timeline__fill { position: absolute; inset: 0; background: var(--c-orange); transform-origin: 50% 0; transform: scaleY(var(--fill, 0)); }
.timeline .num { transition: transform .7s var(--ease-out) .1s, opacity .4s .1s, box-shadow .5s var(--ease-out); }
/* Punkte erscheinen wie die Kacheln: Nummer springt auf, Titel und Liste gleiten nacheinander ein */
.js .timeline__item[data-reveal] .num { transform: scale(.3); opacity: 0; }
.js .timeline__item[data-reveal].is-visible .num { transform: none; opacity: 1; }
.js .timeline__item[data-reveal] .timeline__body > * { opacity: 0; transform: translateY(14px); transition: opacity .7s ease .2s, transform .8s var(--ease-out) .2s; }
.js .timeline__item[data-reveal] .timeline__body > * + * { transition-delay: .32s; }
.js .timeline__item[data-reveal].is-visible .timeline__body > * { opacity: 1; transform: none; }
.timeline__item.is-current .num { box-shadow: 0 0 0 6px rgba(221, 70, 0, .22); }

/* 6 · Zahlen zählen hoch -------------------------------------------------- */
.count { font-variant-numeric: tabular-nums; }

/* 7 · Video-Band: öffnet sich beim Reinscrollen --------------------------- */
.feature { clip-path: inset(var(--clip-y, 0%) var(--clip-x, 0%) round var(--clip-r, 0px)); will-change: clip-path; }
.feature video { transform: scale(var(--feat-scale, 1)); }

/* 8 · Bilder: Parallaxe --------------------------------------------------- */
.photo { overflow: hidden; }
.photo img { transform: translate3d(0, var(--py, 0px), 0) scale(1.18); will-change: transform; }

/* 9 · Karten: Akzentlinie + Hover ---------------------------------------- */
.card { position: relative; }
.card::before {
  content: ""; position: absolute; left: 0; top: -1px; width: 100%; height: 1px;
  background: rgba(255, 255, 255, .14); transform-origin: 0 50%;
}
.js .card[data-reveal] { border-top-color: transparent; } /* Linie zeichnet ::before */
.js .card[data-reveal].is-visible::before { animation: lineIn 1s var(--ease-out) both; animation-delay: var(--d, 0s); }
@keyframes lineIn { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.card__title, .card__text { transition: transform .5s var(--ease-out), color .3s; }
.card:hover .card__title { color: var(--c-white); transform: translateX(6px); }
.card:hover .card__text { transform: translateX(6px); }

/* 10 · Team: Bild-Zoom und Farbfläche beim Hover --------------------------- */
.team-card .media { position: relative; overflow: hidden; width: 100%; }
.team-card .media img { transition: transform 1.1s var(--ease-out), filter .6s; filter: grayscale(.35); }
.team-card .media::after {
  content: ""; position: absolute; inset: auto 0 0; height: 4px; background: var(--c-orange);
  transform: scaleX(0); transform-origin: 0 50%; transition: transform .6s var(--ease-out);
}
.team-card:hover .media img { transform: scale(1.05); filter: none; }
.team-card:hover .media::after { transform: scaleX(1); }

/* 11 · Buttons: Farbwischer von links ----------------------------------- */
.btn { position: relative; isolation: isolate; overflow: hidden; transition: color .45s var(--ease-out); }
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1; background: var(--wipe, var(--c-orange));
  transform: scaleX(0); transform-origin: 100% 50%; transition: transform .55s var(--ease-out);
}
.btn:hover::before, .btn:focus-visible::before { transform: scaleX(1); transform-origin: 0 50%; }
.btn:hover { background: var(--c-white); color: var(--c-white); }
.btn--orange, .btn--yellow { --wipe: var(--c-white); }
.btn--orange:hover { background: var(--c-orange); color: var(--c-orange); }
.btn--yellow:hover { background: var(--c-yellow); color: var(--c-yellow); }
.btn--on-orange { --wipe: var(--c-black); }
.btn--on-orange:hover { background: var(--c-white); color: var(--c-white); }

/* 12 · Laufband vor dem Call to Action ----------------------------------- */
.marquee {
  overflow: hidden; border-block: 1px solid rgba(255, 255, 255, .12);
  padding-block: .7rem; margin-bottom: 0;
}
.marquee__track { display: flex; width: max-content; animation: marquee 28s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__item {
  display: flex; align-items: center; gap: 1.75rem; padding-right: 1.75rem;
  font-family: var(--f-head); font-size: clamp(1.75rem, 3.2vw, 3rem); line-height: 1; text-transform: uppercase; white-space: nowrap;
}
.marquee__item i { display: block; width: .35em; height: .35em; background: var(--accent-m, var(--c-orange)); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* CTA: Bild driftet langsam */
.cta { background-size: auto, max(115%, 82rem) auto; animation: ctaDrift 18s ease-in-out infinite alternate; }
@keyframes ctaDrift { from { background-position: 0 0, 100% 40%; } to { background-position: 0 0, 80% 60%; } }

/* Responsive -------------------------------------------------------------- */
@media (max-width: 991px) {
  .marquee__track { animation-duration: 22s; }
  .cta { animation: none; background-size: auto, cover; }
}
@media (max-width: 767px) {
  .photo img { transform: none; }                 /* keine Parallaxe auf dem Handy */
  .feature { clip-path: none; }
}
@media (max-width: 479px) {
  /* Nummern sind mobil ausgeblendet: Fortschrittslinie läuft links am Rand */
  .timeline__item { padding-left: 1.25rem; }
  .timeline__track { left: 0; }
  .cta { background-size: auto, 400% auto; animation: none; }
  .marquee { padding-block: .55rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js h2[data-reveal] > .rv { transform: none; }
  .photo img { transform: none; }
  .feature { clip-path: none; }
  .nav.is-hidden { transform: none; }
  .js .timeline__item[data-reveal] .num, .js .timeline__item[data-reveal] .timeline__body > * { opacity: 1; transform: none; }
  .marquee__track { transform: none; }
}

/* 13 · Hero-Intro der Startseite (angelehnt an palantir.com):
   „WE HELP. YOU HEAL./TRAIN./RECOVER./WIN." groß in der Mitte, dann erscheint
   „MUNIQUE Performance" und beides gleitet an seine Position unten im Hero. */
.hero--intro .hero__claim, .hero--intro .hero__title { display: table; transform-origin: 0 0; will-change: transform; }
.rot { display: inline-block; overflow: clip; vertical-align: bottom; padding-bottom: .08em; margin-bottom: -.08em; }
.rot__w { display: inline-block; transition: transform .3s var(--ease-out), opacity .2s; }
.rot__w.is-out { transform: translateY(-105%); opacity: 0; }
.rot__w.is-in { transform: translateY(105%); opacity: 0; transition: none; }
.hero.is-intro:not(.is-intro-title) .hero__title .w > span { animation: none; transform: translateY(105%); }
.hero.is-intro .hero__row > * { animation: none; opacity: 0; }
.hero.is-intro .hero__gradient { opacity: .6; transition: opacity 1.2s; }
/* Der Claim darf keine transform-Animation haben, sonst überschreibt sie die Intro-Position */
.hero--intro .hero__claim { animation: claimIn .8s ease .1s both; }
@keyframes claimIn { from { opacity: 0; } to { opacity: 1; } }
