/* ============================================================
   New Life Ministries / Bishop Gregory K. Riggen
   Mobile-first, no framework.

   Three breakpoints:
     sm  >=  640px  (large phones / tablet portrait)
     md  >= 1024px  (tablet landscape / desktop)
     lg  >= 1400px  (wide desktop)
   ============================================================ */

:root {
  --navy: #1a3a5f;
  --navy-deep: #122a47;
  --gold: #c9a961;
  --gold-deep: #a8893f;
  --cream: #f5f1e8;
  --cream-deep: #ece5d2;
  --ink: #1f2a37;
  --ink-soft: #4b5563;
  --line: #d9d2c2;
  --white: #ffffff;

  --serif: "Cormorant Garamond", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --container: 1140px;
  --radius: 8px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 8px 24px rgba(20,40,70,.10), 0 2px 6px rgba(20,40,70,.06);
  --transition: 200ms ease;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 70px; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

img, svg { max-width: 100%; height: auto; display: block; }
a  { color: var(--navy); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--gold-deep); }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.18;
  color: var(--navy);
  margin: 0 0 .5em;
  letter-spacing: -0.005em;
  text-wrap: balance;
}
h1 { font-size: clamp(2rem, 6vw + .5rem, 3.75rem); }
h2 { font-size: clamp(1.625rem, 3vw + .9rem, 2.5rem); }
h3 { font-size: clamp(1.2rem, 1vw + .9rem, 1.5rem); }
p  { text-wrap: pretty; }

.eyebrow {
  font-family: var(--sans);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin: 0 0 .6em;
}

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

/* skip link */
.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--navy); color: var(--white);
  padding: 8px 14px; z-index: 1000;
}
.skip-link:focus { left: 12px; top: 12px; }

/* =====================================================
   Header (mobile-first: hamburger)
   ===================================================== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(160%) blur(8px);
  -webkit-backdrop-filter: saturate(160%) blur(8px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
}
.site-header.scrolled {
  background: rgba(255,255,255,.97);
  border-bottom-color: var(--line);
  box-shadow: var(--shadow-sm);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 20px; gap: 12px;
  position: relative;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--navy);
  min-width: 0;
}
.brand:hover { color: var(--gold-deep); }
.brand-mark { color: var(--gold-deep); display: inline-flex; flex-shrink: 0; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; }
.brand-title {
  font-family: var(--serif);
  font-size: clamp(1.05rem, 1.3vw + .7rem, 1.25rem);
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.brand-sub   { font-size: .74rem; color: var(--ink-soft); letter-spacing: .02em; }

.nav-toggle {
  appearance: none; border: 0; background: transparent;
  padding: 10px; cursor: pointer;
  display: inline-flex; flex-direction: column; gap: 5px;
  min-width: 44px; min-height: 44px;
  align-items: center; justify-content: center;
}
.nav-toggle-bar { display: block; width: 26px; height: 2px; background: var(--navy); transition: transform var(--transition), opacity var(--transition); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.site-nav {
  position: absolute; top: 100%; left: 0; right: 0;
  background: var(--white);
  border-bottom: 1px solid var(--line);
  max-height: 0; overflow: hidden;
  transition: max-height 280ms ease;
}
.site-nav.open { max-height: 460px; }
.site-nav ul   { list-style: none; margin: 0; padding: 8px 0; display: flex; flex-direction: column; }
.site-nav li   { border-top: 1px solid var(--line); }
.site-nav li:first-child { border-top: none; }
.site-nav a    {
  display: block;
  padding: 14px 24px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 500; font-size: 1rem;
  min-height: 44px;
}
.site-nav a:hover { color: var(--navy); background: var(--cream); }

/* =====================================================
   Buttons
   ===================================================== */
.btn {
  display: inline-block;
  padding: 13px 26px;
  font-family: var(--sans); font-weight: 600; font-size: .95rem;
  text-decoration: none; border-radius: var(--radius);
  transition: background var(--transition), color var(--transition), transform var(--transition), box-shadow var(--transition);
  border: 2px solid transparent;
  cursor: pointer;
  min-height: 44px;
  text-align: center;
  line-height: 1.25;
}
.btn-primary {
  background: var(--gold); color: var(--navy-deep); border-color: var(--gold);
}
.btn-primary:hover {
  background: var(--gold-deep); border-color: var(--gold-deep); color: var(--white);
  transform: translateY(-1px); box-shadow: var(--shadow-md);
}
.btn-secondary {
  background: transparent; color: var(--white); border-color: rgba(255,255,255,.6);
}
.btn-secondary:hover { background: rgba(255,255,255,.1); border-color: var(--white); color: var(--white); }

/* =====================================================
   Hero (mobile-first: stacked)
   ===================================================== */
