/* ============================================================
   CONVERSION COMPASS — Global Stylesheet
   Fonts, variables, nav, footer, buttons, shared components
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Merriweather+Sans:wght@400;700;800&family=Mulish:wght@400;600;700&display=swap');

/* ---- Variables ---- */
:root {
  --plum:       #43374F;
  --plum-light: #5a4a6b;
  --cream:      #F2F7F2;
  --beige:      #BDAA99;
  --beige-pale: #ede6df;
  --green-1:    #7DC247;
  --green-2:    #249C48;
  --green-grad: linear-gradient(135deg, #7DC247, #249C48);
  --text-dark:  #2a2033;
  --text-muted: #6b5f78;
  --max-w:      1200px;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html  { scroll-behavior: smooth; }
body  { font-family: 'Mulish', sans-serif; background: var(--cream); color: var(--plum); overflow-x: hidden; line-height: 1.6; }
img   { max-width: 100%; height: auto; display: block; }
a     { text-decoration: none; }

/* ---- Navigation ---- */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.5rem 5%;
  background: var(--beige);
  border-bottom: 1px solid rgba(67,55,79,0.15);
  transition: box-shadow 0.3s;
}
nav.scrolled { box-shadow: 0 4px 24px rgba(67,55,79,0.2); }

.nav-logo img { height: 70px; width: auto; }

.nav-links { display: flex; align-items: center; gap: 2.5rem; }

.nav-links a {
  font-weight: 600; font-size: 0.9rem; color: var(--plum);
  letter-spacing: 0.02em; transition: color 0.2s;
}
.nav-links a:hover { color: var(--text-dark); }
.nav-links a.active {
  font-weight: 700;
  border-bottom: 2px solid var(--plum);
  padding-bottom: 2px;
}

.btn-nav {
  background: var(--green-grad) !important;
  color: #fff !important;
  padding: 0.6rem 1.4rem;
  border-radius: 50px;
  font-weight: 700 !important;
  border-bottom: none !important;
  transition: opacity 0.2s, transform 0.2s !important;
}
.btn-nav:hover { opacity: 0.9; transform: translateY(-1px); }

/* Mobile hamburger */
.nav-toggle {
  display: none; flex-direction: column; gap: 5px;
  cursor: pointer; padding: 5px; background: none; border: none;
}
.nav-toggle span { width: 24px; height: 2px; background: var(--plum); display: block; border-radius: 2px; transition: all 0.3s; }

/* Mobile menu */
.nav-mobile {
  display: none; position: fixed; top: 82px; left: 0; right: 0;
  background: var(--beige); border-bottom: 1px solid rgba(67,55,79,0.15);
  flex-direction: column; padding: 1.5rem 5%; gap: 1.2rem; z-index: 99;
}
.nav-mobile.open { display: flex; }
.nav-mobile a { font-weight: 600; font-size: 1rem; color: var(--plum); }
.nav-mobile .btn-nav { text-align: center; padding: 0.75rem 1.4rem; border-radius: 50px; }

/* ---- Buttons ---- */
.btn-primary {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: var(--green-grad); color: #fff;
  font-family: 'Mulish', sans-serif; font-weight: 700; font-size: 0.95rem;
  padding: 0.9rem 2rem; border-radius: 50px;
  border: none; cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 20px rgba(36,156,72,0.3);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(36,156,72,0.4); }

.btn-secondary {
  display: inline-flex; align-items: center; gap: 0.5rem;
  color: var(--plum); font-family: 'Mulish', sans-serif;
  font-weight: 700; font-size: 0.95rem;
  padding: 0.9rem 2rem; border-radius: 50px;
  border: 2px solid var(--beige);
  transition: border-color 0.2s, background 0.2s;
}
.btn-secondary:hover { border-color: var(--plum); background: rgba(67,55,79,0.05); }

.btn-outline-light {
  display: inline-flex; align-items: center; gap: 0.5rem;
  color: var(--cream); font-family: 'Mulish', sans-serif;
  font-weight: 700; font-size: 0.95rem;
  padding: 0.9rem 2rem; border-radius: 50px;
  border: 2px solid rgba(242,247,242,0.4);
  transition: border-color 0.2s, background 0.2s;
}
.btn-outline-light:hover { border-color: var(--cream); background: rgba(242,247,242,0.1); }

/* ---- Section Shared ---- */
.section-eyebrow {
  text-align: center; font-size: 0.8rem; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--green-2);
  margin-bottom: 1rem;
}
.section-title {
  text-align: center;
  font-family: 'Merriweather Sans', sans-serif;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 800; color: var(--plum);
  margin-bottom: 1rem; letter-spacing: -0.02em;
}
.section-sub {
  text-align: center; max-width: 560px; margin: 0 auto 4rem;
  color: var(--text-muted); line-height: 1.7; font-size: 1.05rem;
}

