/* =========================================================
   YANSYS MEDICAL — Animations & Transitions
   ========================================================= */

/* Keyframes */
@keyframes scrollBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); opacity: 1; }
  50%       { transform: translateX(-50%) translateY(8px); opacity: 0.5; }
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInLeft {
  from { opacity: 0; transform: translateX(-30px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes fadeInRight {
  from { opacity: 0; transform: translateX(30px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.9); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0,168,150,.4); }
  50%       { box-shadow: 0 0 0 12px rgba(0,168,150,0); }
}
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-12px); }
}
@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
@keyframes countUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes lineGrow {
  from { width: 0; }
  to   { width: 100%; }
}
@keyframes spinSlow {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* Reveal on scroll — base state */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-24px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.reveal-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(24px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.reveal-right.visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.94);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal-scale.visible {
  opacity: 1;
  transform: scale(1);
}

/* Stagger delays */
.delay-100 { transition-delay: 0.10s !important; }
.delay-200 { transition-delay: 0.20s !important; }
.delay-300 { transition-delay: 0.30s !important; }
.delay-400 { transition-delay: 0.40s !important; }
.delay-500 { transition-delay: 0.50s !important; }
.delay-600 { transition-delay: 0.60s !important; }
.delay-700 { transition-delay: 0.70s !important; }
.delay-800 { transition-delay: 0.80s !important; }

/* Hero entrance */
.hero-text .hero-label,
.hero-label { animation: fadeInUp 0.6s ease both; animation-delay: 0.2s; }
.hero-text h1,
.hero-title-block h1 { animation: fadeInUp 0.7s ease both; animation-delay: 0.35s; }
.hero-text .hero-desc,
.hero-desc-block .hero-desc { animation: fadeInUp 0.7s ease both; animation-delay: 0.50s; }
.hero-text .hero-ctas,
.hero-ctas { animation: fadeInUp 0.7s ease both; animation-delay: 0.65s; }
.hero-visual .hero-card { animation: fadeInRight 0.8s ease both; animation-delay: 0.7s; }

/* Floating cards */
.float-card { animation: float 4s ease-in-out infinite; }
.float-card:nth-child(2) { animation-delay: -2s; }

/* Pulse on icon */
.pulse-icon { animation: pulse 2.5s ease-in-out infinite; }

/* Skeleton shimmer */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 4px;
}

/* Stats counter animation */
.stat-number {
  animation: countUp 0.8s ease both;
}

/* Section separator line */
.separator {
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
  border-radius: 2px;
  margin-bottom: var(--space-lg);
}
.separator.center { margin-inline: auto; }

/* Gradient text */
.gradient-text {
  background: linear-gradient(135deg, var(--color-primary-light), var(--color-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Decorative elements */
.deco-circle {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0,168,150,.15) 0%, transparent 70%);
  pointer-events: none;
}

/* Loading spinner */
.spinner {
  width: 20px;
  height: 20px;
  border: 2.5px solid rgba(255,255,255,.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spinSlow 0.7s linear infinite;
  display: inline-block;
}

/* Page transition */
.page-transition {
  animation: fadeIn 0.4s ease;
}

/* Card hover glow */
.glow-hover {
  transition: box-shadow var(--transition-normal);
}
.glow-hover:hover {
  box-shadow: 0 0 0 3px rgba(0,168,150,.25), var(--shadow-lg);
}

/* Underline animate */
.underline-anim {
  position: relative;
}
.underline-anim::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-secondary);
  transition: width var(--transition-normal);
}
.underline-anim:hover::after { width: 100%; }

/* Tag line decoration */
.tag-line {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}
.tag-line::before, .tag-line::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--color-border);
}

/* Tooltip */
[data-tooltip] { position: relative; cursor: help; }
[data-tooltip]::before {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  background: var(--color-dark);
  color: white;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-fast);
  z-index: 100;
}
[data-tooltip]:hover::before { opacity: 1; }

/* Focus visible */
:focus-visible {
  outline: 2.5px solid var(--color-primary);
  outline-offset: 3px;
  border-radius: 4px;
}

/* 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, .reveal-scale {
    opacity: 1 !important;
    transform: none !important;
  }
  .sponsor-lux-bg,
  .sponsor-lux-inner,
  .sponsor-lux-item,
  .sponsor-lux-tag,
  .sponsor-lux-img,
  .sponsor-lux-deco,
  .sponsor-lux-overlay,
  .sponsor-lux-accent {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    clip-path: none !important;
    animation: none !important;
  }
}
