/* =============================================================
   Bretica — Animaciones y mejoras visuales modernas
   animations.css
   ============================================================= */

/* ─── Keyframes ─────────────────────────────────────────────── */

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-10px); }
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-12px); }
  to   { opacity: 1; transform: none; }
}

@keyframes shimmer {
  0%   { transform: translateX(-150%) skewX(-15deg); }
  100% { transform: translateX(250%)  skewX(-15deg); }
}

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

@keyframes gradientHero {
  0%   { background-position: 0% 50%;   }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%;   }
}

@keyframes borderGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,142,122,0); }
  50%       { box-shadow: 0 0 0 6px rgba(255,142,122,0.18); }
}

@keyframes countUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}

/* ─── Scroll reveal ─────────────────────────────────────────── */

.reveal,
.reveal-left,
.reveal-right {
  opacity: 0;
  will-change: transform, opacity;
}

.reveal {
  transform: translateY(32px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-left {
  transform: translateX(-32px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-right {
  transform: translateX(32px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Stagger: aplique a hijos con stagger-1…6 */
.stagger-1 { transition-delay: 0.08s; }
.stagger-2 { transition-delay: 0.18s; }
.stagger-3 { transition-delay: 0.28s; }
.stagger-4 { transition-delay: 0.38s; }
.stagger-5 { transition-delay: 0.48s; }
.stagger-6 { transition-delay: 0.58s; }

/* ─── Navbar glass al hacer scroll ──────────────────────────── */

.site-header {
  transition: background-color 0.3s ease,
              box-shadow 0.3s ease,
              backdrop-filter 0.3s ease;
}

.site-header.hdr-scrolled {
  background-color: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 2px 24px rgba(15, 23, 42, 0.09);
  border-bottom-color: rgba(229, 231, 235, 0.5);
}

/* ─── Hero animado ───────────────────────────────────────────── */

/* Entrada del hero copy */
.hero-copy {
  animation: fadeInDown 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Float en el panel lateral */
.float-anim {
  animation: float 5s ease-in-out infinite;
}

/* Punto parpadeante del eyebrow */
.hero-eyebrow::before {
  animation: pulse-dot 2.2s ease-in-out infinite;
}

/* Fondo del hero con gradiente animado */
.hero {
  background: radial-gradient(
    circle at 15% 20%,
    rgba(167, 235, 208, 0.55) 0%,
    rgba(245, 247, 250, 0.8) 45%,
    #ffffff 100%
  );
  position: relative;
  overflow: hidden;
}

/* Orbe decorativo detrás del hero */
.hero::before {
  content: '';
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,142,122,0.12) 0%, transparent 70%);
  top: -120px;
  right: -100px;
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  width: 350px;
  height: 350px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(167,235,208,0.25) 0%, transparent 70%);
  bottom: -80px;
  left: -60px;
  pointer-events: none;
}

/* ─── Botones con shimmer ────────────────────────────────────── */

.btn-primary {
  position: relative;
  overflow: hidden;
}

.btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.35) 50%,
    transparent 100%
  );
  transform: translateX(-150%) skewX(-15deg);
}

.btn-primary:hover::after {
  animation: shimmer 0.65s ease forwards;
}

/* ─── Cards con hover 3D ─────────────────────────────────────── */

.card,
.partner-card,
.tool-card,
.step,
.panel-item {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.3s ease;
  transform-style: preserve-3d;
}

.card:hover,
.partner-card:hover,
.step:hover {
  transform: translateY(-5px) scale(1.01);
  box-shadow: 0 20px 44px rgba(15, 23, 42, 0.11);
  border-color: rgba(167, 235, 208, 0.6);
}

.panel-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
  border-color: rgba(255, 142, 122, 0.3);
}

/* ─── Sección de proof con contadores ───────────────────────── */

.stat-num {
  transition: transform 0.3s ease;
}

.proof-stat:hover .stat-num {
  transform: scale(1.08);
}

[data-counter].counted {
  animation: countUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* ─── Gradiente en texto ─────────────────────────────────────── */

.gradient-text {
  background: linear-gradient(135deg, var(--bretica-blue), var(--bretica-coral));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ─── Proceso: hover en número ───────────────────────────────── */

.proceso-num {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              background-color 0.3s ease,
              color 0.3s ease;
}

.proceso-step:hover .proceso-num {
  background-color: var(--bretica-coral);
  color: #fff;
  transform: scale(1.15) rotate(-5deg);
}

/* ─── CTA section orbe ───────────────────────────────────────── */

.section-cta {
  position: relative;
  overflow: hidden;
}

.section-cta::before {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,142,122,0.15) 0%, transparent 70%);
  top: -100px;
  right: -80px;
  pointer-events: none;
}

/* ─── Top bar animado ────────────────────────────────────────── */

.top-bar {
  background-size: 200% 200%;
  animation: gradientHero 6s ease infinite;
}

/* ─── Tool card badge parpadeante ────────────────────────────── */

.tool-badge::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  margin-right: 5px;
  animation: pulse-dot 2s 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;
  }

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