/* ============================================================
   For His Glory Ministries — design system
   Palette: deep brick red + midnight navy + warm gold + ivory

   The two darks split by role, so neither dominates:
     navy  = structural chrome (header, footer, page heroes, utility bands)
     brick = warm emphasis (home hero, scripture, dark buttons)
   Sections alternate between them for rhythm.

   Type: Fraunces (display) + Albert Sans (body)
   ============================================================ */

:root {
  --brick-950: #3A150C;   /* home hero, scripture bands, text on gold */
  --brick-900: #5A2316;   /* dark buttons, leader initials */
  --brick-800: #6E3022;   /* the brand brick — button hover */

  --navy-950: #0E1A2B;    /* header, footer, lightbox */
  --navy-900: #17263D;    /* page heroes, utility bands */
  --navy-800: #22344F;    /* elevated cards on navy */
  --navy-700: #2E4160;    /* hairlines on navy */

  --gold: #C9A227;
  --gold-bright: #E3BC50;
  --gold-deep: #8F6B10;
  --ivory: #FAF5EA;
  --white: #FFFFFF;
  --ink: #2E1B15;
  --slate: #5C4740;
  /* Bridging neutrals — must stay legible on BOTH navy and brick */
  --mist: #CFC8C5;      /* muted text on dark */
  --cloud: #F7F3F0;     /* bright text on dark */
  --line-light: #E8DFCD;
  --line-dark: var(--navy-700);

  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Albert Sans", "Helvetica Neue", Arial, sans-serif;

  --container: 1140px;
  --radius: 14px;
  --shadow-card: 0 10px 30px rgba(46, 17, 10, 0.12);
  --shadow-lift: 0 18px 44px rgba(46, 17, 10, 0.20);
}

/* ---------- Reset & base ---------- */

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--slate);
  background: var(--ivory);
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  color: var(--ink);
  margin: 0 0 0.6em;
}

h1 { font-size: clamp(2.5rem, 6vw, 4.25rem); font-weight: 640; }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.75rem); }
h3 { font-size: 1.375rem; }
h4 { font-size: 1.125rem; }

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--gold-deep); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--gold); }

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
  border-radius: 2px;
}

::selection { background: var(--gold); color: var(--brick-950); }

/* ---------- Utilities ---------- */

.container {
  width: min(var(--container), 100% - 2.5rem);
  margin-inline: auto;
}

.eyebrow {
  display: block;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin-bottom: 0.9rem;
}

.on-dark .eyebrow { color: var(--gold-bright); }

.crown-mark { color: var(--gold); margin-bottom: 1rem; }
.crown-mark svg { display: inline-block; }

.section { padding: clamp(4rem, 9vw, 6.5rem) 0; }
.section--white { background: var(--white); }
/* Two dark section flavours: navy for mid-page utility bands, brick for the
   closing band on pages that have no scripture section (events, gallery). */
.section--dark, .section--warm { color: var(--mist); }
.section--dark h1, .section--dark h2, .section--dark h3, .section--dark h4,
.section--warm h1, .section--warm h2, .section--warm h3, .section--warm h4 { color: var(--cloud); }
.section--dark { background: var(--navy-900); }
.section--warm { background: var(--brick-900); }

.section-head { max-width: 640px; margin-bottom: clamp(2.25rem, 5vw, 3.5rem); }
.section-head--center { margin-inline: auto; text-align: center; }

.lead { font-size: 1.2rem; line-height: 1.6; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  border-radius: 999px;
  padding: 0.9rem 1.9rem;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease;
  cursor: pointer;
  border: 2px solid transparent;
}

.btn--gold {
  background: var(--gold);
  color: var(--brick-950);
}
.btn--gold:hover {
  background: var(--gold-bright);
  color: var(--brick-950);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(201, 162, 39, 0.35);
}

.btn--ghost {
  background: transparent;
  color: var(--cloud);
  border-color: rgba(251, 242, 236, 0.45);
}
.btn--ghost:hover {
  color: var(--white);
  border-color: var(--gold);
  transform: translateY(-2px);
}

.btn--dark {
  background: var(--brick-900);
  color: var(--cloud);
}
.btn--dark:hover { background: var(--brick-800); color: var(--white); transform: translateY(-2px); }

