/* ============================================================
   Steadfast Life — Shared Stylesheet
   ============================================================ */

/* ── RESET & TOKENS ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --terracotta: #C4714A;
  --terracotta-aa: #994D2E;       /* WCAG AA accessible: 5.85:1 on white, 5.32:1 on linen */
  --terracotta-light: #D98B66;
  --terracotta-pale: #F2E0D5;
  --linen: #F5EFE6;
  --linen-dark: #EDE4D7;
  --warm-brown: #5C3D2E;
  --warm-brown-light: #7A5544;
  --text-dark: #2C2218;
  --text-mid: #6B5744;
  --text-light: #7A6558;          /* darkened from #9C8070 — now 4.79:1 on linen, 5.27:1 on white */
  --white: #FDFAF7;
  --font-display: 'Instrument Serif', Georgia, serif;
  --font-body: 'DM Sans', sans-serif;
}

html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--white);
  color: var(--text-dark);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

/* ── NAV ── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(253,250,247,0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--linen-dark);
  padding: 0 5%; height: 68px;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-logo {
  font-family: var(--font-display);
  font-size: 1.75rem; font-weight: 500;
  color: var(--warm-brown); text-decoration: none;
  letter-spacing: 0.01em;
}
.logo-img {               /* relative units are great for nav bars */ /* never taller than this */
  width: auto;
  max-width: 300px;            /* optional cap */
}
.nav-links { display: flex; align-items: center; gap: 2rem; list-style: none; }
.nav-links a {
  font-size: 0.875rem; color: var(--text-mid);
  text-decoration: none; letter-spacing: 0.02em; transition: color 0.2s;
}
.nav-links a:hover,
.nav-links a.active { color: var(--terracotta-aa); }
.btn-nav {

  background: var(--terracotta-aa);
  color: white !important;
  padding: 0.5rem 1.25rem;
  border-radius: 100px;
  font-weight: 500;
  font-size: 0.875rem;
  transition: background 0.2s;
}
.btn-nav:hover { background: var(--terracotta); color: white; }

/* ── DROPDOWN ── */
.nav-dropdown { position: relative; }

.nav-dropdown > a {
  display: flex; align-items: center; gap: 0.35rem;
  cursor: pointer;
}

/* Chevron */
.nav-dropdown > a::after {
  content: '';
  display: inline-block;
  width: 7px; height: 7px;
  border-right: 1.5px solid var(--text-light);
  border-bottom: 1.5px solid var(--text-light);
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.2s, border-color 0.2s;
  margin-top: 2px;
}
.nav-dropdown:hover > a::after {
  transform: rotate(-135deg) translateY(1px);
  border-color: var(--terracotta-aa);
}
.nav-dropdown:hover > a { color: var(--terracotta-aa); }

/* Panel */
.dropdown-panel {
  position: absolute;
  top: calc(100% + 16px);
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  min-width: 210px;
  background: rgba(253,250,247,0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--linen-dark);
  border-radius: 14px;
  padding: 0.5rem;
  box-shadow: 0 16px 48px rgba(44,34,24,0.1), 0 2px 8px rgba(44,34,24,0.06);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

/* Bridge the gap so mouse can move from trigger to panel */
.dropdown-panel::before {
  content: '';
  position: absolute;
  top: -16px; left: 0; right: 0;
  height: 16px;
}

.nav-dropdown:hover .dropdown-panel {
  opacity: 1;
  pointer-events: all;
  transform: translateX(-50%) translateY(0);
}

.dropdown-link {
  display: block;
  padding: 0.65rem 1rem;
  font-size: 0.875rem;
  color: var(--text-mid);
  text-decoration: none;
  border-radius: 8px;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}
.dropdown-link.active {
  color: var(--terracotta-aa);
}
.dropdown-link:hover {
  background: var(--linen);
  color: var(--terracotta-aa);
}

/* ── MOBILE: Programs label & sub-links ── */
.mobile-section-label {
  font-size: 0.68rem; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--terracotta-aa);
  padding: 1rem 0 0.25rem;
  border-bottom: none !important;
  display: block;
  pointer-events: none;
}
.mobile-sub {
  padding-left: 1rem !important;
  font-size: 0.9rem !important;
}
.mobile-sub.active {
  color: var(--terracotta-aa);
}

