/* =============================================================
   ANIMATIONS.CSS — Keyframes, reveals, effects
   Sanus Pharma · v20260525
   ============================================================= */

/* ─── KEYFRAMES ─────────────────────────────────────────────── */

@keyframes meshDrift {
  0%, 100% { transform: scale(1) rotate(0deg) translateX(0); }
  33%       { transform: scale(1.08) rotate(3deg) translateX(-2%); }
  66%       { transform: scale(1.04) rotate(-2deg) translateX(2%); }
}

@keyframes floatOrbit1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%       { transform: translate(-18px, 22px) scale(1.06); }
  66%       { transform: translate(12px, -14px) scale(0.94); }
}

@keyframes floatOrbit2 {
  0%, 100% { transform: translate(0, 0) scale(1) rotate(0deg); }
  50%       { transform: translate(-12px, 18px) scale(1.1) rotate(15deg); }
}

@keyframes floatOrbit3 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  40%       { transform: translate(10px, -20px) scale(1.12); }
  80%       { transform: translate(-8px, 12px) scale(0.9); }
}

@keyframes heroDotPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.75); }
}

@keyframes scrollLineAnim {
  0%   { transform: scaleY(0); transform-origin: top; opacity: 1; }
  50%  { transform: scaleY(1); transform-origin: top; opacity: 1; }
  51%  { transform: scaleY(1); transform-origin: bottom; opacity: 1; }
  100% { transform: scaleY(0); transform-origin: bottom; opacity: 0; }
}

@keyframes splashLogoPulse {
  from { transform: scale(1) rotate(-3deg); }
  to   { transform: scale(1.08) rotate(3deg); }
}

@keyframes splashBarGrow {
  from { width: 0%; }
  to   { width: 100%; }
}

@keyframes splashSafety {
  to {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
  }
}

@keyframes ringPulse {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50%       { opacity: 0.2; transform: scale(1.15); }
}

@keyframes checkDraw {
  to { stroke-dashoffset: 0; }
}

@keyframes revealFadeUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes revealFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes revealSlideRight {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes navSlideDown {
  from { transform: translateY(-100%); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

/* ─── SCROLL REVEAL ─────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
  will-change: opacity, transform;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger delays for grid children */
.values-grid .reveal:nth-child(2) { transition-delay: 0.08s; }
.values-grid .reveal:nth-child(3) { transition-delay: 0.16s; }
.values-grid .reveal:nth-child(4) { transition-delay: 0.24s; }

.prop-grid .reveal:nth-child(2) { transition-delay: 0.05s; }
.prop-grid .reveal:nth-child(3) { transition-delay: 0.10s; }
.prop-grid .reveal:nth-child(4) { transition-delay: 0.15s; }
.prop-grid .reveal:nth-child(5) { transition-delay: 0.20s; }

.infra-features .reveal:nth-child(2) { transition-delay: 0.06s; }
.infra-features .reveal:nth-child(3) { transition-delay: 0.12s; }
.infra-features .reveal:nth-child(4) { transition-delay: 0.18s; }
.infra-features .reveal:nth-child(5) { transition-delay: 0.24s; }
.infra-features .reveal:nth-child(6) { transition-delay: 0.30s; }

.team-grid .reveal:nth-child(2) { transition-delay: 0.06s; }
.team-grid .reveal:nth-child(3) { transition-delay: 0.12s; }
.team-grid .reveal:nth-child(4) { transition-delay: 0.18s; }
.team-grid .reveal:nth-child(5) { transition-delay: 0.24s; }
.team-grid .reveal:nth-child(6) { transition-delay: 0.30s; }

.mission-grid .reveal:nth-child(2) { transition-delay: 0.12s; }
.partners-grid .reveal:nth-child(2) { transition-delay: 0.06s; }
.partners-grid .reveal:nth-child(3) { transition-delay: 0.12s; }
.partners-grid .reveal:nth-child(4) { transition-delay: 0.18s; }
.partners-grid .reveal:nth-child(5) { transition-delay: 0.24s; }

.timeline .reveal:nth-child(2) { transition-delay: 0.08s; }
.timeline .reveal:nth-child(3) { transition-delay: 0.16s; }
.timeline .reveal:nth-child(4) { transition-delay: 0.24s; }
.timeline .reveal:nth-child(5) { transition-delay: 0.32s; }

.contact-details .reveal:nth-child(2) { transition-delay: 0.08s; }
.contact-details .reveal:nth-child(3) { transition-delay: 0.16s; }

.about-stats-row .reveal:nth-child(2) { transition-delay: 0.08s; }
.about-stats-row .reveal:nth-child(3) { transition-delay: 0.16s; }

.objective-pillars .reveal:nth-child(2) { transition-delay: 0.1s; }
.objective-pillars .reveal:nth-child(3) { transition-delay: 0.2s; }

/* Hero elements stagger */
.hero .hero-eyebrow { transition-delay: 0s; }
.hero .hero-headline { transition-delay: 0.12s; }
.hero .hero-sub { transition-delay: 0.24s; }
.hero .hero-actions { transition-delay: 0.36s; }

/* ─── NAV ANIMATION ─────────────────────────────────────────── */
.nav {
  animation: navSlideDown 0.8s var(--ease-out) 0.5s both;
}

/* ─── HERO STATS REVEAL ─────────────────────────────────────── */
.hero-stats {
  opacity: 0;
  animation: revealFadeIn 0.8s var(--ease-out) 1.2s forwards;
}

.hero-scroll-hint {
  opacity: 0;
  animation: revealFadeIn 0.8s var(--ease-out) 1.4s forwards;
}

/* ─── GLASS CARD HOVER GLOW ─────────────────────────────────── */
.glass-card {
  position: relative;
  overflow: hidden;
}

.glass-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    circle at var(--card-mx, 50%) var(--card-my, 50%),
    rgba(115, 200, 255, 0.08) 0%,
    transparent 60%
  );
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.glass-card:hover::after { opacity: 1; }

/* ─── BUTTON SHIMMER ────────────────────────────────────────── */
.btn-primary {
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.18),
    transparent
  );
  transition: left 0.5s var(--ease-soft);
}

