/* ========================================
   M D Nest at Eagle Point — Styles
   ======================================== */

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  overflow-x: hidden;
}

::selection {
  background: rgba(123, 45, 59, 0.2);
  color: inherit;
}

/* --- Animations --- */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(1.5rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-up {
  animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* --- Scroll Reveal --- */
.reveal {
  opacity: 0;
  transform: translateY(2rem);
  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);
}

.reveal.delay-1 { transition-delay: 0.1s; }
.reveal.delay-2 { transition-delay: 0.2s; }
.reveal.delay-3 { transition-delay: 0.3s; }
.reveal.delay-4 { transition-delay: 0.4s; }

/* --- Divider --- */
.divider {
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(123, 45, 59, 0.2), transparent);
  margin: 0 auto;
}

/* --- Section Eyebrow --- */
.section-eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #7B2D3B;
}

/* --- Buttons --- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  background: #7B2D3B;
  color: #FDF8F6;
  padding: 0.75rem 1.5rem;
  border-radius: 9999px;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  border: 2px solid #7B2D3B;
}

.btn-primary:hover {
  background: #5e222e;
  border-color: #5e222e;
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(123, 45, 59, 0.3);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  background: transparent;
  color: #FDF8F6;
  padding: 0.75rem 1.5rem;
  border-radius: 9999px;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  border: 2px solid rgba(253, 248, 246, 0.4);
}

.btn-secondary:hover {
  border-color: #FDF8F6;
  background: rgba(253, 248, 246, 0.1);
  transform: translateY(-2px);
}

/* --- Inputs --- */
.input-field {
  background: #FDF8F6;
  border: 1.5px solid #E5D5CA;
  border-radius: 12px;
  padding: 0.875rem 1rem;
  font-size: 0.9375rem;
  font-family: 'Inter', system-ui, sans-serif;
  color: #3d171d;
  transition: all 0.3s ease;
  outline: none;
  width: 100%;
}

.input-field::placeholder {
  color: #C4A882;
}

.input-field:focus {
  border-color: #7B2D3B;
  box-shadow: 0 0 0 3px rgba(123, 45, 59, 0.1);
}

.input-field:hover:not(:focus) {
  border-color: #C4A882;
}

/* --- Navbar --- */
#navbar {
  background: transparent;
}

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

.nav-link {
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: #7B2D3B;
  transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

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

.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

/* --- Scroll Indicator --- */
.scroll-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: float 2s ease-in-out infinite;
}

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

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

/* --- Responsive Tweaks --- */
@media (max-width: 768px) {
  .hero-headline {
    font-size: 2.75rem !important;
  }

  .font-serif.text-4xl {
    font-size: 2.25rem;
  }

  .font-serif.text-5xl {
    font-size: 2.5rem;
  }

  .font-serif.text-6xl {
    font-size: 2.75rem;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .font-serif.text-5xl {
    font-size: 3rem;
  }
}

/* --- Focus Visible --- */
*:focus-visible {
  outline: 2px solid #7B2D3B;
  outline-offset: 2px;
}

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }

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