/* =============================================
   OUTBOUND — Dopamine Animations
   Animated counters, glow effects, scroll
   triggers, micro-interactions, confetti
   ============================================= */

/* ---- Scroll Progress Bar ---- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: rgba(255,92,0,0.08);
  z-index: 9999;
  pointer-events: none;
}

.scroll-progress__bar {
  height: 100%;
  background: linear-gradient(90deg, #FF5C00, #FF8040);
  width: 0%;
  transition: width 0.1s linear;
  box-shadow: 0 0 8px rgba(255,92,0,0.6);
}

/* ---- Animated Counter Ticker ---- */
@keyframes count-up-fade {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.counter-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.counter-value {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  color: var(--white);
  line-height: 1;
  letter-spacing: -0.02em;
  display: inline-block;
}

.counter-label {
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 500;
  white-space: nowrap;
}

/* Pulse glow on metrics bar */
@keyframes metrics-pulse-glow {
  0%, 100% { box-shadow: 0 0 12px rgba(255,92,0,0.08); }
  50%       { box-shadow: 0 0 20px rgba(255,92,0,0.18); }
}

.metrics-ticker {
  animation: metrics-pulse-glow 4s ease-in-out infinite;
}

/* ---- Primary Button Glow + Lift ---- */
.btn-primary-glow {
  position: relative;
  background: var(--orange);
  color: white;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  padding: 14px 28px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
  box-shadow: 0 0 0 rgba(255,92,0,0);
}

.btn-primary-glow:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(255,92,0,0.4), 0 0 0 2px rgba(255,92,0,0.15);
}

.btn-primary-glow:active {
  transform: translateY(0);
  box-shadow: 0 0 0 rgba(255,92,0,0);
}

@keyframes btn-pulse-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,92,0,0); }
  50%       { box-shadow: 0 0 16px 2px rgba(255,92,0,0.25); }
}

.btn-primary-glow:not(:hover) {
  animation: btn-pulse-glow 3s ease-in-out infinite;
}

/* Secondary CTA arrow slide */
.btn-arrow-slide {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}

.btn-arrow-slide svg {
  transition: transform 0.2s ease;
}

.btn-arrow-slide:hover {
  color: var(--white);
}

.btn-arrow-slide:hover svg {
  transform: translateX(4px);
}

/* ---- Sticky Founding Banner ---- */
.sticky-founding-banner {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9000;
  max-width: 380px;
  background: linear-gradient(135deg, #1a0a00 0%, #2d1200 100%);
  border: 1px solid rgba(255,92,0,0.4);
  border-radius: 16px;
  padding: 16px 20px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.5), 0 0 24px rgba(255,92,0,0.15);
  display: none;
  overflow: hidden;
}

.sticky-founding-banner.visible {
  display: block;
  animation: slide-in-up 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes slide-in-up {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.sticky-founding-banner__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.sticky-founding-banner__tag {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #FF5C00;
}

.sticky-banner-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #FF5C00;
  box-shadow: 0 0 6px #FF5C00;
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}

.sticky-founding-banner__close {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 2px;
  line-height: 1;
  font-size: 16px;
  transition: color 0.2s;
}

.sticky-founding-banner__close:hover { color: var(--white); }

.sticky-founding-banner__countdown {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.countdown-chip {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  background: rgba(255,92,0,0.1);
  border: 1px solid rgba(255,92,0,0.2);
  border-radius: 8px;
  padding: 6px 10px;
  min-width: 46px;
}

.countdown-chip__value {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  color: #FF5C00;
  line-height: 1;
}

.countdown-chip__label {
  font-size: 9px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
  margin-top: 2px;
}

.sticky-founding-banner__spots {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 12px;
}

.sticky-founding-banner__spots strong {
  color: #FF5C00;
}

.sticky-founding-banner__spots.urgent {
  color: #FF5C00;
}

.sticky-founding-banner__cta {
  display: block;
  background: #FF5C00;
  color: white;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  padding: 10px 16px;
  border-radius: 8px;
  text-align: center;
  text-decoration: none;
  transition: opacity 0.2s, transform 0.2s;
}

.sticky-founding-banner__cta:hover {
  opacity: 0.88;
  transform: translateY(-1px);
}

/* ---- Countdown Timer ---- */
.countdown-timer {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,92,0,0.06);
  border: 1px solid rgba(255,92,0,0.18);
  border-radius: 10px;
  padding: 10px 18px;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 28px;
  width: fit-content;
}

.countdown-timer.urgent {
  border-color: rgba(255,92,0,0.4);
  background: rgba(255,92,0,0.1);
}

.countdown-timer__units {
  display: flex;
  gap: 8px;
  margin-left: 8px;
}

.countdown-unit {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--white);
}

