/* ==========================================================================
   Glory of Faith Church — Poth, TX
   Shared stylesheet
   Palette: purple · white · gold · black
   ========================================================================== */

/* -------------------------------------------------------------------------- */
/*  Design tokens                                                             */
/* -------------------------------------------------------------------------- */
:root {
  /* Purples */
  --purple-950: #1E0A31;
  --purple-900: #2D0F44;
  --purple-800: #3D1560;
  --purple-700: #4A1E6B;
  --purple-600: #5B2A86;
  --purple-500: #6B3FA0;
  --purple-300: #A987C9;

  /* Gold */
  --gold: #D4AF37;
  --gold-light: #E9CC6E;
  --gold-dark: #A8841C;

  /* Neutrals */
  --black: #15101C;
  --ink: #201A28;
  --slate: #4A4453;
  --muted: #6E6878;
  --line: #E7E1EE;
  --cream: #FAF7F2;
  --white: #FFFFFF;

  /* Semantic */
  --bg: var(--white);
  --bg-alt: var(--cream);
  --text: var(--ink);
  --heading: var(--purple-900);

  /* Type */
  --font-display: "Cormorant Garamond", "Playfair Display", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Layout */
  --maxw: 1180px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 4px 18px rgba(45, 15, 68, 0.08);
  --shadow-md: 0 18px 48px rgba(45, 15, 68, 0.16);
  --shadow-lg: 0 30px 70px rgba(21, 16, 28, 0.35);
  --nav-h: 76px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;   /* stop iOS inflating text in landscape */
  text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  font-size: 17px;
  overflow-x: hidden;
  overscroll-behavior-y: none;      /* no rubber-band flash on Android/iOS */
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: rgba(212, 175, 55, 0.25);
}

/* height:auto is required: the width/height attributes on each <img> (which
   prevent layout shift) otherwise act as a fixed CSS height and override the
   aspect-ratio set on figures further down. */
img { max-width: 100%; height: auto; display: block; }

a { color: var(--purple-600); text-decoration: none; transition: color 0.2s ease; }
a:hover { color: var(--gold-dark); }

/* Visible keyboard focus everywhere, without showing rings on mouse clicks */
:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
  border-radius: 4px;
}
.hero :focus-visible,
.page-hero :focus-visible,
.site-header :focus-visible,
.section--purple :focus-visible,
.verse :focus-visible,
.site-footer :focus-visible { outline-color: var(--gold-light); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--heading);
  line-height: 1.12;
  margin: 0 0 0.5em;
  font-weight: 600;
  letter-spacing: 0.3px;
}

h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); }
h2 { font-size: clamp(2rem, 4.5vw, 3rem); }
h3 { font-size: clamp(1.3rem, 2.6vw, 1.7rem); }

p { margin: 0 0 1.1rem; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  /* Respect the notch in landscape on iOS, where insets are left/right */
  padding-inline: max(var(--gutter), env(safe-area-inset-left), env(safe-area-inset-right));
}

section { position: relative; }

.section {
  padding-block: clamp(3.5rem, 8vw, 7rem);
}
.section--alt { background: var(--bg-alt); }
.section--purple {
  background:
    radial-gradient(1100px 500px at 15% -10%, rgba(212,175,55,0.14), transparent 60%),
    linear-gradient(160deg, var(--purple-900), var(--purple-950));
  color: #EFE7F6;
}
.section--purple h1,
.section--purple h2,
.section--purple h3 { color: #fff; }

/* -------------------------------------------------------------------------- */
/*  Eyebrow, headings, dividers                                               */
/* -------------------------------------------------------------------------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin: 0 0 1rem;
}
.section--purple .eyebrow { color: var(--gold-light); }
.eyebrow::before {
  content: "";
  width: 34px; height: 2px;
  background: linear-gradient(90deg, var(--gold), transparent);
}

.section-head { max-width: 720px; margin: 0 auto 3rem; text-align: center; }
.section-head .eyebrow::before { display: none; }
.section-head .eyebrow { justify-content: center; }
.section-head p { color: var(--muted); font-size: 1.08rem; }
.section--purple .section-head p { color: #D9CDE6; }

/* Ornamental gold divider (cross flourish) */
.divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  margin: 1.4rem auto 0;
  color: var(--gold);
}
.divider::before,
.divider::after {
  content: "";
  height: 1px;
  width: min(90px, 18vw);
  background: linear-gradient(90deg, transparent, var(--gold));
}
.divider::after { background: linear-gradient(90deg, var(--gold), transparent); }
.divider svg { width: 22px; height: 22px; }

