/* =================================================================
   FAITH TEMPLE COMPLEX — SITE-WIDE DESIGN SYSTEM
   A church serving Hayti, Missouri since 1948.
   Palette: white + turquoise + metallic gold
   Clean, bright, reverent.
   ================================================================= */

/* -----------------------------------------------------------------
   1. DESIGN TOKENS
   ----------------------------------------------------------------- */
:root {
  /* Turquoise — primary brand color (from logo ribbon) */
  --teal-950: #0A3D4D;
  --teal-900: #104E63;
  --teal-800: #155F78;
  --teal-700: #1E7C99;
  --teal-600: #2C9EBC;
  --teal-500: #3EB4D0;
  --teal-400: #6CC8DD;
  --teal-300: #9ADBE9;
  --teal-200: #C2E8F1;
  --teal-100: #DCF0F6;
  --teal-50:  #EEF8FB;

  /* Metallic gold — accent color (from logo ring) */
  --gold-800: #7A5A00;
  --gold-700: #9C7200;
  --gold-600: #B8881A;
  --gold-500: #D4A017;
  --gold-400: #E0B945;
  --gold-300: #ECD080;
  --gold-200: #F5E4B8;
  --gold-100: #FBF2D9;

  /* Neutrals — clean whites and cool grays */
  --white:     #FFFFFF;
  --off-white: #FAFBFC;
  --gray-50:   #F4F7F8;
  --gray-100:  #EDF1F3;
  --gray-200:  #E1E7EA;
  --gray-300:  #C8D1D6;
  --gray-400:  #99A4AA;
  --gray-500:  #6B767E;
  --gray-600:  #4D5961;
  --gray-700:  #343F46;
  --gray-800:  #1F2A32;
  --gray-900:  #0F1A22;

  /* Semantic tokens */
  --bg-primary: var(--white);
  --bg-soft: var(--gray-50);
  --bg-tinted: var(--teal-50);
  --bg-dark: var(--teal-900);
  --bg-darkest: var(--teal-950);
  --text-body: var(--gray-800);
  --text-muted: var(--gray-600);
  --text-on-dark: var(--white);
  --accent: var(--gold-500);
  --accent-hover: var(--gold-600);
  --primary: var(--teal-700);
  --primary-hover: var(--teal-800);
  --border: var(--gray-200);
  --border-strong: var(--gray-300);

  /* Typography */
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'Figtree', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Type scale — 18px base for accessibility */
  --fs-xs:   clamp(0.8125rem, 0.8rem + 0.05vw, 0.875rem);
  --fs-sm:   clamp(0.9375rem, 0.9rem + 0.1vw, 1rem);
  --fs-base: clamp(1.0625rem, 1rem + 0.2vw, 1.125rem);
  --fs-lg:   clamp(1.1875rem, 1.1rem + 0.3vw, 1.3125rem);
  --fs-xl:   clamp(1.375rem, 1.25rem + 0.5vw, 1.625rem);
  --fs-2xl:  clamp(1.75rem, 1.5rem + 1vw, 2.25rem);
  --fs-3xl:  clamp(2.25rem, 1.8rem + 2vw, 3.25rem);
  --fs-4xl:  clamp(2.75rem, 2rem + 3.5vw, 4.5rem);

  /* Spacing */
  --space-1: 0.25rem;  --space-2: 0.5rem;   --space-3: 0.75rem;
  --space-4: 1rem;     --space-5: 1.25rem;  --space-6: 1.5rem;
  --space-8: 2rem;     --space-10: 2.5rem;  --space-12: 3rem;
  --space-16: 4rem;    --space-20: 5rem;    --space-24: 6rem;
  --space-32: 8rem;

  /* Layout */
  --max-width: 1240px;
  --max-width-narrow: 880px;
  --max-width-prose: 68ch;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);

  /* Radii */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 999px;

  /* Shadows — clean, soft */
  --shadow-xs: 0 1px 2px rgba(15, 26, 34, 0.04);
  --shadow-sm: 0 2px 8px rgba(15, 26, 34, 0.06);
  --shadow-md: 0 8px 24px rgba(15, 26, 34, 0.08);
  --shadow-lg: 0 20px 48px rgba(15, 26, 34, 0.12);
  --shadow-teal: 0 8px 32px rgba(30, 124, 153, 0.18);
  --shadow-gold: 0 8px 32px rgba(212, 160, 23, 0.24);

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in: cubic-bezier(0.4, 0, 1, 1);
  --dur-fast: 180ms;
  --dur-med: 320ms;
  --dur-slow: 600ms;
}

