/* ============================================================
   REMINDME — animations.css
   Keyframes, ambient animations, scroll-reveal base states
   ============================================================ */

/* ---- Ambient Keyframes ---- */

@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 0 30px rgba(134, 59, 255, 0.4), 0 0 60px rgba(134, 59, 255, 0.15);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 50px rgba(134, 59, 255, 0.65), 0 0 100px rgba(134, 59, 255, 0.25);
    transform: scale(1.04);
  }
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.75); }
}

@keyframes float-slow {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  33%       { transform: translateY(-18px) rotate(2deg); }
  66%       { transform: translateY(-8px) rotate(-1.5deg); }
}

@keyframes float-slower {
  0%, 100% { transform: translateY(0px) rotate(0deg) scale(1); }
  50%       { transform: translateY(-25px) rotate(3deg) scale(1.02); }
}

@keyframes orb-drift-1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25%       { transform: translate(60px, -40px) scale(1.08); }
  50%       { transform: translate(30px, 60px) scale(0.95); }
  75%       { transform: translate(-40px, 20px) scale(1.03); }
}

@keyframes orb-drift-2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  30%       { transform: translate(-50px, 30px) scale(1.05); }
  60%       { transform: translate(40px, -50px) scale(0.97); }
  80%       { transform: translate(20px, 40px) scale(1.02); }
}

@keyframes orb-drift-3 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  40%       { transform: translate(30px, -60px) scale(1.06); }
  70%       { transform: translate(-60px, -20px) scale(0.94); }
}

@keyframes scroll-line {
  0%   { transform: scaleY(0); transform-origin: top; opacity: 1; }
  50%  { transform: scaleY(1); transform-origin: top; opacity: 1; }
  51%  { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; opacity: 0; }
}

@keyframes spin-slow {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

@keyframes badge-enter {
  from { opacity: 0; transform: translateY(10px) scale(0.95); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes nebula-pulse {
  0%, 100% { opacity: 0.15; transform: scale(1) rotate(0deg); }
  50%       { opacity: 0.25; transform: scale(1.1) rotate(8deg); }
}

@keyframes ring-expand {
  0%   { transform: scale(0.8); opacity: 0.6; }
  100% { transform: scale(1.6); opacity: 0; }
}

@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}

@keyframes success-pop {
  0%   { transform: scale(0.5); opacity: 0; }
  60%  { transform: scale(1.1); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes loader-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* ---- GSAP pre-animation states ---- */

.gsap-fade-up {
  opacity: 0;
  transform: translateY(40px);
}

/* ---- Scroll-reveal base states (IntersectionObserver fallback) ---- */

.reveal-up {
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 0.75s var(--ease-out), transform 0.75s var(--ease-out);
}

.reveal-up.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-50px);
  transition: opacity 0.75s var(--ease-out), transform 0.75s var(--ease-out);
}

.reveal-left.is-visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(50px);
  transition: opacity 0.75s var(--ease-out), transform 0.75s var(--ease-out);
}

.reveal-right.is-visible {
  opacity: 1;
  transform: translateX(0);
}

/* Stagger children */
.reveal-up:nth-child(1) { transition-delay: 0s; }
.reveal-up:nth-child(2) { transition-delay: 0.1s; }
.reveal-up:nth-child(3) { transition-delay: 0.2s; }
.reveal-up:nth-child(4) { transition-delay: 0.3s; }

/* ---- Hero ambient orbs ---- */

.hero__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  will-change: transform;
}

.hero__orb--1 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(134, 59, 255, 0.18) 0%, transparent 70%);
  top: -15%;
  left: -10%;
  animation: orb-drift-1 20s ease-in-out infinite;
}

.hero__orb--2 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(71, 191, 255, 0.12) 0%, transparent 70%);
  top: 20%;
  right: -8%;
  animation: orb-drift-2 25s ease-in-out infinite;
}

.hero__orb--3 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(126, 20, 255, 0.15) 0%, transparent 70%);
  bottom: -10%;
  left: 30%;
  animation: orb-drift-3 18s ease-in-out infinite;
}

/* ---- Aurora orbs (reusable) ---- */

.aurora-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
  will-change: transform, opacity;
}

.aurora-orb--1 {
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(134, 59, 255, 0.13) 0%, transparent 65%);
  top: -20%;
  right: -15%;
  animation: orb-drift-1 28s ease-in-out infinite;
}

