/* ═══════════════════════════════════════════════════════════
   nadavnevo.com — Premium Animation Layer
   Quiet luxury medical: Apple-level polish, restrained motion.
   Requires: bauhaus.css loaded first, nav.js for .js-ready class.
   ═══════════════════════════════════════════════════════════ */

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

/* ─── 1. ENHANCED REVEAL SYSTEM ─── */
/* Override basic reveal with slide-up + fade */
.js-ready .reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.js-ready .reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Reveal from left (for RTL, this means from right visually) */
.js-ready .reveal-left {
  opacity: 0;
  transform: translateX(60px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.js-ready .reveal-left.visible {
  opacity: 1;
  transform: translateX(0);
}

/* Reveal with scale */
.js-ready .reveal-scale {
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.js-ready .reveal-scale.visible {
  opacity: 1;
  transform: scale(1);
}

/* ─── 2. STAGGER CHILDREN ─── */
.js-ready .reveal-group .reveal:nth-child(1) { transition-delay: 0ms; }
.js-ready .reveal-group .reveal:nth-child(2) { transition-delay: 120ms; }
.js-ready .reveal-group .reveal:nth-child(3) { transition-delay: 240ms; }
.js-ready .reveal-group .reveal:nth-child(4) { transition-delay: 360ms; }
.js-ready .reveal-group .reveal:nth-child(5) { transition-delay: 480ms; }

/* ─── 3. HERO TEXT ENTRANCE SEQUENCE ─── */
@keyframes heroTextIn {
  0%   { opacity: 0; transform: translateY(30px); -webkit-filter: blur(8px); filter: blur(8px); }
  100% { opacity: 1; transform: translateY(0);    -webkit-filter: blur(0);   filter: blur(0); }
}
@keyframes heroLineIn {
  0%   { transform: scaleX(0); }
  100% { transform: scaleX(1); }
}

.js-ready .headline h1 {
  animation: heroTextIn 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.15s both;
}
.js-ready .headline .blog-meta {
  animation: heroTextIn 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.35s both;
}
.js-ready .headline .headline-side {
  animation: heroTextIn 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.5s both;
}

/* ─── 4. HERO IMAGE FLOAT + PARALLAX ─── */
@keyframes heroFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-12px); }
}
.hero-card-photo .card-frame img {
  animation: heroFloat 5s ease-in-out infinite;
  animation-delay: 1s;
}
@media (max-width: 820px) {
  .hero-card-photo .card-frame img {
    animation: none;
  }
}
/* Parallax is JS-driven via animations.js */
.hero-card-photo[data-parallax] {
  transition: transform 0.1s linear;
  will-change: transform;
}

/* ─── 5. 3D TILT ON SERVICE CARDS ─── */
.service {
  perspective: 800px;
  transform-style: preserve-3d;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.service:hover {
  transform: translateY(-6px) rotateX(2deg) rotateY(-2deg);
  box-shadow: 0 20px 40px rgba(0,0,0,0.08), 0 8px 16px rgba(0,0,0,0.04);
}
.service .service-icon {
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.service:hover .service-icon {
  transform: scale(1.08) translateY(-4px);
}
.service .service-arrow {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s;
  opacity: 0.4;
}
.service:hover .service-arrow {
  transform: translate(-4px, -4px);
  opacity: 1;
}

/* ─── 6. MAGNETIC CTA BUTTONS ─── */
/* JS handles the magnetic pull — these are the CSS transitions */
.cta-pill, .cta-btn {
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              background 0.2s;
  will-change: transform;
}
.cta-pill:hover, .cta-btn:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,0.12), 0 2px 6px rgba(0,0,0,0.06);
}

/* Glow ring on hover for primary buttons */
.cta-pill.yellow::after {
  content: '';
  position: absolute;
  top: -3px; right: -3px; bottom: -3px; left: -3px;
  border-radius: inherit;
  background: transparent;
  border: 2px solid var(--yellow);
  opacity: 0;
  transform: scale(1.05);
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: none;
}
.cta-pill.yellow { position: relative; overflow: visible; }
.cta-pill.yellow:hover::after {
  opacity: 0.5;
  transform: scale(1);
}