/* -----------------------------------------------------------------
   2. RESET & BASE
   ----------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: 1.65;
  color: var(--text-body);
  background: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg, video { max-width: 100%; display: block; height: auto; }

a {
  color: var(--teal-700);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
  transition: color var(--dur-fast) var(--ease);
}
a:hover { color: var(--teal-600); }

button { font-family: inherit; cursor: pointer; border: none; background: none; }

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

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

.skip-link {
  position: absolute;
  top: -100px;
  left: var(--space-4);
  background: var(--teal-800);
  color: var(--white);
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-sm);
  font-weight: 600;
  z-index: 1000;
  transition: top var(--dur-fast) var(--ease);
}
.skip-link:focus { top: var(--space-4); color: var(--white); }

/* -----------------------------------------------------------------
   3. TYPOGRAPHY
   ----------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  color: var(--teal-950);
  margin: 0 0 var(--space-4);
  font-variation-settings: "SOFT" 60, "opsz" 48;
  letter-spacing: -0.01em;
}

h1 { font-size: var(--fs-4xl); font-weight: 700; letter-spacing: -0.02em; line-height: 1.05; }
h2 { font-size: var(--fs-3xl); font-weight: 600; line-height: 1.1; }
h3 { font-size: var(--fs-xl); font-weight: 600; }
h4 { font-size: var(--fs-lg); font-weight: 600; }

p { margin: 0 0 var(--space-5); max-width: var(--max-width-prose); }
p:last-child { margin-bottom: 0; }

.eyebrow {
  font-family: var(--font-body);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--teal-700);
  margin-bottom: var(--space-4);
  display: inline-block;
}
.eyebrow--gold { color: var(--gold-600); }
.eyebrow--on-dark { color: var(--gold-400); }

.lede {
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  font-weight: 400;
  line-height: 1.5;
  color: var(--gray-700);
  font-variation-settings: "SOFT" 80, "opsz" 24;
}

blockquote {
  margin: var(--space-8) 0;
  padding: var(--space-6) var(--space-8);
  border-left: 4px solid var(--gold-500);
  background: var(--teal-50);
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--fs-xl);
  line-height: 1.4;
  color: var(--teal-950);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}
blockquote cite {
  display: block;
  margin-top: var(--space-3);
  font-family: var(--font-body);
  font-style: normal;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--teal-700);
  letter-spacing: 0.05em;
}
blockquote cite::before { content: "— "; }

/* -----------------------------------------------------------------
   4. LAYOUT HELPERS
   ----------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container-narrow { max-width: var(--max-width-narrow); }

.section {
  padding-block: clamp(4rem, 9vw, 7rem);
  position: relative;
}

.section--alt { background: var(--bg-soft); }
.section--tinted { background: var(--bg-tinted); }
.section--teal {
  background: var(--teal-900);
  color: var(--text-on-dark);
}
.section--teal h1, .section--teal h2, .section--teal h3,
.section--teal h4 { color: var(--white); }

.section-header {
  max-width: 60ch;
  margin-bottom: var(--space-12);
}
.section-header--center {
  max-width: 60ch;
  margin-inline: auto;
  text-align: center;
}
.section-header p {
  margin-inline: auto;
  font-size: var(--fs-lg);
  color: var(--text-muted);
}
.section-header--center p { max-width: 55ch; }

/* -----------------------------------------------------------------
   5. BUTTONS
   ----------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-7, 1.75rem);
  min-height: 52px;
  font-family: var(--font-body);
  font-size: var(--fs-base);
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: all var(--dur-med) var(--ease);
  white-space: nowrap;
  border: 2px solid transparent;
  cursor: pointer;
}

.btn-primary {
  background: var(--teal-700);
  color: var(--white);
}
.btn-primary:hover {
  background: var(--teal-800);
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: var(--shadow-teal);
}

.btn-accent {
  background: var(--gold-500);
  color: var(--teal-950);
}
.btn-accent:hover {
  background: var(--gold-400);
  color: var(--teal-950);
  transform: translateY(-1px);
  box-shadow: var(--shadow-gold);
}

.btn-outline {
  background: transparent;
  color: var(--teal-700);
  border-color: var(--teal-600);
}
.btn-outline:hover {
  background: var(--teal-700);
  color: var(--white);
}

.btn-outline-light {
  background: transparent;
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.5);
}
.btn-outline-light:hover {
  background: var(--white);
  color: var(--teal-900);
  border-color: var(--white);
}

.btn-lg { padding: var(--space-5) var(--space-10); min-height: 60px; font-size: var(--fs-lg); }

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.arrow-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--teal-700);
  font-weight: 600;
  text-decoration: none;
  font-size: var(--fs-base);
  transition: gap var(--dur-fast) var(--ease);
}
.arrow-link::after {
  content: "→";
  transition: transform var(--dur-fast) var(--ease);
}
.arrow-link:hover { gap: var(--space-3); color: var(--teal-800); }
.arrow-link:hover::after { transform: translateX(2px); }

/* -----------------------------------------------------------------
   6. ANNOUNCEMENT BAR
   ----------------------------------------------------------------- */