.hero {
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(201,169,97,.18), transparent 60%),
    linear-gradient(180deg, var(--navy) 0%, var(--navy-deep) 100%);
  color: var(--white);
  padding: 56px 0 64px;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  align-items: center;
}
.hero h1 { color: var(--white); margin-bottom: .25em; }
.hero .eyebrow { color: var(--gold); }
.hero-titles {
  font-family: var(--serif); font-style: italic;
  font-size: clamp(1.1rem, 1vw + .8rem, 1.4rem);
  color: var(--gold); margin: 0 0 1em;
}
.hero-statement {
  max-width: 36em; font-size: 1.02rem; color: rgba(255,255,255,.86);
  margin-bottom: 1.5em;
}
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-image {
  max-width: 320px;
  margin: 0 auto;
  order: -1; /* image first on mobile */
}
.hero-image img {
  border-radius: var(--radius);
  box-shadow: 0 16px 40px rgba(0,0,0,.35);
  border: 3px solid var(--gold);
  aspect-ratio: 1200 / 1347;
  object-fit: cover;
  width: 100%;
}

/* =====================================================
   Sections (generic)
   ===================================================== */
.section { padding: 56px 0; }
.section-cream { background: var(--cream); }
.section-navy  { background: var(--navy); color: var(--white); }
.section-navy h2,
.section-navy h3 { color: var(--white); }
.section-navy a { color: var(--gold); }
.section-navy a:hover { color: var(--white); }

.section-head { max-width: 720px; margin: 0 auto 40px; text-align: center; }
.section-head h2 { margin-bottom: .35em; }
.section-lead { font-size: 1.05rem; color: var(--ink-soft); margin: 0; }
.section-head-light .section-lead { color: rgba(255,255,255,.82); }
.section-head-light .eyebrow { color: var(--gold); }

/* =====================================================
   Four E's (mobile-first: 1-col)
   ===================================================== */
.four-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
.four-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 22px 22px;
  position: relative;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
}
.four-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.four-card h3 {
  margin: 0 0 .5em;
  padding-bottom: .5em;
  border-bottom: 2px solid var(--gold);
  display: inline-block;
}
.four-card p { color: var(--ink-soft); margin: 0; }

/* =====================================================
   About (mobile-first: stacked)
   ===================================================== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  align-items: start;
}
.about-image {
  max-width: 280px;
  margin: 0 auto;
}
.about-image img {
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}
.about-copy h2 { margin-bottom: .4em; }
.about-copy p { color: var(--ink); margin: 0 0 1em; }

/* =====================================================
   Resources CTA card
   ===================================================== */
.cta-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-left: 4px solid var(--gold);
  border-radius: var(--radius);
  padding: 24px;
  display: flex; flex-direction: column; align-items: flex-start;
  gap: 18px;
  box-shadow: var(--shadow-sm);
}
.cta-card h3 { margin-bottom: .25em; }
.cta-card p  { margin: 0; color: var(--ink-soft); }
.cta-card .btn { align-self: stretch; }

/* =====================================================
   Missions (mobile-first: stacked)
   ===================================================== */
.missions-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  align-items: start;
}
.missions-blurb p { color: var(--ink); font-size: 1.05rem; }
.give-card {
  background: var(--cream);
  border-radius: var(--radius);
  padding: 24px;
  border-top: 4px solid var(--gold);
  box-shadow: var(--shadow-sm);
}
.give-card h3 { margin-top: 0; }
.give-intro { color: var(--ink-soft); margin-top: 0; }
.give-list  { list-style: none; padding: 0; margin: 0; }
.give-list li {
  padding: 12px 0;
  border-top: 1px solid var(--line);
  word-break: break-word;
}
.give-list li:first-child { border-top: none; }

/* =====================================================
   Contact (mobile-first: stacked)
   ===================================================== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  align-items: start;
}
.contact-info h3,
.contact-form h3 { color: var(--white); margin-top: 0; }
.contact-note {
  color: rgba(255,255,255,.78);
  font-size: .95rem;
  margin: 0 0 24px;
  padding: 14px 16px;
  background: rgba(255,255,255,.06);
  border-left: 3px solid var(--gold);
  border-radius: 4px;
}
.contact-list { margin: 0; }
.contact-list dt {
  font-size: .76rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--gold); margin-top: 16px; font-weight: 600;
}
.contact-list dt:first-child { margin-top: 0; }
.contact-list dd { margin: 4px 0 0; color: rgba(255,255,255,.92); word-break: break-word; }
.contact-list dd a { color: var(--white); text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.3); }
.contact-list dd a:hover { color: var(--gold); border-bottom-color: var(--gold); }

.contact-form {
  background: var(--white);
  color: var(--ink);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-md);
}
.contact-form h3 { color: var(--navy); margin-bottom: 18px; }
.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-weight: 600;
  font-size: .9rem;
  margin-bottom: 6px;
  color: var(--ink);
}
.field input,
.field textarea {
  width: 100%;
  font: inherit;
  font-size: 16px; /* prevents iOS zoom on focus */
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--white);
  color: var(--ink);
  transition: border-color var(--transition), box-shadow var(--transition);
  min-height: 44px;
}
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(26,58,95,.15);
}
.field textarea { resize: vertical; min-height: 140px; }
.field-hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

