/* DropForce Systems — Animations v3.0 (GSAP + Animate.css) */

/* ═══════════════ KEYFRAMES ═══════════════ */

@keyframes pulse-green {
  0%   { box-shadow: 0 0 4px 1px rgba(52,211,153,0.4); opacity: 0.85; }
  50%  { box-shadow: 0 0 16px 5px rgba(52,211,153,0.85); opacity: 1; }
  100% { box-shadow: 0 0 4px 1px rgba(52,211,153,0.4); opacity: 0.85; }
}

@keyframes pulse-yellow {
  0%   { box-shadow: 0 0 3px 1px rgba(248,191,36,0.3); opacity: 0.75; }
  50%  { box-shadow: 0 0 10px 3px rgba(248,191,36,0.6); opacity: 1; }
  100% { box-shadow: 0 0 3px 1px rgba(248,191,36,0.3); opacity: 0.75; }
}

@keyframes pulse-brand {
  0%   { box-shadow: 0 0 4px 1px rgba(34,211,238,0.4); opacity: 0.85; }
  50%  { box-shadow: 0 0 14px 4px rgba(34,211,238,0.8); opacity: 1; }
  100% { box-shadow: 0 0 4px 1px rgba(34,211,238,0.4); opacity: 0.85; }
}

@keyframes glowPulse {
  0%   { text-shadow: 0 0 8px rgba(34,211,238,0.4); }
  50%  { text-shadow: 0 0 28px rgba(34,211,238,0.95), 0 0 60px rgba(34,211,238,0.35); }
  100% { text-shadow: 0 0 8px rgba(34,211,238,0.4); }
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(0.6); transform-origin: top; }
  50%       { opacity: 1;   transform: scaleY(1);   transform-origin: top; }
}

@keyframes beamFillDropforce {
  0%   { width: 0%; }
  100% { width: 100%; }
}

@keyframes beamFillCompetitor {
  0%   { width: 0%; }
  100% { width: 10%; }
}

@keyframes droneHover {
  0%, 100% { transform: translateY(0) scale(1); }
  50%       { transform: translateY(-5px) scale(1.05); }
}

@keyframes rotorSpin {
  0%   { transform: scale(0.55) rotate(0deg);   opacity: 0.45; }
  50%  { transform: scale(1.1)  rotate(180deg); opacity: 1; }
  100% { transform: scale(0.55) rotate(360deg); opacity: 0.45; }
}

@keyframes hudCursorBlink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

@keyframes iconPulseIn {
  0%   { transform: scale(0.5); opacity: 0; }
  100% { transform: scale(1);  opacity: 1; }
}

@keyframes statGlowIn {
  from { text-shadow: 0 0 0 rgba(34,211,238,0); }
  to   { text-shadow: 0 0 32px rgba(34,211,238,0.55); }
}

@keyframes cardScanReveal {
  0%   { left: -60%; opacity: 1; }
  80%  { left: 120%;  opacity: 1; }
  100% { left: 120%;  opacity: 0; }
}

@keyframes borderGlow {
  0%   { box-shadow: 0 0 0 0 rgba(34,211,238,0); }
  50%  { box-shadow: 0 0 0 2px rgba(34,211,238,0.4); }
  100% { box-shadow: 0 0 0 0 rgba(34,211,238,0); }
}

/* ═══════════════ HERO GLOW (persistent after GSAP reveal) ═══════════════ */

.hero-headline {
  animation: glowPulse 3.5s ease-in-out 1.6s infinite;
}

/* ═══════════════ CARD TRANSITIONS ═══════════════ */

.stat-card,
.production-card,
.tech-card,
.hiw-step,
.status-card {
  transition:
    box-shadow 0.35s cubic-bezier(0.4, 0.0, 0.2, 1),
    border-color var(--transition-normal);
  will-change: box-shadow, border-color;
}

/* ═══════════════ CARD HOVER ═══════════════ */