.announcement-bar {
  background: var(--teal-900);
  color: var(--white);
  padding: var(--space-3) var(--gutter);
  text-align: center;
  font-size: var(--fs-sm);
  font-weight: 500;
}
.announcement-bar a {
  color: var(--gold-300);
  font-weight: 700;
  margin-left: var(--space-2);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.announcement-bar a:hover { color: var(--gold-200); }

/* -----------------------------------------------------------------
   7. SITE HEADER
   ----------------------------------------------------------------- */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: saturate(180%) blur(8px);
  background-color: rgba(255, 255, 255, 0.94);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  padding-block: var(--space-3);
  flex-wrap: wrap;
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  color: var(--teal-950);
  flex-shrink: 0;
}
.logo-mark {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  flex-shrink: 0;
  overflow: hidden;
  background: var(--white);
  box-shadow: var(--shadow-xs);
}
.logo-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  mix-blend-mode: multiply;
}
.logo-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  line-height: 1.1;
  min-width: 0;
}
.logo-text .logo-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--fs-base);
  color: var(--teal-950);
  letter-spacing: -0.01em;
  font-variation-settings: "SOFT" 30, "opsz" 24;
  line-height: 1.15;
  white-space: nowrap;
}
.logo-text .logo-sub {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold-600);
  white-space: nowrap;
}

.main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: var(--space-1);
  align-items: center;
}
.main-nav a {
  display: inline-block;
  padding: var(--space-3) var(--space-4);
  color: var(--teal-950);
  text-decoration: none;
  font-weight: 600;
  font-size: var(--fs-sm);
  border-radius: var(--radius-full);
  transition: all var(--dur-fast) var(--ease);
  white-space: nowrap;
}
.main-nav a:hover {
  background: var(--teal-50);
  color: var(--teal-800);
}
.main-nav a[aria-current="page"] {
  background: var(--teal-700);
  color: var(--white);
}
.main-nav .nav-cta {
  background: var(--gold-500);
  color: var(--teal-950);
  margin-left: var(--space-2);
}
.main-nav .nav-cta:hover {
  background: var(--gold-400);
  color: var(--teal-950);
}

/* -----------------------------------------------------------------
   MOBILE NAV — Pure CSS checkbox-driven (no JavaScript dependency)
   ----------------------------------------------------------------- */

/* Hide the actual checkbox visually but keep it functional */
.nav-toggle-cb {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
}

/* The label IS the hamburger button — clicking the label toggles the checkbox */
.mobile-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  padding: var(--space-3);
  border-radius: var(--radius-sm);
  color: var(--teal-900);
  cursor: pointer;
  min-width: 48px;
  min-height: 48px;
  position: relative;
  z-index: 210;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}
.mobile-toggle:hover { background: var(--teal-50); }
.nav-toggle-cb:focus-visible + .mobile-toggle {
  outline: 2px solid var(--teal-600);
  outline-offset: 2px;
}

.hamburger {
  position: relative;
  width: 26px;
  height: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  pointer-events: none;
}
.hamburger-bar {
  display: block;
  height: 2.5px;
  width: 100%;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.2s var(--ease);
  transform-origin: center;
}

/* When the checkbox is checked → animate the hamburger to an X */
.nav-toggle-cb:checked ~ .mobile-toggle .hamburger-bar:nth-child(1) {
  transform: translateY(8.75px) rotate(45deg);
}
.nav-toggle-cb:checked ~ .mobile-toggle .hamburger-bar:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.nav-toggle-cb:checked ~ .mobile-toggle .hamburger-bar:nth-child(3) {
  transform: translateY(-8.75px) rotate(-45deg);
}

/* Backdrop overlay (only visible on mobile) */
.nav-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10, 61, 77, 0.55);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s var(--ease), visibility 0.3s var(--ease);
  z-index: 199;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
}

