/* =============================================================================
   effects.css — Efectos visuales: neón, glow, glass, bordes luminosos,
   animaciones y transiciones (estilo "Framer Motion" hecho a mano en CSS).
   ============================================================================= */

/* --- Texto neón ------------------------------------------------------------ */
.neon {
  color: var(--neon);
  text-shadow: 0 0 6px rgba(0, 255, 102, 0.6), 0 0 20px rgba(0, 255, 102, 0.35);
}
.neon-strong {
  color: #eafff2;
  text-shadow:
    0 0 4px rgba(0, 255, 102, 0.9),
    0 0 12px rgba(0, 255, 102, 0.7),
    0 0 32px rgba(0, 255, 102, 0.45);
}

/* Título con degradado animado. */
.gradient-text {
  background: linear-gradient(100deg, var(--neon-bright), var(--neon) 40%, var(--cyan) 90%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 6s linear infinite;
}
@keyframes shimmer {
  to { background-position: 200% center; }
}

/* --- Superficie de cristal (glassmorphism) --------------------------------- */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur)) saturate(140%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(140%);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-panel), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.glass-strong {
  background: var(--glass-bg-strong);
  backdrop-filter: blur(22px) saturate(150%);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
  border: 1px solid var(--glass-border);
}

/* --- Borde luminoso animado (conic) ---------------------------------------- */
.glow-border {
  position: relative;
  isolation: isolate;
}
.glow-border::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: conic-gradient(
    from var(--angle, 0deg),
    transparent 0%,
    var(--neon) 15%,
    transparent 35%,
    transparent 65%,
    var(--cyan) 82%,
    transparent 100%
  );
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity var(--t-med);
  z-index: -1;
  animation: spin-angle 5s linear infinite;
}
.glow-border:hover::before { opacity: 1; }

/* Propiedad personalizada animable para el gradiente cónico. */
@property --angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}
@keyframes spin-angle {
  to { --angle: 360deg; }
}

/* --- Glow al pasar el ratón ------------------------------------------------ */
.hover-glow { transition: transform var(--t-med), box-shadow var(--t-med), border-color var(--t-med); }
.hover-glow:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 255, 102, 0.45);
  box-shadow: var(--shadow-panel), var(--glow-md);
}

/* --- Línea de escaneo tipo CRT --------------------------------------------- */
.scanlines::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0, 255, 102, 0.04) 0px,
    rgba(0, 255, 102, 0.04) 1px,
    transparent 2px,
    transparent 4px
  );
  mix-blend-mode: overlay;
  border-radius: inherit;
}

/* --- Rejilla de fondo (grid) ----------------------------------------------- */
.grid-bg {
  background-image:
    linear-gradient(rgba(0, 255, 102, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 255, 102, 0.06) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(circle at 50% 40%, #000 30%, transparent 78%);
}

/* --- Animaciones de entrada (reveal on scroll / carga) --------------------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity var(--t-slow), transform var(--t-slow);
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}
@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes pop-in {
  0% { opacity: 0; transform: scale(0.92); }
  100% { opacity: 1; transform: scale(1); }
}
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0, 255, 102, 0.35); }
  50% { box-shadow: 0 0 26px 4px rgba(0, 255, 102, 0.5); }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

.anim-fade-up { animation: fade-up var(--t-slow) both; }
.anim-pop { animation: pop-in var(--t-med) both; }
.anim-float { animation: float 5s var(--ease) infinite; }
.pulse { animation: pulse-glow 2.4s ease-in-out infinite; }

/* --- Spinner de carga ------------------------------------------------------ */
.spinner {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 3px solid rgba(0, 255, 102, 0.18);
  border-top-color: var(--neon);
  animation: spin 0.8s linear infinite;
  box-shadow: var(--glow-sm);
}

/* Divisor con brillo. */
.divider {
  height: 1px;
  border: 0;
  background: linear-gradient(90deg, transparent, var(--neon-dim), transparent);
  opacity: 0.5;
}
