/* ==========================================================================
   SEENOAH — Subtle Micro-Animations & Interactive Motion Suite
   High-performance GPU-accelerated micro-interactions (transform, opacity, filter)
   Respects prefers-reduced-motion for complete accessibility
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. KEYFRAME DEFINITIONS
   -------------------------------------------------------------------------- */

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

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

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.94);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

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

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

@keyframes auraBreathe {
  0%, 100% {
    opacity: 0.3;
    transform: scale(0.98);
  }
  50% {
    opacity: 0.55;
    transform: scale(1.03);
  }
}

@keyframes beaconPulse {
  0% {
    transform: scale(1);
    opacity: 0.8;
  }
  70% {
    transform: scale(2.2);
    opacity: 0;
  }
  100% {
    transform: scale(2.2);
    opacity: 0;
  }
}

@keyframes liveDotGlow {
  0%, 100% {
    opacity: 1;
    box-shadow: 0 0 6px #10B981, 0 0 12px rgba(16, 185, 129, 0.4);
  }
  50% {
    opacity: 0.55;
    box-shadow: 0 0 2px #10B981;
  }
}

@keyframes pulseGlow {
  0%, 100% {
    opacity: 0.8;
    box-shadow: 0 0 8px #19B8C9, 0 0 16px rgba(25, 184, 201, 0.35);
  }
  50% {
    opacity: 1;
    box-shadow: 0 0 14px #19B8C9, 0 0 28px rgba(25, 184, 201, 0.65);
  }
}

@keyframes pulseNode {
  0%, 100% {
    transform: scale(1);
    opacity: 0.85;
  }
  50% {
    transform: scale(1.08);
    opacity: 1;
  }
}

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

@keyframes lineFlow {
  0% {
    stroke-dashoffset: 40;
  }
  100% {
    stroke-dashoffset: 0;
  }
}

/* --------------------------------------------------------------------------
   2. SCROLL ENTRANCE UTILITY CLASSES (IntersectionObserver Controlled)
   -------------------------------------------------------------------------- */

/* Elements remain visible by default for graceful degradation (no-JS) */
.animate-fade-up {
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.animate-fade-up.animate-hidden {
  opacity: 0;
  transform: translateY(28px);
}

.animate-fade-up.animate-visible,
.animate-fade-up.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.animate-fade-in {
  opacity: 1;
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity;
}

.animate-fade-in.animate-hidden {
  opacity: 0;
}

.animate-fade-in.animate-visible,
.animate-fade-in.is-visible {
  opacity: 1;
}

.animate-scale-up {
  opacity: 1;
  transform: scale(1);
  transition:
    opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.animate-scale-up.animate-hidden {
  opacity: 0;
  transform: scale(0.94);
}

.animate-scale-up.animate-visible,
.animate-scale-up.is-visible {
  opacity: 1;
  transform: scale(1);
}

/* Section Header Entrance Reveal */
.section-header.animate-fade-up.animate-hidden {
  opacity: 0;
  transform: translateY(20px);
}
.section-header.animate-fade-up.animate-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger Delays for Cascade Grids */
.delay-1  { transition-delay: 0.08s; }
.delay-2  { transition-delay: 0.16s; }
.delay-3  { transition-delay: 0.24s; }
.delay-4  { transition-delay: 0.32s; }
.delay-5  { transition-delay: 0.40s; }
.delay-6  { transition-delay: 0.48s; }
.delay-7  { transition-delay: 0.56s; }
.delay-8  { transition-delay: 0.64s; }
.delay-9  { transition-delay: 0.72s; }
.delay-10 { transition-delay: 0.80s; }
.delay-11 { transition-delay: 0.88s; }
.delay-12 { transition-delay: 0.96s; }

/* --------------------------------------------------------------------------
   3. HERO SECTION MICRO-ANIMATIONS
   -------------------------------------------------------------------------- */

/* Live Beacon on Hero Eyebrow Badge */
.hero-badge-pulse {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
  position: relative;
  flex-shrink: 0;
}

.hero-badge-pulse::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 1.5px solid var(--cyan);
  animation: beaconPulse 2.4s cubic-bezier(0.25, 1, 0.5, 1) infinite;
  pointer-events: none;
}

.light-theme .hero-badge-pulse {
  background: var(--electric-blue);
  box-shadow: 0 0 8px var(--electric-blue);
}

.light-theme .hero-badge-pulse::after {
  border-color: var(--electric-blue);
}

/* Ambient Breathing Aura on Hero Visual */
.hero-banner-glow {
  animation: auraBreathe 6s ease-in-out infinite;
}

/* Live Telemetry Floating Pill */
.hero-floating-badge.badge-top {
  animation: floatSlow 4.5s ease-in-out infinite;
}

.floating-badge-dot {
  animation: liveDotGlow 2.2s infinite ease-in-out;
}

/* --------------------------------------------------------------------------
   4. BUTTON MICRO-INTERACTIONS & SHINE EFFECT
   -------------------------------------------------------------------------- */

.btn {
  position: relative;
  overflow: hidden;
  will-change: transform;
}

.btn:active {
  transform: scale(0.97) translateZ(0);
}

/* Subtle Shimmer Sweep on Primary CTA Buttons */
.btn-primary::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.22) 50%,
    transparent 100%
  );
  transform: skewX(-20deg);
  pointer-events: none;
}