@media (max-width: 1180px) {
  /* Show hamburger, hide desktop nav by default */
  .mobile-toggle { display: inline-flex; }
  .nav-backdrop { display: block; }

  /* When menu is open, lift the hamburger above the full-screen nav so it stays tappable as the close button */
  .nav-toggle-cb:checked ~ .mobile-toggle {
    position: fixed;
    top: var(--space-3);
    right: var(--space-3);
    z-index: 220;
  }

  .main-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    background: var(--white);
    box-shadow: none;
    padding: calc(var(--space-16) + env(safe-area-inset-top, 0px)) var(--space-6) calc(var(--space-6) + env(safe-area-inset-bottom, 0px));
    transform: translateX(100%);
    transition: transform 0.32s cubic-bezier(0.32, 0.72, 0, 1);
    z-index: 200;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
  }

  /* THE MAGIC: when checkbox is checked, slide the menu in */
  .nav-toggle-cb:checked ~ .main-nav {
    transform: translateX(0);
  }
  .nav-toggle-cb:checked ~ .nav-backdrop {
    opacity: 1;
    visibility: visible;
  }

  .main-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-1);
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
  }
  .main-nav a {
    padding: var(--space-3) var(--space-5);
    font-size: 1.05rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    white-space: normal;
    min-height: 48px;
    text-align: center;
  }
  .main-nav a[aria-current="page"] {
    background: var(--teal-700);
    color: var(--white);
  }
  .main-nav .nav-cta {
    margin-left: 0;
    margin-top: var(--space-4);
    text-align: center;
    justify-content: center;
    background: var(--gold-500);
  }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .main-nav,
  .nav-backdrop,
  .hamburger-bar {
    transition: none !important;
  }
}

/* -----------------------------------------------------------------
   8. CARDS
   ----------------------------------------------------------------- */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  border: 1px solid var(--border);
  transition: transform var(--dur-med) var(--ease), box-shadow var(--dur-med) var(--ease), border-color var(--dur-med) var(--ease);
  height: 100%;
  display: flex;
  flex-direction: column;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--teal-300);
}
.card h3 { margin-bottom: var(--space-3); }
.card p { flex-grow: 1; color: var(--text-muted); font-size: var(--fs-base); }

.program-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  border: 1px solid var(--border);
  transition: all var(--dur-med) var(--ease);
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}
.program-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--gold-500);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur-med) var(--ease);
}
.program-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--teal-300);
}
.program-card:hover::before { transform: scaleX(1); }

.program-card .program-icon {
  width: 56px;
  height: 56px;
  background: var(--teal-50);
  color: var(--teal-700);
  border-radius: var(--radius-md);
  display: grid;
  place-items: center;
  margin-bottom: var(--space-5);
  transition: all var(--dur-med) var(--ease);
}
.program-card:hover .program-icon {
  background: var(--teal-700);
  color: var(--gold-300);
}
.program-card .program-icon svg { width: 28px; height: 28px; }
.program-card h3 { font-size: var(--fs-xl); margin-bottom: var(--space-3); }
.program-card p { color: var(--text-muted); font-size: var(--fs-base); margin-bottom: var(--space-5); flex-grow: 1; }
.program-card .arrow-link { margin-top: auto; }

/* -----------------------------------------------------------------
   9. GRIDS
   ----------------------------------------------------------------- */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-8);
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-6);
}
.grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-6);
}

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

/* -----------------------------------------------------------------
   10. PAGE HERO (bright, clean)
   ----------------------------------------------------------------- */
.page-hero {
  background: linear-gradient(135deg, var(--teal-50) 0%, var(--white) 60%, var(--gold-100) 100%);
  color: var(--teal-950);
  padding-block: clamp(4rem, 8vw, 6rem);
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}
.page-hero::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -10%;
  width: 500px; height: 500px;
  background: radial-gradient(circle, var(--teal-100) 0%, transparent 70%);
  opacity: 0.7;
  pointer-events: none;
}
.page-hero::after {
  content: "";
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 400px; height: 400px;
  background: radial-gradient(circle, var(--gold-100) 0%, transparent 70%);
  opacity: 0.5;
  pointer-events: none;
}
.page-hero .container { position: relative; z-index: 1; }
.page-hero .eyebrow { color: var(--teal-700); }
.page-hero h1 {
  color: var(--teal-950);
  max-width: 20ch;
  margin-bottom: var(--space-6);
}
.page-hero .lede {
  color: var(--gray-700);
  font-size: var(--fs-xl);
  max-width: 55ch;
}

/* -----------------------------------------------------------------
   11. FORMS
   ----------------------------------------------------------------- */
.form-field {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-5);
}
.form-field label {
  font-weight: 600;
  font-size: var(--fs-sm);
  color: var(--teal-950);
}
.form-field input,
.form-field textarea,
.form-field select {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  padding: var(--space-4);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--white);
  color: var(--text-body);
  min-height: 52px;
  transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.form-field textarea { min-height: 140px; resize: vertical; }