/* ---------- Header / nav ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(14, 26, 43, 0.93);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(201, 162, 39, 0.18);
}

.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
}

.brand { display: flex; align-items: center; flex-shrink: 0; }
.brand img { height: 44px; width: auto; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: var(--cloud);
  text-decoration: none;
  padding: 0.35rem 0;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.nav-links a:hover { color: var(--gold-bright); }
.nav-links a[aria-current="page"] {
  color: var(--gold-bright);
  border-bottom-color: var(--gold);
}

.nav-links .nav-cta {
  background: var(--gold);
  color: var(--brick-950);
  font-weight: 700;
  border-radius: 999px;
  padding: 0.55rem 1.3rem;
  border-bottom: none;
}
.nav-links .nav-cta:hover { background: var(--gold-bright); color: var(--brick-950); }
.nav-links a.nav-cta[aria-current="page"] {
  color: var(--brick-950);
  border-bottom: none;
  background: var(--gold-bright);
}

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  padding: 0.5rem;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--cloud);
  margin: 6px 0;
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  background: var(--brick-950);
  color: var(--cloud);
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  /* Collapses the stage lighting to one warm hue so it reads with the brick, not against it */
  filter: grayscale(0.75) sepia(0.9) saturate(1.7) hue-rotate(-12deg) brightness(0.95);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(78deg, rgba(58, 21, 12, 0.94) 18%, rgba(58, 21, 12, 0.68) 52%, rgba(110, 48, 34, 0.36) 100%),
    linear-gradient(to top, rgba(58, 21, 12, 0.92) 0%, rgba(58, 21, 12, 0) 45%);
  pointer-events: none;
}

.hero__inner {
  position: relative;
  z-index: 1;
  padding: clamp(6rem, 14vw, 10.5rem) 0 clamp(4.5rem, 10vw, 7.5rem);
  max-width: 720px;
}

.hero h1 { color: var(--white); margin-bottom: 0.5em; }
.hero h1 em {
  font-style: italic;
  font-weight: 500;
  color: var(--gold-bright);
}

.hero__sub {
  font-size: 1.2rem;
  color: var(--mist);
  max-width: 540px;
  margin-bottom: 2.2rem;
}

.hero__actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-bottom: 2.75rem; }

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 2rem;
  font-size: 0.95rem;
  color: var(--cloud);
}

.hero__meta span { display: inline-flex; align-items: center; gap: 0.5rem; }
.hero__meta svg { color: var(--gold); flex-shrink: 0; }

/* Page hero (interior pages) */

.page-hero {
  background: var(--navy-900);
  color: var(--mist);
  padding: clamp(3.5rem, 8vw, 5.5rem) 0;
  position: relative;
  overflow: hidden;
}
.page-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 85% -20%, rgba(201, 162, 39, 0.16), transparent 55%);
  pointer-events: none;
}
.page-hero .container { position: relative; z-index: 1; }
.page-hero h1 { color: var(--white); font-size: clamp(2.25rem, 5vw, 3.5rem); margin-bottom: 0.3em; }
.page-hero p { max-width: 620px; font-size: 1.15rem; }

/* ---------- Cards ---------- */

.card-grid {
  display: grid;
  gap: 1.75rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lift); }

.card img { height: 220px; width: 100%; object-fit: cover; }

.card__body { padding: 1.6rem 1.6rem 1.8rem; flex: 1; display: flex; flex-direction: column; }
.card__body h3 { margin-bottom: 0.4em; }
.card__body p { flex: 1; }
.card__link {
  margin-top: 1.1rem;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--gold-deep);
  text-decoration: none;
}
.card__link:hover { color: var(--gold); }

/* Info cards (events, giving, contact) */

.info-card {
  background: var(--white);
  border-radius: var(--radius);
  border-top: 4px solid var(--gold);
  box-shadow: var(--shadow-card);
  padding: 2.2rem 2rem;
}
.info-card h3 { display: flex; align-items: center; gap: 0.6rem; }
.info-card h3 svg { color: var(--gold); flex-shrink: 0; }

.info-card dl { margin: 1.2rem 0 0; }
.info-card dt {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin-top: 1rem;
}
.info-card dd { margin: 0.15rem 0 0; color: var(--ink); font-weight: 500; }

/* ---------- Scripture band ---------- */

.scripture {
  background: var(--brick-950);
  color: var(--cloud);
  text-align: center;
  padding: clamp(4rem, 9vw, 6rem) 0;
  position: relative;
  overflow: hidden;
}
.scripture::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 120%, rgba(201, 162, 39, 0.18), transparent 60%);
}
.scripture .container { position: relative; max-width: 760px; }

.scripture blockquote {
  margin: 0;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 480;
  font-size: clamp(1.4rem, 3vw, 2rem);
  line-height: 1.45;
  color: var(--white);
}

.scripture cite {
  display: block;
  margin-top: 1.4rem;
  font-family: var(--font-body);
  font-style: normal;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-bright);
}

/* ---------- Split / feature rows ---------- */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: center;
}

