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

html {
  scroll-behavior: smooth;
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
}

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

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

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  html {
    scroll-behavior: auto;
  }
  .group img {
    transition: none;
  }
}

/* ========== NAVBAR SCROLL STATE ========== */
#navbar.scrolled {
  background: rgba(255, 252, 248, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 20px rgba(123, 45, 59, 0.08);
}

#navbar.scrolled .nav-link {
  color: #734a31;
}

#navbar.scrolled .nav-link:hover {
  color: #7B2D3B;
}

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

/* ========== ACTIVE NAV LINK ========== */
.nav-link.active {
  color: #7B2D3B !important;
  position: relative;
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(to right, #7B2D3B, #e47063);
  border-radius: 1px;
}

/* ========== MOBILE MENU ========== */
#mobile-menu {
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========== HERO FLOATING CARD ========== */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-8px); }
}

.absolute -bottom-6 -left-4.z-20 {
  animation: float 3s ease-in-out infinite;
}

/* ========== CUSTOM SELECTION ========== */
::selection {
  background: #f9c5ce;
  color: #5c1f29;
}

::-moz-selection {
  background: #f9c5ce;
  color: #5c1f29;
}

/* ========== SMOOTH HOVER FOR CARDS ========== */
.group:hover .group-hover\
:scale-105 {
  transform: scale(1.05);
}

/* ========== BUTTON FOCUS STATES ========== */
a:focus-visible,
button:focus-visible {
  outline: 2px solid #7B2D3B;
  outline-offset: 2px;
  border-radius: 0.5rem;
}

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

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

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

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

/* ========== FORM STYLES ========== */
input, textarea {
  font-family: inherit;
}

input:focus, textarea:focus {
  outline: none;
  border-color: #7B2D3B !important;
  box-shadow: 0 0 0 3px rgba(123, 45, 59, 0.15) !important;
}

/* ========== MOBILE MENU LINKS ========== */
.mobile-link {
  border-bottom: 1px solid rgba(244, 154, 168, 0.2);
}

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

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

@media (min-width: 1024px) {
  .lg\:hover\:shadow-xl:hover {
    box-shadow: 0 20px 40px rgba(123, 45, 59, 0.12);
  }
}