.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
  outline: none;
  border-color: var(--teal-600);
  box-shadow: 0 0 0 3px var(--teal-100);
}
.form-checkbox-group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-3);
  margin-top: var(--space-2);
}
.form-checkbox {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  padding: var(--space-4);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--white);
  cursor: pointer;
  transition: all var(--dur-fast) var(--ease);
}
.form-checkbox:hover { border-color: var(--teal-400); background: var(--teal-50); }
.form-checkbox input[type="checkbox"] { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--teal-700); cursor: pointer; }
.form-checkbox span { font-weight: 500; font-size: var(--fs-sm); }

/* -----------------------------------------------------------------
   12. SITE FOOTER
   ----------------------------------------------------------------- */
.site-footer {
  background: var(--teal-950);
  color: var(--teal-100);
  padding-block: var(--space-16) var(--space-8);
  margin-top: var(--space-24);
}
.site-footer a { color: var(--gold-300); }
.site-footer a:hover { color: var(--gold-200); }

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: var(--space-10);
  margin-bottom: var(--space-12);
}
@media (max-width: 860px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .footer-grid { grid-template-columns: 1fr; }
}

.footer-heading {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-base);
  color: var(--gold-300);
  margin-bottom: var(--space-4);
  letter-spacing: 0.02em;
}
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: var(--space-3); }
.footer-grid li a { text-decoration: none; font-size: var(--fs-sm); transition: color var(--dur-fast) var(--ease); }
.footer-grid li a:hover { text-decoration: underline; }

.footer-brand h3 {
  font-family: var(--font-display);
  color: var(--white);
  font-size: var(--fs-xl);
  margin-bottom: var(--space-3);
}
.footer-brand p { font-size: var(--fs-sm); color: var(--teal-200); max-width: 36ch; }

.footer-social {
  display: flex;
  gap: var(--space-3);
  margin-top: var(--space-5);
}
.footer-social a {
  width: 40px; height: 40px;
  background: var(--teal-800);
  border-radius: var(--radius-full);
  display: grid;
  place-items: center;
  color: var(--gold-300);
  text-decoration: none;
  transition: all var(--dur-fast) var(--ease);
}
.footer-social a:hover {
  background: var(--gold-500);
  color: var(--teal-950);
  transform: translateY(-2px);
}
.footer-social svg { width: 20px; height: 20px; }

.newsletter-form {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
  margin-top: var(--space-3);
}
.newsletter-form input {
  flex: 1 1 200px;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-full);
  border: 2px solid var(--teal-800);
  background: var(--teal-900);
  color: var(--white);
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  min-height: 48px;
}
.newsletter-form input::placeholder { color: var(--teal-300); }
.newsletter-form input:focus { border-color: var(--gold-500); outline: none; }
.newsletter-form button {
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-full);
  background: var(--gold-500);
  color: var(--teal-950);
  font-weight: 700;
  min-height: 48px;
}
.newsletter-form button:hover { background: var(--gold-400); }

.footer-bottom {
  border-top: 1px solid var(--teal-800);
  padding-top: var(--space-6);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-4);
  font-size: var(--fs-xs);
  color: var(--teal-300);
}

/* -----------------------------------------------------------------
   13. IMAGE PLACEHOLDER
   ----------------------------------------------------------------- */
.img-placeholder {
  background: linear-gradient(135deg, var(--teal-50) 0%, var(--gold-100) 100%);
  display: grid;
  place-items: center;
  color: var(--teal-600);
  border-radius: var(--radius-lg);
  aspect-ratio: 4 / 3;
  text-align: center;
  padding: var(--space-6);
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--fs-sm);
}
.img-placeholder svg { width: 48px; height: 48px; margin-bottom: var(--space-2); opacity: 0.4; }

/* -----------------------------------------------------------------
   14. ANIMATIONS
   ----------------------------------------------------------------- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.reveal { opacity: 0; animation: fadeUp var(--dur-slow) var(--ease) forwards; }
.reveal-1 { animation-delay: 0.1s; }
.reveal-2 { animation-delay: 0.25s; }
.reveal-3 { animation-delay: 0.4s; }
.reveal-4 { animation-delay: 0.55s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}

/* -----------------------------------------------------------------
   15. UTILITY CLASSES
   ----------------------------------------------------------------- */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mt-auto { margin-top: auto; }

.divider-ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  margin: var(--space-12) 0;
  color: var(--gold-500);
}
.divider-ornament::before,
.divider-ornament::after {
  content: "";
  flex: 1;
  max-width: 80px;
  height: 1px;
  background: var(--teal-300);
}
.divider-ornament svg { width: 24px; height: 24px; opacity: 0.6; }

/* =================================================================
   16. RESPONSIVE GRIDS — page-level layouts
   All collapse cleanly on mobile; all have proper desktop behavior.
   ================================================================= */

