/* ============================================
   TRANQUILIVA — ANIMATIONS
   animations.css
   ============================================ */

/* ── Keyframes ── */

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

@keyframes float-phone {
  0%, 100% { transform: rotate(15deg) translateY(0px); }
  50% { transform: rotate(15deg) translateY(-12px); }
}

@keyframes blob-drift {
  0%, 100% { transform: scale(1) translate(0, 0); border-radius: 60% 40% 70% 30% / 50% 60% 40% 70%; }
  25% { transform: scale(1.05) translate(10px, -15px); border-radius: 40% 60% 30% 70% / 60% 40% 70% 30%; }
  50% { transform: scale(0.97) translate(-8px, 10px); border-radius: 70% 30% 60% 40% / 40% 70% 30% 60%; }
  75% { transform: scale(1.03) translate(12px, 5px); border-radius: 50% 50% 40% 60% / 70% 30% 60% 40%; }
}

@keyframes blob-drift-2 {
  0%, 100% { transform: scale(1) translate(0, 0); border-radius: 40% 60% 30% 70% / 60% 40% 70% 30%; }
  33% { transform: scale(1.08) translate(-12px, 10px); border-radius: 60% 40% 70% 30% / 40% 60% 30% 70%; }
  66% { transform: scale(0.95) translate(8px, -8px); border-radius: 30% 70% 50% 50% / 50% 30% 70% 50%; }
}

@keyframes bounce-dot {
  0%, 100% { transform: translateY(0); opacity: 0.5; }
  50% { transform: translateY(-6px); opacity: 1; }
}

@keyframes bounce-arrow {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}

@keyframes live-pulse {
  0% { box-shadow: 0 0 0 0 rgba(34,197,94,0.4); }
  70% { box-shadow: 0 0 0 8px rgba(34,197,94,0); }
  100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); }
}

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

@keyframes breathe {
  0%, 100% { transform: scale(1); opacity: 0.8; }
  30% { transform: scale(1.4); opacity: 1; }
  58% { transform: scale(1.4); opacity: 1; }
  100% { transform: scale(1); opacity: 0.8; }
}

@keyframes teal-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(63,187,192,0); }
  50% { box-shadow: 0 0 24px 8px rgba(63,187,192,0.4); }
}

@keyframes padlock-bounce {
  0%, 100% { transform: scale(1); }
  30% { transform: scale(1.15) rotate(-5deg); }
  60% { transform: scale(1.1) rotate(5deg); }
}

@keyframes crisis-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,107,107,0); }
  50% { box-shadow: 0 0 0 12px rgba(255,107,107,0.15); }
}

