/* ============================================
   Bill Donaldson — Mortgage Lender Site
   Custom Styles for Guaranteed Rate Maitland
   ============================================ */

/* ---------- Base & Utilities ---------- */
html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  overflow-x: hidden;
}

::selection {
  background-color: rgba(180, 125, 208, 0.25);
  color: #3d1d44;
}

/* ---------- Animations ---------- */
@keyframes float {
  0%, 100% { transform: translateY(0px) scale(1); }
  50% { transform: translateY(-20px) scale(1.03); }
}

@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.animate-float {
  animation: float 6s ease-in-out infinite;
}

.animate-fade-in-up {
  animation: fade-in-up 0.7s ease-out both;
}

.animate-fade-in {
  animation: fade-in 0.5s ease-out both;
}

/* ---------- Scroll Reveal ---------- */
.scroll-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

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

/* ---------- Header ---------- */
#site-header {
  background: transparent;
  transition: background 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}

#site-header.scrolled {
  background: rgba(250, 245, 252, 0.88);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  box-shadow: 0 1px 20px rgba(123, 63, 142, 0.08);
}

.nav-link {
  position: relative;
}

/* ---------- Mobile Menu ---------- */
#mobile-menu {
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
}

#mobile-menu.open {
  max-height: 400px;
  opacity: 1;
}

#mobile-menu.closed {
  max-height: 0;
  opacity: 0;
}

.mobile-nav-link {
  display: block;
}

/* ---------- Form Select ---------- */
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='%239655b8' 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 1rem center;
  padding-right: 2.5rem;
}

/* ---------- Custom Scrollbar ---------- */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #faf5fc;
}
::-webkit-scrollbar-thumb {
  background: #e6cff0;
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #d4a7e0;
}

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

/* ---------- Responsive Tweaks ---------- */
@media (max-width: 640px) {
  .font-serif {
    font-size: clamp(1.75rem, 8vw, 2.5rem);
  }
}

@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; }
  .scroll-reveal {
    opacity: 1;
    transform: none;
  }
}