.aurora-orb--2 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(71, 191, 255, 0.1) 0%, transparent 70%);
  bottom: 0;
  left: -10%;
  animation: orb-drift-2 22s ease-in-out infinite;
}

.aurora-orb--3 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(134, 59, 255, 0.12) 0%, transparent 65%);
  top: 10%;
  left: -15%;
  animation: orb-drift-3 24s ease-in-out infinite;
}

/* ============================================================
   PERSPECTIVE GRID — Fondo futurista con scroll
   ============================================================ */

.bg-grid {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

/* Fade sutil en bordes laterales — sin fade vertical para que sea visible en toda la página */
.bg-grid::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    linear-gradient(to right, var(--bg) 0%, transparent 12%),
    linear-gradient(to left,  var(--bg) 0%, transparent 12%);
  pointer-events: none;
}

/* Plano de la cuadrícula en perspectiva */
.bg-grid__plane {
  position: absolute;
  width: 300%;
  height: 400%;
  left: -100%;
  top: -10%;
  transform: perspective(900px) rotateX(75deg);
  transform-origin: 50% 38%;
  background-image:
    linear-gradient(rgba(134, 59, 255, 0.14) 1px, transparent 1px),
    linear-gradient(90deg, rgba(71, 191, 255, 0.07) 1px, transparent 1px);
  background-size: 80px 80px;
  animation: grid-move 8s linear infinite;
  will-change: transform;
}

@keyframes grid-move {
  from { background-position: 0 0; }
  to   { background-position: 0 80px; }
}

@media (prefers-reduced-motion: reduce) {
  .bg-grid { display: none; }
}

.aurora-orb--4 {
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(71, 191, 255, 0.09) 0%, rgba(134, 59, 255, 0.12) 40%, transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: nebula-pulse 12s ease-in-out infinite;
}


/* ---- Hero badge dot ---- */
.hero__badge-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  animation: pulse-dot 2.2s ease-in-out infinite;
  box-shadow: 0 0 8px rgba(71, 191, 255, 0.7);
}

/* ---- Scroll indicator ---- */
.hero__scroll-indicator {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  opacity: 0.5;
  transition: opacity var(--transition);
}

.hero__scroll-indicator:hover {
  opacity: 0.8;
}

.hero__scroll-line {
  width: 1px;
  height: 50px;
  background: linear-gradient(to bottom, transparent, var(--primary));
  animation: scroll-line 2s ease-in-out infinite;
}

.hero__scroll-indicator span {
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 500;
}

/* ---- Module card icon pulse ---- */
.module-card__icon svg {
  transition: transform 0.4s var(--ease);
}

.module-card:hover .module-card__icon svg {
  transform: scale(1.1);
  filter: drop-shadow(0 0 8px rgba(134, 59, 255, 0.5));
}

/* ---- Tech pill shimmer on hover ---- */
.tech-pill {
  position: relative;
  overflow: hidden;
}

.tech-pill::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.08) 50%,
    transparent 100%
  );
  background-size: 200% 100%;
  opacity: 0;
  transition: opacity 0.3s;
}

.tech-pill:hover::after {
  opacity: 1;
  animation: shimmer 0.8s var(--ease);
}

/* ---- Success icon animation ---- */
.waitlist__success.is-shown .success__icon {
  animation: success-pop 0.6s var(--ease-out) forwards;
}

/* ---- Submit loader ---- */
.submit-loader {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: loader-spin 0.8s linear infinite;
}

.btn--loading .submit-text,
.btn--loading .submit-arrow {
  display: none;
}

.btn--loading .submit-loader {
  display: block;
}

/* ---- Nebula rings ---- */
.nebula-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(134, 59, 255, 0.15);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.nebula-ring--1 {
  width: 400px;
  height: 400px;
  animation: nebula-pulse 8s ease-in-out infinite;
}

.nebula-ring--2 {
  width: 650px;
  height: 650px;
  border-color: rgba(71, 191, 255, 0.08);
  animation: nebula-pulse 12s ease-in-out infinite reverse;
}

.nebula-ring--3 {
  width: 900px;
  height: 900px;
  border-color: rgba(134, 59, 255, 0.06);
  animation: nebula-pulse 16s ease-in-out infinite;
}

/* ---- Reduce motion ---- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .gsap-fade-up {
    opacity: 1;
    transform: none;
  }

  .reveal-up,
  .reveal-left,
  .reveal-right {
    opacity: 1;
    transform: none;
  }
}
