/* ===== BASE ===== */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: #b8583a;
  color: #fdfbf7;
}

/* ===== NAV ===== */
.nav {
  background: rgba(253, 251, 247, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(26, 20, 16, 0.06);
}

.nav.scrolled {
  box-shadow: 0 1px 20px rgba(26, 20, 16, 0.06);
}

.nav-link {
  position: relative;
}

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

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

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

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

/* ===== HERO ===== */
.hero {
  background: linear-gradient(135deg, #fdfbf7 0%, #f4ebd5 100%);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -20%;
  right: -10%;
  width: 60%;
  height: 140%;
  background: radial-gradient(ellipse, rgba(184, 88, 58, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(to top, #fdfbf7, transparent);
  pointer-events: none;
}

/* ===== BUTTONS ===== */
.cta-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 16px 32px;
  background: #b8583a;
  color: #fdfbf7;
  border-radius: 100px;
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s ease;
  border: 2px solid #b8583a;
}

.cta-primary:hover {
  background: #9a452c;
  border-color: #9a452c;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(184, 88, 58, 0.3);
}

.cta-primary .group-hover\:translate-x-1 {
  transition: transform 0.3s ease;
}

.cta-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 16px 32px;
  background: transparent;
  color: #1a1410;
  border-radius: 100px;
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  border: 2px solid rgba(26, 20, 16, 0.2);
  transition: all 0.3s ease;
}

.cta-secondary:hover {
  border-color: #b8583a;
  color: #b8583a;
  transform: translateY(-2px);
}

/* ===== SERVICE CARDS ===== */
.service-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

/* ===== INPUTS ===== */
.input {
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input:focus {
  box-shadow: 0 0 0 3px rgba(184, 88, 58, 0.1);
}

/* ===== REVEAL ANIMATIONS ===== */
.reveal {
  opacity: 1;
  transform: none;
  transition: opacity 0.7s ease, transform 0.7s ease;
}

/* Only apply reveal animations when JS is enabled and user prefers motion */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(30px);
  }

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

/* If JS is disabled, everything stays visible (progressive enhancement) */
.no-js .reveal {
  opacity: 1;
  transform: none;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 767px) {
  .hero h1 {
    font-size: 2.75rem;
  }

  .hero {
    padding-top: 80px;
  }

  .nav {
    background: rgba(253, 251, 247, 0.98);
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .hero h1 {
    font-size: 3.5rem;
  }
}

/* ===== FOCUS VISIBLE ===== */
:focus-visible {
  outline: 2px solid #b8583a;
  outline-offset: 2px;
}

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

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

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

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