.countdown-unit span {
  font-size: 10px;
  font-weight: 500;
  color: var(--muted);
}

.countdown-sep {
  color: var(--muted-2);
  font-size: 16px;
}

/* ---- Price Anchor ---- */
.price-anchor {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.price-anchor__standard {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--muted-2);
  text-decoration: line-through;
  opacity: 0.6;
}

.price-anchor__founding {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 800;
  color: #FF5C00;
  letter-spacing: -0.02em;
}

.price-anchor__saving {
  font-size: 12px;
  color: #22C55E;
  font-weight: 600;
  background: rgba(34,197,94,0.08);
  border: 1px solid rgba(34,197,94,0.2);
  border-radius: 6px;
  padding: 3px 10px;
  animation: count-up-fade 0.5s ease;
}

/* ---- Intersection Observer Animations ---- */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

.animate-on-scroll.visible .check-burst {
  animation: check-burst 0.4s 0.1s ease both;
}

@keyframes check-burst {
  0%   { transform: scale(0); opacity: 0; }
  60%  { transform: scale(1.2); }
  100% { transform: scale(1); opacity: 1; }
}

/* ---- Feature Comparison Table ---- */
.comparison-table-row {
  opacity: 0;
  transform: translateX(-10px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.comparison-table-row.visible {
  opacity: 1;
  transform: translateX(0);
}

.checkmark-burst {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(255,92,0,0.12);
}

.checkmark-burst svg {
  animation: check-burst 0.3s ease both;
}

/* ---- Testimonial Cards ---- */
.testimonial-card {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.4s ease, transform 0.4s ease, box-shadow 0.2s ease;
}

.testimonial-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.testimonial-card:hover {
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  transform: translateY(-3px);
}

/* ---- Product Card Hover Animations ---- */
@keyframes product-card-bounce {
  0%, 100% { transform: translateY(0); }
  40%       { transform: translateY(-3px); }
  70%       { transform: translateY(-1px); }
}

.product-card-animated {
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.25s ease,
              border-color 0.2s ease;
}

.product-card-animated:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.35), 0 0 0 1px rgba(255,92,0,0.2);
  border-color: rgba(255,92,0,0.4);
}

.product-card-animated:hover .product-price-bounce {
  animation: product-card-bounce 0.4s ease;
}

@keyframes buy-btn-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,92,0,0); }
  50%       { box-shadow: 0 0 0 4px rgba(255,92,0,0.15); }
}

.buy-btn-pulse:not(:hover) {
  animation: buy-btn-pulse 3s ease-in-out infinite;
}

/* ---- BESTSELLER / Badge Bounce ---- */
@keyframes badge-bounce {
  0%, 100% { transform: translateY(0); }
  25%       { transform: translateY(-3px) rotate(-2deg); }
  75%       { transform: translateY(-1px) rotate(1deg); }
}

.badge-bounce {
  animation: badge-bounce 2s ease-in-out infinite;
  display: inline-block;
}

/* ---- Social Proof Counter ---- */
@keyframes social-counter-spin {
  0%   { transform: rotate(-3deg) scale(1); }
  50%  { transform: rotate(3deg) scale(1.05); }
  100% { transform: rotate(-3deg) scale(1); }
}

.social-proof-counter {
  display: inline-block;
  animation: social-counter-spin 3s ease-in-out infinite;
}