/* CONTACT PAGE — info on left, form on right */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: var(--space-12);
  align-items: start;
}
@media (max-width: 860px) {
  .contact-grid { grid-template-columns: 1fr; gap: var(--space-8); }
}

.contact-block { margin-bottom: var(--space-6); }
.contact-block h3 {
  font-size: var(--fs-base);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold-600);
  margin-bottom: var(--space-2);
}
.contact-block p { margin: 0; }

.form-container {
  background: var(--white);
  padding: var(--space-8);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
@media (max-width: 520px) {
  .form-container { padding: var(--space-6); }
}

/* IMPACT STRIP — 4 stats across */
.impact-strip {
  background: var(--teal-900);
  color: var(--white);
  padding-block: var(--space-16);
}
.impact-strip-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-8);
  text-align: center;
}
.impact-strip-grid > div { display: flex; flex-direction: column; gap: var(--space-2); }
.impact-strip-number {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  font-weight: 700;
  color: var(--gold-400);
  line-height: 1;
}
.impact-strip-label {
  font-size: var(--fs-sm);
  color: var(--teal-100);
  letter-spacing: 0.03em;
}
@media (max-width: 860px) {
  .impact-strip-grid { grid-template-columns: repeat(2, 1fr); gap: var(--space-6); }
}
@media (max-width: 420px) {
  .impact-strip-grid { grid-template-columns: 1fr; gap: var(--space-5); }
}

/* WAYS GRID — 3 ways to help */
.ways-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}
.way {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  text-align: center;
  transition: transform var(--dur-med) var(--ease), box-shadow var(--dur-med) var(--ease);
  display: flex;
  flex-direction: column;
  align-items: center;
}
.way:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.way-icon {
  width: 64px; height: 64px;
  background: var(--teal-50);
  color: var(--teal-700);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: var(--space-4);
}
.way-icon svg { width: 32px; height: 32px; }
.way h3 { margin-bottom: var(--space-3); }
.way p { color: var(--text-muted); margin-bottom: var(--space-6); flex-grow: 1; }
@media (max-width: 860px) {
  .ways-grid { grid-template-columns: 1fr; gap: var(--space-5); }
}

/* EXPECT GRID — 4 numbered items */
.expect-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-8);
}
.expect-item { text-align: center; }
.expect-number {
  width: 56px; height: 56px;
  background: var(--gold-500);
  color: var(--teal-950);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  margin-bottom: var(--space-4);
}
.expect-item h3 { margin-bottom: var(--space-2); font-size: var(--fs-lg); }
.expect-item p { color: var(--text-muted); font-size: var(--fs-base); }
@media (max-width: 860px) {
  .expect-grid { grid-template-columns: repeat(2, 1fr); gap: var(--space-6); }
}
@media (max-width: 480px) {
  .expect-grid { grid-template-columns: 1fr; }
}

/* SERVICES TIMES — 3 service cards */
.services-times {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}
.service-time-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  text-align: center;
  transition: box-shadow var(--dur-med) var(--ease);
}
.service-time-card:hover { box-shadow: var(--shadow-md); }
.service-time-icon {
  width: 56px; height: 56px;
  background: var(--teal-50);
  color: var(--teal-700);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-4);
}
.service-time-icon svg { width: 28px; height: 28px; }
.service-time-day {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-lg);
  color: var(--teal-950);
  margin-bottom: var(--space-1);
}
.service-time-when {
  color: var(--gold-600);
  font-weight: 600;
  font-size: var(--fs-base);
  margin-bottom: var(--space-3);
  letter-spacing: 0.02em;
}
.service-time-desc {
  color: var(--text-muted);
  font-size: var(--fs-sm);
  margin: 0;
}
@media (max-width: 860px) {
  .services-times { grid-template-columns: 1fr; gap: var(--space-5); }
}

/* PROJECT DETAIL — label col + content col */
.project-detail-grid,
.program-detail-grid {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: var(--space-10);
  align-items: start;
}
.project-detail-label,
.program-detail-label {
  position: sticky;
  top: calc(var(--space-20) + var(--space-4));
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.project-number {
  font-family: var(--font-display);
  font-size: 4rem;
  font-weight: 700;
  color: var(--gold-500);
  line-height: 1;
  opacity: 0.8;
}
@media (max-width: 900px) {
  .project-detail-grid,
  .program-detail-grid {
    grid-template-columns: 1fr;
    gap: var(--space-5);
  }
  .project-detail-label,
  .program-detail-label {
    position: static;
    flex-direction: row;
    align-items: center;
  }
  .project-number { font-size: 2.5rem; }
}

.project-feature-img {
  margin: var(--space-6) 0 var(--space-8);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.project-feature-img img { width: 100%; height: auto; display: block; }
.project-feature-img figcaption {
  background: var(--teal-950);
  color: var(--white);
  padding: var(--space-3) var(--space-5);
  font-size: var(--fs-sm);
  font-style: italic;
  text-align: center;
}

.project-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-4);
  margin: var(--space-8) 0;
}
.project-gallery figure {
  margin: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
}
.project-gallery img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
  transition: transform 0.4s var(--ease);
}
.project-gallery figure:hover img { transform: scale(1.05); }
.project-gallery figcaption {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(to top, rgba(10, 61, 77, 0.9), transparent);
  color: var(--white);
  padding: var(--space-6) var(--space-4) var(--space-3);
  font-size: var(--fs-sm);
}