/* -------------------------------------------------------------------------- */
/*  Buttons                                                                    */
/* -------------------------------------------------------------------------- */
.btn {
  --bg-btn: var(--gold);
  --fg-btn: #2A1608;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;   /* comfortable touch target on phones and tablets */
  gap: 0.55rem;
  padding: 0.85rem 1.7rem;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.98rem;
  letter-spacing: 0.02em;
  background: var(--bg-btn);
  color: var(--fg-btn);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s ease;
  box-shadow: 0 10px 26px rgba(212, 175, 55, 0.32);
}
.btn:hover {
  transform: translateY(-2px);
  color: #2A1608;
  box-shadow: 0 16px 34px rgba(212, 175, 55, 0.42);
  background: var(--gold-light);
}
.btn--gold { background: linear-gradient(135deg, var(--gold-light), var(--gold)); }
.btn--outline {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,0.55);
  box-shadow: none;
}
.btn--outline:hover {
  background: rgba(255,255,255,0.12);
  color: #fff;
  border-color: #fff;
  box-shadow: none;
}
.btn--purple {
  background: var(--purple-700);
  color: #fff;
  box-shadow: 0 10px 26px rgba(74, 30, 107, 0.32);
}
.btn--purple:hover { background: var(--purple-600); color: #fff; }

/* -------------------------------------------------------------------------- */
/*  Header / navigation                                                        */
/* -------------------------------------------------------------------------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  transition: background 0.35s ease, box-shadow 0.35s ease, backdrop-filter 0.35s ease;
}
/* Keep the bar clear of the notch/status bar on iOS */
.site-header { padding-top: env(safe-area-inset-top); }
/* Scrim guarantees nav legibility over any hero photo before scrolling */
.site-header::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: calc(var(--nav-h) + env(safe-area-inset-top) + 40px);
  background: linear-gradient(180deg, rgba(21,10,40,0.75), transparent);
  pointer-events: none;
  transition: opacity 0.35s ease;
}
.site-header.scrolled::before { opacity: 0; }
.site-header.scrolled {
  background: rgba(28, 12, 46, 0.92);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 30px rgba(21, 16, 28, 0.35);
}
.nav, .brand, .nav__links { position: relative; z-index: 1; }
.nav {
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand {
  display: flex;
  align-items: center;
  min-height: 44px;
  gap: 0.7rem;
  color: #fff;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.4px;
}
.brand:hover { color: #fff; }
.brand__mark {
  width: 42px; height: 42px;
  flex: none;
  display: grid; place-items: center;
  border-radius: 12px;
  background: linear-gradient(150deg, var(--gold-light), var(--gold-dark));
  box-shadow: 0 6px 16px rgba(212,175,55,0.4);
}
.brand__mark svg { width: 24px; height: 24px; }
.brand__text { display: flex; flex-direction: column; line-height: 1.05; }
.brand__text b { font-size: 1.22rem; font-weight: 600; }
.brand__text span {
  font-family: var(--font-body);
  font-size: 0.62rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold-light);
  font-weight: 600;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  list-style: none;
  margin: 0; padding: 0;
}
.nav__links a {
  color: rgba(255,255,255,0.86);
  font-size: 0.94rem;
  font-weight: 500;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  position: relative;
  /* comfortable, guideline-sized hit area */
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.nav__links a::after {
  content: "";
  position: absolute;
  left: 0.9rem; right: 0.9rem; bottom: 0.28rem;
  height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}
.nav__links a:hover { color: #fff; }
.nav__links a:hover::after,
.nav__links a.active::after { transform: scaleX(1); }
.nav__links a.active { color: #fff; }
.nav__cta { margin-left: 0.6rem; }
.nav__cta .btn { padding: 0.6rem 1.25rem; }

.nav__toggle {
  display: none;
  width: 46px; height: 46px;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 10px;
}
.nav__toggle span {
  display: block;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.2s ease;
}
.nav__toggle span + span { margin-top: 6px; }
.nav.open .nav__toggle span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav.open .nav__toggle span:nth-child(2) { opacity: 0; }
.nav.open .nav__toggle span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* -------------------------------------------------------------------------- */
/*  Hero                                                                       */
/* -------------------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: min(88vh, 780px);
  /* svh = the *small* viewport height, so the hero doesn't resize when mobile
     browsers hide/show their address bar mid-scroll. vh above is the fallback. */
  min-height: min(88svh, 780px);
  display: flex;
  align-items: center;
  color: #fff;
  /* Nav height plus breathing room, so content never crowds the bar */
  padding: calc(var(--nav-h) + env(safe-area-inset-top) + 2rem) 0 clamp(5rem, 9vw, 7.5rem);
  overflow: hidden;
}
.hero__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.06);
  z-index: -2;
}
.hero__overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(21,16,28,0.55) 0%, rgba(45,15,68,0.4) 40%, rgba(21,16,28,0.85) 100%),
    linear-gradient(90deg, rgba(45,15,68,0.75) 0%, rgba(45,15,68,0.15) 60%);
}
/* For heroes where the photo itself is the message (the church building), keep
   the left dark enough for the heading but let the subject stay visible. */
