/* ============================================
   Hormoon-Vitaal — Animations & Motion
   ============================================ */

/* --- Respect reduced motion --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  [data-animate] { opacity: 1 !important; transform: none !important; }
}

/* --- Page load fade-in --- */
body { animation: bodyFadeIn 0.4s ease both; }
@keyframes bodyFadeIn { from { opacity: 0; } to { opacity: 1; } }

/* =====================
   Scroll Reveal
   ===================== */
[data-animate] {
  opacity: 0;
  will-change: opacity, transform;
}
[data-animate="up"]    { transform: translateY(36px); }
[data-animate="down"]  { transform: translateY(-24px); }
[data-animate="left"]  { transform: translateX(-40px); }
[data-animate="right"] { transform: translateX(40px); }
[data-animate="scale"] { transform: scale(0.9); }
[data-animate="fade"]  { transform: none; }

[data-animate].is-visible {
  opacity: 1;
  transform: none;
  transition:
    opacity 0.72s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.72s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Delay helpers */
[data-delay="100"].is-visible { transition-delay: 0.1s; }
[data-delay="150"].is-visible { transition-delay: 0.15s; }
[data-delay="200"].is-visible { transition-delay: 0.2s; }
[data-delay="300"].is-visible { transition-delay: 0.3s; }
[data-delay="400"].is-visible { transition-delay: 0.4s; }
[data-delay="500"].is-visible { transition-delay: 0.5s; }
[data-delay="600"].is-visible { transition-delay: 0.6s; }

/* =====================
   Hero Animations
   ===================== */
.hero-word {
  display: inline-block;
  opacity: 0;
  transform: translateY(44px);
  animation: heroWordIn 0.75s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes heroWordIn {
  to { opacity: 1; transform: translateY(0); }
}

.hero-child-animate {
  opacity: 0;
  transform: translateY(22px);
  animation: heroFadeUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes heroFadeUp {
  to { opacity: 1; transform: translateY(0); }
}

/* =====================
   Floating Botanicals
   ===================== */
.hv-botanical {
  position: absolute;
  pointer-events: none;
  will-change: transform;
}
.hv-botanical--1 {
  animation: floatA 9s ease-in-out infinite;
}
.hv-botanical--2 {
  animation: floatB 12s ease-in-out infinite;
  animation-delay: -3s;
}
.hv-botanical--3 {
  animation: floatC 10s ease-in-out infinite;
  animation-delay: -6s;
}
.hv-botanical--4 {
  animation: floatA 14s ease-in-out infinite;
  animation-delay: -2s;
}

@keyframes floatA {
  0%, 100% { transform: translateY(0) rotate(0deg) scale(1); }
  33%       { transform: translateY(-18px) rotate(4deg) scale(1.02); }
  66%       { transform: translateY(-8px) rotate(-3deg) scale(0.98); }
}
@keyframes floatB {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%       { transform: translateY(-24px) rotate(-6deg); }
}
@keyframes floatC {
  0%, 100% { transform: translateY(0) rotate(0deg) scale(1); }
  40%       { transform: translateY(-14px) rotate(5deg) scale(1.03); }
  80%       { transform: translateY(-6px) rotate(-2deg) scale(0.97); }
}

/* =====================
   Wave Dividers
   ===================== */
.hv-wave {
  position: relative;
  overflow: hidden;
  line-height: 0;
  margin-bottom: -2px; /* prevent gap */
}
.hv-wave svg {
  display: block;
  width: 100%;
  height: auto;
  min-height: 60px;
}
.hv-wave--flip {
  transform: scaleX(-1);
}

/* Wave at bottom of hero */
.hv-hero {
  padding-bottom: 0 !important;
}
.hv-hero__wave {
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  line-height: 0;
  pointer-events: none;
}
.hv-hero__wave svg {
  display: block;
  width: 100%;
}

/* =====================
   Stats Section
   ===================== */
.hv-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-radius: var(--hv-radius-lg);
  overflow: hidden;
  box-shadow: var(--hv-shadow-md);
}
@media (max-width: 768px) {
  .hv-stats-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .hv-stats-grid { grid-template-columns: 1fr; }
}

.hv-stat {
  padding: var(--hv-space-lg) var(--hv-space-md);
  text-align: center;
  background: var(--hv-wit);
  border-right: var(--hv-border);
  position: relative;
  overflow: hidden;
  transition: background 0.25s ease;
}
.hv-stat:last-child { border-right: none; }
.hv-stat:hover { background: var(--hv-groen-bg); }

.hv-stat::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--hv-groen);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}
.hv-stat:hover::before { transform: scaleX(1); }

.hv-stat__number {
  font-family: var(--hv-font-heading);
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 700;
  color: var(--hv-groen);
  line-height: 1;
  margin-bottom: 0.375rem;
}
.hv-stat__label {
  font-size: 0.875rem;
  color: var(--hv-grijs);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* =====================
   Trust Bar
   ===================== */
.hv-trust-bar {
  background: var(--hv-groen);
  padding: 0.875rem var(--hv-space-md);
  overflow: hidden;
}
.hv-trust-bar__inner {
  max-width: var(--hv-max-width-wide);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--hv-space-lg);
  flex-wrap: wrap;
}
.hv-trust-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: rgba(255,255,255,0.9);
  white-space: nowrap;
  font-weight: 500;
}
.hv-trust-item__icon {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.2);
  border-radius: 50%;
  font-size: 0.7rem;
  flex-shrink: 0;
}
.hv-trust-divider {
  width: 1px;
  height: 20px;
  background: rgba(255,255,255,0.25);
}
@media (max-width: 600px) {
  .hv-trust-divider { display: none; }
}

