/* ============================================================
   Hope Bridge Empowerment Foundation — Site Stylesheet
   Palette drawn directly from the HBEMF logo: deep navy bridge,
   sunrise orange, and a muted terracotta, over a soft sky tint.

   Note on variable names: --teal* and --amber* names are kept
   from the original build for compatibility with existing markup,
   but now hold the logo's terracotta and sunrise-orange values
   respectively (not literal teal/amber hues).
   ============================================================ */

:root {
  --navy: #16233F;
  --navy-dark: #0A1220;
  --navy-mid: #2B3F63;

  /* "amber" = sunrise orange, sampled from the logo's sunburst */
  --amber: #E07C4A;
  --amber-dark: #B85C2E;
  --amber-light: #FBEAE0;

  /* "teal" = muted terracotta, sampled from the logo's wordmark */
  --teal: #A8504E;
  --teal-dark: #7E3A38;
  --teal-light: #F4E2E1;

  --sky-tint: #DDEBF8;
  --slate: #4A5568;
  --slate-light: #94A0B4;
  --light-bg: #F9FAFC;
  --white: #FFFFFF;
  --border: #E3E8EF;
  --card-shadow: 0 10px 25px -5px rgba(22, 35, 63, 0.08), 0 8px 10px -6px rgba(22, 35, 63, 0.04);
  --hover-shadow: 0 22px 34px -12px rgba(22, 35, 63, 0.18);
  --radius: 16px;
}

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

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--slate);
  background-color: var(--light-bg);
  line-height: 1.65;
}

h1, h2, h3, h4, h5 {
  font-family: 'Fraunces', Georgia, 'Times New Roman', serif;
  font-optical-sizing: auto;
  color: var(--navy);
  margin: 0;
  letter-spacing: -0.01em;
}

a { color: var(--teal); }
img { max-width: 100%; display: block; }

.visually-hidden {
  position: absolute !important;
  clip: rect(0 0 0 0);
  width: 1px; height: 1px;
  overflow: hidden;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--amber);
  color: #fff;
  padding: 10px 16px;
  z-index: 2000;
  font-weight: 600;
}
.skip-link:focus { left: 8px; top: 8px; }

/* ---------- NAVIGATION ---------- */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
}
.site-header::before {
  content: "";
  display: block;
  height: 4px;
  background: linear-gradient(90deg, var(--amber), var(--teal));
}
.navbar {
  max-width: 1400px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  position: relative;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 18px;
  font-family: 'Fraunces', Georgia, serif;
  color: var(--navy);
  text-decoration: none;
  white-space: nowrap;
}
.brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--sky-tint);
  color: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.5px;
  overflow: hidden;
  flex-shrink: 0;
}
.brand-mark img { width: 100%; height: 100%; object-fit: cover; }
.footer-brand .brand-mark { width: 50px; height: 50px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}
.nav-links a {
  color: var(--navy);
  text-decoration: none;
  font-weight: 600;
  font-size: 14.5px;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  transition: border-color .2s ease, color .2s ease;
}
.nav-links a:hover,
.nav-links a[aria-current="page"] {
  border-bottom-color: var(--amber);
  color: var(--teal-dark);
}
.video-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  height: 0;
  overflow: hidden;
  border-radius: 12px;
}
.video-wrapper iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: 0;
}

.nav-actions { display: flex; align-items: center; gap: 12px; }
.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 22px;
  color: var(--navy);
  cursor: pointer;
  padding: 6px;
}

