/* ============================================================
   DELTA — Animations & Motion
   ============================================================ */

/* ============================================================
   Keyframes
   ============================================================ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(40px); }
  to   { opacity: 1; transform: translateY(0); }
}

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

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

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

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

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.88); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 20px var(--primary-glow); }
  50%       { box-shadow: 0 0 48px rgba(0, 73, 172, 0.7), 0 0 80px rgba(0, 73, 172, 0.3); }
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-10px); }
}

@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}

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

@keyframes border-flow {
  0%   { border-color: var(--primary); }
  33%  { border-color: var(--accent); }
  66%  { border-color: var(--primary-light); }
  100% { border-color: var(--primary); }
}

@keyframes gradient-shift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

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

/* ============================================================
   Scroll Reveal — Initial States
   Elements that should animate on scroll
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity var(--t-slower) var(--ease-out),
              transform var(--t-slower) var(--ease-out);
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-50px);
  transition: opacity var(--t-slower) var(--ease-out),
              transform var(--t-slower) var(--ease-out);
}

.reveal-left.revealed {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(50px);
  transition: opacity var(--t-slower) var(--ease-out),
              transform var(--t-slower) var(--ease-out);
}

.reveal-right.revealed {
  opacity: 1;
  transform: translateX(0);
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.9);
  transition: opacity var(--t-slower) var(--ease-out),
              transform var(--t-slower) var(--ease-out);
}

.reveal-scale.revealed {
  opacity: 1;
  transform: scale(1);
}

/* Stagger delays for children */
.stagger > *:nth-child(1)  { transition-delay: 0.05s; }
.stagger > *:nth-child(2)  { transition-delay: 0.12s; }
.stagger > *:nth-child(3)  { transition-delay: 0.19s; }
.stagger > *:nth-child(4)  { transition-delay: 0.26s; }
.stagger > *:nth-child(5)  { transition-delay: 0.33s; }
.stagger > *:nth-child(6)  { transition-delay: 0.40s; }
.stagger > *:nth-child(7)  { transition-delay: 0.47s; }
.stagger > *:nth-child(8)  { transition-delay: 0.54s; }

/* ============================================================
   Hero Animations (immediate, no scroll trigger)
   ============================================================ */
.hero-animate-1 { animation: fadeDown 0.9s var(--ease-out) 0.1s both; }
.hero-animate-2 { animation: fadeUp  0.9s var(--ease-out) 0.3s both; }
.hero-animate-3 { animation: fadeUp  0.9s var(--ease-out) 0.5s both; }
.hero-animate-4 { animation: fadeUp  0.9s var(--ease-out) 0.7s both; }
.hero-animate-5 { animation: fadeUp  0.9s var(--ease-out) 0.9s both; }

/* ============================================================
   Hero Canvas
   ============================================================ */
#particles-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* ============================================================
   Hero Section
   ============================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--bg);
}

.hero-bg-gradient {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(0, 73, 172, 0.4) 0%, transparent 70%),
    radial-gradient(ellipse 50% 40% at 80% 80%, rgba(0, 47, 122, 0.2) 0%, transparent 60%),
    radial-gradient(ellipse 40% 30% at 20% 60%, rgba(255, 215, 0, 0.05) 0%, transparent 60%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 900px;
  padding: 0 24px;
  padding-top: var(--navbar-h);
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 20px;
  background: rgba(0, 73, 172, 0.15);
  border: 1px solid rgba(0, 73, 172, 0.3);
  border-radius: var(--radius-full);
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--primary-light);
  margin-bottom: 28px;
}

.hero-eyebrow-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse-glow 2s ease-in-out infinite;
  flex-shrink: 0;
}

.hero h1 {
  font-size: clamp(2.6rem, 6.5vw, 5.2rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.18;
  margin-bottom: 32px;
}

.hero-tagline {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 40px;
  line-height: 1.75;
}

.hero-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 100px;
  flex-wrap: wrap;
}

.hero-scroll-hint {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  animation: fadeIn 1s ease 1.5s both;
}

.scroll-mouse {
  width: 22px;
  height: 36px;
  border: 2px solid rgba(255,255,255,0.2);
  border-radius: var(--radius-full);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 6px;
}

.scroll-mouse-dot {
  width: 3px;
  height: 8px;
  background: var(--primary-light);
  border-radius: var(--radius-full);
  animation: float 1.6s ease-in-out infinite;
}