.hero__overlay--photo {
  background:
    linear-gradient(180deg, rgba(21,16,28,0.42) 0%, rgba(45,15,68,0.18) 45%, rgba(21,16,28,0.62) 100%),
    linear-gradient(90deg, rgba(45,15,68,0.82) 0%, rgba(45,15,68,0.3) 45%, rgba(45,15,68,0.04) 78%);
}
.hero__inner { max-width: 780px; }
.hero .eyebrow { color: var(--gold-light); }
.hero .eyebrow::before { background: linear-gradient(90deg, var(--gold-light), transparent); }
.hero h1 {
  color: #fff;
  text-shadow: 0 4px 30px rgba(0,0,0,0.4);
  margin-bottom: 0.3em;
}
.hero h1 .accent {
  display: block;
  color: var(--gold-light);
  font-style: italic;
}
.hero__lead {
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  color: rgba(255,255,255,0.92);
  max-width: 34ch;
  margin-bottom: 2rem;
}
.hero--home .hero__lead { max-width: 46ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.9rem; }

/* Page hero (interior pages) */
.page-hero {
  position: relative;
  min-height: min(52vh, 440px);
  min-height: min(52svh, 440px);
  display: flex;
  align-items: center;
  color: #fff;
  /* Balanced padding — content sits centred, not stranded at the bottom */
  padding: calc(var(--nav-h) + env(safe-area-inset-top) + 2.5rem) 0 clamp(2.75rem, 5vw, 4rem);
  overflow: hidden;
}
.page-hero__inner { position: relative; z-index: 2; max-width: 760px; }
.page-hero h1 { color: #fff; text-shadow: 0 4px 24px rgba(0,0,0,0.35); }
.page-hero p { color: rgba(255,255,255,0.9); font-size: 1.15rem; max-width: 52ch; margin: 0; }
.breadcrumb {
  font-size: 0.82rem; letter-spacing: 0.04em;
  color: rgba(255,255,255,0.75);
  margin-bottom: 1rem;
}
/* Negative margin keeps the text flowing normally while enlarging the hit area */
.breadcrumb a {
  color: var(--gold-light);
  display: inline-block;
  padding: 0.6rem 0.35rem;
  margin: -0.6rem -0.35rem;
}

/* -------------------------------------------------------------------------- */
/*  Verse banner                                                               */
/* -------------------------------------------------------------------------- */
.verse {
  position: relative;
  color: #fff;
  text-align: center;
  padding-block: clamp(4rem, 9vw, 7rem);
  overflow: hidden;
}
.verse__bg { position: absolute; inset: 0; background-size: cover; background-position: center; z-index: -2; }
.verse__overlay {
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(160deg, rgba(45,15,68,0.9), rgba(21,10,49,0.82));
}
.verse blockquote {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 4vw, 2.9rem);
  font-style: italic;
  line-height: 1.3;
  max-width: 20ch;
  margin: 1rem auto 1.2rem;
  color: #fff;
  text-wrap: balance;
}
.verse cite {
  display: block;
  font-family: var(--font-body);
  font-style: normal;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: 0.82rem;
  color: var(--gold-light);
  font-weight: 600;
}
.verse .divider { color: var(--gold-light); }

