/* ========================================================
   By His Grace Recovery, Inc. — Site Stylesheet
   ======================================================== */

:root {
  --purple: #4B2E83;
  --purple-dark: #362160;
  --purple-light: #7A5CB5;
  --teal: #1F7A8C;
  --teal-light: #3FA9BB;
  --green: #4C9A6A;
  --gold: #C7973F;
  --navy: #22222E;
  --ink-soft: #4A4A57;
  --cream: #FBF8F3;
  --cream-alt: #F4EEE3;
  --white: #FFFFFF;
  --border: #E7DFD0;
  --shadow: 0 10px 30px rgba(43, 27, 74, 0.08);
  --shadow-lg: 0 20px 50px rgba(43, 27, 74, 0.14);
  --radius: 16px;
  --gradient-brand: linear-gradient(120deg, var(--purple) 0%, var(--teal) 55%, var(--green) 100%);
  --gradient-soft: linear-gradient(135deg, rgba(75,46,131,0.07), rgba(31,122,140,0.07));
  --max-width: 1180px;
  --font-head: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-script: "Dancing Script", "Brush Script MT", cursive;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--navy);
  background: var(--cream);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  width: 100%;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--purple-dark);
  line-height: 1.2;
  margin: 0 0 0.5em;
  font-weight: 700;
}

h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); }
h3 { font-size: 1.35rem; }

p { margin: 0 0 1em; color: var(--ink-soft); }

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

section { padding: 88px 0; }
.section-tight { padding: 56px 0; }
.bg-alt { background: var(--cream-alt); }
.bg-white { background: var(--white); }
.bg-brand {
  background: var(--gradient-brand);
  color: var(--white);
}
.bg-brand h1, .bg-brand h2, .bg-brand h3, .bg-brand p { color: var(--white); }

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--teal);
  margin-bottom: 14px;
}
.bg-brand .eyebrow { color: rgba(255,255,255,0.85); }

.lede {
  font-size: 1.15rem;
  max-width: 640px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 30px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.98rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease;
}
.btn-primary {
  background: var(--gradient-brand);
  color: var(--white);
  box-shadow: var(--shadow);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.btn-gold {
  background: var(--gold);
  color: var(--white);
  box-shadow: 0 10px 24px rgba(199,151,63,0.35);
}
.btn-gold:hover { transform: translateY(-2px); background: #b6862f; }
.btn-outline {
  background: transparent;
  border-color: currentColor;
  color: var(--purple);
}
.btn-outline:hover { background: var(--purple); color: var(--white); border-color: var(--purple); }
.bg-brand .btn-outline { color: var(--white); }
.bg-brand .btn-outline:hover { background: var(--white); color: var(--purple); }
.btn-block { width: 100%; justify-content: center; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(251, 248, 243, 0.97);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  max-width: var(--max-width);
  margin: 0 auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand img { height: 52px; width: 52px; border-radius: 50%; object-fit: cover; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text .script {
  font-family: var(--font-script);
  font-size: 1.5rem;
  color: var(--purple);
}
.brand-text .sub {
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--teal);
  font-weight: 700;
}

.main-nav { display: flex; align-items: center; gap: 4px; }
.main-nav a {
  padding: 10px 16px;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--navy);
  border-radius: 8px;
  transition: color 0.15s ease, background 0.15s ease;
}
.main-nav a:hover { color: var(--purple); background: var(--cream-alt); }
.main-nav a.active { color: var(--purple); }
.nav-cta {
  margin-left: 8px;
  padding: 10px 22px !important;
  background: var(--gradient-brand);
  color: var(--white) !important;
  border-radius: 999px;
}
.nav-cta:hover { opacity: 0.92; background: var(--gradient-brand); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span { width: 26px; height: 2px; background: var(--purple-dark); border-radius: 2px; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 96px 0 100px;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--gradient-brand);
  opacity: 0.06;
  z-index: 0;
}
.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 56px;
  align-items: center;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--white);
  border: 1px solid var(--border);
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--teal);
  box-shadow: var(--shadow);
  margin-bottom: 22px;
}
.hero-badge .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--green);
}
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 28px; }
.hero-art {
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: var(--white);
  padding: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-art img { width: 100%; max-width: 340px; }

.stat-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 64px;
}
.stat-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 20px;
  text-align: center;
  box-shadow: var(--shadow);
}
.stat-card .num {
  font-family: var(--font-head);
  font-size: 1.9rem;
  color: var(--purple);
  font-weight: 700;
}
.stat-card .label { font-size: 0.88rem; color: var(--ink-soft); margin-top: 4px; }

/* ---------- Cards / Grids ---------- */
.grid { display: grid; gap: 28px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.icon-badge {
  width: 54px; height: 54px;
  border-radius: 14px;
  background: var(--gradient-soft);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
}
.icon-badge svg { width: 26px; height: 26px; stroke: var(--purple); }

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.two-col img { border-radius: var(--radius); box-shadow: var(--shadow-lg); }

.section-head { max-width: 720px; margin: 0 auto 52px; text-align: center; }
.section-head.left { margin: 0 0 44px; text-align: left; }

/* ---------- Timeline / Phases ---------- */
.phase-track {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  position: relative;
}
.phase-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 26px;
  box-shadow: var(--shadow);
  position: relative;
}
.phase-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--gradient-brand);
  color: var(--white);
  font-weight: 700;
  font-family: var(--font-head);
  margin-bottom: 16px;
}

.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 10px 0;
  color: var(--ink-soft);
}
.checklist li svg { flex-shrink: 0; width: 20px; height: 20px; margin-top: 3px; stroke: var(--green); }