.contact-form .btn { width: 100%; padding: 14px; font-size: 1rem; }
.form-status {
  margin: 14px 0 0;
  font-size: .92rem;
  min-height: 1.4em;
}
.form-status.is-success { color: #137a3a; font-weight: 600; }
.form-status.is-error   { color: #a8323d; font-weight: 600; }
.form-note { font-size: .9rem; color: var(--ink-soft); margin-top: 8px; }

/* =====================================================
   Footer (mobile-first: stacked center)
   ===================================================== */
.site-footer {
  background: var(--navy-deep);
  color: rgba(255,255,255,.78);
  padding: 36px 0 28px;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: center;
  text-align: center;
}
.footer-title { font-family: var(--serif); font-size: 1.2rem; color: var(--white); margin: 0; }
.footer-sub   { font-size: .88rem; margin: 4px 0 0; color: rgba(255,255,255,.6); }
.footer-nav   { display: flex; gap: 18px; flex-wrap: wrap; justify-content: center; }
.footer-nav a { color: rgba(255,255,255,.85); text-decoration: none; font-size: .92rem; padding: 6px 4px; }
.footer-nav a:hover { color: var(--gold); }
.footer-copy  { margin: 0; font-size: .82rem; color: rgba(255,255,255,.55); }

/* ============================================================
   BREAKPOINT 1 — sm  >= 640px  (large phones, tablet portrait)
   - Wider container padding
   - Four E's becomes 2-column
   - Resource CTA card becomes side-by-side
   - Larger section padding
   ============================================================ */
@media (min-width: 640px) {
  body { font-size: 17px; }
  .container { padding: 0 28px; }

  .section { padding: 72px 0; }
  .section-head { margin-bottom: 48px; }

  .four-grid { grid-template-columns: repeat(2, 1fr); gap: 22px; }
  .four-card { padding: 30px 26px 26px; }

  .hero { padding: 72px 0 80px; }
  .hero-image { max-width: 380px; }

  .cta-card {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 30px;
    gap: 24px;
  }
  .cta-card .btn { align-self: auto; }

  .give-card { padding: 28px 30px; }
  .contact-form { padding: 30px; }
}

/* ============================================================
   BREAKPOINT 2 — md  >= 1024px  (tablet landscape, desktop)
   - Horizontal navigation (hamburger hidden)
   - All multi-column layouts activate
   - Four E's becomes 4-column
   - Section spacing increased
   ============================================================ */
@media (min-width: 1024px) {
  .header-inner { padding: 14px 20px; }

  .nav-toggle { display: none; }
  .site-nav {
    position: static;
    background: transparent;
    border: none;
    max-height: none;
    overflow: visible;
  }
  .site-nav ul {
    flex-direction: row;
    gap: 28px;
    padding: 0;
  }
  .site-nav li { border-top: none; }
  .site-nav a {
    padding: 4px 0;
    border-bottom: 2px solid transparent;
    transition: border-color var(--transition), color var(--transition);
    min-height: auto;
    font-size: .95rem;
  }
  .site-nav a:hover { background: transparent; border-bottom-color: var(--gold); }

  .section { padding: 88px 0; }
  .section-head { margin-bottom: 56px; }

  .hero { padding: 88px 0 96px; }
  .hero-inner {
    grid-template-columns: 1.1fr 1fr;
    gap: 56px;
  }
  .hero-statement { font-size: 1.08rem; margin-bottom: 1.75em; }
  .hero-image {
    max-width: none;
    margin: 0;
    order: 0; /* image right on desktop */
  }

  .four-grid { grid-template-columns: repeat(4, 1fr); gap: 24px; }
  .four-card { padding: 32px 24px 28px; }

  .about-grid {
    grid-template-columns: 360px 1fr;
    gap: 56px;
  }
  .about-image { max-width: none; margin: 0; }

  .cta-card { padding: 32px; }

  .missions-grid {
    grid-template-columns: 1.2fr 1fr;
    gap: 40px;
  }
  .give-card { padding: 28px 32px; }

  .contact-grid {
    grid-template-columns: 1fr 1.3fr;
    gap: 48px;
  }
  .contact-form { padding: 32px; }

  .footer-inner {
    grid-template-columns: 1.4fr 2fr 1fr;
    gap: 24px;
    text-align: left;
  }
  .footer-nav { justify-content: flex-start; }
  .footer-copy { text-align: right; }
}

/* ============================================================
   BREAKPOINT 3 — lg  >= 1400px  (wide desktop)
   - Wider container
   - More vertical breathing room
   ============================================================ */
@media (min-width: 1400px) {
  :root { --container: 1240px; }
  .section { padding: 104px 0; }
  .hero { padding: 104px 0 112px; }
  .section-head { margin-bottom: 64px; }
}

/* =====================================================
   Reduced motion
   ===================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
  }
}