/* -------------------------------------------------------------------------- */
/*  Cards & grids                                                              */
/* -------------------------------------------------------------------------- */
.grid { display: grid; gap: clamp(1.2rem, 3vw, 2rem); }
.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(--line);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s ease;
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: rgba(212,175,55,0.5);
}
.card__icon {
  width: 58px; height: 58px;
  display: grid; place-items: center;
  border-radius: 14px;
  margin-bottom: 1.1rem;
  background: linear-gradient(150deg, rgba(107,63,160,0.14), rgba(212,175,55,0.16));
  color: var(--purple-700);
}
.card__icon svg { width: 30px; height: 30px; }
.card h3 { margin-bottom: 0.4rem; }
.card p { color: var(--muted); margin: 0; }

/* Media card (image top) */
.mcard {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
  display: flex; flex-direction: column;
}
.mcard:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.mcard__media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; }
.mcard__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.7s var(--ease); }
.mcard:hover .mcard__media img { transform: scale(1.07); }
.mcard__media::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(45,15,68,0.35));
}
.mcard__tag {
  position: absolute; top: 0.9rem; left: 0.9rem; z-index: 2;
  background: rgba(212,175,55,0.95);
  color: #2A1608;
  font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  padding: 0.3rem 0.7rem; border-radius: 999px;
}
.mcard__body { padding: 1.5rem 1.6rem 1.8rem; flex: 1; }
.mcard__body h3 { margin-bottom: 0.5rem; }
.mcard__body p { color: var(--muted); margin: 0; }

/* -------------------------------------------------------------------------- */
/*  Split feature (image + text)                                               */
/* -------------------------------------------------------------------------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.split--flip .split__media { order: 2; }
.split__media { position: relative; }
.split__media img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  aspect-ratio: 4 / 5;
  object-fit: cover;
}
.split__media--wide img { aspect-ratio: 5 / 4; }
/* For photos shot wide, where cropping to 5/4 would cut off a third of the
   frame. Our own church photos come off the camera at 16:9, so this shows the
   whole picture. A 16:9 image is short for its width, so give its column a
   little extra room or it looks lost beside a tall block of text. The mobile
   rule further down collapses this back to a single column. */
.split__media--pano img { aspect-ratio: 16 / 9; }
.split--pano { grid-template-columns: 1fr 1.2fr; }
.split__media .badge {
  position: absolute;
  bottom: -22px; right: -18px;
  background: linear-gradient(150deg, var(--purple-700), var(--purple-900));
  color: #fff;
  padding: 1rem 1.4rem;
  border-radius: 14px;
  box-shadow: var(--shadow-md);
  text-align: center;
  line-height: 1.1;
}
.split__media .badge b { display: block; font-family: var(--font-display); font-size: 1.9rem; color: var(--gold-light); }
.split__media .badge span { font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; }
.split__media .frame-gold {
  position: absolute; inset: 14px -14px -14px 14px;
  border: 2px solid var(--gold);
  border-radius: var(--radius);
  z-index: -1;
}

/* -------------------------------------------------------------------------- */
/*  Info / stat strip                                                          */
/* -------------------------------------------------------------------------- */
/* Sits in its own band and lifts over the hero — no negative-margin collisions.
   Its own bottom padding replaces the next section's top padding. */