@media (max-width: 960px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 16px 24px 20px;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 12px 20px -10px rgba(22,35,63,0.18);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 10px 0; width: 100%; }
  .nav-toggle { display: inline-flex; }
  .nav-actions .btn-donate-nav { display: none; }
}

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  font-size: 15px;
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
  border: none;
  line-height: 1;
}
.btn-sm { padding: 9px 18px; font-size: 13.5px; }
.btn-primary { background: var(--amber); color: #fff; box-shadow: 0 4px 14px rgba(224,124,74,.35); }
.btn-primary:hover { background: var(--amber-dark); transform: translateY(-2px); }
.btn-teal { background: var(--teal); color: #fff; box-shadow: 0 4px 14px rgba(168,80,78,.30); }
.btn-teal:hover { background: var(--teal-dark); transform: translateY(-2px); }
.btn-outline { background: rgba(255,255,255,.08); color: #fff; border: 1.5px solid rgba(255,255,255,.35); }
.btn-outline:hover { background: #fff; color: var(--navy); }
.btn-outline-dark { background: transparent; color: var(--navy); border: 1.5px solid var(--border); }
.btn-outline-dark:hover { border-color: var(--teal); color: var(--teal-dark); }
.btn-group { display: flex; flex-wrap: wrap; gap: 14px; }

/* ---------- HERO ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, var(--navy-dark) 0%, var(--navy) 55%, var(--navy-mid) 100%),
              radial-gradient(circle at 85% 12%, rgba(224,124,74,.5), transparent 45%);
  color: #fff;
  padding: 84px 24px 118px;
}
.hero-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 48px;
  align-items: center;
}
.eyebrow {
  display: inline-block;
  background: rgba(224,124,74,.20);
  border: 1px solid var(--amber);
  color: var(--amber-light);
  padding: 6px 16px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 12.5px;
  letter-spacing: .4px;
  margin-bottom: 18px;
}
.hero h1 {
  color: #fff;
  font-weight: 800;
  font-size: 46px;
  line-height: 1.16;
  margin: 0 0 18px;
  letter-spacing: -.5px;
}
.hero h1 .accent { color: var(--amber); }
.hero p.lede {
  font-size: 17.5px;
  color: #CBD5E1;
  margin: 0 0 32px;
  max-width: 560px;
}
.hero-media {
  border-radius: 16px;
  overflow: hidden;
  min-height: 320px;
  border: 1px solid rgba(255,255,255,.15);
}
.hero-media img { width: 100%; height: 100%; object-fit: cover; min-height: 320px; }
.media-slot {
  width: 100%;
  height: 100%;
  min-height: 320px;
  background: linear-gradient(135deg, rgba(230,244,244,.12), rgba(226,232,240,.06));
  border: 1.5px dashed rgba(255,255,255,.3);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #CBD5E1;
  padding: 28px;
  font-size: 13.5px;
}
.media-slot .icon { font-size: 30px; margin-bottom: 10px; }

.page-header {
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, var(--navy-dark) 0%, var(--navy) 60%, var(--navy-mid) 100%),
              radial-gradient(circle at 88% 15%, rgba(224,124,74,.45), transparent 45%);
  color: #fff;
  padding: 78px 24px 108px;
  text-align: center;
}
.page-header h1 { color: #fff; font-weight: 700; font-size: 42px; margin: 0 0 14px; }
.page-header h1 .accent { color: var(--amber); }
.page-header p { font-size: 17.5px; color: #CBD5E1; max-width: 700px; margin: 0 auto; }

/* Horizon / wave divider echoing the bridge-over-water logo mark */
.hero::after,
.page-header::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 64px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 90' preserveAspectRatio='none'><path d='M0,45 C240,90 480,0 720,40 C960,80 1200,10 1440,45 L1440,90 L0,90 Z' fill='%23F9FAFC'/></svg>");
  background-size: 100% 100%;
  background-repeat: no-repeat;
}
.hero .hero-inner, .page-header > * { position: relative; z-index: 2; }

/* ---------- STATS BANNER ---------- */
.stats-banner {
  background: var(--white);
  margin: -64px auto 10px;
  max-width: 1280px;
  border-radius: 16px;
  padding: 30px 36px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 24px;
  box-shadow: var(--hover-shadow);
  border: 1px solid var(--border);
  position: relative;
  z-index: 10;
}
.stat-item { text-align: center; }
.stat-number { font-size: 34px; font-weight: 800; color: var(--teal); line-height: 1; margin-bottom: 6px; }
.stat-label { font-size: 13.5px; color: var(--slate); font-weight: 500; }

/* ---------- SECTIONS / LAYOUT ---------- */
.section { padding: 64px 24px; max-width: 1280px; margin: 0 auto; }
.section-tight { padding-top: 40px; padding-bottom: 40px; }
.section-header { margin-bottom: 38px; max-width: 760px; }
.section-header.center { margin: 0 auto 38px; text-align: center; }
.section-title { font-weight: 800; font-size: 30px; letter-spacing: -.4px; margin-bottom: 10px; }
.section-subtitle { font-size: 16px; color: var(--slate); }
.divider-mark { width: 56px; height: 4px; background: var(--amber); border-radius: 2px; margin: 14px auto 0; }
.bg-panel { background: var(--white); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.bg-tint { background: var(--teal-light); }

/* ---------- GRIDS & CARDS ---------- */
.grid { display: grid; gap: 26px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }

.card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 30px;
  border: 1px solid var(--border);
  box-shadow: var(--card-shadow);
  transition: transform .22s ease, box-shadow .22s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--hover-shadow); }
.card h3 { font-size: 19px; margin-bottom: 10px; }
.card p { margin: 0; font-size: 15px; }
.card-accent-navy { border-top: 4px solid var(--navy); }
.card-accent-teal { border-top: 4px solid var(--teal); }
.card-accent-amber { border-top: 4px solid var(--amber); }
.card-accent-navy-dark { border-top: 4px solid var(--navy-dark); }
.card-accent-teal-dark { border-top: 4px solid var(--teal-dark); }

.tag {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--teal-dark);
  background: var(--teal-light);
  padding: 4px 12px;
  border-radius: 12px;
  letter-spacing: .3px;
  text-transform: uppercase;
  margin-bottom: 12px;
}

/* Team / person cards */
.person-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--card-shadow);
  text-align: center;
  transition: transform .22s ease, box-shadow .22s ease;
}
.person-card:hover { transform: translateY(-4px); box-shadow: var(--hover-shadow); }
.person-photo {
  aspect-ratio: 3 / 4;
  height: auto;
  background: linear-gradient(135deg, var(--teal-light), var(--border));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--slate-light);
  position: relative;
  overflow: hidden;
}
.person-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 12%; }
.person-photo .fallback { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .4px; }
.person-photo .fallback .glyph { font-size: 34px; }
.person-badge {
  position: absolute; top: 12px; left: 12px;
  background: var(--navy);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  padding: 4px 11px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: .4px;
}
.person-badge.field { background: var(--teal-dark); }
.person-badge.adviser { background: #6D28D9; }
.person-body { padding: 20px 18px; }
.person-body h4 { font-size: 17px; margin-bottom: 4px; }
.person-role { font-size: 12.5px; font-weight: 700; color: var(--amber-dark); text-transform: uppercase; letter-spacing: .4px; display: block; margin-bottom: 10px; }
.person-body p { font-size: 13.5px; margin: 0; text-align: left; }

/* Dual presence / offices */
.office-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px,1fr)); gap: 24px; margin-top: 30px; }
.map-wrapper { border-radius: 12px; overflow: hidden; border: 1px solid var(--border); box-shadow: var(--card-shadow); }
.map-header { padding: 14px 18px; background: var(--navy); color: #fff; }
.map-header.alt { background: var(--teal-dark); }
.map-title { font-weight: 700; font-size: 15px; display: block; }
.map-sub { font-size: 12.5px; opacity: .85; }
.map-frame { width: 100%; height: 260px; border: none; display: block; }

/* Testimonial */
.testimonial {
  border-left: 4px solid var(--amber);
  padding: 14px 18px;
  background: var(--light-bg);
  border-radius: 0 10px 10px 0;
  font-style: italic;
  color: var(--navy);
  font-size: 15px;
}
.testimonial-by { display: flex; align-items: center; gap: 12px; margin-top: 16px; }
.avatar-badge {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--navy); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px;
}