/* ---------- Quote ---------- */
.scripture {
  text-align: center;
  max-width: 760px;
  margin: 0 auto;
}
.scripture blockquote {
  font-family: var(--font-script);
  font-size: 2rem;
  line-height: 1.4;
  margin: 0 0 16px;
}
.scripture cite {
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.85rem;
  color: var(--gold);
}

/* ---------- Team ---------- */
.team-card { text-align: center; }
.avatar {
  width: 92px; height: 92px;
  border-radius: 50%;
  margin: 0 auto 18px;
  display: flex; align-items: center; justify-content: center;
  background: var(--gradient-brand);
  color: var(--white);
  font-family: var(--font-head);
  font-size: 1.6rem;
  font-weight: 700;
}
.team-card h3 { margin-bottom: 4px; }
.team-role { color: var(--teal); font-weight: 600; font-size: 0.92rem; }

/* ---------- Donation / Allocation ---------- */
.allocation-bar {
  display: flex;
  height: 22px;
  border-radius: 999px;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px var(--border);
  margin: 28px 0 20px;
}
.allocation-bar span { display: block; height: 100%; }
.alloc-facility { background: var(--purple); }
.alloc-staff { background: var(--teal); }
.alloc-ops { background: var(--green); }
.alloc-legend { display: flex; gap: 22px; flex-wrap: wrap; font-size: 0.9rem; color: var(--ink-soft); }
.alloc-legend span.swatch { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: middle; }

.give-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 34px 30px;
  box-shadow: var(--shadow);
}
.give-card h3 { margin-bottom: 10px; }

/* ---------- Forms ---------- */
.form-field { margin-bottom: 20px; }
.form-field label {
  display: block;
  font-weight: 600;
  font-size: 0.92rem;
  margin-bottom: 8px;
  color: var(--purple-dark);
}
.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 13px 16px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--white);
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--navy);
}
.form-field textarea { min-height: 140px; resize: vertical; }
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(31,122,140,0.15);
}
.form-note { font-size: 0.85rem; color: var(--ink-soft); margin-top: 10px; }
.form-status { margin-top: 16px; font-weight: 600; }
.form-status.success { color: var(--green); }
.form-status.error { color: #b6482f; }
.hidden-field { position: absolute; left: -9999px; opacity: 0; pointer-events: none; }

/* ---------- Contact info blocks ---------- */
.info-list { list-style: none; padding: 0; margin: 0; }
.info-list li {
  display: flex;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.info-list li:last-child { border-bottom: none; }
.info-list .ico {
  width: 42px; height: 42px;
  border-radius: 10px;
  background: var(--gradient-soft);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.info-list .ico svg { width: 20px; height: 20px; stroke: var(--purple); }
.info-list .label { font-weight: 700; color: var(--purple-dark); font-size: 0.88rem; text-transform: uppercase; letter-spacing: 0.04em; }

.map-embed {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
}
.map-embed iframe { width: 100%; height: 340px; border: 0; display: block; }

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--gradient-brand);
  border-radius: 28px;
  padding: 60px 48px;
  text-align: center;
  color: var(--white);
  box-shadow: var(--shadow-lg);
}
.cta-band h2, .cta-band p { color: var(--white); }
.cta-band .btn-outline { border-color: rgba(255,255,255,0.7); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--purple-dark);
  color: rgba(255,255,255,0.82);
  padding: 72px 0 28px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.1fr;
  gap: 40px;
  padding-bottom: 44px;
  border-bottom: 1px solid rgba(255,255,255,0.14);
}
.footer-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.footer-brand img { height: 46px; width: 46px; border-radius: 50%; }
.footer-brand .script { font-family: var(--font-script); font-size: 1.4rem; color: var(--white); }
.site-footer h4 {
  color: var(--white);
  font-family: var(--font-body);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.site-footer a { color: rgba(255,255,255,0.78); }
.site-footer a:hover { color: var(--white); }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 12px; font-size: 0.94rem; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 26px;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.6);
}
.social-row { display: flex; gap: 12px; }
.social-row a {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.3);
  display: flex; align-items: center; justify-content: center;
}
.social-row a:hover { background: rgba(255,255,255,0.12); }
.social-row svg { width: 16px; height: 16px; stroke: var(--white); }

/* ---------- Page hero (interior pages) ---------- */
.page-hero {
  padding: 70px 0 56px;
  text-align: center;
  background: var(--gradient-soft);
}
.page-hero .eyebrow { justify-content: center; }
.breadcrumb { font-size: 0.85rem; color: var(--teal); font-weight: 600; margin-bottom: 12px; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ---------- Utility ---------- */
.mt-0 { margin-top: 0; }
.text-center { text-align: center; }
.mx-auto { margin-left: auto; margin-right: auto; }
.tag {
  display: inline-block;
  background: var(--cream-alt);
  color: var(--purple);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 10px;
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-art { order: -1; max-width: 320px; margin: 0 auto; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .two-col { grid-template-columns: 1fr; }
  .stat-strip { grid-template-columns: repeat(2, 1fr); }
  .phase-track { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .main-nav { position: fixed; top: 78px; left: 0; right: 0; bottom: 0; background: var(--cream); flex-direction: column; align-items: stretch; padding: 20px; gap: 6px; transform: translateX(100%); transition: transform 0.25s ease; overflow-y: auto; }
  .main-nav.open { transform: translateX(0); }
  .main-nav a { padding: 16px; font-size: 1.05rem; border-bottom: 1px solid var(--border); border-radius: 0; }
  .nav-cta { text-align: center; margin-top: 10px; }
  .nav-toggle { display: flex; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  section { padding: 60px 0; }
  .cta-band { padding: 44px 26px; }
  .stat-strip { grid-template-columns: 1fr 1fr; }
}