.quick-band { padding-block: 0 clamp(2rem, 4vw, 3rem); }
.quick-band + .section { padding-top: clamp(2.5rem, 5vw, 4rem); }
.quick {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
  margin-top: clamp(-5.5rem, -6vw, -4rem);
  position: relative;
  z-index: 5;
}
.quick__item {
  background: #fff;
  border-radius: var(--radius);
  padding: 1.8rem;
  box-shadow: var(--shadow-md);
  border-top: 4px solid var(--gold);
  display: flex; gap: 1rem; align-items: flex-start;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.quick__item:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.quick__item .card__icon { margin: 0; flex: none; width: 50px; height: 50px; }
.quick__item h3 { font-size: 1.15rem; margin-bottom: 0.15rem; }
.quick__item p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.quick__item a { font-weight: 600; }

/* -------------------------------------------------------------------------- */
/*  Schedule                                                                   */
/* -------------------------------------------------------------------------- */
.schedule { display: grid; gap: 1.1rem; }
.slot {
  display: grid;
  grid-template-columns: 130px 1fr auto;
  align-items: center;
  gap: 1.5rem;
  padding: 1.4rem 1.8rem;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--gold);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.slot:hover { transform: translateX(4px); box-shadow: var(--shadow-md); }
.slot__day {
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--purple-800);
  font-weight: 600;
}
.slot__name { font-weight: 600; color: var(--ink); }
.slot__name small { display: block; color: var(--muted); font-weight: 400; font-size: 0.9rem; }
.slot__time {
  font-weight: 700;
  color: var(--gold-dark);
  white-space: nowrap;
  font-size: 1.05rem;
}

/* -------------------------------------------------------------------------- */
/*  Contact                                                                    */
/* -------------------------------------------------------------------------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(2rem,4vw,3.5rem); align-items: start; }
.info-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.3rem; }
.info-list li { display: flex; gap: 1rem; align-items: flex-start; }
.info-list .card__icon { margin: 0; flex: none; width: 50px; height: 50px; }
.info-list h3 { font-size: 1.15rem; margin: 0 0 0.15rem; }
.info-list p, .info-list a { margin: 0; color: var(--slate); }
/* Phone / Facebook act as CTAs here, so give them a real tap target */
.info-list a, .quick__item a {
  display: inline-flex; align-items: center; min-height: 44px;
}
.map-embed {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 6px solid #fff;
  aspect-ratio: 4 / 3;
  background: var(--purple-900);
}
.map-embed iframe { width: 100%; height: 100%; border: 0; display: block; }

/* -------------------------------------------------------------------------- */
/*  CTA band                                                                   */
/* -------------------------------------------------------------------------- */
.cta-band { text-align: center; }
.cta-band h2 { color: #fff; margin-bottom: 0.4rem; }
.cta-band p { color: #D9CDE6; max-width: 46ch; margin: 0 auto 1.8rem; font-size: 1.1rem; }
.cta-band .hero__actions { justify-content: center; }

/* Facebook callout */
.fb-callout {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; flex-wrap: wrap;
  background: linear-gradient(135deg, #fff, var(--cream));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem clamp(1.5rem, 4vw, 2.8rem);
  box-shadow: var(--shadow-sm);
}
.fb-callout__text { display: flex; align-items: center; gap: 1.1rem; }
.fb-callout__icon {
  width: 56px; height: 56px; flex: none;
  display: grid; place-items: center; border-radius: 14px;
  background: #1877F2; color: #fff;
}
.fb-callout__icon svg { width: 30px; height: 30px; }
.fb-callout h3 { margin: 0; }
.fb-callout p { margin: 0; color: var(--muted); }

/* -------------------------------------------------------------------------- */
/*  Gallery mosaic                                                             */
/* -------------------------------------------------------------------------- */
/* 5 photos tiling a perfect 4x2 block: one 2x2 feature + four 1x1 */
.mosaic {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: clamp(140px, 15vw, 205px);
  gap: 0.9rem;
}
.mosaic figure {
  margin: 0; overflow: hidden; border-radius: var(--radius-sm);
  position: relative; background: var(--purple-900);
}
.mosaic img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s var(--ease); }
.mosaic figure::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(45,15,68,0.4));
  opacity: 0; transition: opacity 0.4s ease;
}
.mosaic figure:hover img { transform: scale(1.07); }
.mosaic figure:hover::after { opacity: 1; }
.mosaic .feature { grid-column: span 2; grid-row: span 2; }

