/* ============================================================
   Centro de Treinamentos EAG — Motion Extras (aditivo)
   - Wipe shine (linha de luz diagonal no hero slide entrante)
   - Typewriter (h1 hero)
   - Stagger sequencial nos cards (números + infra)
   - Cinético na tese (3 linhas em sequência)
   - Modal de zoom na galeria
   - Cases em marquee horizontal infinito
   - Pricing hover luxuoso
   - Localização: parallax no background
   - Footer: ícones sociais
   - Header CTA: pulse sutil
   100% opt-in. Não conflita com style.css/motion.css.
   ============================================================ */


/* ----------------------------------------------------------------
   1) HERO SLIDESHOW — shine diagonal durante o wipe
   Lâmina amarela inclinada cruza o slide entrante, evidenciando o
   corte diagonal já existente no clip-path do .motion-slide.is-active.
   ---------------------------------------------------------------- */
.motion-slide.is-entering::after {
  content: "";
  position: absolute;
  top: -12%;
  left: 0;
  width: 60%;
  height: 124%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 190, 43, 0.0) 30%,
    rgba(255, 190, 43, 0.45) 50%,
    rgba(255, 255, 255, 0.18) 55%,
    rgba(255, 190, 43, 0.0) 70%,
    transparent 100%
  );
  transform: skewX(-12deg) translateX(-110%);
  animation: motion-wipe-shine 1.5s var(--ease-in-out) forwards;
  pointer-events: none;
  mix-blend-mode: screen;
  z-index: 4;
}
@keyframes motion-wipe-shine {
  0%   { transform: skewX(-12deg) translateX(-110%); opacity: 0.0; }
  18%  { opacity: 1.0; }
  82%  { opacity: 1.0; }
  100% { transform: skewX(-12deg) translateX(260%); opacity: 0.0; }
}


/* ----------------------------------------------------------------
   2) TYPEWRITER — h1 do hero (efeito de digitar letra a letra)
   Mantém os spans inline (.trick-light-yellow) e os <br /> intactos.
   Conteúdo textual idêntico bit a bit.
   ---------------------------------------------------------------- */
[data-kinetic="typewriter"] {
  visibility: hidden;
}
[data-kinetic="typewriter"].typewriter--ready {
  visibility: visible;
}
.typewriter-caret {
  display: inline-block;
  width: 4px;
  height: 0.85em;
  margin-left: 0.06em;
  background: var(--eag-yellow);
  color: transparent;
  border-radius: 2px;
  animation: typewriter-blink 0.85s steps(2, jump-none) infinite;
  vertical-align: text-bottom;
  position: relative;
  top: -0.05em;
}
@media (min-width: 768px) {
  .typewriter-caret { width: 5px; }
}
@media (min-width: 1024px) {
  .typewriter-caret { width: 6px; }
}
.typewriter--done .typewriter-caret {
  animation: typewriter-blink 0.85s steps(2, jump-none) 3, typewriter-caret-fade 0.5s 2.5s forwards;
}
@keyframes typewriter-blink {
  0%, 49%   { opacity: 1; }
  50%, 100% { opacity: 0; }
}
@keyframes typewriter-caret-fade {
  to { opacity: 0; visibility: hidden; }
}


/* ----------------------------------------------------------------
   3) STAGGER — cards de Números (img 4) e Infraestrutura (img 7)
   Cada card aparece um após o outro (gradativo). Sem efeito cinético
   nos textos internos — só fade-up sequencial dos cards.
   --reveal-stagger é populado por motion-extras.js.
   ---------------------------------------------------------------- */
.numbers-grid     > .reveal.is-visible,
.infra-grid       > .reveal.is-visible,
.versatility-grid > .reveal.is-visible,
.feature-grid     > .reveal.is-visible,
.format-grid      > .reveal.is-visible,
.pricing-grid     > .reveal.is-visible {
  transition-delay: var(--reveal-stagger, 0ms);
}


/* ----------------------------------------------------------------
   4) TESE — cinético sequencial nas 3 linhas (img 3)
   Mantém o .reveal existente (fade-up) e adiciona stagger ENTRE as
   linhas (sem ele, as 3 dispararim juntas e perdem a cadência).
   ---------------------------------------------------------------- */
.tese .tese__line[data-kinetic]:nth-of-type(2).kinetic--in .word {
  transition-delay: calc(var(--i, 0) * 50ms + 320ms);
}
.tese .tese__line[data-kinetic]:nth-of-type(3).kinetic--in .word {
  transition-delay: calc(var(--i, 0) * 50ms + 640ms);
}


