/* ===== Custom Styles for Eric's Automotive Repair ===== */

/* Base & Smooth Scrolling */
html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  overflow-x: hidden;
}

/* ===== Custom Scrollbar ===== */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #070310;
}
::-webkit-scrollbar-thumb {
  background: #3d274c;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #653d7a;
}

/* ===== Floating Animation ===== */
@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-12px) rotate(1deg); }
}

@keyframes float-delayed {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-8px) rotate(-1deg); }
}

.animate-float {
  animation: float 4s ease-in-out infinite;
}

.animate-float-delayed {
  animation: float-delayed 5s ease-in-out infinite;
  animation-delay: 1s;
}

/* ===== Navbar ===== */
#navbar {
  transition: background-color 0.4s ease, backdrop-filter 0.4s ease, box-shadow 0.4s ease;
}

#navbar.scrolled {
  background-color: rgba(3, 1, 8, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3), 0 1px 0 rgba(212, 160, 23, 0.05) inset;
}

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

/* ===== Card Hover Glow ===== */
.group:hover .group-hover\:shadow-lg {
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* ===== Input Focus ===== */
input:focus,
select:focus,
textarea:focus {
  box-shadow: 0 0 0 1px rgba(251, 191, 36, 0.2);
}

/* ===== Mobile Menu ===== */
#mobile-menu {
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.mobile-link {
  position: relative;
}

.mobile-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: linear-gradient(to right, #fbbf24, transparent);
  transition: width 0.3s ease;
}

.mobile-link:hover::after {
  width: 100%;
}

/* ===== Service Cards ===== */
.group {
  position: relative;
}

.group::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 1rem;
  padding: 1px;
  background: linear-gradient(to bottom right, transparent, transparent);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  transition: background 0.5s ease;
  pointer-events: none;
}

.group:hover::before {
  background: linear-gradient(to bottom right, rgba(251, 191, 36, 0.2), transparent);
}

/* ===== Hero Gradient Text ===== */
.bg-gradient-to-r {
  background-clip: text;
  -webkit-background-clip: text;
}

/* ===== Subtle Pulse for Dot ===== */
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(251, 191, 36, 0.4); }
  50% { box-shadow: 0 0 0 6px rgba(251, 191, 36, 0); }
}

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

/* ===== Responsive Typography ===== */
@media (max-width: 640px) {
  .font-display {
    word-spacing: -0.02em;
  }
}

/* ===== Fade In Animation ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.8s ease forwards;
}

.fade-in-up-delay-1 { animation-delay: 0.1s; opacity: 0; }
.fade-in-up-delay-2 { animation-delay: 0.2s; opacity: 0; }
.fade-in-up-delay-3 { animation-delay: 0.3s; opacity: 0; }
.fade-in-up-delay-4 { animation-delay: 0.4s; opacity: 0; }

/* ===== Intersection Observer Hidden State ===== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Map dark mode ===== */
iframe[title*="Map"] {
  border-radius: 0.75rem;
}

/* ===== Custom Select Arrow ===== */
select.appearance-none {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239c6fb5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

select.appearance-none option {
  background: #1a0a2e;
  color: #ebe0f0;
}