.btn-primary:hover::before {
  left: 150%;
}

/* ─── EYEBROW UNDERLINE ANIMATION ─────────────────────────────── */
.eyebrow {
  position: relative;
  display: inline-block;
}

/* ─── SECTION BG TINT PARALLAX ──────────────────────────────── */
.section-bg-tint {
  transform-origin: center center;
}

/* ─── TEAM AVATAR ANIMATION ─────────────────────────────────── */
.team-card:hover .team-avatar-ring {
  animation: ringPulse 1.2s ease-in-out infinite;
  opacity: 0.7;
}

/* ─── FORM INPUT FOCUS ANIMATION ───────────────────────────── */
.form-input {
  position: relative;
}

/* ─── FOOTER GRADIENT ANIMATION ─────────────────────────────── */
.footer-glass {
  animation: meshDrift 30s ease-in-out infinite;
}

/* ─── PAGE READY STATE ──────────────────────────────────────── */
html:not(.is-ready) .splash { display: flex; }
html.is-ready .splash { display: none; }

/* ─── PARTNER CARD HOVER ─────────────────────────────────────── */
.partner-card--wide .partner-visual img {
  transition: transform var(--t-slow);
}

.partner-card--wide:hover .partner-visual img {
  transform: scale(1.05);
}

/* ─── INFRA IMAGE PARALLAX ──────────────────────────────────── */
.infra-image img {
  transition: transform var(--t-slow);
}

.infra-image:hover img { transform: scale(1.05); }

/* ─── TIMELINE CONNECTOR LINE ───────────────────────────────── */
@media (min-width: 960px) {
  .timeline {
    position: relative;
  }

  .timeline::before {
    content: '';
    position: absolute;
    top: 26px;
    left: 26px;
    right: 26px;
    height: 2px;
    background: linear-gradient(90deg, var(--secondary), var(--accent), var(--secondary));
    z-index: 0;
    opacity: 0.3;
  }
}

/* ─── ACTIVE NAV LINK ───────────────────────────────────────── */
.nav-link.is-active {
  color: var(--accent);
  background: var(--bg-2);
}

/* ─── SCROLL PROGRESS INDICATOR ─────────────────────────────── */
.scroll-progress {
  position: fixed;
  top: var(--nav-h);
  left: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--secondary), var(--accent));
  z-index: 1001;
  transform-origin: left;
  transform: scaleX(0);
  transition: transform 0.1s linear;
}
