/* Capa de movimiento - Fundación Grupo Andrade (se carga después de site.css) */

/* Transición suave entre páginas (navegadores con View Transitions) */
@view-transition { navigation: auto; }
.hdr { view-transition-name: fga-hdr; }
::view-transition-old(root) { animation: fga-page-out .28s cubic-bezier(.4, 0, 1, 1) both; }
::view-transition-new(root) { animation: fga-page-in .5s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes fga-page-out { to { opacity: 0; transform: translateY(-12px); } }
@keyframes fga-page-in { from { opacity: 0; transform: translateY(18px); } }

/* Barra de progreso de lectura */
.fga-progress { position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 60; pointer-events: none;
  background: linear-gradient(90deg, var(--yellow, #FFD200), #ffe766); transform-origin: 0 50%; transform: scaleX(0); }

/* Títulos que entran palabra por palabra */
.fga-words .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .08em; margin-bottom: -.08em; }
.fga-words .w > span { display: inline-block; transform: translateY(105%); }
.fga-words.go .w > span { animation: fga-word .9s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i) * 55ms + 80ms); }
@keyframes fga-word { to { transform: none; } }

/* Texto y botones del hero / encabezados de página */
.fga-up { opacity: 0; transform: translateY(22px); }
.fga-up.go { animation: fga-up .8s cubic-bezier(.2, .7, .2, 1) both; animation-delay: var(--d, 0ms); }
@keyframes fga-up { to { opacity: 1; transform: none; } }

/* Foto del hero: se descubre con una cortina y se asienta */
.hs-slide.is-active .hs-fig .ph { animation: fga-curtain 1.1s cubic-bezier(.7, 0, .2, 1) both .15s; }
.hs-slide.is-active .hs-fig .ph img { animation: fga-settle 1.6s cubic-bezier(.2, .7, .2, 1) both .15s; }
@keyframes fga-curtain { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes fga-settle { from { transform: scale(1.18); } to { transform: none; } }

/* Estrellas: aparecen girando y luego flotan */
.hs-slide.is-active .sticker { animation: fga-pop .9s cubic-bezier(.3, 1.6, .5, 1) both .7s, fga-float 5s ease-in-out 1.6s infinite; }
@keyframes fga-pop { from { opacity: 0; scale: 0; rotate: -140deg; } }
@keyframes fga-float { 50% { translate: 0 -10px; rotate: 8deg; } }
.st .star { transition: transform .8s cubic-bezier(.3, 1.6, .5, 1); }
.st .star { transition: scale .8s cubic-bezier(.3,1.6,.5,1), rotate .8s cubic-bezier(.3,1.6,.5,1); }
.head.rv:not(.in) .st .star, .rv:not(.in) > .st .star { scale: 0; rotate: -180deg; }

/* Isotipos decorativos con paralaje */
.fga-par { will-change: transform; transform: translate3d(0, var(--py, 0px), 0) rotate(var(--pr, 0deg)); }

/* Fotos de tarjetas: zoom suave al pasar el mouse */
.post .cover img, .feat .cover img, .prod .cover img, .ph img { transition: transform .9s cubic-bezier(.2, .7, .2, 1); }
.post:hover .cover img, .feat:hover .cover img, .prod:hover .cover img { transform: scale(1.06); }
.post, .feat, .way, .prod { transition: transform .35s cubic-bezier(.2, .7, .2, 1), box-shadow .35s ease; }
@media (hover: hover) {
  .post:hover, .way:hover, .prod:hover { transform: translateY(-6px); box-shadow: 0 18px 40px -18px rgba(18, 27, 63, .35); }
}

/* Botones: brillo que cruza y efecto magnético */
.btn { position: relative; overflow: hidden; isolation: isolate; }
.btn::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .45) 50%, transparent 70%);
  transform: translateX(-120%); }
.btn:hover::after { transition: transform .7s ease; transform: translateX(120%); }
.btn.fga-mag { transition: transform .25s cubic-bezier(.2, .7, .2, 1), background-color .15s ease; }

/* Bandas de color: el fondo entra con una ola suave */
.band.rv-band { clip-path: inset(6% 3% 6% 3% round 32px); transition: clip-path 1.1s cubic-bezier(.2, .7, .2, 1); }
.band.rv-band.in { clip-path: inset(0 0 0 0 round 0); }

/* Header: se esconde al bajar y vuelve al subir */
.hdr { transition: transform .45s cubic-bezier(.2, .7, .2, 1), box-shadow .3s ease; }
.hdr.fga-hide { transform: translateY(-100%); }

/* Respeta a quien pide menos movimiento */
@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  .fga-words .w > span, .fga-up { transform: none !important; opacity: 1 !important; animation: none !important; }
  .hs-slide.is-active .hs-fig .ph, .hs-slide.is-active .hs-fig .ph img, .hs-slide.is-active .sticker { animation: none !important; }
  .fga-par { transform: none !important; }
  .band.rv-band { clip-path: none; }
  .hdr.fga-hide { transform: none; }
  .fga-progress { display: none; }
}

/* Widgets FGA: sección que continúa la anterior (mismo fondo, menos espacio) */
.sec.sec-join { padding-top: 0; margin-top: calc(clamp(56px, 7vw, 96px) - clamp(64px, 9vw, 124px)); }
.note.is-error { color: #b42318; }
