/* =============================================================
   animations.css — Ecoloop Website
   All @keyframes, hero canvas, glow blobs, stat shimmer,
   why-section SVG background, reveal transitions
   ============================================================= */

/* ── HERO SECTION ───────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, #263a6a 60%, #1e4a2a 100%);
  color: var(--white);
  padding: 6rem 2.5rem 5rem;
  position: relative;
  overflow: clip;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%237ab648' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/svg%3E");
}
.hero-inner {
  max-width: 1100px; margin: 0 auto;
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 3rem; align-items: center;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: .5rem;
  background: rgba(122,182,72,.18); border: 1px solid rgba(122,182,72,.35);
  color: #a5d97a; font-size: .75rem; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase;
  padding: .35rem .9rem; border-radius: 50px; margin-bottom: 1.2rem;
}
.hero-badge::before { content: '●'; color: var(--green); animation: pulse 2s infinite; }
.hero h1 { font-family: 'Syne', sans-serif; font-size: clamp(2rem,4vw,3.2rem); font-weight: 800; line-height: 1.35; margin-bottom: 1.2rem; }
.hero h1 em { font-style: normal; color: var(--green); }
.hero p { font-size: 1.05rem; line-height: 1.7; color: #c5d5ea; margin-bottom: 2rem; max-width: 480px; }
.hero-btns { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero-stats { display: flex; flex-direction: column; gap: 1.2rem; }

/* ── STAT CARDS ─────────────────────────────────────────────── */
.stat-card {
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 12px; padding: 1.2rem 1.5rem;
  backdrop-filter: blur(8px);
  position: relative; overflow: clip;
}
.stat-card::after {
  content: '';
  position: absolute; top: 0; left: -100%;
  width: 60%; height: 2px;
  background: linear-gradient(90deg, transparent, rgba(125,194,66,0.7), transparent);
  animation: stat-shine 4s ease-in-out infinite;
}
.stat-card:nth-child(2)::after { animation-delay: 1s; }
.stat-card:nth-child(3)::after { animation-delay: 2s; }
.stat-card:nth-child(4)::after { animation-delay: 3s; }
.stat-card .num { font-family: 'Syne', sans-serif; font-size: 2rem; font-weight: 800; color: var(--green); line-height: 1.2; }
.stat-card .label { font-size: .82rem; color: #a8b8d8; margin-top: .25rem; }

/* ── HERO CANVAS & GLOW ─────────────────────────────────────── */
#hero-canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  display: block; opacity: 0.95;
  pointer-events: none; z-index: 1;
}
.hero-glow {
  position: absolute; border-radius: 50%;
  pointer-events: none; z-index: 1;
  filter: blur(80px); opacity: 0.95;
  animation: glow-drift 9s ease-in-out infinite alternate;
}
.hero-glow-1 { width: clamp(200px, 60vw, 520px); height: clamp(200px, 60vw, 520px); background: radial-gradient(circle, rgba(125,194,66,0.22) 0%, transparent 70%); top: -120px; right: -80px; animation-delay: 0s; }
.hero-glow-2 {  width: clamp(160px, 45vw, 380px); height: clamp(160px, 45vw, 380px); background: radial-gradient(circle, rgba(26,100,200,0.18) 0%, transparent 70%); bottom: -60px; left: 10%; animation-delay: 3s; }
.hero-glow-3 { width: clamp(120px, 32vw, 260px); height: clamp(120px, 32vw, 260px); background: radial-gradient(circle, rgba(125,194,66,0.15) 0%, transparent 70%); top: 40%; left: 35%; animation-delay: 1.5s; }

/* ── WHY ECOLOOP SECTION ────────────────────────────────────── */
#why { position: relative; overflow: clip; }
.why-bg-svg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  display: block; pointer-events: none; z-index: 0; opacity: 1;
}
#why .section1-inner,
#why .why-grid { position: relative; z-index: 1; }

/* ── DEPLOYED PAGE HEADER ───────────────────────────────────── */
#page-deployed .page-header {
  background: linear-gradient(135deg, var(--navy) 0%, #1e4a2a 100%);
}

/* ── @KEYFRAMES ─────────────────────────────────────────────── */
@keyframes dropIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: none; }
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: .3; }
}
@keyframes glow-drift {
  0%   { transform: translate(0,0) scale(1); }
  100% { transform: translate(30px,20px) scale(1.12); }
}
@keyframes stat-shine {
  0%   { left: -60%; }
  100% { left: 160%; }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-8px); }
}
@keyframes float3 {
  0%, 100% { transform: translateY(-50%); }
  50%       { transform: translateY(calc(-50% - 8px)); }
}