/* ─── 7. STAT COUNTER ENHANCED ─── */
.stat {
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.stat:hover {
  transform: translateY(-4px);
}
.stat-num {
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.stat:hover .stat-num {
  transform: scale(1.1);
}

/* ─── 8. FAQ SMOOTH EXPAND ─── */
.faq-item {
  transition: background 0.3s, box-shadow 0.3s, transform 0.3s;
}
.faq-item:hover {
  transform: translateX(-4px);
}
.faq-item.open {
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}
.faq-num {
  transition: color 0.3s, transform 0.3s;
}
.faq-item:hover .faq-num {
  color: var(--cobalt);
  transform: scale(1.1);
}

/* ─── 9. SECTION HEAD ACCENT LINE ─── */
.section-head .num::after {
  content: '';
  display: block;
  width: 0;
  height: 2px;
  background: var(--cobalt);
  margin-top: 8px;
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.section-head.visible .num::after,
.section-head .num::after {
  /* Animate on hover of section head */
}
.reveal.visible .num::after,
.section-head:hover .num::after {
  width: 48px;
}

/* ─── 10. HERO CARD GLOW ACCENT ─── */
.hero-card-photo .card-frame::before {
  animation: glowPulse 4s ease-in-out infinite;
}
@keyframes glowPulse {
  0%, 100% { opacity: 0.12; transform: translateX(-50%) scale(1); }
  50%      { opacity: 0.2;  transform: translateX(-50%) scale(1.08); }
}

/* ─── 11. HOSPITAL LOGOS HOVER ─── */
.hospital-logos img {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              filter 0.3s;
  filter: grayscale(0.3);
}
.hospital-logos img:hover {
  transform: scale(1.08);
  filter: grayscale(0);
}

/* ─── 12. SMOOTH SCROLL INDICATOR (hero) ─── */
@keyframes scrollHint {
  0%, 100% { opacity: 0.4; transform: translateY(0); }
  50%      { opacity: 1;   transform: translateY(8px); }
}
.scroll-hint {
  display: flex;
  justify-content: center;
  padding: 24px 0 8px;
}
.scroll-hint svg {
  animation: scrollHint 2s ease-in-out infinite;
  opacity: 0.4;
}

/* ─── 13. CTA BAND SHIMMER ─── */
.cta-band {
  position: relative;
  overflow: hidden;
}
.cta-band::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.06), transparent);
  animation: shimmer 6s ease-in-out infinite;
  pointer-events: none;
}
@keyframes shimmer {
  0%   { left: -100%; }
  50%  { left: 100%; }
  100% { left: 100%; }
}

/* ─── 14. CREDENTIAL STRIP ENTRANCE ─── */
.creds {
  animation: heroTextIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

/* ─── 15. TEXT BLOCK LEDE ACCENT ─── */
.text-block .lede {
  position: relative;
  transition: transform 0.4s;
}
.text-block .lede::before {
  content: '';
  position: absolute;
  right: -20px; top: 0; bottom: 0;
  width: 3px;
  background: var(--cobalt);
  border-radius: 2px;
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.3s;
}
.reveal.visible .lede::before,
.text-block:hover .lede::before {
  transform: scaleY(1);
}

/* ─── 16. NAV LINK HOVER UNDERLINE ─── */
.nav-links a {
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  right: 0;
  width: 0;
  height: 2px;
  background: var(--cobalt);
  transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

/* ─── 17. FORM FIELD FOCUS ANIMATION ─── */
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  border-color: var(--cobalt);
  box-shadow: 0 0 0 3px rgba(45, 91, 255, 0.1);
  transform: translateY(-1px);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ─── 18. FOOTER LINK HOVER ─── */
.footer-links a {
  transition: color 0.2s, transform 0.2s;
  display: inline-block;
}
.footer-links a:hover {
  color: var(--cobalt);
  transform: translateX(3px);
}

/* ─── 19. WHATSAPP FAB PULSE ─── */
@keyframes fabPulse {
  0%, 100% { box-shadow: 0 4px 16px rgba(37, 211, 102, 0.3); }
  50%      { box-shadow: 0 4px 24px rgba(37, 211, 102, 0.5), 0 0 0 8px rgba(37, 211, 102, 0.1); }
}
.whatsapp-float {
  animation: fabPulse 3s ease-in-out infinite;
}

/* ─── 20. SMOOTH PAGE ENTRANCE ─── */
@keyframes pageIn {
  0%   { opacity: 0; }
  100% { opacity: 1; }
}
.js-ready .wrap {
  animation: pageIn 0.5s ease-out both;
}