/* ----------------------------------------------------------------
   5) GALERIA — cursor de zoom + modal lightbox
   ---------------------------------------------------------------- */
.gallery__item img[data-parallax] {
  cursor: zoom-in;
}

.zoom-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(2, 16, 23, 0.94);
  backdrop-filter: blur(6px) saturate(1.1);
  -webkit-backdrop-filter: blur(6px) saturate(1.1);
  opacity: 0;
  transition: opacity 0.28s var(--ease-out);
  padding: 16px;
}
@media (min-width: 768px) {
  .zoom-modal { padding: 24px; }
}
.zoom-modal.is-open {
  display: flex;
  opacity: 1;
}
.zoom-modal__inner {
  position: relative;
  max-width: min(96vw, 1600px);
  max-height: 92vh;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: scale(0.96);
  transition: transform 0.32s var(--ease-out);
}
.zoom-modal.is-open .zoom-modal__inner {
  transform: scale(1);
}
.zoom-modal__img {
  max-width: 100%;
  max-height: 92vh;
  width: auto;
  height: auto;
  display: block;
  border-radius: 14px;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.55);
}
.zoom-modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.94);
  color: var(--eag-black);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  transition: background 0.2s var(--ease-out), transform 0.2s var(--ease-out);
}
.zoom-modal__close:hover {
  background: var(--eag-yellow);
  transform: scale(1.08);
}
.zoom-modal__close:focus-visible {
  outline: 2px solid var(--eag-yellow);
  outline-offset: 3px;
}
.zoom-modal__caption {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  padding: 6px 14px;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-radius: 6px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.92);
  letter-spacing: 0.04em;
  text-align: center;
  max-width: 90vw;
}
@media (min-width: 768px) {
  .zoom-modal__caption {
    bottom: -36px;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    padding: 0;
    color: rgba(255, 255, 255, 0.78);
  }
}
body.zoom-locked {
  overflow: hidden;
}
/* Header transparente enquanto o hero está no viewport (1ª tela) */
.site-header.is-hero-top {
  background: rgba(2, 16, 23, 0.32);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom-color: transparent;
}

.zoom-modal__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.92);
  color: var(--eag-black);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  z-index: 2;
  transition: background 0.2s var(--ease-out), transform 0.2s var(--ease-out);
}
.zoom-modal__nav--prev { left: 12px; }
.zoom-modal__nav--next { right: 12px; }
.zoom-modal__nav:hover {
  background: var(--eag-yellow);
  transform: translateY(-50%) scale(1.08);
}
.zoom-modal__nav:focus-visible {
  outline: 2px solid var(--eag-yellow);
  outline-offset: 3px;
}
@media (min-width: 768px) {
  .zoom-modal__nav { width: 56px; height: 56px; }
  .zoom-modal__nav--prev { left: 20px; }
  .zoom-modal__nav--next { right: 20px; }
}


/* ----------------------------------------------------------------
   6) CASES — marquee horizontal infinito (img 10)
   Sobrescreve .cases-grid grid → flex em row com animação translateX.
   Pausa quando passa o mouse.
   ---------------------------------------------------------------- */
.cases-marquee {
  position: relative;
  overflow: hidden;
  margin-left: calc(var(--space-md) * -1);
  margin-right: calc(var(--space-md) * -1);
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
}
.cases-marquee__track {
  display: flex;
  gap: var(--space-md);
  width: max-content;
  animation: cases-marquee-scroll 36s linear infinite;
  will-change: transform;
  padding: 4px var(--space-md); /* margem pro hover não estourar a máscara */
}
.cases-marquee:hover .cases-marquee__track,
.cases-marquee:focus-within .cases-marquee__track,
.cases-marquee.is-touch-paused .cases-marquee__track {
  animation-play-state: paused;
}
.cases-marquee .case-card {
  flex: 0 0 auto;
  width: clamp(220px, 26vw, 280px);
  transition: border-color 0.2s var(--ease-out), transform 0.25s var(--ease-out);
}
.cases-marquee .case-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 190, 43, 0.55);
}
@keyframes cases-marquee-scroll {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(-50%, 0, 0); }
}
@media (max-width: 640px) {
  .cases-marquee__track { animation-duration: 28s; }
}


/* ----------------------------------------------------------------
   7) PRICING — hover luxuoso (img 12) · DESKTOP + TOUCH
   Scale sutil + glow amarelo na borda. Aplica nos 3 cards (Básico /
   Pro featured / Sob Medida).
   Desktop: dispara no :hover. Mobile/tablet: dispara no :active
   (tap-and-hold) — feedback consistente em qualquer dispositivo.
   ---------------------------------------------------------------- */