/* -------------------------------------------------------------------------- */
/*  Belief / values list                                                       */
/* -------------------------------------------------------------------------- */
.beliefs { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.beliefs li {
  display: flex; gap: 0.9rem; align-items: flex-start;
  padding-bottom: 1rem; border-bottom: 1px dashed var(--line);
}
.beliefs li:last-child { border-bottom: 0; }
.beliefs .tick {
  flex: none; width: 26px; height: 26px; margin-top: 3px;
  display: grid; place-items: center; border-radius: 50%;
  background: linear-gradient(150deg, var(--gold-light), var(--gold-dark));
  color: #2A1608;
}
.beliefs .tick svg { width: 15px; height: 15px; }
.beliefs b { color: var(--heading); font-family: var(--font-display); font-size: 1.15rem; }

.lead { font-size: 1.2rem; color: var(--slate); }
.text-center { text-align: center; }
.mt-lg { margin-top: 2.5rem; }

/* -------------------------------------------------------------------------- */
/*  Footer                                                                     */
/* -------------------------------------------------------------------------- */
.site-footer {
  background:
    radial-gradient(900px 400px at 80% -20%, rgba(212,175,55,0.12), transparent 60%),
    linear-gradient(180deg, var(--purple-950), #120823);
  color: #CFC2DD;
  padding-top: clamp(3rem, 6vw, 4.5rem);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: clamp(2rem, 4vw, 3.5rem);
  padding-bottom: 3rem;
}
.footer-brand .brand { margin-bottom: 1rem; }
.footer-brand p { color: #B7A9C7; max-width: 34ch; }
.footer-col h4 {
  color: #fff; font-family: var(--font-body); font-size: 0.82rem;
  letter-spacing: 0.18em; text-transform: uppercase; margin-bottom: 1.1rem;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.2rem; }
.footer-col a {
  color: #CFC2DD;
  display: inline-flex; align-items: center; min-height: 44px;
}
.footer-col a:hover { color: var(--gold-light); }
.footer-contact a { min-height: 44px; }
.footer-contact li { display: flex; gap: 0.6rem; margin-bottom: 0.7rem; color: #CFC2DD; }
.footer-contact svg { width: 18px; height: 18px; flex: none; margin-top: 4px; color: var(--gold); }
/* The address and service-time rows are plain text, so the 4px nudge above
   lines their icon up with the first line. The phone and email rows are links,
   and .footer-col a gives those a 44px tap target that centres its text inside
   a box taller than the line — which left those two icons sitting 8px high.
   Centre the icon on the same box rather than nudging it down by hand. */
.footer-contact li:has(a) { align-items: center; }
.footer-contact li:has(a) svg { margin-top: 0; }
.footer-social { display: flex; gap: 0.7rem; margin-top: 1.2rem; }
.footer-social a {
  width: 44px; height: 44px; display: grid; place-items: center;
  border-radius: 50%; background: rgba(255,255,255,0.08); color: #fff;
  transition: background 0.25s ease, transform 0.25s ease;
}
.footer-social a:hover { background: var(--gold); color: #2A1608; transform: translateY(-3px); }
.footer-social svg { width: 20px; height: 20px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-block: 1.5rem;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.6rem;
  font-size: 0.86rem; color: #9C8FB0;
}
.footer-bottom a { color: #B7A9C7; }

/* -------------------------------------------------------------------------- */
/*  Scroll reveal                                                              */
/* -------------------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
  will-change: opacity, transform;
}
.reveal.in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: 0.1s; }
.reveal[data-delay="2"] { transition-delay: 0.2s; }
.reveal[data-delay="3"] { transition-delay: 0.3s; }

/* -------------------------------------------------------------------------- */
/*  Responsive                                                                 */
/* -------------------------------------------------------------------------- */
/* --- Large desktops: let the layout breathe rather than stranding it -------- */
@media (min-width: 1600px) {
  :root { --maxw: 1320px; }
}

/* --- Laptops / small desktops ---------------------------------------------- */
@media (max-width: 1200px) {
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
}

/* --- Tablets (iPad mini 744 through iPad Pro 1024) --------------------------
   Three cards across is cramped at these widths; two reads much better.       */
@media (min-width: 620px) and (max-width: 1023px) {
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  /* the odd card out spans the full row instead of leaving a hole */
  .grid--3 > :last-child:nth-child(odd) { grid-column: 1 / -1; }
  /* ...but a 4:3 photo at double width becomes a 600px wall that swamps the
     row above it, so flatten the image on the card that stretches. */
  .grid--3 > .mcard:last-child:nth-child(odd) .mcard__media { aspect-ratio: 21 / 9; }
}

@media (max-width: 1023px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 860px) {
  .nav__toggle { display: block; }
  .nav__links {
    position: fixed;
    inset: var(--nav-h) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: rgba(24, 10, 40, 0.98);
    backdrop-filter: blur(12px);
    padding: 0.5rem 1.2rem 1.4rem;
    box-shadow: var(--shadow-lg);
    /* Clear the menu's own height *plus* its top offset, so no part can peek
       above the viewport regardless of how tall the menu content is. */
    transform: translateY(calc(-100% - var(--nav-h) - 8px));
    visibility: hidden;
    transition: transform 0.4s var(--ease), visibility 0s linear 0.4s;
    max-height: calc(100vh - var(--nav-h));
    overflow-y: auto;
  }
  .nav.open .nav__links {
    transform: translateY(0);
    visibility: visible;
    transition: transform 0.4s var(--ease), visibility 0s;
  }
  .nav__links a { padding: 0.9rem 0.6rem; border-bottom: 1px solid rgba(255,255,255,0.08); font-size: 1.05rem; }
  .nav__links a::after { display: none; }
  .nav__cta { margin: 1rem 0 0; }
  .nav__cta .btn { width: 100%; justify-content: center; }
  .site-header { background: rgba(24, 10, 40, 0.92); backdrop-filter: blur(10px); }
}

@media (max-width: 760px) {
  .split { grid-template-columns: 1fr; }
  .split--flip .split__media { order: 0; }
  .split__media .frame-gold { display: none; }
  /* Longer names (e.g. "Alejandra and Roberto") would otherwise run the badge
     flush to the screen edge, so tuck it inside the frame on small screens. */
  .split__media .badge { right: 0.75rem; bottom: -14px; padding: 0.8rem 1.1rem; }
  .split__media .badge b { font-size: 1.5rem; }
  .split__media .badge span { letter-spacing: 0.1em; }
  .contact-grid { grid-template-columns: 1fr; }
  .quick { grid-template-columns: 1fr; margin-top: -3rem; }
  .grid--2, .grid--4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .slot { grid-template-columns: 1fr; gap: 0.4rem; text-align: left; }
  .slot__time { justify-self: start; }
  /* 2 cols: feature stays 2x2, remaining four tile two rows — still perfect */
  .mosaic { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 46vw; }
  .fb-callout { flex-direction: column; align-items: flex-start; }
  .fb-callout .btn { width: 100%; justify-content: center; }
}

/* --- Phones ---------------------------------------------------------------- */
@media (max-width: 619px) {
  .grid--3 { grid-template-columns: 1fr; }
  .hero__actions .btn,
  .cta-band .btn { width: 100%; }
}

/* --- Short viewports (phone in landscape) -----------------------------------
   Trim the tall hero padding so the message still fits on one screen.        */
@media (max-height: 520px) and (orientation: landscape) {
  .hero { min-height: 0; padding: calc(var(--nav-h) + 1rem) 0 2rem; }
  .page-hero { min-height: 0; padding: calc(var(--nav-h) + 1rem) 0 1.5rem; }
  .hero h1 { font-size: clamp(2rem, 5vw, 3rem); }
  .hero__lead { margin-bottom: 1.1rem; }
  .nav__links { max-height: calc(100svh - var(--nav-h)); }
}

/* --- Touch devices ----------------------------------------------------------
   On a touchscreen :hover latches after a tap and leaves cards stuck in their
   lifted state. Neutralise the movement; colour changes are harmless.        */
@media (hover: none) {
  .card:hover,
  .mcard:hover,
  .quick__item:hover,
  .slot:hover,
  .btn:hover,
  .footer-social a:hover { transform: none; box-shadow: var(--shadow-sm); }
  .mcard:hover .mcard__media img,
  .mosaic figure:hover img { transform: none; }
  .mosaic figure:hover::after { opacity: 0; }
  .quick__item:hover { box-shadow: var(--shadow-md); }
  .btn:hover { box-shadow: 0 10px 26px rgba(212, 175, 55, 0.32); }
  /* keep a clear pressed state instead */
  .btn:active { transform: scale(0.97); }
  .card:active, .mcard:active { transform: scale(0.995); }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
  .hero__bg { transform: none; }
}

/* -------------------------------------------------------------------------- */
/*  Responsive hero / verse backgrounds                                       */
/*  Phones pull the 640px file, tablets 1024px, desktops the full 1600px.     */
/*  Saves roughly 80% of hero bytes on a phone.                               */
/* -------------------------------------------------------------------------- */
.bg--hero-worship { background-image: url("../assets/images/hero-worship-640.jpg"); }
.bg--sanctuary-interior { background-image: url("../assets/images/sanctuary-interior-640.jpg"); }
.bg--service { background-image: url("../assets/images/service-640.jpg"); }
.bg--church-exterior { background-image: url("../assets/images/church-exterior-640.jpg"); }
.bg--hero-cross { background-image: url("../assets/images/hero-cross-640.jpg"); }
.bg--hero-praise { background-image: url("../assets/images/hero-praise-640.jpg"); }
.bg--bible { background-image: url("../assets/images/bible-640.jpg"); }
.bg--church-interior { background-image: url("../assets/images/church-interior-640.jpg"); }
.bg--community { background-image: url("../assets/images/community-640.jpg"); }
.bg--welcome { background-image: url("../assets/images/welcome-640.jpg"); }

@media (min-width: 641px) {
  .bg--hero-worship { background-image: url("../assets/images/hero-worship-1024.jpg"); }
  .bg--sanctuary-interior { background-image: url("../assets/images/sanctuary-interior-1024.jpg"); }
  .bg--service { background-image: url("../assets/images/service-1024.jpg"); }
  .bg--church-exterior { background-image: url("../assets/images/church-exterior-1024.jpg"); }
  .bg--hero-cross { background-image: url("../assets/images/hero-cross-1024.jpg"); }
  .bg--hero-praise { background-image: url("../assets/images/hero-praise-1024.jpg"); }
  .bg--bible { background-image: url("../assets/images/bible-1024.jpg"); }
  .bg--church-interior { background-image: url("../assets/images/church-interior-1024.jpg"); }
  .bg--community { background-image: url("../assets/images/community-1024.jpg"); }
  .bg--welcome { background-image: url("../assets/images/welcome-1024.jpg"); }
}

@media (min-width: 1025px) {
  .bg--hero-worship { background-image: url("../assets/images/hero-worship.jpg"); }
  .bg--sanctuary-interior { background-image: url("../assets/images/sanctuary-interior.jpg"); }
  .bg--service { background-image: url("../assets/images/service.jpg"); }
  .bg--church-exterior { background-image: url("../assets/images/church-exterior.jpg"); }
  .bg--hero-cross { background-image: url("../assets/images/hero-cross.jpg"); }
  .bg--hero-praise { background-image: url("../assets/images/hero-praise.jpg"); }
  .bg--bible { background-image: url("../assets/images/bible.jpg"); }
  .bg--church-interior { background-image: url("../assets/images/church-interior.jpg"); }
  .bg--community { background-image: url("../assets/images/community.jpg"); }
  .bg--welcome { background-image: url("../assets/images/welcome.jpg"); }
}
