/* GORGON · Financial Control — animaciones institucionales (CSS puro, sin JavaScript)
   .gx-loader  → indicador de carga en ciclo de 3 s (todos los procesos)
   .gx-intro   → animación de inicio de 3 s (se reproduce una vez)
   Emblema: marca/gorgon-emblema-512.webp (extraído del logo oficial). */

:root { --gx-marino: #1B3A6B; --gx-profundo: #0F2346; --gx-verde: #2E9E5B; --gx-claro: #5CC98A; --gx-luz: #B9F5D2; }

/* ── Piezas comunes del emblema ── */
.gx-emb { position: absolute; border-radius: 50%; overflow: hidden; }
.gx-emb > img { width: 100%; height: 100%; display: block; }
.gx-ojo { position: absolute; top: 54.5%; width: 9.5%; height: 4.6%; border-radius: 50%; transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, var(--gx-luz), var(--gx-claro) 45%, rgba(46,158,91,0) 100%);
  mix-blend-mode: screen; opacity: 0; filter: blur(.4px); }
.gx-ojo.i { left: 40.6%; } .gx-ojo.d { left: 59.4%; }
.gx-brillo { position: absolute; inset: 0; background: linear-gradient(115deg, transparent 38%, rgba(255,255,255,.32) 50%, transparent 62%); transform: translateX(-130%); }