/* ---- Workflow Diagram Animation ---- */
.staffing-flow-animated .staffing-flow__node {
  opacity: 0;
  transform: scale(0.85);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.staffing-flow-animated .staffing-flow__arrow {
  opacity: 0;
  transition: opacity 0.3s ease;
}

.staffing-flow-animated.visible .staffing-flow__node:nth-child(1) { opacity: 1; transform: scale(1); transition-delay: 0s; }
.staffing-flow-animated.visible .staffing-flow__arrow:nth-child(2) { opacity: 1; transition-delay: 0.15s; }
.staffing-flow-animated.visible .staffing-flow__node:nth-child(3) { opacity: 1; transform: scale(1); transition-delay: 0.3s; }
.staffing-flow-animated.visible .staffing-flow__arrow:nth-child(4) { opacity: 1; transition-delay: 0.45s; }
.staffing-flow-animated.visible .staffing-flow__node:nth-child(5) { opacity: 1; transform: scale(1); transition-delay: 0.6s; }
.staffing-flow-animated.visible .staffing-flow__arrow:nth-child(6) { opacity: 1; transition-delay: 0.75s; }
.staffing-flow-animated.visible .staffing-flow__node:nth-child(7) { opacity: 1; transform: scale(1); transition-delay: 0.9s; }
.staffing-flow-animated.visible .staffing-flow__arrow:nth-child(8) { opacity: 1; transition-delay: 1.05s; }
.staffing-flow-animated.visible .staffing-flow__node:nth-child(9) { opacity: 1; transform: scale(1); transition-delay: 1.2s; }

/* ---- Confetti Burst ---- */
@keyframes confetti-fall {
  0%   { transform: translateY(-10px) rotate(0deg); opacity: 1; }
  100% { transform: translateY(80px) rotate(720deg); opacity: 0; }
}

.confetti-particle {
  position: fixed;
  pointer-events: none;
  z-index: 99999;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  animation: confetti-fall 1.2s ease-out forwards;
}

/* ---- Tier Card Glow (Pricing) ---- */
.tier-card-animated {
  transition: transform 0.2s ease, box-shadow 0.3s ease;
  position: relative;
}

.tier-card-animated:hover {
  transform: translateY(-3px);
}

@keyframes tier-glow-pulse {
  0%, 100% { box-shadow: 0 0 0 2px rgba(255,92,0,0.3), 0 8px 32px rgba(255,92,0,0.15); }
  50%       { box-shadow: 0 0 0 3px rgba(255,92,0,0.5), 0 12px 40px rgba(255,92,0,0.25); }
}

.tier-card--featured-animated {
  animation: tier-glow-pulse 3s ease-in-out infinite;
  border-color: #FF5C00;
  background: rgba(255,92,0,0.03);
}

@keyframes gold-shimmer {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.badge-enterprise {
  background: linear-gradient(135deg, #D4AF37, #F5E6A3, #D4AF37, #C5A028);
  background-size: 200% 200%;
  animation: gold-shimmer 3s ease infinite;
  color: #1a1000;
}

/* ---- Nav Link Underline Slide ---- */
.nav-link-animated {
  position: relative;
  text-decoration: none;
  padding: 6px 0;
}

.nav-link-animated::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background: var(--orange);
  transition: width 0.25s ease;
  border-radius: 1px;
}

.nav-link-animated:hover::after,
.nav-link-animated.active::after {
  width: 100%;
}

.nav-link-animated.active::after {
  background: var(--white);
}

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

  .btn-primary-glow:not(:hover),
  .buy-btn-pulse:not(:hover),
  .tier-card--featured-animated,
  .badge-bounce,
  .social-proof-counter {
    animation: none !important;
  }

  .sticky-founding-banner.visible {
    animation: none;
  }
}

/* ---- Mobile ---- */
@media (max-width: 640px) {
  .sticky-founding-banner {
    bottom: 10px;
    right: 10px;
    left: 10px;
    max-width: none;
    padding: 14px 16px;
  }

  .sticky-founding-banner__countdown {
    gap: 5px;
  }

  .countdown-chip {
    min-width: 38px;
    padding: 5px 8px;
  }

  .countdown-chip__value {
    font-size: 16px;
  }

  .scroll-progress {
    height: 2px;
  }
}