/* Custom styles for J. Rose & Co. */

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

/* Navbar scroll state */
#navbar.scrolled {
  background: rgba(253, 252, 248, 0.95);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 20px rgba(22, 101, 52, 0.08);
}

/* Nav links */
.nav-link {
  position: relative;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: #16a34a;
  border-radius: 1px;
  transition: width 0.25s ease;
}
.nav-link:hover::after {
  width: 100%;
}

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

/* Hero background blobs */
.hero-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
  animation: blobFloat 8s ease-in-out infinite;
}

.blob-1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, #dcfce7 0%, transparent 70%);
  top: -10%;
  right: -5%;
  animation-delay: 0s;
}

.blob-2 {
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, #f0fdf4 0%, transparent 70%);
  bottom: 5%;
  left: 10%;
  animation-delay: -3s;
}

.blob-3 {
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, #fef9c3 0%, transparent 70%);
  top: 30%;
  left: 40%;
  animation-delay: -5s;
  opacity: 0.3;
}

@keyframes blobFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -20px) scale(1.05); }
  66% { transform: translate(-20px, 15px) scale(0.95); }
}

/* Floating cards */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes floatDelayed {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

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

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

/* Service cards */
.service-card {
  cursor: pointer;
}

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

.gallery-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(20, 83, 45, 0.15) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: inherit;
}

.gallery-item:hover::after {
  opacity: 1;
}

/* Testimonial cards */
.testimonial-card {
  transition: transform 0.3s ease, background 0.3s ease;
}

.testimonial-card:hover {
  transform: translateY(-4px);
}

/* Scroll reveal (progressive enhancement) */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
  }

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

/* Fallback: always visible if JS disabled or reduced motion */
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* Form focus states */
input:focus, select:focus, textarea:focus {
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.15);
}

/* Custom select arrow */
select {
  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='%2316a34a' 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;
}

/* Navbar active state on scroll */
.nav-link.active {
  color: #16a34a;
}
.nav-link.active::after {
  width: 100%;
}