/* ── MOBILE NAV ── */
.nav-hamburger {
  display: none;
  flex-direction: column; gap: 5px;
  cursor: pointer; padding: 4px;
  background: none; border: none;
}
.nav-hamburger span {
  display: block; width: 24px; height: 2px;
  background: var(--warm-brown);
  transition: all 0.25s ease; border-radius: 2px;
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  display: none;
  position: fixed; top: 68px; left: 0; right: 0;
  background: rgba(253,250,247,0.98);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--linen-dark);
  padding: 1.5rem 6%; z-index: 99;
  flex-direction: column; gap: 0;
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  font-size: 1rem; color: var(--text-mid);
  text-decoration: none; padding: 1rem 0;
  border-bottom: 1px solid var(--linen-dark);
  font-weight: 400; letter-spacing: 0.01em; transition: color 0.2s;
  display: block;
}
.mobile-menu a:last-child { border-bottom: none; padding-bottom: 0.5rem; }
.mobile-menu a:hover { color: var(--terracotta-aa); }
.mobile-menu .mobile-cta {
  margin-top: 1rem;
  background: var(--terracotta-aa); color: white;
  padding: 0.85rem 1.5rem; border-radius: 100px;
  text-align: center; font-weight: 500;
  border-bottom: none;
}
.mobile-menu .mobile-cta:hover { background: var(--terracotta); color: white; }

/* ── SHARED UTILITIES ── */
.tag {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.72rem; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--terracotta-aa); margin-bottom: 1.25rem;
}
.tag::before { content: ''; width: 20px; height: 1px; background: var(--terracotta); }

h1 {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 4.5vw, 4.2rem);
  font-weight: 300; line-height: 1.08;
  color: var(--warm-brown);
  letter-spacing: -0.01em; margin-bottom: 1.5rem;
}
h1 em { font-style: italic; color: var(--terracotta); }

h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 300; color: var(--warm-brown);
  letter-spacing: -0.01em; line-height: 1.2; margin-bottom: 0.75rem;
}
h2 em { font-style: italic; color: var(--terracotta); }
h2.on-dark { color: var(--linen); }

section { padding: 7rem 8%; }

.section-sub { font-size: 1rem; color: var(--text-light); font-weight: 300; }

.btn-primary {
  background: var(--terracotta-aa); color: white;
  padding: 0.85rem 2rem; border-radius: 100px;
  font-size: 0.9rem; font-weight: 500;
  text-decoration: none; letter-spacing: 0.02em;
  transition: background 0.2s, transform 0.15s; display: inline-block;
}
.btn-primary:hover { background: var(--terracotta); transform: translateY(-1px); }

.btn-ghost {
  color: var(--warm-brown); padding: 0.5rem 0;
  font-size: 0.9rem; font-weight: 400;
  text-decoration: none; border-bottom: 1px solid currentColor;
  letter-spacing: 0.02em; transition: color 0.2s; display: inline-block;
}
.btn-ghost:hover { color: var(--terracotta-aa); }

.btn-light {
  background: var(--linen); color: var(--warm-brown);
  padding: 0.9rem 2.25rem; border-radius: 100px;
  font-size: 0.95rem; font-weight: 500;
  text-decoration: none; display: inline-block;
  transition: background 0.2s, transform 0.15s; letter-spacing: 0.02em;
}
.btn-light:hover { background: white; transform: translateY(-2px); }

.reveal { transition: opacity 0.65s ease, transform 0.65s ease; }
.reveal.hidden { opacity: 0; transform: translateY(22px); }

/* ── CTA BANNER (shared dark version) ── */
#cta-banner { background: var(--warm-brown); padding: 6rem 8%; text-align: center; }
#cta-banner h2 { color: var(--linen); font-size: clamp(1.8rem, 3vw, 2.8rem); margin-bottom: 1rem; }
#cta-banner h2 em { color: var(--terracotta-light); }
#cta-banner p { color: rgba(245,239,230,0.65); font-weight: 300; margin-bottom: 2.5rem; font-size: 1rem; }

/* ── TESTIMONIALS (shared) ── */
#testimonials { background: var(--white); }
.testimonials-header,
.testi-header { text-align: center; margin-bottom: 3rem; }
.testi-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.testi-card { background: var(--linen); border-radius: 18px; padding: 2rem; border: 1px solid var(--linen-dark); }
.testi-card blockquote { font-family: var(--font-display); font-size: 0.95rem; font-style: italic; color: var(--text-mid); line-height: 1.7; font-weight: 300; margin-bottom: 1rem; }
.testi-attr { font-size: 0.78rem; font-weight: 500; color: var(--warm-brown); }
@media (max-width: 960px) {
  .testi-grid { grid-template-columns: 1fr; }
}