/* ============================================================
   Floating Orbs (background decoration)
   ============================================================ */
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  animation: float 8s ease-in-out infinite;
}

.orb-1 {
  width: 400px;
  height: 400px;
  background: rgba(0, 73, 172, 0.12);
  top: -100px;
  right: -100px;
  animation-duration: 10s;
}

.orb-2 {
  width: 300px;
  height: 300px;
  background: rgba(255, 215, 0, 0.05);
  bottom: 10%;
  left: -80px;
  animation-duration: 12s;
  animation-delay: -3s;
}

.orb-3 {
  width: 200px;
  height: 200px;
  background: rgba(0, 73, 172, 0.1);
  bottom: 30%;
  right: 10%;
  animation-duration: 9s;
  animation-delay: -5s;
}

/* ============================================================
   Shimmer Loading Effect (optional use)
   ============================================================ */
.shimmer {
  background: linear-gradient(90deg,
    var(--glass-bg) 25%,
    rgba(255,255,255,0.08) 50%,
    var(--glass-bg) 75%);
  background-size: 200% auto;
  animation: shimmer 2s linear infinite;
}

/* ============================================================
   Tab Transition
   ============================================================ */
.tab-panel {
  display: none;
  animation: fadeIn 0.4s var(--ease-out);
}

.tab-panel.active {
  display: block;
}

/* ============================================================
   Counter Animation
   ============================================================ */
.counter-value {
  animation: count-up 0.4s var(--ease-out) both;
}

/* ============================================================
   Animated Underline (for headings)
   ============================================================ */
.underline-animate {
  position: relative;
  display: inline-block;
}

.underline-animate::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transition: width 0.6s var(--ease-out);
  border-radius: var(--radius-full);
}

.underline-animate:hover::after,
.underline-animate.active::after { width: 100%; }

/* ============================================================
   Parallax Container
   ============================================================ */
.parallax-container {
  will-change: transform;
}

/* ============================================================
   Glow Rings (decorative)
   ============================================================ */
.glow-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(0, 73, 172, 0.15);
  pointer-events: none;
  animation: spin-slow 30s linear infinite;
}

.glow-ring-1 {
  width: 600px;
  height: 600px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.glow-ring-2 {
  width: 400px;
  height: 400px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation-direction: reverse;
  animation-duration: 20s;
  border-color: rgba(255, 215, 0, 0.08);
}

/* ============================================================
   Page Transition Overlay
   ============================================================ */
.page-transition {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 9999;
  pointer-events: none;
  animation: fadeIn 0.3s ease both;
}

/* ============================================================
   Reduced Motion Support
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }

  .reveal,
  .reveal-left,
  .reveal-right,
  .reveal-scale {
    opacity: 1;
    transform: none;
  }
}

/* ============================================================
   Light Theme — Animation Overrides
   ============================================================ */

/* Hero background gradient */
[data-theme="light"] .hero-bg-gradient {
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(0, 73, 172, 0.12) 0%, transparent 70%),
    radial-gradient(ellipse 50% 40% at 80% 80%, rgba(0, 47, 122, 0.06) 0%, transparent 60%),
    radial-gradient(ellipse 40% 30% at 20% 60%, rgba(255, 215, 0, 0.04) 0%, transparent 60%);
}

/* Floating orbs — softer on light */
[data-theme="light"] .orb-1 {
  background: rgba(0, 73, 172, 0.06);
}

[data-theme="light"] .orb-2 {
  background: rgba(255, 215, 0, 0.04);
}

[data-theme="light"] .orb-3 {
  background: rgba(0, 73, 172, 0.05);
}

/* Glow rings — lighter */
[data-theme="light"] .glow-ring {
  border-color: rgba(0, 73, 172, 0.06);
}

[data-theme="light"] .glow-ring-2 {
  border-color: rgba(255, 215, 0, 0.04);
}

/* Hero eyebrow badge */
[data-theme="light"] .hero-eyebrow {
  background: rgba(0, 73, 172, 0.08);
  border-color: rgba(0, 73, 172, 0.2);
}

/* Scroll mouse */
[data-theme="light"] .scroll-mouse {
  border-color: rgba(0, 73, 172, 0.2);
}

[data-theme="light"] .scroll-mouse-dot {
  background: var(--primary);
}
