/* ===== Custom Styles for Stevie E's Place ===== */

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

/* Base transitions */
* {
  -webkit-tap-highlight-color: transparent;
}

/* Navigation */
#navbar {
  background: rgba(253, 252, 250, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(6, 79, 70, 0.08);
}

#navbar.scrolled {
  background: rgba(253, 252, 250, 0.95);
  box-shadow: 0 4px 30px rgba(6, 79, 70, 0.08);
}

.nav-link {
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: #065f46;
  transition: width 0.3s ease;
}

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

/* Mobile menu */
.mobile-link {
  position: relative;
}

/* Hero animations */
.hero-tag {
  animation: fadeInUp 0.8s ease forwards;
  opacity: 0;
}

h1 {
  animation: fadeInUp 0.8s ease 0.15s forwards;
  opacity: 0;
}

h1 p, .hero-cta {
  animation: fadeInUp 0.8s ease 0.3s forwards;
  opacity: 0;
}

/* Actually fix the hero animation targets */
#hero > div.relative {
  animation: fadeInUp 0.8s ease 0.15s forwards;
  opacity: 0;
}

#hero > div.relative > div > div:first-child > div {
  animation: fadeInUp 0.8s ease 0.15s forwards;
  opacity: 0;
}

#hero > div.relative > div > div:first-child > h1 {
  animation: fadeInUp 0.8s ease 0.25s forwards;
  opacity: 0;
}

#hero > div.relative > div > div:first-child > p {
  animation: fadeInUp 0.8s ease 0.35s forwards;
  opacity: 0;
}

#hero > div.relative > div > div:first-child > div:first-of-type {
  animation: fadeInUp 0.8s ease 0.45s forwards;
  opacity: 0;
}

#hero > div.relative > div > div:first-child > div:last-of-type {
  animation: fadeInUp 0.8s ease 0.55s forwards;
  opacity: 0;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Service cards */
.service-card {
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.05) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.5s ease;
  border-radius: inherit;
}

.service-card:hover::before {
  opacity: 1;
}

/* Gallery */
.gallery-img-wrap {
  position: relative;
  overflow: hidden;
}

.gallery-img-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(6, 78, 59, 0.3) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.4s ease;
  border-radius: inherit;
}

.gallery-img-wrap:hover::after {
  opacity: 1;
}

.gallery-img {
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.gallery-img-wrap:hover .gallery-img {
  transform: scale(1.08);
}

/* Scroll reveal animations */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

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

::-webkit-scrollbar-track {
  background: #fdfcfa;
}

::-webkit-scrollbar-thumb {
  background: #065f46;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #047857;
}

/* Selection color */
::selection {
  background: rgba(6, 95, 70, 0.2);
  color: #064e3b;
}

/* Focus visible styles */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid #065f46;
  outline-offset: 2px;
}

/* Select arrow */
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23065f46' 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 12px center;
  padding-right: 40px;
}

/* Reduced 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;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  .gallery-img {
    transition: none;
  }

  .gallery-img-wrap:hover .gallery-img {
    transform: none;
  }
}

/* Tablet adjustments */
@media (max-width: 768px) {
  #hero > div.relative > div > div:first-child > h1 {
    font-size: 3rem;
  }
}

/* Print styles */
@media print {
  #navbar,
  #mobileMenu,
  .service-card,
  .gallery-img-wrap {
    display: none;
  }

  body {
    background: white;
    color: black;
  }
}
