/* ═══════════════════════════════════════════════════
   BRIDGEHEAD PARTNERS — animations.css
   Premium animations + visual enhancements
   ═══════════════════════════════════════════════════ */

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

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

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

@keyframes gradientShift {
  0%   { background-position: 0% 60%; }
  50%  { background-position: 100% 40%; }
  100% { background-position: 0% 60%; }
}

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

@keyframes floatSlow {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50%       { transform: translateY(-8px) rotate(1deg); }
}

@keyframes dotPulse {
  0%, 100% { transform: scale(1); opacity: 1; box-shadow: 0 0 0 0 rgba(0,201,167,.4); }
  50%       { transform: scale(1.3); opacity: .8; box-shadow: 0 0 0 6px rgba(0,201,167,0); }
}

@keyframes shimmer {
  from { transform: translateX(-120%) skewX(-20deg); }
  to   { transform: translateX(220%) skewX(-20deg); }
}

@keyframes ripple {
  0%   { r: 0; opacity: 0.6; }
  100% { r: 40; opacity: 0; }
}

@keyframes particleRise {
  0%   { opacity: 0; transform: translateY(0) scale(0.5); }
  20%  { opacity: 0.6; }
  80%  { opacity: 0.2; }
  100% { opacity: 0; transform: translateY(-80px) scale(1); }
}

@keyframes scanRotate {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

@keyframes dataFlow {
  0%   { stroke-dashoffset: 120; opacity: 0; }
  20%  { opacity: 0.8; }
  80%  { opacity: 0.6; }
  100% { stroke-dashoffset: 0; opacity: 0; }
}

@keyframes alertBlink {
  0%, 100% { opacity: 1; r: 5; }
  50%       { opacity: 0.3; r: 7; }
}

@keyframes nodeBreath {
  0%, 100% { opacity: 0.5; r: var(--base-r, 22); }
  50%       { opacity: 0; r: calc(var(--base-r, 22) + 8); }
}

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

@keyframes borderGlow {
  0%, 100% { border-color: rgba(0,201,167,.15); }
  50%       { border-color: rgba(0,201,167,.4); }
}

/* ── HERO ENHANCED ──────────────────────────────────── */

.hero {
  background: linear-gradient(135deg, #1E1B4B 0%, #2D2A6E 35%, #1a1744 65%, #131040 100%) !important;
  background-size: 400% 400% !important;
  animation: gradientShift 14s ease infinite;
  padding: 0 !important;
}

.hero::before {
  content: '' !important;
  position: absolute !important;
  inset: 0 !important;
  background-image:
    linear-gradient(rgba(0,201,167,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,201,167,.045) 1px, transparent 1px) !important;
  background-size: 56px 56px !important;
  pointer-events: none !important;
}

.hero::after {
  content: '' !important;
  position: absolute !important;
  top: -10%;
  right: 0;
  width: 55%;
  height: 90%;
  background: radial-gradient(ellipse at 60% 30%, rgba(34,81,227,.14) 0%, transparent 65%);
  pointer-events: none;
}

.hero__inner {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 40px !important;
  align-items: center !important;
  min-height: 90vh !important;
  padding-top: 100px !important;
  padding-bottom: 80px !important;
}

@media (max-width: 860px) {
  .hero__inner {
    grid-template-columns: 1fr !important;
    min-height: auto !important;
    padding-top: 72px !important;
    padding-bottom: 60px !important;
  }
  .hero__visual { display: none !important; }
}

/* ── HERO CONTENT (left column) ────────────────────── */

.hero__content {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
  z-index: 1;
  text-align: left;
}

/* ── HERO PARTICLES ─────────────────────────────────── */

.hero-particles {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.particle {
  position: absolute;
  width: 3px; height: 3px;
  border-radius: 50%;
  background: var(--teal);
  opacity: 0;
  animation: particleRise var(--dur) ease-in-out var(--delay) infinite;
}

/* ── HERO VISUAL (SVG SIDE) ─────────────────────────── */

.hero__visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: floatSlow 9s ease-in-out infinite;
}

.hero__network {
  width: 100%;
  max-width: 500px;
  filter: drop-shadow(0 0 48px rgba(0,201,167,.12));
}

/* ── HERO TITLE GRADIENT ────────────────────────────── */

.hero__title em {
  font-style: normal !important;
  background: linear-gradient(90deg, #00C9A7 0%, #60efcf 50%, #7dd3fc 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
}

/* ── HERO BADGE PULSE ───────────────────────────────── */

.hero__badge {
  animation: fadeIn 0.6s ease both;
}

/* ── LOGO DOT PULSE ─────────────────────────────────── */

.nav__logo-dot {
  width: 10px !important;
  height: 10px !important;
  border-radius: 50% !important;
  background: var(--teal) !important;
  display: inline-block !important;
  animation: dotPulse 2.8s ease-in-out infinite !important;
}

/* ── NAVBAR SCROLL EFFECT ───────────────────────────── */

.nav {
  transition: background .3s ease, box-shadow .3s ease !important;
}

.nav.scrolled {
  background: rgba(30,27,75,.99) !important;
  box-shadow: 0 4px 40px rgba(0,0,0,.25) !important;
}

/* ── SCROLL REVEAL ──────────────────────────────────── */

.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity .65s cubic-bezier(.22,1,.36,1), transform .65s cubic-bezier(.22,1,.36,1);
}

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

.reveal--left {
  transform: translateX(-32px);
}
.reveal--left.visible {
  transform: translateX(0);
}

.reveal--scale {
  transform: scale(0.95) translateY(16px);
}
.reveal--scale.visible {
  transform: scale(1) translateY(0);
}

.reveal--d1 { transition-delay: .08s; }
.reveal--d2 { transition-delay: .16s; }
.reveal--d3 { transition-delay: .24s; }
.reveal--d4 { transition-delay: .32s; }
.reveal--d5 { transition-delay: .40s; }
.reveal--d6 { transition-delay: .48s; }
.reveal--d7 { transition-delay: .56s; }
.reveal--d8 { transition-delay: .64s; }

/* ── CARD GLASSMORPHISM (dark sections) ─────────────── */

.card--dark {
  background: rgba(45,42,110,.55) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  border: 1px solid rgba(0,201,167,.10) !important;
  transition: transform .32s ease, box-shadow .32s ease, border-color .32s ease !important;
}

.card--dark:hover {
  transform: translateY(-8px) !important;
  box-shadow: 0 24px 56px rgba(0,0,0,.32), 0 0 0 1px rgba(0,201,167,.28) !important;
  border-color: rgba(0,201,167,.28) !important;
}

.card--dark .card__icon {
  transition: transform .3s ease !important;
}

.card--dark:hover .card__icon {
  transform: scale(1.18) rotate(-4deg) !important;
}

/* Light cards */
.cat-card {
  transition: transform .32s ease, box-shadow .32s ease, border-color .32s ease !important;
}
.cat-card:hover {
  transform: translateY(-6px) !important;
  box-shadow: 0 16px 40px rgba(0,0,0,.10) !important;
  border-color: var(--teal) !important;
}

.territory-card {
  transition: transform .32s ease, box-shadow .32s ease !important;
}
.territory-card:hover {
  transform: translateY(-5px) !important;
  box-shadow: 0 20px 48px rgba(0,0,0,.12) !important;
}

/* ── BUTTON SHIMMER ─────────────────────────────────── */

.btn {
  position: relative !important;
  overflow: hidden !important;
}

.btn::after {
  content: '' !important;
  position: absolute !important;
  top: 0; left: -120%;
  width: 50%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.22), transparent);
  transform: skewX(-20deg);
  pointer-events: none;
}

