/**
 * ToolStackly Ambient Theme & Tactile Micro-Interactions System
 * 100% Client-Side Procedural CSS (0 KB external image assets)
 * High Performance, GPU Accelerated, 60fps Native Physics
 */

/* ==========================================================================
   1. Ambient Geometric Dot-Grid & Mesh Backgrounds
   ========================================================================== */

.bg-dot-grid {
  background-image: radial-gradient(rgba(148, 163, 184, 0.28) 1.25px, transparent 1.25px);
  background-size: 24px 24px;
  background-position: 0 0;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 15%, #000 60%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 15%, #000 60%, transparent 100%);
}

/* Ambient Hero Glow Containers */
.ambient-glow-wrapper {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 1200px;
  height: 520px;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.glow-orb-primary {
  position: absolute;
  top: -80px;
  left: 50%;
  transform: translateX(-50%);
  width: 640px;
  height: 360px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.16) 0%, rgba(139, 92, 246, 0.08) 45%, transparent 70%);
  filter: blur(64px);
  animation: orb-breathe 10s ease-in-out infinite alternate;
}

.glow-orb-secondary {
  position: absolute;
  top: 40px;
  right: 8%;
  width: 320px;
  height: 260px;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.12) 0%, transparent 70%);
  filter: blur(52px);
  animation: orb-breathe 14s ease-in-out infinite alternate-reverse;
}

.glow-orb-tertiary {
  position: absolute;
  top: 60px;
  left: 8%;
  width: 300px;
  height: 240px;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.10) 0%, transparent 70%);
  filter: blur(52px);
  animation: orb-breathe 12s ease-in-out infinite alternate;
}

@keyframes orb-breathe {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(8px, -12px, 0) scale(1.05);
  }
  100% {
    transform: translate3d(-6px, 8px, 0) scale(0.98);
  }
}

/* ==========================================================================
   2. Tactile Button & Element Click Physics
   ========================================================================== */

/* Universal Tactile Button Press */
.btn-tactile {
  transition: transform 120ms cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 120ms ease,
              background-color 150ms ease,
              border-color 150ms ease;
  will-change: transform;
  -webkit-tap-highlight-color: transparent;
}

.btn-tactile:active {
  transform: scale(0.96) translateY(1px);
}

/* Category Filter Pills */
.filter-btn {
  transition: transform 140ms cubic-bezier(0.34, 1.56, 0.64, 1),
              background-color 150ms ease,
              color 150ms ease,
              box-shadow 150ms ease,
              border-color 150ms ease;
  will-change: transform;
  -webkit-tap-highlight-color: transparent;
}

.filter-btn:active {
  transform: scale(0.94);
}

/* ==========================================================================
   3. Tool Cards Elevation & Hover Physics
   ========================================================================== */

.tool-card {
  transition: transform 220ms cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 220ms cubic-bezier(0.16, 1, 0.3, 1),
              border-color 200ms ease;
  will-change: transform;
  -webkit-tap-highlight-color: transparent;
}

.tool-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 32px -8px rgba(79, 70, 229, 0.08), 0 4px 12px -2px rgba(15, 23, 42, 0.04);
}

.tool-card:active {
  transform: translateY(-2px) scale(0.99);
}

.tool-card .tool-icon {
  transition: transform 240ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.tool-card:hover .tool-icon {
  transform: scale(1.12) rotate(2deg);
}

.tool-card .launch-arrow,
.tool-card [data-lucide="arrow-right"] {
  transition: transform 180ms ease;
}

.tool-card:hover .launch-arrow,
.tool-card:hover [data-lucide="arrow-right"] {
  transform: translateX(4px);
}

/* ==========================================================================
   4. Live Search Input Focus & Halo
   ========================================================================== */

.search-input-field {
  transition: box-shadow 200ms cubic-bezier(0.16, 1, 0.3, 1),
              border-color 200ms ease,
              transform 200ms ease;
}

.search-input-field:focus {
  transform: translateY(-1px);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.14), 0 10px 24px -4px rgba(99, 102, 241, 0.08);
}

/* ==========================================================================
   5. Modal Spring Animations
   ========================================================================== */

.modal-spring-card {
  transition: transform 260ms cubic-bezier(0.34, 1.4, 0.64, 1), opacity 200ms ease;
  will-change: transform, opacity;
}

/* ==========================================================================
   6. Dropzone Interactive Physics
   ========================================================================== */

.tool-dropzone-interactive {
  transition: transform 180ms ease,
              border-color 180ms ease,
              background-color 180ms ease,
              box-shadow 180ms ease;
}

.tool-dropzone-interactive:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px -6px rgba(99, 102, 241, 0.08);
}

.tool-dropzone-interactive:active {
  transform: scale(0.995);
}

/* ==========================================================================
   7. Accessibility: Reduced Motion Support
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  .glow-orb-primary,
  .glow-orb-secondary,
  .glow-orb-tertiary {
    animation: none !important;
  }
  .tool-card,
  .btn-tactile,
  .filter-btn,
  .tool-card:hover,
  .tool-card:active,
  .modal-spring-card,
  .search-input-field,
  .tool-dropzone-interactive {
    transform: none !important;
    transition: none !important;
  }
}