/* ---- Page Hero (inner pages) ---- */
.page-hero {
  padding: 10rem 5% 5rem;
  background: var(--plum); text-align: center;
  position: relative; overflow: hidden;
}
.page-hero::before {
  content: ''; position: absolute; top: -30%; right: -10%;
  width: 50vw; height: 120%;
  background: radial-gradient(ellipse, rgba(125,194,71,0.12) 0%, transparent 70%);
}
.page-hero .eyebrow {
  font-size: 0.8rem; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--green-1);
  margin-bottom: 1rem; display: block; position: relative; z-index: 1;
}
.page-hero h1 {
  font-family: 'Merriweather Sans', sans-serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800; color: var(--cream);
  margin-bottom: 1rem; position: relative; z-index: 1;
}
.page-hero p {
  font-size: 1.05rem; color: rgba(242,247,242,0.7);
  max-width: 580px; margin: 0 auto;
  line-height: 1.7; position: relative; z-index: 1;
}

/* ---- CTA Band ---- */
.cta-band {
  padding: 6rem 5%; background: var(--plum); text-align: center;
  position: relative; overflow: hidden;
}
.cta-band::before {
  content: ''; position: absolute; top: -50%; left: -10%;
  width: 50%; height: 200%;
  background: radial-gradient(ellipse, rgba(125,194,71,0.1) 0%, transparent 70%);
}
.cta-band h2 {
  font-family: 'Merriweather Sans', sans-serif;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 800; color: var(--cream);
  margin-bottom: 1rem; position: relative; z-index: 1;
}
.cta-band p {
  color: rgba(242,247,242,0.7); font-size: 1.05rem;
  max-width: 520px; margin: 0 auto 2rem;
  position: relative; z-index: 1;
}
.cta-actions {
  display: flex; justify-content: center; gap: 1rem; flex-wrap: wrap;
  position: relative; z-index: 1;
}

/* ---- Footer ---- */
footer {
  background: var(--text-dark); padding: 4rem 5% 2rem;
}
.footer-top {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(242,247,242,0.1);
  margin-bottom: 2rem;
}
.footer-brand img { height: 56px; width: auto; margin-bottom: 1rem; }
.footer-brand p {
  font-size: 0.875rem; color: rgba(242,247,242,0.5);
  line-height: 1.7; max-width: 280px;
}
.footer-col h4 {
  font-family: 'Merriweather Sans', sans-serif;
  font-size: 0.85rem; font-weight: 700; color: var(--cream);
  margin-bottom: 1rem; letter-spacing: 0.05em; text-transform: uppercase;
}
.footer-col a {
  display: block; font-size: 0.875rem; color: rgba(242,247,242,0.5);
  margin-bottom: 0.6rem; transition: color 0.2s;
}
.footer-col a:hover { color: var(--cream); }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 0.5rem;
}
.footer-bottom p { font-size: 0.8rem; color: rgba(242,247,242,0.3); }

/* ---- Animations ---- */
/* Only hide elements if JS has confirmed it loaded (body.js class).
   This ensures cards are always visible even if JS fails to load. */
body.js .fade-up {
  opacity: 0; transform: translateY(28px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
body.js .fade-up.visible { opacity: 1; transform: translateY(0); }
body.js .stagger > *:nth-child(2) { transition-delay: 0.1s; }
body.js .stagger > *:nth-child(3) { transition-delay: 0.2s; }
body.js .stagger > *:nth-child(4) { transition-delay: 0.3s; }

/* ---- Toast ---- */
.toast {
  position: fixed; bottom: 2rem; right: 2rem;
  background: var(--plum); color: var(--cream);
  padding: 1rem 1.5rem; border-radius: 14px;
  font-size: 0.9rem; font-weight: 600;
  box-shadow: 0 10px 40px rgba(0,0,0,0.2);
  transform: translateY(100px); opacity: 0;
  transition: all 0.4s cubic-bezier(0.34,1.56,0.64,1);
  z-index: 999;
}
.toast.show { transform: translateY(0); opacity: 1; }

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .footer-top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 580px) {
  .footer-top { grid-template-columns: 1fr; }
  .footer-bottom { text-align: center; justify-content: center; }
}