/* News / article cards */
.article-card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--card-shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .22s ease, box-shadow .22s ease;
}
.article-card:hover { transform: translateY(-4px); box-shadow: var(--hover-shadow); }
.article-media {
  height: 180px;
  background: var(--teal-light);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--slate-light);
  position: relative;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .4px;
}
.article-media img { width:100%; height:100%; object-fit: cover; }
.article-media .cat-badge {
  position: absolute; top: 12px; left: 12px;
  background: var(--navy); color: #fff;
  font-size: 10.5px; font-weight: 700;
  padding: 4px 11px; border-radius: 20px;
  text-transform: uppercase; letter-spacing: .4px;
}
.article-body { padding: 22px; display: flex; flex-direction: column; flex-grow: 1; }
.article-date { font-size: 12px; color: var(--slate-light); margin-bottom: 8px; }
.article-body h3 { font-size: 18px; margin-bottom: 10px; }
.article-body p { font-size: 14px; flex-grow: 1; }
.article-link { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); font-weight: 700; font-size: 13.5px; color: var(--navy); text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.article-link:hover { color: var(--amber-dark); }

/* Forms */
.form-card { background: var(--white); border-radius: var(--radius); padding: 36px; border: 1px solid var(--border); box-shadow: var(--card-shadow); }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-weight: 600; font-size: 13.5px; color: var(--navy); margin-bottom: 7px; }
.form-control {
  width: 100%;
  padding: 13px 15px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 14.5px;
  color: var(--navy);
  background: var(--light-bg);
  transition: border-color .18s, box-shadow .18s, background .18s;
}
.form-control:focus { outline: none; border-color: var(--teal); background: #fff; box-shadow: 0 0 0 3px rgba(168,80,78,.16); }
textarea.form-control { resize: vertical; min-height: 130px; }
.btn-submit { width: 100%; }
.form-note { font-size: 13px; color: var(--slate-light); margin-top: 10px; }

/* Donate ways-to-give */
.give-card { background: var(--white); border: 1px solid var(--border); border-radius: 16px; padding: 30px; box-shadow: var(--card-shadow); }
.give-icon { width: 46px; height: 46px; border-radius: 12px; display: flex; align-items: center; justify-content: center; margin-bottom: 18px; font-size: 20px; }
.give-card ul { list-style: none; margin: 0; padding: 0; font-size: 15px; line-height: 2; }
.give-card ul strong { color: var(--navy); }
.give-placeholder { color: var(--slate-light); }

/* Newsletter */
.newsletter-form { display: flex; flex-wrap: wrap; gap: 10px; max-width: 460px; margin: 0 auto; }
.newsletter-form input { flex: 1 1 220px; }
.newsletter-form button { flex-shrink: 0; }

/* ---------- FOOTER ---------- */
.site-footer {
  background: var(--navy-dark);
  color: #fff;
  padding-top: 60px;
  border-top: 4px solid transparent;
  border-image: linear-gradient(90deg, var(--amber), var(--teal)) 1;
}
.footer-brand span { font-family: 'Fraunces', Georgia, serif; }
.footer-inner { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 44px; border-bottom: 1px solid rgba(148,163,184,.25); }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.footer-brand span { font-weight: 800; font-size: 16px; font-family: 'Plus Jakarta Sans', sans-serif; }
.footer-tagline { color: #CBD5E1; font-size: 14px; line-height: 1.7; max-width: 340px; margin-bottom: 20px; }
.footer-social-label { font-size: 11.5px; font-weight: 700; color: var(--amber); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 12px; }
.footer-social { display: flex; gap: 10px; }
.footer-social a {
  width: 36px; height: 36px; border-radius: 8px;
  background: rgba(255,255,255,.08);
  color: #CBD5E1;
  display: flex; align-items: center; justify-content: center;
  text-decoration: none;
  transition: background .18s, color .18s;
}
.footer-social a:hover { background: var(--amber); color: var(--navy-dark); }
.footer-col h4 { color: var(--amber); font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 16px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.footer-col li { margin-bottom: 10px; }
.footer-col a { color: #CBD5E1; text-decoration: none; }
.footer-col a:hover { color: var(--amber); text-decoration: underline; }
.footer-col address { font-style: normal; color: #CBD5E1; font-size: 14px; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 14px; padding: 22px 0; font-size: 12.5px; color: var(--slate-light); }
.footer-bottom-links { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-bottom-links a { color: var(--slate-light); text-decoration: none; }
.footer-bottom-links a:hover { color: #E2E8F0; text-decoration: underline; }

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero h1, .page-header h1 { font-size: 32px; }
  .hero { padding: 56px 20px 76px; }
  .stats-banner { margin-top: 20px; }
}
