/* ============================================
   Ru Painting — Custom Styles
   ============================================ */

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

body {
  overflow-x: hidden;
}

::selection {
  background-color: rgba(123, 45, 59, 0.15);
  color: #5c1f2c;
}

/* --- Hero Animations --- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.animate-fade-in {
  animation: fadeInUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* --- Section Styles --- */
.section-eyebrow {
  display: block;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3.25rem);
}

.section-subtitle {
  line-height: 1.75;
}

/* --- Service Cards --- */
.service-card {
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease;
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 60px -20px rgba(123, 45, 59, 0.15);
}

.service-card h3 {
  font-size: 1.25rem;
}

/* --- Gallery Items --- */
.gallery-item {
  cursor: default;
  transition: box-shadow 0.4s ease;
}

.gallery-item:hover {
  box-shadow: 0 20px 60px -15px rgba(123, 45, 59, 0.2);
}

/* --- Testimonial Cards --- */
.testimonial-card {
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.4s ease;
}

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

/* --- Scroll Reveal Animations --- */
.reveal {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* --- Navbar Transitions --- */
#navbar.scrolled {
  background: rgba(253, 248, 246, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 20px rgba(123, 45, 59, 0.08);
}

#navbar.scrolled .font-serif {
  color: #7B2D3B !important;
}

/* --- Mobile Menu --- */
.mobile-link {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s ease;
}

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

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

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

/* --- Mobile Menu Button Active State --- */
#menuBtn.active #menuIcon svg {
  transform: rotate(90deg);
}

#menuBtn.active #menuIcon svg line:first-child {
  transform: translateY(5px) rotate(45deg);
}

#menuBtn.active #menuIcon svg line:last-child {
  transform: translateY(-5px) rotate(-45deg);
}

/* --- Button Focus Styles --- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid #7B2D3B;
  outline-offset: 2px;
  border-radius: 4px;
}

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .animate-fade-in {
    animation: none;
    opacity: 1;
  }
  .service-card,
  .gallery-item,
  .testimonial-card {
    transition: none;
  }
  .reveal {
    transition: none;
    opacity: 1;
    transform: none;
  }
}

/* --- Responsive Adjustments --- */
@media (max-width: 767px) {
  .service-card {
    transform: none !important;
  }
  .service-card:hover {
    transform: none !important;
  }
}
