/* Base & Utilities */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  overflow-x: hidden;
}

::selection {
  background: #E8735A;
  color: #fff;
}

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

#navbar.scrolled {
  background: rgba(253, 248, 245, 0.9);
  backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}

.nav-link {
  position: relative;
}

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

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

/* 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 {
  display: block;
  padding: 8px 0;
  border-bottom: 1px solid #f1f1f1;
  transition: color 0.2s;
}

.mobile-link:last-child {
  border-bottom: none;
}

.mobile-link:hover {
  color: #E8735A;
}

/* Hero animations */
.hero-anim {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeUp 0.8s ease forwards;
}

.hero-anim:nth-child(1) { animation-delay: 0.1s; }
.hero-anim:nth-child(2) { animation-delay: 0.2s; }
.hero-anim:nth-child(3) { animation-delay: 0.3s; }
.hero-anim:nth-child(4) { animation-delay: 0.4s; }

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-img {
  opacity: 0;
  transform: translateX(40px);
  animation: slideRight 1s ease 0.3s forwards;
}

@keyframes slideRight {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Floating card */
.floating-card {
  animation: float 4s ease-in-out infinite;
}

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

/* Service cards */
.service-card {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease, box-shadow 0.4s ease, background 0.4s ease, border-color 0.4s ease;
}

.service-card.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* Stagger children */
.service-card:nth-child(1) { transition-delay: 0.05s; }
.service-card:nth-child(2) { transition-delay: 0.1s; }
.service-card:nth-child(3) { transition-delay: 0.15s; }
.service-card:nth-child(4) { transition-delay: 0.2s; }
.service-card:nth-child(5) { transition-delay: 0.25s; }
.service-card:nth-child(6) { transition-delay: 0.3s; }

/* Smooth image hover */
.rounded-3xl.overflow-hidden img {
  transition: transform 0.6s ease;
}

.rounded-3xl.overflow-hidden:hover img {
  transform: scale(1.03);
}

/* Button ripple feel */
button, a {
  -webkit-tap-highlight-color: transparent;
}

/* Form 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='%23999' 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 16px center;
  appearance: none;
}

/* Subtle pattern overlay for sections */
section::before {
  content: '';
  pointer-events: none;
}

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

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

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

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

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}

/* Tablet */
@media (max-width: 768px) {
  .hero-anim {
    opacity: 1;
    transform: translateY(0);
  }
  .hero-img {
    opacity: 1;
    transform: translateX(0);
  }
}