/* ── LOADER (ciclo perfecto de 3 s) ── */
.gx-loader { position: relative; width: var(--gx-tam, 132px); aspect-ratio: 1; flex: none; }
.gx-loader .gx-emb { inset: 10%; box-shadow: 0 4px 18px rgba(15,35,70,.28); animation: gx-respira 3s ease-in-out infinite; }
.gx-loader .gx-pista, .gx-loader .gx-arcos { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.gx-loader .gx-pista circle { fill: none; stroke: var(--gx-marino); stroke-opacity: .18; stroke-width: 2.2; }
.gx-loader .gx-arcos { animation: gx-gira 3s linear infinite; }
.gx-loader .gx-arcos circle { fill: none; stroke: var(--gx-verde); stroke-width: 3.2; stroke-linecap: round; stroke-dasharray: 46 101.65; }
.gx-loader .gx-arcos circle + circle { stroke: var(--gx-marino); stroke-width: 2.2; stroke-dasharray: 18 129.65; stroke-dashoffset: -60; }
.gx-loader .gx-ojo { animation: gx-mirada 3s ease-in-out infinite; }
.gx-loader .gx-brillo { animation: gx-barrido 3s cubic-bezier(.5,0,.3,1) infinite; }
.gx-oscuro .gx-loader .gx-pista circle, .gx-loader.gx-neg .gx-pista circle { stroke: #fff; stroke-opacity: .16; }
.gx-oscuro .gx-loader .gx-arcos circle + circle, .gx-loader.gx-neg .gx-arcos circle + circle { stroke: #fff; }
.gx-oscuro .gx-loader .gx-arcos circle:first-child, .gx-loader.gx-neg .gx-arcos circle:first-child { stroke: var(--gx-claro); }

@keyframes gx-gira { to { transform: rotate(720deg); } }
@keyframes gx-respira { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.03); } }
@keyframes gx-mirada { 0%, 38%, 72%, 100% { opacity: 0; } 50% { opacity: 1; } 58% { opacity: .85; } }
@keyframes gx-barrido { 0%, 52% { transform: translateX(-130%); } 88%, 100% { transform: translateX(130%); } }

/* ── INTRO DE 3 s ── */
.gx-intro { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; cursor: pointer;
  background: radial-gradient(circle at 50% 42%, #24497f 0%, var(--gx-marino) 38%, var(--gx-profundo) 100%);
  animation: gx-salir .45s 3s ease-in forwards; }
.gx-intro.fijo { animation: none; }
.gx-escena { position: relative; width: min(64vmin, 400px); aspect-ratio: 1 / 1.32; }
.gx-escena .gx-centro { position: absolute; left: 0; right: 0; top: 0; aspect-ratio: 1; }
.gx-rayos { position: absolute; inset: -22%; border-radius: 50%; opacity: 0;
  background: repeating-conic-gradient(from 0deg, rgba(92,201,138,.0) 0deg 5deg, rgba(92,201,138,.55) 5deg 5.6deg, rgba(92,201,138,0) 5.6deg 12deg);
  -webkit-mask: radial-gradient(circle, transparent 34%, #000 46%, transparent 70%); mask: radial-gradient(circle, transparent 34%, #000 46%, transparent 70%);
  animation: gx-rayos 2.4s .7s ease-out forwards; }
.gx-anillo { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; transform: rotate(-90deg); }
.gx-anillo circle { fill: none; stroke: var(--gx-claro); stroke-width: 1.6; stroke-linecap: round; stroke-dasharray: 308; stroke-dashoffset: 308;
  animation: gx-trazar .8s .05s cubic-bezier(.65,0,.35,1) forwards, gx-desvanecer .3s 1.05s forwards; }
.gx-intro .gx-emb { inset: 2%; opacity: 0; clip-path: circle(0% at 50% 50%); filter: brightness(.35) saturate(.6);
  animation: gx-abrir .95s .45s cubic-bezier(.2,.75,.25,1) forwards; box-shadow: 0 12px 50px rgba(0,0,0,.45); }
.gx-intro .gx-ojo { animation: gx-destello .9s 1.55s ease-in-out forwards; }
.gx-intro .gx-brillo { animation: gx-barrido-1 .8s 1.95s cubic-bezier(.5,0,.3,1) forwards; }
.gx-onda { position: absolute; inset: 2%; border-radius: 50%; border: 2px solid var(--gx-claro); opacity: 0;
  animation: gx-onda .9s 1.7s ease-out forwards; }
.gx-onda.dos { animation-delay: 1.85s; border-width: 1px; }
.gx-nom { position: absolute; left: 14%; right: 14%; bottom: 0; width: 72%; opacity: 0; transform: translateY(16px); animation: gx-subir .6s 2.15s cubic-bezier(.2,.8,.2,1) forwards; }
.gx-saltar { position: fixed; right: 16px; bottom: 14px; color: rgba(255,255,255,.55); font: 12px/1 Inter, system-ui, sans-serif; letter-spacing: .08em; }

@keyframes gx-trazar { to { stroke-dashoffset: 0; } }
@keyframes gx-desvanecer { to { opacity: 0; } }
@keyframes gx-abrir { 0% { opacity: 1; clip-path: circle(0% at 50% 50%); transform: scale(1.12); filter: brightness(.35) saturate(.6); }
  70% { filter: brightness(1.08) saturate(1.05); } 100% { opacity: 1; clip-path: circle(50% at 50% 50%); transform: scale(1); filter: none; } }
@keyframes gx-rayos { 0% { opacity: 0; transform: rotate(-20deg) scale(.85); } 35% { opacity: .9; } 100% { opacity: 0; transform: rotate(25deg) scale(1.08); } }
@keyframes gx-destello { 0% { opacity: 0; } 35% { opacity: 1; transform: translate(-50%, -50%) scale(1.25); } 100% { opacity: .55; transform: translate(-50%, -50%) scale(1); } }
@keyframes gx-onda { 0% { opacity: .9; transform: scale(1); } 100% { opacity: 0; transform: scale(1.55); } }
@keyframes gx-barrido-1 { from { transform: translateX(-130%); } to { transform: translateX(130%); } }
@keyframes gx-subir { to { opacity: 1; transform: none; } }
@keyframes gx-salir { to { opacity: 0; visibility: hidden; } }

@media (prefers-reduced-motion: reduce) {
  .gx-loader *, .gx-intro, .gx-intro * { animation-duration: .01s !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; }
  .gx-loader .gx-arcos { animation: gx-gira 3s linear infinite !important; }
}
