/* ===== Custom Styles for T&H Electric ===== */

:root {
  --color-plum-950: #0d050d;
  --color-plum-900: #1a0a1a;
  --color-plum-800: #3e1f3e;
  --color-amber-400: #fbbf24;
  --color-amber-500: #f59e0b;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  overflow-x: hidden;
}

/* ===== Selection ===== */
::selection {
  background: rgba(251, 191, 36, 0.3);
  color: #fbbf24;
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #0d050d;
}
::-webkit-scrollbar-thumb {
  background: #3e1f3e;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #613061;
}

/* ===== Reveal Animations (progressive enhancement) ===== */
.reveal {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  }
  .reveal.revealed {
    opacity: 1;
    transform: translateY(0);
  }
  .reveal:nth-child(2) { transition-delay: 0.05s; }
  .reveal:nth-child(3) { transition-delay: 0.1s; }
  .reveal:nth-child(4) { transition-delay: 0.15s; }
  .reveal:nth-child(5) { transition-delay: 0.2s; }
  .reveal:nth-child(6) { transition-delay: 0.25s; }
  .reveal:nth-child(7) { transition-delay: 0.3s; }
  .reveal:nth-child(8) { transition-delay: 0.35s; }
}

/* ===== Navbar ===== */
#navbar {
  background: rgba(13, 5, 13, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(62, 31, 62, 0.4);
  transition: background 0.4s ease, box-shadow 0.4s ease;
}

#navbar.scrolled {
  background: rgba(13, 5, 13, 0.92);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
}

/* ===== Service Cards ===== */
.service-card {
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.4s ease, box-shadow 0.4s ease;
}

.service-card:hover {
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(251, 191, 36, 0.15);
}

/* ===== Mobile Menu ===== */
#mobileMenu {
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

#mobileMenu.open {
  opacity: 1;
  pointer-events: all;
}

.mobile-link {
  transition: color 0.3s ease, transform 0.3s ease;
}

.mobile-link:hover {
  transform: scale(1.05);
}

/* ===== Image Hover ===== */
.group img {
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ===== Form ===== */
select option {
  background: #1a0a1a;
  color: #e8dce9;
}

/* ===== Gold shimmer on CTA ===== */
@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

/* ===== Pulse for badge dot ===== */
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.3); }
}

.animate-pulse {
  animation: pulse-dot 2s ease-in-out infinite;
}

/* ===== Map dark theme override ===== */
iframe[title="T&H Electric location map"] {
  border-radius: 0.75rem;
}

/* ===== Focus Visible ===== */
*:focus-visible {
  outline: 2px solid #fbbf24;
  outline-offset: 2px;
}

/* ===== Responsive tweaks ===== */
@media (max-width: 768px) {
  html {
    scroll-padding-top: 70px;
  }
}