.split__media img {
  border-radius: var(--radius);
  box-shadow: var(--shadow-lift);
  width: 100%;
  height: 100%;
  max-height: 460px;
  object-fit: cover;
}

.split--flip .split__media { order: -1; }

/* ---------- Ministry rows (outreach) ---------- */

.ministry { padding: clamp(3.25rem, 7vw, 5rem) 0; }
.ministry + .ministry { border-top: 1px solid var(--line-light); }
.section--white .ministry + .ministry { border-top-color: #F0E9DB; }

.schedule-list { list-style: none; margin: 1.25rem 0 0; padding: 0; }
.schedule-list li {
  display: flex;
  gap: 0.9rem;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--line-light);
  align-items: baseline;
}
.schedule-list li:last-child { border-bottom: none; }
.schedule-list strong { color: var(--ink); min-width: 9.5rem; }

/* ---------- Leadership ---------- */

.leader-grid {
  display: grid;
  gap: 1.75rem;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.leader-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 2rem 1.5rem;
  text-align: center;
}

.leader-card--photo { padding: 0; overflow: hidden; text-align: center; }
.leader-card--photo img { width: 100%; height: 260px; object-fit: cover; object-position: top; }
.leader-card--photo .leader-card__body { padding: 1.5rem 1.25rem 1.75rem; }

.leader-card__initials {
  width: 84px;
  height: 84px;
  margin: 0 auto 1.2rem;
  border-radius: 50%;
  background: var(--brick-900);
  color: var(--gold-bright);
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

.leader-card h3 { font-size: 1.2rem; margin-bottom: 0.2em; }
.leader-card__role {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin-bottom: 0.7rem;
}
.leader-card a { font-size: 0.92rem; word-break: break-all; }

/* ---------- Gallery ---------- */

.gallery-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.gallery-grid button {
  border: 0;
  padding: 0;
  background: none;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: zoom-in;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.gallery-grid button:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
.gallery-grid img { width: 100%; height: 230px; object-fit: cover; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(14, 26, 43, 0.95);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}
.lightbox.is-open { display: flex; }
.lightbox img {
  max-width: min(1100px, 92vw);
  max-height: 84vh;
  border-radius: 10px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}
.lightbox__close {
  position: absolute;
  top: 1.25rem;
  right: 1.5rem;
  background: none;
  border: 0;
  color: var(--cloud);
  font-size: 2.4rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
}
.lightbox__close:hover { color: var(--gold-bright); }

/* ---------- Watch online ---------- */

.watch-grid {
  display: grid;
  gap: 1.75rem;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.watch-card {
  background: var(--navy-800);
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
  padding: 2.4rem 2.1rem;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.watch-card:hover { transform: translateY(-5px); border-color: rgba(201, 162, 39, 0.5); }
.watch-card h3 { color: var(--white); display: flex; align-items: center; gap: 0.7rem; }
.watch-card h3 svg { color: var(--gold-bright); flex-shrink: 0; }
.watch-card p { color: var(--mist); }
.watch-card .btn { margin-top: 1.4rem; }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--navy-950);
  color: var(--mist);
  padding: 4.5rem 0 2rem;
  font-size: 0.97rem;
}

.footer-grid {
  display: grid;
  gap: 2.5rem;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--line-dark);
}

.footer-brand img { width: 220px; margin-bottom: 1.1rem; }
.footer-brand p { max-width: 300px; }

.site-footer h4 {
  color: var(--white);
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 1.1rem;
}

.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 0.55rem; }
.site-footer a { color: var(--mist); text-decoration: none; }
.site-footer a:hover { color: var(--gold-bright); }
.site-footer address { font-style: normal; line-height: 1.7; }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 1.75rem;
  font-size: 0.85rem;
  color: #7C8AA3;
}

/* ---------- Reveal animation ---------- */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .card, .btn, .watch-card, .gallery-grid button { transition: none; }
}

/* ---------- Responsive ---------- */

@media (max-width: 920px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 820px) {
  .nav-toggle { display: block; }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--brick-950);
    border-bottom: 1px solid rgba(201, 162, 39, 0.2);
    padding: 0.5rem 1.25rem 1.25rem;
    display: none;
  }
  .nav-links.is-open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links a {
    display: block;
    padding: 0.85rem 0;
    font-size: 1.05rem;
    border-bottom: 1px solid var(--line-dark);
  }
  .nav-links a[aria-current="page"] { border-bottom-color: var(--line-dark); }
  .nav-links .nav-cta {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.7rem 1.5rem;
    border-bottom: none;
  }

  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

  .split { grid-template-columns: 1fr; }
  .split--flip .split__media { order: 0; }
}

@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
  .card img { height: 200px; }
}