/* FAQ (shared) */
.faq-item { border-bottom: 1px solid var(--linen-dark); padding: 1.5rem 0; }
.faq-q {
  font-size: 0.95rem; font-weight: 500; color: var(--warm-brown);
  cursor: pointer; display: flex; justify-content: space-between;
  align-items: center; gap: 1rem; user-select: none;
}
.faq-q::after {
  content: '+'; font-size: 1.2rem; color: var(--terracotta-aa);
  flex-shrink: 0; transition: transform 0.2s;
}
.faq-item.open .faq-q::after { transform: rotate(45deg); }
.faq-a {
  font-size: 0.875rem; color: var(--text-mid); line-height: 1.75;
  font-weight: 300; max-height: 0; overflow: hidden;
  transition: max-height 0.35s ease, padding 0.2s;
}
.faq-item.open .faq-a { max-height: 600px; padding-top: 0.75rem; }

/* ── FOOTER ── */
footer {
  background: var(--text-dark);
  color: rgba(245,239,230,0.65);
  text-align: center; padding: 3rem 8%;
  font-size: 0.85rem; font-weight: 300;
}
.footer-logo {
  font-family: var(--font-display); font-size: 1.1rem;
  color: var(--linen); display: block; margin-bottom: 1rem;
}
.footer-links {
  display: flex; justify-content: center;
  gap: 2rem; margin-bottom: 1.25rem; flex-wrap: wrap;
}
.footer-links a {
  color: rgba(245,239,230,0.75); text-decoration: none;
  font-size: 0.8rem; transition: color 0.2s;
}
.footer-links a:hover { color: var(--terracotta-light); }
.footer-motto { font-style: italic; font-size: 0.78rem; color: rgba(245,239,230,0.45); margin-top: 0.5rem; }

/* ── RESPONSIVE ── */
@media (max-width: 960px) {
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  section { padding: 4rem 6%; }
}

/* ── SKIP NAVIGATION LINK (ADA 2.4.1) ── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  background: var(--warm-brown);
  color: var(--linen);
  padding: 0.75rem 1.5rem;
  border-radius: 0 0 8px 8px;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  z-index: 9999;
  transition: top 0.2s;
}
.skip-link:focus { top: 0; }

/* ── FOCUS INDICATORS (ADA 2.4.7) ── */
:focus-visible {
  outline: 3px solid var(--terracotta-aa);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Inputs already show a custom border focus; swap outline for box-shadow */
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(153, 77, 46, 0.35);
}

/* ── REDUCED MOTION (ADA 2.3.3) ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal.hidden {
    opacity: 1;
    transform: none;
  }
}
/* ── SHARED BUTTON VARIANTS (wilderness + cross-site) ── */
.btn-primary-light {
  background: var(--linen); color: var(--warm-brown);
  padding: 0.9rem 2.25rem; border-radius: 100px;
  font-size: 0.95rem; font-weight: 500;
  text-decoration: none; transition: background 0.2s, transform 0.15s; display: inline-block;
}
.btn-primary-light:hover { background: white; transform: translateY(-1px); }

.btn-outline-light {
  color: rgba(245,239,230,0.85); padding: 0.9rem 2.25rem;
  border-radius: 100px; font-size: 0.9rem; font-weight: 400;
  text-decoration: none; border: 1px solid rgba(245,239,230,0.3);
  transition: all 0.2s; display: inline-block;
}
.btn-outline-light:hover { background: rgba(245,239,230,0.1); border-color: rgba(245,239,230,0.5); }

.btn-outline {
  color: var(--warm-brown); padding: 0.85rem 2rem;
  border-radius: 100px; font-size: 0.9rem; font-weight: 500;
  text-decoration: none; border: 1.5px solid var(--warm-brown);
  transition: all 0.2s; display: inline-block;
}
.btn-outline:hover { background: var(--warm-brown); color: white; }

/* ── SHARED FORM STYLES ── */
.form-group { margin-bottom: 0.75rem; }
.form-group label {
  display: block; font-size: 0.75rem; font-weight: 500;
  letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 0.35rem;
}
.form-note {
  text-align: center; font-size: 0.78rem;
  color: rgba(245,239,230,0.35); margin-top: 1rem; font-weight: 300;
}

/* ── TESTIMONIAL CITE (replaces misused <cite> for person attribution) ── */
.testi-cite {
  font-style: normal;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--warm-brown);
  letter-spacing: 0.03em;
}
.testi-card--featured .testi-cite { color: rgba(245,239,230,0.45); }