.stat-card:hover {
  border-color: var(--color-border-accent);
  box-shadow: 0 0 28px var(--glow-brand-light), inset 0 0 18px rgba(34,211,238,0.06);
}
.production-card:hover {
  border-color: var(--color-border-accent);
  box-shadow: 0 0 32px var(--glow-brand-light), inset 0 0 22px rgba(34,211,238,0.07);
}
.tech-card:hover {
  border-color: var(--color-border-accent);
  box-shadow: 0 0 24px var(--glow-brand-light), inset 0 0 16px rgba(34,211,238,0.06);
}
.status-card:hover {
  border-color: rgba(34,211,238,0.4);
  box-shadow: 0 0 14px rgba(34,211,238,0.12);
}

/* ═══════════════ CARD TOP BAR ═══════════════ */

.card-top-bar {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--color-border-tactical);
  transform-origin: left;
  transition: background var(--transition-normal), box-shadow var(--transition-normal);
}
.production-card:hover .card-top-bar,
.tech-card:hover .card-top-bar {
  background: var(--color-brand-cyan);
  box-shadow: 0 0 12px var(--glow-brand-light);
}

/* ═══════════════ BUTTONS ═══════════════ */

.btn-primary {
  will-change: transform;
  transition:
    transform var(--transition-fast),
    box-shadow var(--transition-fast),
    background var(--transition-fast),
    color var(--transition-fast);
}
.btn-primary:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 0 32px var(--glow-brand-intense);
}
.btn-primary:active { transform: translateY(0) scale(0.98); }

.btn-secondary {
  will-change: transform;
  transition:
    transform var(--transition-fast),
    border-color var(--transition-fast),
    color var(--transition-fast),
    background var(--transition-fast);
}
.btn-secondary:hover {
  transform: translateY(-2px) scale(1.04);
  border-color: var(--color-brand-cyan);
  background: var(--color-bg-hover);
  color: var(--color-text-accent);
}
.btn-secondary:active { transform: scale(0.98); }

/* ═══════════════ STATUS DOTS ═══════════════ */

.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-status-online);
  vertical-align: middle;
  margin-right: 6px;
  flex-shrink: 0;
}
.status-dot.operational { animation: pulse-green 1.5s ease-in-out infinite; }
.status-dot.development { background: var(--color-status-caution); animation: pulse-yellow 2.2s ease-in-out infinite; }
.status-dot.pipeline    { background: var(--color-status-pipeline); animation: none; }
.status-dot.info        { background: var(--color-brand-cyan); animation: pulse-brand 2s ease-in-out infinite; }

/* ═══════════════ CORNER BRACKETS ═══════════════ */

.corner-bracket {
  position: absolute;
  width: 12px;
  height: 12px;
  opacity: 0;
  transition: opacity var(--transition-normal), border-color var(--transition-normal);
}
.corner-bracket.br-tl { top:0;left:0; border-top:2px solid var(--color-border-tactical); border-left:2px solid var(--color-border-tactical); }
.corner-bracket.br-tr { top:0;right:0; border-top:2px solid var(--color-border-tactical); border-right:2px solid var(--color-border-tactical); }
.corner-bracket.br-bl { bottom:0;left:0; border-bottom:2px solid var(--color-border-tactical); border-left:2px solid var(--color-border-tactical); }
.corner-bracket.br-br { bottom:0;right:0; border-bottom:2px solid var(--color-border-tactical); border-right:2px solid var(--color-border-tactical); }
.corner-bracket.loaded { opacity: 1; }

.stat-card:hover .corner-bracket,
.production-card:hover .corner-bracket,
.tech-card:hover .corner-bracket {
  border-color: var(--color-brand-cyan);
  opacity: 1;
}

/* ═══════════════ TECH ICON SVG ═══════════════ */

.tech-icon-svg {
  width: 28px;
  height: 28px;
  color: var(--color-brand-cyan);
  margin-bottom: var(--space-sm);
  display: block;
  opacity: 0.8;
  transition: opacity var(--transition-fast), filter var(--transition-fast);
}
.tech-card:hover .tech-icon-svg {
  opacity: 1;
  filter: drop-shadow(0 0 6px rgba(34,211,238,0.6));
}

/* ═══════════════ CARD SCAN-LINE (JS adds .scan class) ═══════════════ */

.stat-card.scan::after,
.tech-card.scan::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  left: -60%;
  width: 55%;
  background: linear-gradient(90deg, transparent, rgba(34,211,238,0.09), transparent);
  animation: cardScanReveal 0.85s ease-out forwards;
  pointer-events: none;
  z-index: 5;
}

