/* css/interactions.css — Premium Interaction Styles
   Companion to interactions.js. Defines visual states for interactive elements.
*/

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

/* Tilt card base */
.tilt-card,
[data-tilt] {
  transform-style: preserve-3d;
  transform: perspective(800px) rotateX(0deg) rotateY(0deg);
  will-change: transform;
}

/* Form field focus glow */
input:focus,
textarea:focus,
select:focus {
  outline: none;
}

/* Hover lift utility */
.hover-lift {
  transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1),
              box-shadow 0.3s ease;
}

.hover-lift:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* Glow on hover */
.hover-glow {
  transition: box-shadow 0.3s ease;
}

.hover-glow:hover {
  box-shadow: 0 0 30px rgba(47, 238, 204, 0.3);
}

/* Tap state for touch devices */
@media (hover: none) and (pointer: coarse) {
  .tilt-card:active {
    transform: scale(0.98);
  }

  .hover-lift:active {
    transform: scale(0.98);
  }
}

/* Page transition initial state */
main,
#app {
  opacity: 1;
  transition: opacity 0.2s ease;
}

main.transitioning,
#app.transitioning {
  opacity: 0;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg-100, #031F1A);
}

::-webkit-scrollbar-thumb {
  background: rgba(47, 238, 204, 0.3);
  border-radius: 5px;
  transition: background 0.2s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(47, 238, 204, 0.5);
}

/* Selection */
::selection {
  background: rgba(47, 238, 204, 0.3);
  color: #fff;
}

/* Focus visible for accessibility */
*:focus-visible {
  outline: 2px solid var(--accent-1, #2feecc);
  outline-offset: 2px;
}

/* Smooth scroll */
html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
