/* =========================================================
   Grace Baptist Church — site stylesheet
   One file for the whole site. Colors & fonts live in :root.
   ========================================================= */

/* ---------- Brand font: Figtree (self-hosted, Latin subset) ---------- */
@font-face { font-family: "Figtree"; src: url("../fonts/Figtree-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("../fonts/Figtree-Italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("../fonts/Figtree-Medium.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("../fonts/Figtree-SemiBold.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("../fonts/Figtree-Bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("../fonts/Figtree-ExtraBold.woff2") format("woff2"); font-weight: 800; font-style: normal; font-display: swap; }

/* ---------- Brand palette (sampled from the logo files) ----------
   navy #232D39   brown #966544   slate #597D9D   white
   Contrast: white on brown 4.95:1, white on navy 13.9:1,
   brown-deep text on page bg 5.5:1, slate-deep text on white 5.7:1. */
:root {
  --navy: #232d39;
  --navy-2: #2e3a49;
  --navy-3: #1b232d;       /* footer */
  --brown: #966544;        /* primary accent / buttons (white text OK) */
  --brown-deep: #84583a;   /* brown text on light bg, button hover */
  --brown-light: #c79a7c;  /* brown accent text on navy */
  --slate: #597d9d;        /* secondary accent */
  --slate-deep: #4a6a87;   /* slate text on light bg */
  --slate-light: #a9c2d8;  /* slate text on navy */
  --ink: #232d39;
  --ink-soft: #4f5966;
  --bg: #f5f3f0;           /* page background (light neutral) */
  --paper: #ffffff;
  --mist: #e9eef3;         /* soft slate-tinted section */
  --line: #dde2e7;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(35, 45, 57, .10);
  --font: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --max: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img, video, iframe { max-width: 100%; display: block; }
a { color: var(--brown-deep); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
h1, h2, h3 {
  font-family: var(--font);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -.015em;
  margin: 0 0 .5em;
  color: var(--ink);
}
h1 { font-size: clamp(2.2rem, 5.5vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.4rem); }
h3 { font-size: 1.3rem; font-weight: 700; letter-spacing: -.01em; }
p { margin: 0 0 1em; }

.container { width: min(100% - 2.5rem, var(--max)); margin-inline: auto; }
.narrow { max-width: 760px; }
.skip-link {
  position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff;
  padding: .6rem 1rem; z-index: 100;
}
.skip-link:focus { left: 1rem; top: 1rem; }
:focus-visible { outline: 3px solid var(--slate); outline-offset: 3px; }

.eyebrow {
  display: inline-block;
  font-size: .8rem; letter-spacing: .18em; text-transform: uppercase;
  font-weight: 700; color: var(--slate-deep); margin-bottom: .6rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .8rem 1.4rem; border-radius: 999px;
  font-weight: 600; text-decoration: none; font-size: 1rem;
  border: 2px solid transparent; transition: transform .15s, background .15s, color .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--brown); color: #fff; }
.btn-primary:hover { background: var(--brown-deep); color: #fff; }
.btn-dark { background: var(--navy); color: #fff; }
.btn-dark:hover { background: var(--navy-2); color: #fff; }
.btn-outline { border-color: currentColor; color: #fff; }
.btn-outline:hover { background: rgba(255,255,255,.12); color: #fff; }
.btn-outline-dark { border-color: var(--ink); color: var(--ink); }
.btn-outline-dark:hover { background: var(--ink); color: #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--navy);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 76px; }
.brand { display: flex; align-items: center; text-decoration: none; }
.brand img { height: 46px; width: auto; }
.nav-toggle {
  display: none;
  background: none; border: 2px solid rgba(255,255,255,.35); border-radius: 10px;
  padding: .45rem .7rem; font: inherit; font-weight: 600; color: #fff; cursor: pointer;
}
.nav-toggle-bars { display: inline-block; width: 18px; height: 2px; background: currentColor; position: relative; vertical-align: middle; margin-right: .4rem; }
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; width: 18px; height: 2px; background: currentColor; }
.nav-toggle-bars::before { top: -6px; } .nav-toggle-bars::after { top: 6px; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .1rem; }
.site-nav a {
  display: block; padding: .5rem .7rem; border-radius: 8px;
  color: #fff; text-decoration: none; font-weight: 600; font-size: .95rem;
}
.site-nav a:hover { background: rgba(255,255,255,.1); color: #fff; }
.site-nav a[aria-current="page"] { color: var(--brown-light); box-shadow: inset 0 -2px 0 var(--brown-light); border-radius: 0; }
.site-nav .nav-give a { background: var(--brown); color: #fff; border-radius: 999px; padding-inline: 1.1rem; margin-left: .3rem; }
.site-nav .nav-give a:hover { background: var(--brown-deep); }
.site-nav .nav-give a[aria-current="page"] { box-shadow: none; color: #fff; background: var(--brown-deep); }

/* Mobile menu: JS adds .js to <html>; without JS the menu just shows */
@media (max-width: 1020px) {
  .js .nav-toggle { display: inline-flex; align-items: center; }
  .js .site-nav { display: none; }
  .js .site-nav.is-open { display: block; }
  .site-nav { position: absolute; left: 0; right: 0; top: 100%; background: var(--navy); border-bottom: 1px solid rgba(255,255,255,.1); box-shadow: var(--shadow); }
  .site-nav ul { flex-direction: column; padding: .6rem 1.25rem 1.2rem; }
  .site-nav a { padding: .8rem .6rem; font-size: 1.05rem; border-bottom: 1px solid rgba(255,255,255,.1); border-radius: 0; }
  .site-nav .nav-give a { margin: .8rem 0 0; text-align: center; border-bottom: 0; border-radius: 999px; }
  .site-nav a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--brown-light); }
  html:not(.js) .site-nav { position: static; box-shadow: none; border: 0; }
  html:not(.js) .header-inner { flex-wrap: wrap; }
}

/* ---------- Hero (home) ----------
   IMAGE SLOTS: assets/img/hero-1920 / hero-1024 / hero-mobile-1024 (.jpg + .webp).
   The cross sits left of center, so text goes on the right on desktop; a navy
   overlay keeps the white text readable. */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  color: #fff; background: var(--navy);
  padding: 330px 0 7rem;
  display: flex; align-items: flex-end;
}
.hero-media { position: absolute; top: 0; left: 0; right: 0; height: 400px; }
.hero-media img { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-media { z-index: -2; }
.hero-media img { object-fit: cover; object-position: 50% 30%; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(35,45,57,.05) 0, rgba(35,45,57,.25) 220px, rgba(35,45,57,.85) 330px, var(--navy) 400px);
}
.hero-content { position: relative; }
.hero h1 { color: #fff; max-width: 15ch; text-shadow: 0 2px 18px rgba(0,0,0,.25); }
.hero .eyebrow { color: #f0d9c8; }
.hero-lead { font-size: clamp(1.1rem, 2.2vw, 1.3rem); max-width: 40ch; color: #f1f3f5; margin-bottom: 1.8rem; }
@media (min-width: 900px) {
  .hero { min-height: 640px; align-items: center; padding: 7rem 0 9.5rem; }
  .hero-media { bottom: 0; height: auto; }
  .hero-media img { object-position: 35% 40%; }
  .hero::after {
    background: linear-gradient(90deg, rgba(35,45,57,.10) 0%, rgba(35,45,57,.22) 36%, rgba(35,45,57,.86) 56%, rgba(35,45,57,.95) 100%);
  }
  .hero-content { padding-left: 52%; }
}

/* Plan-a-visit building photo */
.visit-media { display: grid; gap: 1.2rem; }
.building-photo { margin: 0; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: var(--navy-2); }
.building-photo img { width: 100%; height: auto; }
.building-photo figcaption { padding: .8rem 1.1rem; font-weight: 600; color: #fff; background: var(--navy-2); }

/* Plan-a-visit info cards (in the right column, above the map) */
.visit-cards { display: grid; gap: 1.2rem; }
.visit-card {
  display: grid; grid-template-columns: auto 1fr; gap: 1rem; align-items: start;
  background: var(--navy-2); border-radius: var(--radius); border-left: 4px solid var(--brown);
  padding: 1.3rem 1.4rem; box-shadow: var(--shadow);
}
.visit-card h3 { margin: .15rem 0 .35rem; font-size: 1.25rem; font-weight: 800; color: #fff; }
.visit-card p { margin: 0; color: #e6eaee; }
.visit-icon {
  display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px;
  border-radius: 50%; background: var(--brown); color: #fff;
}
.visit-icon svg { display: block; }
/* Desktop: right column stretches to the left column's height and the map fills what's left */
@media (min-width: 900px) {
  #visit .visit-media { align-self: stretch; display: flex; flex-direction: column; }
  #visit .visit-cards { gap: 1rem; }
  #visit .visit-card { padding: 1.1rem 1.3rem; }
  #visit .map-frame { flex: 1 1 auto; min-height: 260px; display: flex; }
  #visit .map-frame iframe { height: auto; min-height: 260px; flex: 1 1 auto; }
}

/* Footer social links */
.social { list-style: none; display: flex; gap: .6rem; margin: 1rem 0 0; padding: 0; }
.social a { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 50%; background: rgba(255,255,255,.08); color: #fff; }
.social a:hover { background: var(--brown); color: #fff; }

/* Service-times card that overlaps the hero */
.times-card {
  position: relative; margin-top: -4.5rem; z-index: 2;
  background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow);
  border-top: 4px solid var(--brown);
  padding: 1.6rem 1.6rem 1.2rem;
}
.times-card h2 { font-size: 1.6rem; margin-bottom: 1rem; }
.times-groups { display: grid; gap: 1.2rem; }
.times-group h3 { font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; color: var(--brown-deep); margin: 0 0 .5rem; }
.times-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.times-grid li { border-left: 3px solid var(--mist); padding-left: .85rem; }
.times-grid .time { display: block; font-size: 1.7rem; font-weight: 800; letter-spacing: -.01em; line-height: 1.15; color: var(--navy); }
.times-grid .label { color: var(--ink-soft); font-size: .95rem; }
.times-note { margin: 1rem 0 0; font-size: .95rem; color: var(--ink-soft); }
.times-group:not(:first-child) .times-grid { grid-template-columns: 1fr; }
@media (min-width: 820px) { .times-groups { grid-template-columns: 2fr 1fr 1fr; gap: 1.5rem; } }

/* ---------- Sections ---------- */
.section { padding: clamp(3.5rem, 8vw, 5.5rem) 0; }
.section-sand { background: var(--mist); }
.section-dark { background: var(--navy); color: #e6eaee; }
.section-dark h2, .section-dark h3 { color: #fff; }
.section-dark .eyebrow { color: var(--brown-light); }
.section-head { margin-bottom: 2rem; }

.split { display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 900px) { .split { grid-template-columns: 1.05fr 1fr; gap: 3.5rem; } .split.top { align-items: start; } }

.welcome-text p { font-size: 1.12rem; }
.welcome-text .signoff { font-size: 1.35rem; font-weight: 700; color: var(--brown-deep); }

.media-frame { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: #000; }
.media-frame video { width: 100%; height: auto; }
.video-embed { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: #000; }
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Announcements */
.announcements { display: grid; gap: 1rem; }
@media (min-width: 760px) { .announcements { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); } }
.announcement {
  background: var(--paper); border-radius: var(--radius); padding: 1.4rem 1.5rem;
  border: 1px solid var(--line); box-shadow: var(--shadow);
}
.announcement .date { font-size: .82rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--slate-deep); }
.announcement h3 { margin: .3rem 0 .4rem; }
.announcement p:last-child { margin-bottom: 0; }

/* Visit / contact info */
.info-list { list-style: none; padding: 0; margin: 0 0 1.5rem; display: grid; gap: 1.1rem; }
.info-list strong { display: block; font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--brown-deep); }
.section-dark .info-list strong { color: var(--brown-light); }
.section-dark a { color: #fff; }
.map-frame { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--line); background: var(--mist); }
.map-frame iframe { width: 100%; height: 380px; border: 0; }

/* Cards */
.cards { display: grid; gap: 1.2rem; }
@media (min-width: 640px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .cards { grid-template-columns: repeat(4, 1fr); } }
.card {
  display: flex; flex-direction: column; background: var(--paper); border-radius: var(--radius);
  padding: 1.5rem; border: 1px solid var(--line); text-decoration: none; color: var(--ink);
  transition: transform .15s, box-shadow .15s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); color: var(--ink); }
.card h3 { margin-bottom: .35rem; }
.card p { color: var(--ink-soft); font-size: .98rem; flex: 1; }
.card .more { font-weight: 700; color: var(--brown-deep); }
.card:hover { border-color: var(--brown); }

/* ---------- Inner page header ---------- */
.page-hero {
  background: linear-gradient(180deg, var(--mist), var(--bg));
  padding: clamp(2.8rem, 7vw, 4.5rem) 0 clamp(1.5rem, 4vw, 2.5rem);
  text-align: center; border-bottom: 1px solid var(--line);
}
.page-hero h1 { font-size: clamp(2.3rem, 5.5vw, 3.4rem); margin-bottom: .2rem; }
.page-hero p { color: var(--ink-soft); max-width: 46ch; margin: 0 auto; }

.page-image { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); margin: 0 auto 2rem; width: fit-content; max-width: 100%; }
.page-image img { width: 100%; height: auto; }

.prose p { font-size: 1.12rem; }
.prose .lead::first-letter { font-size: 3.2em; font-weight: 800; float: left; line-height: .9; padding: .06em .12em 0 0; color: var(--brown); }
.scripture { white-space: nowrap; }

.link-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .9rem; }
@media (min-width: 700px) { .link-list { grid-template-columns: 1fr 1fr; } }
.link-list a {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: 1.1rem 1.3rem; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  text-decoration: none; color: var(--ink); font-weight: 600; font-size: 1.08rem;
}
.link-list a:hover { border-color: var(--brown); box-shadow: var(--shadow); }
.link-list a span.arrow { color: var(--brown-deep); }
.link-list small { display: block; font-weight: 400; color: var(--ink-soft); font-size: .92rem; }

.panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.5rem, 4vw, 2.5rem); box-shadow: var(--shadow); }
.center { text-align: center; }
.give-panel { max-width: 640px; margin: 0 auto; text-align: center; }
.give-panel .givelify-badge { margin: 1.4rem auto; }
.give-panel .givelify-badge img { margin: 0 auto; height: auto; }
.give-note { font-weight: 700; }
.muted { color: var(--ink-soft); font-size: .95rem; }
.notice { background: var(--mist); border: 1px solid var(--line); border-radius: 10px; padding: .9rem 1.1rem; font-size: .97rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-3); color: #cdd3da; padding: 3.5rem 0 1.5rem; font-size: .98rem; }
.site-footer a { color: #fff; }
.footer-grid { display: grid; gap: 2rem; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 1.3fr 1fr 1fr 1fr; } }
.site-footer h2 { font-size: .8rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--brown-light); margin-bottom: .8rem; }
.site-footer address { font-style: normal; }
.footer-logo { height: 52px; width: auto; margin-bottom: 1rem; }
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links li { margin-bottom: .35rem; }
.footer-links a { text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }
.footer-bottom { border-top: 1px solid #2f3a47; margin-top: 2.5rem; padding-top: 1.2rem; font-size: .88rem; color: #a3abb5; }

/* ---------- Our Pastor page (our-pastor.html) ----------
   Portrait family photo beside the text on desktop, above it on mobile. */
.pastor-grid { display: grid; gap: 2rem; align-items: start; }
@media (min-width: 900px) { .pastor-grid { grid-template-columns: 420px 1fr; gap: 3.5rem; } }
.pastor-photo { margin: 0; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); max-width: 480px; justify-self: center; width: 100%; }
@media (min-width: 900px) { .pastor-photo { position: sticky; top: calc(77px + 1.5rem); max-width: none; } /* clears the sticky site header */ }
.pastor-photo img { width: 100%; height: auto; }
.pastor-text h2 { font-size: clamp(2rem, 4vw, 2.8rem); }
.bio-placeholder { color: var(--ink-soft); font-style: italic; }
.pastor-contact { margin-top: 2rem; }
.pastor-contact h3 { margin-bottom: .4rem; }
.visit-pastor a { font-weight: 700; }
.pastor-text { max-width: 70ch; }
.pastor-text h2 { margin-bottom: .25rem; }
.pastor-subtitle { color: var(--slate-deep); font-weight: 600; font-size: 1.15rem; margin-bottom: 1.6rem; }
.pastor-verse {
  margin: 2.2rem 0 0; padding: 1.6rem 1.8rem; background: var(--navy); color: #fff;
  border-left: 5px solid var(--brown); border-radius: var(--radius); box-shadow: var(--shadow);
}
.pastor-verse p { font-size: clamp(1.3rem, 2.6vw, 1.6rem); font-weight: 700; line-height: 1.35; margin: 0 0 .6rem; }
.pastor-verse footer { color: var(--brown-light); font-weight: 600; letter-spacing: .04em; }
.pastor-verse cite { font-style: normal; }
