/* ===== CUSTOM STYLES ===== */

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

/* Selection color */
::selection {
  background-color: #B85C38;
  color: #FDF9F3;
}

/* ===== NAVBAR ===== */
.nav-logo-text {
  transition: color 0.3s ease;
}

.nav-link {
  position: relative;
}

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

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

/* Navbar scroll state */
.navbar-scrolled {
  background-color: rgba(253, 249, 243, 0.95) !important;
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 20px rgba(61, 43, 31, 0.08);
}

.navbar-scrolled .nav-logo-text {
  color: #3D2B1F;
}

.navbar-scrolled .nav-link {
  color: #3D2B1F !important;
}

/* ===== HERO ANIMATIONS ===== */
.hero-eyebrow {
  animation: fadeSlideUp 0.8s ease forwards;
  animation-delay: 0.2s;
  opacity: 0;
}

.hero-headline {
  animation: fadeSlideUp 0.8s ease forwards;
  animation-delay: 0.4s;
  opacity: 0;
}

.hero-sub {
  animation: fadeSlideUp 0.8s ease forwards;
  animation-delay: 0.6s;
  opacity: 0;
}

.hero-ctas {
  animation: fadeSlideUp 0.8s ease forwards;
  animation-delay: 0.8s;
  opacity: 0;
}

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

/* Scroll line animation */
.animate-scroll-line {
  animation: scrollLine 2s ease-in-out infinite;
}

@keyframes scrollLine {
  0%, 100% { opacity: 0.3; transform: scaleY(0.5); transform-origin: top; }
  50% { opacity: 1; transform: scaleY(1); }
}

/* ===== SERVICE CARDS ===== */
.service-card {
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #B85C38, #E9B8A5);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s ease;
}

.service-card:hover::before {
  transform: scaleX(1);
}

/* ===== GALLERY ===== */
.gallery-item {
  cursor: pointer;
}

.gallery-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(61, 43, 31, 0.3), transparent);
  opacity: 0;
  transition: opacity 0.4s ease;
  border-radius: inherit;
}

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

/* ===== REVEAL ANIMATIONS (scroll-triggered via JS) ===== */
.reveal {
  /* Default state: visible (no JS progressive enhancement) */
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* With JS, elements start hidden and animate in */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(40px);
  }
  .reveal.revealed {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== MOBILE MENU ===== */
.mobile-link {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

#mobile-menu.open .mobile-link {
  opacity: 1;
  transform: translateY(0);
}

#mobile-menu.open .mobile-link:nth-child(1) { transition-delay: 0.1s; }
#mobile-menu.open .mobile-link:nth-child(2) { transition-delay: 0.15s; }
#mobile-menu.open .mobile-link:nth-child(3) { transition-delay: 0.2s; }
#mobile-menu.open .mobile-link:nth-child(4) { transition-delay: 0.25s; }

/* Hamburger animation */
#menu-toggle[aria-expanded="true"] #bar1 {
  transform: translateY(3px) rotate(45deg);
}

#menu-toggle[aria-expanded="true"] #bar2 {
  opacity: 0;
}

#menu-toggle[aria-expanded="true"] #bar3 {
  transform: translateY(-3px) rotate(-45deg);
}

/* ===== BUTTONS ===== */
button, a[href^="tel"] {
  -webkit-tap-highlight-color: transparent;
}

/* ===== FORM ===== */
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='%233D2B1F' 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;
}

input:focus, textarea:focus, select:focus {
  border-color: #B85C38 !important;
  box-shadow: 0 0 0 3px rgba(184, 92, 56, 0.15);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .font-serif {
    line-height: 1.15;
  }
}

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