/* ═══════════════ HiW ICON BOUNCE (JS adds .bounce-in class) ═══════════════ */

.hiw-icon.bounce-in {
  animation: iconPulseIn 0.45s ease-out both;
}

/* ═══════════════ STAT NUMBER GLOW (JS adds .glow-in class) ═══════════════ */

.stat-number.glow-in {
  animation: statGlowIn 0.7s ease-out 0.25s forwards;
}

/* ═══════════════ HUD CURSOR ═══════════════ */

.hud-cursor {
  display: inline-block;
  width: 7px;
  height: 11px;
  background: var(--color-brand-cyan);
  margin-left: 3px;
  vertical-align: middle;
  animation: hudCursorBlink 0.7s step-start infinite;
}

/* ═══════════════ NAV LINK UNDERLINE ═══════════════ */

.nav-links a::after {
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ═══════════════ PLATFORM CHIP HOVER ═══════════════ */

.platform-chip {
  transition:
    border-color var(--transition-fast),
    background var(--transition-fast),
    transform var(--transition-fast),
    box-shadow var(--transition-fast);
}
.platform-chip:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 10px rgba(103,232,249,0.25);
}

/* ═══════════════ RM ITEM HOVER ═══════════════ */

.rm-item {
  transition: border-color var(--transition-fast), transform 0.2s ease;
}
.rm-col--operational .rm-item:hover,
.rm-col--development .rm-item:hover {
  transform: translateX(4px);
}

/* ═══════════════ CTA SECTION AMBIENT GLOW ═══════════════ */

@keyframes ctaGlowShift {
  0%   { transform: translate(-50%,-50%) scale(1)   rotate(0deg); opacity: 0.08; }
  33%  { transform: translate(-48%,-52%) scale(1.15) rotate(4deg); opacity: 0.12; }
  66%  { transform: translate(-52%,-48%) scale(0.9)  rotate(-4deg); opacity: 0.09; }
  100% { transform: translate(-50%,-50%) scale(1)   rotate(0deg); opacity: 0.08; }
}

.cta-section::before {
  animation: ctaGlowShift 8s ease-in-out infinite;
}

/* ═══════════════ CTA INNER: animated top bar ═══════════════ */

@keyframes ctaTopBar {
  0%   { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

.cta-section-inner::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg,
    var(--color-brand-cyan) 0%,
    rgba(34,211,238,0.3) 30%,
    var(--color-status-online) 60%,
    var(--color-brand-cyan) 100%
  );
  background-size: 200% auto;
  animation: ctaTopBar 3s linear infinite;
}

/* ═══════════════ HERO HUD SCAN LINE ═══════════════ */

@keyframes hudScan {
  0%   { top: -2px; opacity: 0; }
  5%   { opacity: 0.6; }
  95%  { opacity: 0.6; }
  100% { top: 100%;  opacity: 0; }
}

.hero-hud::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(34,211,238,0.5) 50%, transparent 100%);
  animation: hudScan 4s ease-in-out 2s infinite;
  pointer-events: none;
}

/* ═══════════════ HERO STATUS BAR BORDER PULSE ═══════════════ */

@keyframes statusBarBorderPulse {
  0%, 100% { border-color: rgba(52,211,153,0.30); }
  50%       { border-color: rgba(52,211,153,0.65); }
}

.hero-status-bar {
  animation: statusBarBorderPulse 2.5s ease-in-out infinite;
}

/* ═══════════════ SPEED MULTIPLIER GLOW ═══════════════ */

@keyframes multiplierPulse {
  0%, 100% { text-shadow: 0 0 40px rgba(34,211,238,0.35), 0 0 80px rgba(34,211,238,0.12); }
  50%       { text-shadow: 0 0 70px rgba(34,211,238,0.65), 0 0 140px rgba(34,211,238,0.25); }
}

.speed-ctx-multiplier {
  animation: multiplierPulse 3s ease-in-out infinite;
}

/* ═══════════════ RM NODES GLOW ═══════════════ */

.rm-node-operational .rm-node-dot {
  animation: pulse-green 2s ease-in-out infinite;
}

.rm-node-development .rm-node-dot {
  animation: pulse-yellow 2.4s ease-in-out infinite;
}

/* ═══════════════ REDUCED MOTION ═══════════════ */

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