/* =============================================
   MERIDIAN WEALTH PARTNERS — styles.css
   Emerald-900 #064e3b | Cream #fef9f0 | Gold #d4a853
   Cormorant Garamond + Inter
   ============================================= */

html { scroll-behavior: smooth; }
*, *::before, *::after { box-sizing: border-box; }

/* ─── Scroll Progress ─── */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, #d4a853, #f0c97a, #d4a853);
  z-index: 9999;
  transition: width 0.1s linear;
}

/* ─── Navbar ─── */
.nav-bar {
  background: rgba(6, 78, 59, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(212, 168, 83, 0.2);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}
.nav-bar.scrolled {
  background: rgba(6, 78, 59, 0.99);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}
.nav-link {
  position: relative;
  padding-bottom: 3px;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: #d4a853;
  transition: width 0.3s ease;
}
.nav-link:hover::after,
.nav-link.active::after { width: 100%; }
.nav-link.active { color: #d4a853; }

/* ─── Hamburger ─── */
.hamburger-btn {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.hamburger-line {
  width: 24px;
  height: 1.5px;
  background: #d4a853;
  transition: transform 0.3s ease, opacity 0.3s ease;
  display: block;
}
.hamburger-btn.open .hamburger-line:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger-btn.open .hamburger-line:nth-child(2) { opacity: 0; }
.hamburger-btn.open .hamburger-line:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ─── Mobile Menu ─── */
.mobile-menu {
  position: fixed;
  inset: 0;
  background: rgba(6, 78, 59, 0.99);
  z-index: 40;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 2rem;
  overflow-y: auto;
}
.mobile-menu.open { transform: translateX(0); }
.mobile-menu-inner { max-width: 400px; margin: 0 auto; padding-top: 1rem; }

/* ─── Hero ─── */
.hero-section { position: relative; overflow: hidden; }
.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.06);
  animation: heroZoom 22s ease-in-out infinite alternate;
}
@keyframes heroZoom {
  from { transform: scale(1.06); }
  to   { transform: scale(1.14); }
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(6,78,59,0.78) 0%, rgba(6,78,59,0.52) 50%, rgba(6,78,59,0.88) 100%);
}
.hero-eyebrow { animation: fadeInDown 0.9s ease forwards; }
.hero-title { animation: fadeInUp 1s ease 0.35s forwards; opacity: 0; }
.hero-subtitle { animation: fadeInUp 1s ease 0.65s forwards; opacity: 0; }
.hero-ctas { animation: fadeInUp 1s ease 0.95s forwards; opacity: 0; }
.hero-scroll { animation: fadeInUp 1s ease 1.3s forwards; opacity: 0; }

/* ─── Buttons ─── */
.btn-primary {
  display: inline-block;
  background: #d4a853;
  color: #064e3b;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 13px 30px;
  border: 2px solid #d4a853;
  cursor: pointer;
  transition: background 0.3s, color 0.3s, transform 0.2s, box-shadow 0.3s;
  text-align: center;
}
.btn-primary:hover {
  background: transparent;
  color: #d4a853;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(212, 168, 83, 0.25);
}
.btn-outline {
  display: inline-block;
  background: transparent;
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 13px 30px;
  border: 2px solid rgba(255,255,255,0.5);
  cursor: pointer;
  transition: border-color 0.3s, color 0.3s, transform 0.2s;
  text-align: center;
}
.btn-outline:hover {
  border-color: #d4a853;
  color: #d4a853;
  transform: translateY(-2px);
}

/* ─── Card Hover ─── */
.card-hover { transition: transform 0.3s ease, box-shadow 0.3s ease; }
.card-hover:hover { transform: translateY(-6px); box-shadow: 0 20px 48px rgba(6,78,59,0.12); }

/* ─── Reveal ─── */
.reveal-section {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal-section.revealed { opacity: 1; transform: translateY(0); }

/* ─── Carousel ─── */
.carousel-slide { display: none; animation: fadeSlide 0.5s ease; }
.carousel-slide.active { display: block; }
@keyframes fadeSlide {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(212,168,83,0.3);
  cursor: pointer;
  transition: all 0.3s;
  border: none;
  padding: 0;
}
.carousel-dot.active { background: #d4a853; width: 24px; border-radius: 4px; }

/* ─── FAQ ─── */
.faq-item { overflow: hidden; border: 1px solid #e5e0d8; transition: border-color 0.3s; }
.faq-item.open { border-color: #d4a853; }
.faq-trigger { background: none; border: none; cursor: pointer; width: 100%; }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.4s ease; }
.faq-item.open .faq-answer { max-height: 300px; }
.faq-icon { transition: transform 0.3s ease; flex-shrink: 0; }
.faq-item.open .faq-icon { transform: rotate(180deg); }

/* ─── Modal ─── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(6, 78, 59, 0.75);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(6px);
}
.modal-overlay.active { opacity: 1; pointer-events: all; }
.modal-content {
  background: #fff;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(20px) scale(0.97);
  transition: transform 0.3s ease;
  width: 100%;
}
.modal-overlay.active .modal-content { transform: translateY(0) scale(1); }

/* ─── Back to Top ─── */
.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 48px;
  height: 48px;
  background: #d4a853;
  color: #064e3b;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transform: translateY(16px);
  transition: opacity 0.3s ease, transform 0.3s ease, background 0.3s;
  z-index: 100;
}
.back-to-top.visible { opacity: 1; pointer-events: all; transform: translateY(0); }
.back-to-top:hover { background: #b88f3e; }

/* ─── Lazy images ─── */
.lazy-img { filter: blur(8px); transition: filter 0.5s ease; }
.lazy-img.loaded { filter: blur(0); }

/* ─── Keyframes ─── */
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}

/* ─── Form ─── */
.form-error { display: block; }
input.error, select.error, textarea.error { border-color: #ef4444 !important; }

/* ─── Advisor portrait ring ─── */
.advisor-portrait-ring {
  position: relative;
  display: inline-block;
}
.advisor-portrait-ring::before {
  content: '';
  position: absolute;
  inset: -8px;
  border: 2px solid #d4a853;
  border-radius: 2px;
}

/* ─── Gold text ─── */
.text-gold { color: #d4a853; }
.bg-gold { background-color: #d4a853; }
.border-gold { border-color: #d4a853; }
.text-emerald { color: #064e3b; }
.bg-emerald { background-color: #064e3b; }
.bg-cream { background-color: #fef9f0; }

/* ─── Service card line ─── */
.service-card-line {
  height: 3px;
  background: linear-gradient(90deg, #d4a853, #f0c97a);
  width: 48px;
  transition: width 0.3s ease;
}
.card-hover:hover .service-card-line { width: 80px; }

/* ─── Scrollbar ─── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #fef9f0; }
::-webkit-scrollbar-thumb { background: #d4a853; border-radius: 4px; }

/* ─── Scroll indicator ─── */
.scroll-chevron {
  width: 20px;
  height: 20px;
  border-right: 1.5px solid rgba(212,168,83,0.7);
  border-bottom: 1.5px solid rgba(212,168,83,0.7);
  transform: rotate(45deg);
  margin: 0 auto;
  animation: chevronBounce 2s infinite;
}
@keyframes chevronBounce {
  0%, 100% { transform: rotate(45deg) translateY(0); }
  50%       { transform: rotate(45deg) translateY(6px); }
}
