/* ========== RESET & BASE ========== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { min-height: 100vh; }
img, video, svg { display: block; max-width: 100%; }
button { cursor: pointer; font-family: inherit; }
::selection { background: #D4845A; color: white; }

/* ========== SCROLLBAR ========== */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #FDF8F3; }
::-webkit-scrollbar-thumb { background: #D4845A; border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: #C0704A; }

/* ========== HEADER ========== */
#header {
  background: transparent;
  transition: background 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}
#header.scrolled {
  background: rgba(253, 248, 243, 0.92);
  backdrop-filter: blur(16px);
  box-shadow: 0 1px 20px rgba(165, 90, 60, 0.08);
}

.nav-link { position: relative; }
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: #D4845A;
  border-radius: 999px;
  transition: width 0.3s ease;
}
.nav-link:hover::after { width: 100%; }

/* ========== MOBILE MENU ========== */
.mobile-nav-link { transition: transform 0.2s ease, opacity 0.2s ease; }
#mobileMenu.open { opacity: 1 !important; pointer-events: all !important; }

/* ========== BUTTONS ========== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  background: #D4845A;
  color: white;
  padding: 12px 28px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.9375rem;
  text-decoration: none;
  border: none;
  transition: background 0.25s ease, transform 0.2s ease, box-shadow 0.25s ease;
  box-shadow: 0 4px 16px rgba(212, 132, 90, 0.3);
}
.btn-primary:hover {
  background: #C0704A;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(212, 132, 90, 0.4);
}
.btn-primary:focus-visible { outline: 3px solid #D4845A; outline-offset: 2px; }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  color: white;
  padding: 12px 28px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.9375rem;
  text-decoration: none;
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.2s ease;
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.6);
  transform: translateY(-2px);
}
.btn-secondary:focus-visible { outline: 3px solid white; outline-offset: 2px; }

.btn-outline {
  display: inline-flex;
  align-items: center;
  background: transparent;
  color: #D4845A;
  padding: 12px 28px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.9375rem;
  text-decoration: none;
  border: 2px solid #D4845A;
  transition: background 0.25s ease, color 0.25s ease, transform 0.2s ease;
}
.btn-outline:hover {
  background: #D4845A;
  color: white;
  transform: translateY(-2px);
}

/* ========== BADGES ========== */
.badge-hero {
  display: inline-block;
  background: linear-gradient(135deg, #FDF0EB, #F9DFD3);
  color: #C0704A;
  font-weight: 700;
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid #F4C4B2;
}
.badge-light {
  display: inline-block;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.9);
  font-weight: 700;
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* ========== HERO ========== */
.hero-bg { transition: transform 8s ease; }
.hero-overlay {
  background: linear-gradient(
    135deg,
    rgba(110, 61, 45, 0.82) 0%,
    rgba(165, 90, 60, 0.72) 50%,
    rgba(192, 112, 74, 0.65) 100%
  );
}
#hero:hover .hero-bg { transform: scale(1.03); }

.scroll-indicator {
  animation: scrollBounce 2s ease-in-out infinite;
  opacity: 0.6;
}
@keyframes scrollBounce {
  0%, 100% { transform: translateY(0); opacity: 0.4; }
  50% { transform: translateY(8px); opacity: 0.8; }
}

/* ========== CARDS ========== */
.card-alt {
  background: white;
  border-radius: 20px;
  padding: 2rem;
  border: 1px solid #F3D9C0;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.card-alt:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 50px rgba(165, 90, 60, 0.12);
  border-color: #E09D6A;
}

/* ========== LINKS ========== */
.link-arrow {
  display: inline-flex;
  align-items: center;
  color: #D4845A;
  font-weight: 700;
  font-size: 0.9375rem;
  text-decoration: none;
  transition: color 0.2s ease;
}
.link-arrow:hover { color: #C0704A; }

/* ========== FORM ========== */
.input-field {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid #F3D9C0;
  border-radius: 12px;
  font-family: 'Nunito', system-ui, sans-serif;
  font-size: 0.9375rem;
  color: #3D2A17;
  background: white;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
  outline: none;
}
.input-field::placeholder { color: #C09A7A; }
.input-field:focus {
  border-color: #D4845A;
  box-shadow: 0 0 0 4px rgba(212, 132, 90, 0.1);
}
.input-field:invalid:not(:placeholder-shown) { border-color: #E07555; }

/* ========== BACK TO TOP ========== */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #D4845A;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  box-shadow: 0 4px 20px rgba(212, 132, 90, 0.4);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s ease, transform 0.3s ease, background 0.25s ease;
  z-index: 50;
  pointer-events: none;
}
.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}
.back-to-top:hover { background: #C0704A; transform: translateY(-2px); }

/* ========== REVEAL ANIMATIONS ========== */
.reveal {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.revealed {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  .hero-bg { transition: none; }
  .card-alt { transition: none; }
  .card-alt:hover { transform: none; }
  .btn-primary, .btn-secondary, .btn-outline { transition: none; }
  .btn-primary:hover, .btn-secondary:hover, .btn-outline:hover { transform: none; }
  .back-to-top { transition: none; }
  .animate-float, .animate-float-delayed { animation: none; }
  .scroll-indicator { animation: none; }
}

/* ========== RESPONSIVE ========== */
@media (max-width: 767px) {
  .font-display { font-size: clamp(2rem, 8vw, 3rem); }
  .card-alt { padding: 1.5rem; }
}