.highlight-box {
  background: var(--bg-soft);
  border-left: 4px solid var(--gold-500);
  padding: var(--space-5) var(--space-6);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin: var(--space-6) 0;
  color: var(--teal-950);
}

.program-features {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--space-5);
}
.program-features li {
  padding: var(--space-3) 0 var(--space-3) var(--space-7);
  position: relative;
  border-bottom: 1px solid var(--border);
  color: var(--text-body);
}
.program-features li:last-child { border-bottom: none; }
.program-features li::before {
  content: "";
  position: absolute;
  left: 0; top: 1.1em;
  width: 18px; height: 2px;
  background: var(--gold-500);
}

.program-subtitle {
  font-size: var(--fs-lg);
  color: var(--teal-700);
  font-style: italic;
  margin-bottom: var(--space-4);
}
.program-tag {
  display: inline-block;
  padding: var(--space-1) var(--space-3);
  background: var(--teal-50);
  color: var(--teal-800);
  border-radius: var(--radius-full);
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.program-tag.ocoh {
  background: var(--gold-100);
  color: var(--gold-700);
}

/* PILLAR GRID — 4 pillars with images */
.pillar-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-6);
}
.pillar {
  text-align: center;
  display: flex;
  flex-direction: column;
}
.pillar-img {
  aspect-ratio: 1/1;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: var(--space-4);
}
.pillar-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pillar h3 { font-size: var(--fs-lg); margin-bottom: var(--space-2); }
.pillar p { font-size: var(--fs-sm); color: var(--text-muted); }
@media (max-width: 900px) {
  .pillar-grid { grid-template-columns: repeat(2, 1fr); gap: var(--space-5); }
}
@media (max-width: 480px) {
  .pillar-grid { grid-template-columns: 1fr; }
}

/* LEADER GRID — pastor + first lady */
.leader-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-10);
}
.leader-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}
.leader-portrait {
  aspect-ratio: 4/5;
  overflow: hidden;
  background: var(--teal-50);
}
.leader-portrait img { width: 100%; height: 100%; object-fit: cover; display: block; }
.leader-body { padding: var(--space-7); }
.leader-name { font-size: var(--fs-2xl); margin-bottom: var(--space-2); }
.leader-role {
  color: var(--gold-600);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: var(--fs-sm);
  margin-bottom: var(--space-4);
}
@media (max-width: 860px) {
  .leader-grid { grid-template-columns: 1fr; gap: var(--space-8); }
}

/* CAUSES / MISSION GRIDS — generic cards in a row */
.causes-grid,
.mission-grid,
.find-grid,
.journey-grid,
.stan-meaning-grid,
.stanley-grid,
.subprogram-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-6);
}
.stanley-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: var(--space-10); align-items: center; }
@media (max-width: 860px) {
  .stanley-grid { grid-template-columns: 1fr; gap: var(--space-6); }
}

.cause-card,
.mission-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  transition: box-shadow var(--dur-med) var(--ease), transform var(--dur-med) var(--ease);
}
.cause-card:hover,
.mission-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

/* EVENTS PREVIEW + EVENT CARDS */
.events-preview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-5);
}
.event-preview-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5) var(--space-6);
  display: flex;
  gap: var(--space-5);
  align-items: center;
  transition: border-color var(--dur-fast) var(--ease), transform var(--dur-med) var(--ease), box-shadow var(--dur-med) var(--ease);
}
.event-preview-card:hover {
  border-color: var(--teal-400);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}
.event-preview-card h3 { font-size: var(--fs-lg); margin: 0 0 var(--space-1); }
.event-meta { color: var(--text-muted); font-size: var(--fs-sm); }

.event-date {
  flex-shrink: 0;
  width: 68px;
  background: var(--teal-700);
  color: var(--white);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-2);
  text-align: center;
  line-height: 1.1;
}
.event-date .month {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold-300);
  font-weight: 700;
}
.event-date .day {
  display: block;
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--white);
}