.btn:hover::after {
  animation: shimmer .55s ease;
}

/* ── STEP NUMBER GLOW ───────────────────────────────── */

.step__num {
  animation: borderGlow 4s ease-in-out infinite !important;
  box-shadow: 0 0 0 6px var(--white), 0 0 24px rgba(0,201,167,.3) !important;
}

/* ── PHOTO BAND ─────────────────────────────────────── */

.photo-band {
  position: relative;
  overflow: hidden;
  padding: 96px 0;
}

.photo-band__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: brightness(0.12) saturate(0.4);
  transform: scale(1.05);
  transition: transform 8s ease;
}

.photo-band:hover .photo-band__bg {
  transform: scale(1.02);
}

.photo-band__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(30,27,75,.7) 0%, rgba(13,10,42,.85) 100%);
}

.photo-band__content {
  position: relative;
  z-index: 1;
  text-align: center;
  color: var(--white);
}

.photo-band__kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  margin-top: 64px;
}

@media (max-width: 700px) {
  .photo-band__kpis { grid-template-columns: repeat(2, 1fr); }
}

.photo-kpi {
  text-align: center;
  padding: 28px 16px;
  border: 1px solid rgba(0,201,167,.2);
  border-radius: 16px;
  background: rgba(0,201,167,.05);
  backdrop-filter: blur(8px);
  transition: border-color .3s ease, background .3s ease;
}

.photo-kpi:hover {
  border-color: rgba(0,201,167,.45);
  background: rgba(0,201,167,.1);
}

.photo-kpi__num {
  font-size: 2.8rem;
  font-weight: 900;
  color: var(--teal);
  line-height: 1;
  margin-bottom: 8px;
  background: linear-gradient(90deg, #00C9A7, #60efcf);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.photo-kpi__label {
  font-size: .85rem;
  color: rgba(255,255,255,.65);
  font-weight: 500;
}

/* ── HERO STATS UPGRADE ─────────────────────────────── */

.hero__stats {
  border-top: 1px solid rgba(0,201,167,.15) !important;
}

.stat__num {
  background: linear-gradient(90deg, #00C9A7, #60efcf);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── SECTION HEADER EYEBROW ─────────────────────────── */

.section-header .eyebrow {
  position: relative;
  padding: 5px 14px;
  background: rgba(0,201,167,.08);
  border: 1px solid rgba(0,201,167,.2);
  border-radius: 100px;
}

/* ── TERRITORY HEADER INDIGO ────────────────────────── */

.territory-card__header {
  background: linear-gradient(135deg, var(--dark) 0%, var(--dark-2) 100%) !important;
}

/* ── VENDOR TAG GLOW ────────────────────────────────── */

.vendor-tag {
  background: rgba(34,81,227,.15) !important;
  color: #93c5fd !important;
  border: 1px solid rgba(34,81,227,.25) !important;
  transition: background .2s, border-color .2s !important;
}

.cat-card:hover .vendor-tag {
  background: rgba(0,201,167,.15) !important;
  color: var(--teal) !important;
  border-color: rgba(0,201,167,.3) !important;
}

/* ── FOOTER ENHANCEMENT ─────────────────────────────── */

.footer {
  background: linear-gradient(160deg, #131040 0%, #1E1B4B 100%) !important;
  border-top: 1px solid rgba(0,201,167,.12) !important;
}

/* ── URGENCY BAND ───────────────────────────────────── */

.urgency-band {
  background: linear-gradient(135deg, #1a1000 0%, #2d1a00 100%);
  border-top: 2px solid rgba(251,191,36,.3);
  border-bottom: 2px solid rgba(251,191,36,.3);
}