.price-card {
  transition:
    transform 0.32s var(--ease-out),
    box-shadow 0.32s var(--ease-out),
    border-color 0.32s var(--ease-out);
}
/* Estado "lift" — compartilhado entre hover (desktop) e active (touch) */
@media (hover: hover) and (min-width: 1024px) {
  .price-card:hover {
    transform: translateY(-6px) scale(1.015);
    border-color: rgba(255, 190, 43, 0.85);
    box-shadow:
      0 24px 60px rgba(2, 16, 23, 0.18),
      0 0 0 1px rgba(255, 190, 43, 0.55),
      0 0 30px rgba(255, 190, 43, 0.22);
  }
  .price-card--featured:hover {
    transform: scale(1.03) translateY(-6px);
    border-color: var(--eag-yellow);
    box-shadow:
      0 28px 70px rgba(255, 190, 43, 0.32),
      0 0 0 1px rgba(255, 190, 43, 0.85),
      0 0 40px rgba(255, 190, 43, 0.35);
  }
}
/* Touch: feedback ao tocar e segurar */
.price-card:active {
  transform: translateY(-3px) scale(1.01);
  border-color: rgba(255, 190, 43, 0.85);
  box-shadow:
    0 16px 40px rgba(2, 16, 23, 0.15),
    0 0 0 1px rgba(255, 190, 43, 0.55),
    0 0 24px rgba(255, 190, 43, 0.22);
}
.price-card--featured:active {
  transform: scale(1.04) translateY(-3px);
  border-color: var(--eag-yellow);
  box-shadow:
    0 20px 50px rgba(255, 190, 43, 0.3),
    0 0 0 1px rgba(255, 190, 43, 0.85),
    0 0 30px rgba(255, 190, 43, 0.32);
}


/* ----------------------------------------------------------------
   8) LOCATION — parallax + camada visível no background (img 13)
   O .location__bg já existia com filter+opacity. Aqui adicionamos o
   parallax (variável atualizada por motion.js) e damos um pouco mais
   de presença à imagem (Square SC se enxerga sutilmente atrás).
   ---------------------------------------------------------------- */
.location {
  /* Mais espaço pro background respirar com o parallax */
}
.location__bg {
  inset: -15% 0 !important;
  opacity: 0.55 !important;
  transform: translate3d(0, var(--location-parallax-y, 0px), 0) scale(1.18);
  will-change: transform;
  transition: transform 0.4s linear;
}


/* ----------------------------------------------------------------
   9) FOOTER — ícones sociais minimalistas (img 15)
   ---------------------------------------------------------------- */
.site-footer__social {
  display: flex;
  gap: 12px;
  margin-top: var(--space-md);
}
.site-footer__social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;        /* tap target mínimo recomendado (WCAG) */
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: transparent;
  color: rgba(255, 255, 255, 0.78);
  transition:
    border-color 0.2s var(--ease-out),
    background 0.2s var(--ease-out),
    color 0.2s var(--ease-out),
    transform 0.2s var(--ease-out);
}
.site-footer__social a:hover {
  color: var(--eag-black);
  background: var(--eag-yellow);
  border-color: var(--eag-yellow);
  transform: translateY(-2px);
}
.site-footer__social svg {
  width: 18px;
  height: 18px;
}


/* ----------------------------------------------------------------
   10) HEADER CTA — pulse sutil de tonalidade (img 16)
   Aplica APENAS no .site-header__cta para não poluir os outros CTAs.
   Pisca a tonalidade do amarelo entre dois tons muito próximos.
   ---------------------------------------------------------------- */
.site-header__cta {
  animation: cta-soft-pulse 2.6s ease-in-out infinite;
  will-change: background-color, box-shadow;
}
.site-header__cta:hover {
  animation-play-state: paused;
}
/* Mobile: pulse não é exibido (o CTA do header está display:none em <1024px),
   mas explicitamente desabilitamos a animação pra zero CPU/GPU em background. */
@media (max-width: 1023px) {
  .site-header__cta { animation: none; }
}
@keyframes cta-soft-pulse {
  0%, 100% {
    background-color: var(--eag-yellow);
    box-shadow: 0 0 0 0 rgba(255, 190, 43, 0.0);
  }
  50% {
    background-color: #FFD05E;
    box-shadow: 0 0 0 6px rgba(255, 190, 43, 0.18);
  }
}


/* Nota intencional: removidos overrides de prefers-reduced-motion.
   A LP é institucional e os efeitos fazem parte da comunicação visual. */