.event-card-lg {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  margin-bottom: var(--space-6);
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: var(--space-8);
  align-items: start;
  transition: box-shadow var(--dur-med) var(--ease);
}
.event-card-lg:hover { box-shadow: var(--shadow-md); }
@media (max-width: 720px) {
  .event-card-lg { grid-template-columns: 1fr; gap: var(--space-5); padding: var(--space-6); }
}

.event-date-block {
  background: var(--teal-50);
  border-radius: var(--radius-lg);
  padding: var(--space-5) var(--space-3);
  text-align: center;
  line-height: 1.1;
}
.event-date-block.featured { background: var(--gold-500); color: var(--teal-950); }
.event-date-block .month {
  display: block;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--gold-600);
  margin-bottom: var(--space-1);
}
.event-date-block.featured .month { color: var(--teal-950); }
.event-date-block .day {
  display: block;
  font-family: var(--font-display);
  font-size: 2.75rem;
  font-weight: 700;
  color: var(--teal-950);
  line-height: 1;
}
.event-date-block .dow {
  display: block;
  font-size: 0.75rem;
  color: var(--teal-700);
  margin-top: var(--space-2);
}
.event-date-block.featured .dow { color: var(--teal-900); }

.event-content h2 {
  font-size: var(--fs-2xl);
  margin: var(--space-2) 0 var(--space-3);
}
.event-tag {
  display: inline-block;
  padding: var(--space-1) var(--space-3);
  background: var(--teal-50);
  color: var(--teal-800);
  border-radius: var(--radius-full);
  font-size: var(--fs-sm);
  font-weight: 600;
  margin-bottom: var(--space-2);
}
.event-details-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin: var(--space-4) 0;
  color: var(--text-muted);
  font-size: var(--fs-sm);
}
.event-details-list span {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}
.event-details-list svg {
  width: 16px; height: 16px;
  color: var(--teal-700);
  flex-shrink: 0;
}

/* BUTTON GROUP — base rules earlier in file */

/* CTA BANNER (home page) */
.cta-banner {
  background: linear-gradient(135deg, var(--teal-800) 0%, var(--teal-950) 100%);
  color: var(--white);
  padding: var(--space-12) var(--space-10);
  border-radius: var(--radius-xl);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-banner h2 { color: var(--white); margin-bottom: var(--space-4); }
.cta-banner p { color: var(--teal-100); margin-bottom: var(--space-8); max-width: 50ch; margin-left: auto; margin-right: auto; }
@media (max-width: 640px) {
  .cta-banner { padding: var(--space-8) var(--space-6); }
}

/* ANNOUNCEMENT BAR — mobile polish only (base rules are earlier in file) */
@media (max-width: 640px) {
  .announcement-bar { font-size: 0.8rem; padding: var(--space-2) var(--space-3); }
  .announcement-bar a { display: inline-block; margin-left: var(--space-2); }
}

/* =================================================================
   17. GLOBAL MOBILE POLISH
   ================================================================= */
@media (max-width: 860px) {
  /* Logo: tighten on mobile so hamburger has room */
  .logo-mark { width: 44px; height: 44px; }
  .logo-text .logo-name { font-size: 0.9rem; }
  .logo-text .logo-sub { font-size: 0.62rem; }
  .nav-wrap { padding-block: var(--space-2); gap: var(--space-3); }
}
@media (max-width: 480px) {
  /* Very small phones: hide the logo subtitle */
  .logo-text .logo-sub { display: none; }
  .logo-mark { width: 40px; height: 40px; }
}

@media (max-width: 640px) {
  /* Hero sections: less padding, smaller headings fit mobile */
  .page-hero { padding-block: var(--space-12); }
  .page-hero h1 { font-size: clamp(1.75rem, 6vw, 2.25rem); }

  /* Sections: reduce vertical rhythm */
  .section { padding-block: var(--space-10); }

  /* Container: tighter side padding */
  .container { padding-inline: var(--space-4); }

  /* Footer: less top space on mobile */
  .site-footer { padding-block: var(--space-10) var(--space-6); margin-top: var(--space-12); }
}

/* Ensure all images are responsive by default */
img { max-width: 100%; height: auto; }

/* Prevent horizontal scroll on mobile — use clip on body to NOT break position:fixed (iOS Safari fix) */
html { overflow-x: hidden; }
body { overflow-x: clip; }

/* Better tap targets */
@media (max-width: 860px) {
  .btn, a.btn { min-height: 52px; display: inline-flex; align-items: center; justify-content: center; }
  input, textarea, select, button { font-size: 16px !important; /* prevents iOS zoom */ }
  input, textarea, select { min-height: 52px; }
}