@keyframes heart-burst {
  0% { transform: scale(1); }
  40% { transform: scale(1.4); color: #ff6b6b; }
  60% { transform: scale(0.95); }
  80% { transform: scale(1.15); }
  100% { transform: scale(1); color: #ff6b6b; }
}

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

@keyframes count-up { from { opacity: 0; } to { opacity: 1; } }

@keyframes slide-up {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slide-left {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes waveform {
  0%, 100% { transform: scaleY(0.3); }
  50% { transform: scaleY(1); }
}

@keyframes grain {
  0%, 100% { transform: translate(0,0); }
  10% { transform: translate(-2%,-3%); }
  30% { transform: translate(3%,2%); }
  50% { transform: translate(-1%,4%); }
  70% { transform: translate(4%,-2%); }
  90% { transform: translate(-3%,1%); }
}

@keyframes record-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,107,107,0); }
  50% { box-shadow: 0 0 0 20px rgba(255,107,107,0.15); }
}

@keyframes check-pop {
  0% { transform: scale(0) rotate(-45deg); opacity: 0; }
  60% { transform: scale(1.2) rotate(5deg); opacity: 1; }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}

@keyframes entry-pop {
  from { opacity: 0; transform: translateY(-16px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes plan-toggle {
  from { opacity: 0.6; transform: scale(0.98); }
  to { opacity: 1; transform: scale(1); }
}

/* ── Hero Entrance ── */
.hero-title .word {
  display: inline-block; opacity: 0;
  animation: fade-word 0.4s ease forwards;
}
.hero-title .word:nth-child(1) { animation-delay: 0.1s; }
.hero-title .word:nth-child(2) { animation-delay: 0.2s; }
.hero-title .word:nth-child(3) { animation-delay: 0.3s; }
.hero-title .word:nth-child(4) { animation-delay: 0.4s; }
.hero-title .word:nth-child(5) { animation-delay: 0.5s; }
.hero-title .word:nth-child(6) { animation-delay: 0.6s; }
.hero-title .word:nth-child(7) { animation-delay: 0.7s; }
.hero-title .word:nth-child(8) { animation-delay: 0.8s; }
.hero-title .word:nth-child(9) { animation-delay: 0.9s; }
.hero-title .word:nth-child(10) { animation-delay: 1.0s; }

.hero-sub { opacity: 0; animation: slide-up 0.6s ease 1.1s forwards; }
.hero-ctas { opacity: 0; animation: slide-up 0.6s ease 1.3s forwards; }

/* ── Blob Decorations ── */
.blob {
  position: absolute; z-index: 0;
  background: var(--teal); opacity: 0.12;
  animation: blob-drift 12s ease-in-out infinite;
  pointer-events: none;
}
.blob-2 { animation: blob-drift-2 14s ease-in-out infinite; animation-delay: -4s; }
.blob-3 { animation: blob-drift 16s ease-in-out infinite; animation-delay: -8s; }

/* ── Phone Mockup Animation ── */
.phone-float { animation: float-phone 4s ease-in-out infinite; }

/* ── Bounce Arrow ── */
.scroll-indicator { animation: bounce-arrow 1.5s ease-in-out infinite; color: var(--teal); font-size: 1.5rem; margin-top: 40px; }

/* ── Feature Card Hover ── */
.feature-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-hover) !important; }
.feature-card:hover .icon-wrap { background: var(--teal); color: white; }

/* ── Step Timeline Animation ── */
.step-item { opacity: 0; transform: translateX(-24px); transition: opacity 0.5s ease, transform 0.5s ease; }
.step-item.visible { opacity: 1; transform: translateX(0); }

/* ── Counter ── */
.counter-num { display: inline-block; animation: count-up 0.3s ease; }

/* ── Padlock Glow ── */
.padlock-active { animation: padlock-bounce 0.6s ease, teal-glow 2s ease-in-out infinite; color: var(--teal); }

/* ── Crisis Pulse ── */
.crisis-action-wrap { animation: crisis-pulse 3s ease-in-out infinite; border-radius: var(--radius-lg); }

/* ── Waveform ── */
.waveform { display: flex; align-items: center; gap: 2px; height: 24px; }
.waveform-bar {
  width: 3px; background: var(--teal); border-radius: 2px;
  animation: waveform 0.8s ease-in-out infinite;
}
.waveform-bar:nth-child(2) { animation-delay: 0.1s; height: 60%; }
.waveform-bar:nth-child(3) { animation-delay: 0.2s; height: 90%; }
.waveform-bar:nth-child(4) { animation-delay: 0.15s; height: 50%; }
.waveform-bar:nth-child(5) { animation-delay: 0.25s; height: 80%; }
.waveform-bar:nth-child(6) { animation-delay: 0.05s; height: 40%; }
.waveform-bar:nth-child(7) { animation-delay: 0.3s; height: 70%; }
.waveform-bar:nth-child(8) { animation-delay: 0.12s; height: 55%; }

/* ── Grain Texture ── */
.hero-grain::after {
  content: ''; position: absolute; inset: 0; z-index: 0;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  pointer-events: none; animation: grain 8s steps(1) infinite;
}

/* ── Teal Orbs for features/about ── */
.orb {
  position: absolute; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(63,187,192,0.15) 0%, transparent 70%);
  animation: blob-drift 14s ease-in-out infinite;
}

/* ── How-it-works step connector ── */
.steps-container { position: relative; }
.steps-container::before {
  content: ''; position: absolute; top: 40px; left: 16.7%; right: 16.7%;
  height: 2px; background: linear-gradient(to right, var(--teal), var(--teal-mid), var(--teal));
  z-index: 0;
}

/* ── Smooth transition for tabs ── */
.tab-content { animation: fade-in 0.3s ease; }