.btn-primary:hover::after {
  left: 140%;
  transition: left 0.75s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Arrow nudge on hover */
.btn svg,
.btn-primary svg,
.btn-secondary svg,
.btn-outline svg {
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn:hover svg {
  transform: translateX(3px);
}

/* --------------------------------------------------------------------------
   5. PILLAR & SERVICE CARDS (ELEVATION & ICON MICRO-FLOAT)
   -------------------------------------------------------------------------- */

.pillar-card,
.service-card {
  will-change: transform, box-shadow, border-color;
  transition:
    transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.3s ease;
}

.pillar-icon-box {
  transition:
    transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
    background 0.3s ease,
    border-color 0.3s ease,
    color 0.3s ease,
    box-shadow 0.3s ease;
  will-change: transform;
}

.pillar-card:hover .pillar-icon-box,
.service-card:hover .pillar-icon-box {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 6px 16px rgba(25, 184, 201, 0.25);
}

.service-number {
  transition:
    color 0.25s ease,
    transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, color;
}

.service-card:hover .service-number {
  color: var(--cyan);
  transform: scale(1.06);
}

.light-theme .service-card:hover .service-number {
  color: var(--electric-blue);
}

/* Link Arrow Slide */
.card-link-arrow svg {
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* --------------------------------------------------------------------------
   6. PROCESS TIMELINE & STEP NODES
   -------------------------------------------------------------------------- */

.process-step-item {
  transition: transform 0.3s ease;
}

.step-node {
  will-change: transform, box-shadow, border-color;
  transition:
    transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.25s ease;
}

.process-step-item:hover .step-node {
  transform: scale(1.09);
  border-color: var(--cyan);
  box-shadow: 0 0 0 6px rgba(25, 184, 201, 0.2), 0 0 20px rgba(25, 184, 201, 0.35);
}

.step-number {
  transition: color 0.25s ease, text-shadow 0.25s ease;
}

.process-step-item:hover .step-number {
  text-shadow: 0 0 10px rgba(25, 184, 201, 0.6);
}

.light-theme .process-step-item:hover .step-node {
  border-color: var(--electric-blue);
  box-shadow: 0 0 0 6px rgba(49, 92, 203, 0.15), 0 0 16px rgba(49, 92, 203, 0.25);
}

.process-timeline-line {
  background-size: 200% 100%;
  animation: gradientShift 8s linear infinite;
}

/* --------------------------------------------------------------------------
   7. WHY SEENOAH CARDS
   -------------------------------------------------------------------------- */

.why-card {
  transition:
    transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.25s ease,
    box-shadow 0.3s ease;
  will-change: transform;
}

.why-card:hover {
  transform: translateY(-5px);
  border-color: var(--cyan);
  box-shadow: var(--shadow-card), 0 0 20px rgba(25, 184, 201, 0.15);
}

.why-number {
  transition:
    color 0.25s ease,
    transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}

.why-card:hover .why-number {
  color: var(--cyan);
  transform: scale(1.05);
}

.light-theme .why-card:hover .why-number {
  color: var(--electric-blue);
}

/* --------------------------------------------------------------------------
   8. TECHNOLOGY BADGES (MICRO-TILT & GLOW)
   -------------------------------------------------------------------------- */

.tech-badge {
  will-change: transform, box-shadow, border-color;
  transition:
    transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.25s ease,
    box-shadow 0.25s ease;
}

.tech-badge:hover {
  transform: translateY(-4px);
  border-color: var(--cyan);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25), 0 0 14px rgba(25, 184, 201, 0.22);
}

.tech-badge svg {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), color 0.25s ease;
  will-change: transform;
}

.tech-badge:hover svg {
  transform: scale(1.18) rotate(-4deg);
  color: var(--cyan);
}

.light-theme .tech-badge:hover svg {
  color: var(--electric-blue);
}

/* --------------------------------------------------------------------------
   9. STATISTICS SECTION
   -------------------------------------------------------------------------- */

.stat-item {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}

.stat-item:hover {
  transform: translateY(-4px);
}

.stat-plus {
  display: inline-block;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), filter 0.3s ease;
  will-change: transform;
}

.stat-item:hover .stat-plus {
  transform: scale(1.2);
  filter: drop-shadow(0 0 8px var(--cyan));
}

/* --------------------------------------------------------------------------
   10. TESTIMONIALS & CASE STUDY CARDS
   -------------------------------------------------------------------------- */

.testimonial-card {
  transition:
    transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.3s ease,
    border-color 0.25s ease;
  will-change: transform;
}

.testimonial-card:hover {
  transform: translateY(-5px);
  border-color: var(--cyan);
  box-shadow: var(--shadow-card), 0 0 20px rgba(25, 184, 201, 0.15);
}