/* =====================
   Enhanced Cards
   ===================== */
.hv-card {
  transition:
    box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
    background 0.25s ease;
}
.hv-card:hover {
  box-shadow: 0 8px 32px rgba(74,124,89,0.15);
  transform: translateY(-4px);
}
.hv-card__icon {
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.hv-card:hover .hv-card__icon {
  transform: scale(1.2) rotate(-5deg);
}

/* =====================
   Enhanced Buttons
   ===================== */
.hv-btn {
  position: relative;
  overflow: hidden;
  letter-spacing: 0.01em;
}
/* Shine sweep on hover */
.hv-btn--primary::after,
.hv-btn--warm::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.18), transparent);
  transform: skewX(-20deg);
  transition: left 0.5s ease;
}
.hv-btn--primary:hover::after,
.hv-btn--warm:hover::after {
  left: 140%;
}

/* Ripple */
.btn-ripple {
  position: absolute;
  border-radius: 50%;
  width: 120px;
  height: 120px;
  margin-left: -60px;
  margin-top: -60px;
  background: rgba(255,255,255,0.25);
  transform: scale(0);
  animation: rippleAnim 0.65s linear;
  pointer-events: none;
}
@keyframes rippleAnim {
  to { transform: scale(4); opacity: 0; }
}

/* CTA pulse on banner */
.hv-cta-banner .hv-btn--warm {
  animation: ctaPulse 3s ease-in-out infinite;
}
.hv-cta-banner .hv-btn--warm:hover {
  animation: none;
}
@keyframes ctaPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(212,165,116,0.5); }
  50%       { box-shadow: 0 0 0 10px rgba(212,165,116,0); }
}

/* =====================
   Blog Card Enhancement
   ===================== */
.hv-blog-card {
  transition:
    box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.hv-blog-card:hover {
  box-shadow: 0 12px 40px rgba(0,0,0,0.10);
  transform: translateY(-5px);
}
.hv-blog-card__thumb {
  transition: transform 0.4s ease;
  overflow: hidden;
}
.hv-blog-card:hover .hv-blog-card__thumb {
  transform: scale(1.04);
}

/* =====================
   Symptom Pills
   ===================== */
.hv-symptom-pill {
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.25s ease,
              background 0.2s ease;
}
.hv-symptom-pill:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 6px 16px rgba(74,124,89,0.12);
  background: var(--hv-groen-bg);
}

/* =====================
   Back to Top Button
   ===================== */
.hv-back-top {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 44px;
  height: 44px;
  background: var(--hv-groen);
  color: var(--hv-wit);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  box-shadow: 0 4px 16px rgba(74,124,89,0.3);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.3s ease, transform 0.3s ease, background 0.2s ease;
  pointer-events: none;
  z-index: 50;
}
.hv-back-top.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.hv-back-top:hover {
  background: var(--hv-groen-donker);
  transform: translateY(-2px);
}

/* =====================
   Nav scrolled state
   ===================== */
.site-header.is-scrolled {
  box-shadow: 0 2px 20px rgba(0,0,0,0.08);
}

/* =====================
   Pricing row hover
   ===================== */
.hv-pricing-row {
  transition: background 0.2s ease, transform 0.2s ease;
}
.hv-pricing-row:hover {
  transform: translateX(4px);
}

/* =====================
   Step hover
   ===================== */
.hv-step:hover .hv-step__number {
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(74,124,89,0.3);
}
.hv-step__number {
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
}

/* =====================
   Input focus upgrade
   ===================== */
.hv-form__input,
.hv-form__textarea {
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}
.hv-form__input:focus,
.hv-form__textarea:focus {
  transform: translateY(-1px);
}

/* =====================
   Footer link hover
   ===================== */
.hv-footer__nav-links a {
  position: relative;
}
.hv-footer__nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--hv-wit);
  transition: width 0.25s ease;
}
.hv-footer__nav-links a:hover::after { width: 100%; }

/* =====================
   Scroll progress bar
   ===================== */
.hv-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--hv-groen), var(--hv-zand));
  transform-origin: left;
  transform: scaleX(0);
  z-index: 200;
  transition: transform 0.1s linear;
}

/* =====================
   Section intro reveal
   ===================== */
.hv-section-intro h2 {
  background: linear-gradient(135deg, var(--hv-antraciet) 0%, var(--hv-groen-donker) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* =====================
   Hero enhanced
   ===================== */
.hv-hero {
  min-height: min(100svh, 720px);
  isolation: isolate;
}
.hv-hero__content {
  padding-bottom: calc(var(--hv-space-xl) + 60px); /* room for wave */
}

/* Grain texture overlay */
.hv-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  opacity: 0.4;
  z-index: 0;
}
.hv-hero__content { z-index: 2; }
.hv-hero__wave    { z-index: 2; }
.hv-hero__botanicals { z-index: 1; }
