/* Custom styles for Insulation Plus */

html {
  scroll-behavior: smooth;
}

/* Reveal animation — progressive enhancement, only applies when JS runs */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.6s ease, transform 0.6s ease;
  }
  .reveal.revealed {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Mobile menu transitions */
#mobile-menu {
  transition: max-height 0.3s ease, opacity 0.3s ease;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #0f172a;
}
::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #475569;
}

/* Selection color */
::selection {
  background: rgba(20, 184, 166, 0.3);
  color: #f1f5f9;
}

/* Header scroll state */
#site-header.scrolled {
  background: rgba(2, 6, 23, 0.95);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* Button focus outlines */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid #14b8a6;
  outline-offset: 2px;
  border-radius: 4px;
}

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