.author-avatar-box {
  transition:
    transform 0.3s ease,
    border-color 0.3s ease,
    box-shadow 0.3s ease;
}

.testimonial-card:hover .author-avatar-box {
  transform: scale(1.06);
  border-color: var(--cyan);
  box-shadow: 0 0 12px rgba(25, 184, 201, 0.3);
}

/* Case Study Image Hover Zoom */
.case-study-visual {
  overflow: hidden;
  position: relative;
}

.case-study-thumb {
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1) !important;
  will-change: transform;
}

.case-study-card:hover .case-study-thumb {
  transform: scale(1.05);
}

/* --------------------------------------------------------------------------
   11. FAQ ACCORDION MICRO-INTERACTION
   -------------------------------------------------------------------------- */

.faq-item {
  will-change: transform, border-color, box-shadow;
  transition:
    transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.25s ease,
    background-color 0.25s ease,
    box-shadow 0.25s ease;
}

.faq-item:hover {
  transform: translateY(-2px);
  border-color: var(--cyan);
}
.light-theme .faq-item:hover {
  border-color: rgba(49, 92, 203, 0.35);
}

.faq-item.active {
  border-color: var(--cyan);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25), 0 0 16px rgba(25, 184, 201, 0.12);
}
.light-theme .faq-item.active {
  border-color: var(--electric-blue);
  box-shadow: 0 4px 20px rgba(49, 92, 203, 0.08);
}

.faq-question .faq-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), color 0.2s ease;
  will-change: transform;
}

.faq-item.active .faq-icon {
  transform: rotate(180deg);
}

/* --------------------------------------------------------------------------
   12. HEADER & NAVIGATION MICRO-ANIMATIONS
   -------------------------------------------------------------------------- */

.nav-link {
  position: relative;
}

/* Sleek Indicator Line on Nav Links */
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--cyan);
  border-radius: 2px;
  transition:
    width 0.25s cubic-bezier(0.16, 1, 0.3, 1),
    left 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.light-theme .nav-link::after {
  background: var(--electric-blue);
}

.nav-link:hover::after,
.nav-link.active::after,
.nav-item.active-item > .nav-link::after {
  width: calc(100% - 24px);
  left: 12px;
}

/* Theme Toggle Button Micro-Rotation */
.theme-toggle-btn {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s ease;
  will-change: transform;
}

.theme-toggle-btn:hover {
  transform: rotate(22deg) scale(1.08);
}

.theme-toggle-btn:active {
  transform: rotate(45deg) scale(0.95);
}

/* Back to Top Floating Pulse */
.scroll-top-btn.visible {
  animation: floatMicro 3.2s ease-in-out infinite;
}

.scroll-top-btn:hover {
  transform: translateY(-4px) scale(1.08) !important;
  box-shadow: 0 8px 24px rgba(25, 184, 201, 0.4);
}

/* --------------------------------------------------------------------------
   13. FORM INPUT FOCUS EXPANSION
   -------------------------------------------------------------------------- */

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="date"],
textarea,
select {
  transition:
    border-color 0.25s ease,
    box-shadow 0.25s ease,
    background-color 0.25s ease;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--cyan) !important;
  box-shadow: 0 0 0 3px rgba(25, 184, 201, 0.22), 0 0 16px rgba(25, 184, 201, 0.12) !important;
}

.light-theme input:focus,
.light-theme textarea:focus,
.light-theme select:focus {
  border-color: var(--electric-blue) !important;
  box-shadow: 0 0 0 3px rgba(49, 92, 203, 0.18), 0 0 14px rgba(49, 92, 203, 0.1) !important;
}

/* Filter Tabs & Category Pills Micro-Interactions */
.filter-tab,
.filter-pill {
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
  will-change: transform, box-shadow;
}

.filter-tab:hover,
.filter-pill:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(25, 184, 201, 0.2);
}

.filter-tab.active,
.filter-pill.active {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(49, 92, 203, 0.35);
}

/* --------------------------------------------------------------------------
   14. SVG Pulse & Connection Animations
   -------------------------------------------------------------------------- */
.svg-pulse-node {
  animation: pulseNode 4s infinite ease-in-out;
  transform-origin: center;
}

.svg-flow-line {
  stroke-dasharray: 6 4;
  animation: lineFlow 12s linear infinite;
}

/* --------------------------------------------------------------------------
   15. ACCESSIBILITY: DISABLE MOTION FOR USERS WHO REQUEST IT
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  .animate-fade-up,
  .animate-fade-up.animate-hidden,
  .animate-fade-up.animate-visible,
  .animate-fade-up.is-visible,
  .animate-fade-in,
  .animate-fade-in.animate-hidden,
  .animate-fade-in.animate-visible,
  .animate-scale-up,
  .animate-scale-up.animate-hidden,
  .animate-scale-up.animate-visible,
  .section-header.animate-fade-up.animate-hidden {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  .hero-badge-pulse::after,
  .hero-banner-glow,
  .hero-floating-badge.badge-top,
  .floating-badge-dot,
  .scroll-top-btn.visible {
    animation: none !important;
  }
}
