/* ═══════════════════════════════════════════════
   CORNERSTONE FOUNDATION — MODERN REDESIGN
   Inspired by Lawyerify: clean, professional,
   trust-building with warm African warmth
   ═══════════════════════════════════════════════ */

/* ── CUSTOM PROPERTIES ── */
:root {
  /* Brand Colors */
  --navy:        #1a2744;
  --navy-light:  #243357;
  --green:       #2d6a4f;
  --green-light: #3d8c68;
  --gold:        #c9920a;
  --gold-light:  #f5c842;

  /* Neutrals */
  --white:       #ffffff;
  --off-white:   #faf9f7;
  --surface:     #f4f1ec;
  --muted-bg:    #ede9e1;
  --border:      #ddd8cf;
  --border-dark: #c5bfb3;

  /* Text */
  --text-primary:   #1a2744;
  --text-body:      #3d3d3d;
  --text-muted:     #716b60;
  --text-light:     #9b9490;

  /* Semantic */
  --accent:      var(--green);
  --accent-hover:var(--green-light);
  --highlight:   var(--gold);

  /* Spacing */
  --radius-sm:   4px;
  --radius:      8px;
  --radius-lg:   16px;
  --radius-xl:   24px;

  /* Shadows */
  --shadow-sm:   0 1px 4px rgba(26,39,68,0.08);
  --shadow:      0 4px 16px rgba(26,39,68,0.10);
  --shadow-lg:   0 12px 40px rgba(26,39,68,0.14);
  --shadow-xl:   0 24px 64px rgba(26,39,68,0.18);

  /* Transitions */
  --ease:        cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --duration:    0.28s;
}

/* ── RESET & BASE ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--white);
  color: var(--text-body);
  line-height: 1.65;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* ── TYPOGRAPHY SCALE ── */
.serif {
  font-family: 'Crimson Text', 'Georgia', 'Times New Roman', serif;
}

h1, h2, h3 {
  font-family: 'Crimson Text', 'Georgia', serif;
  font-weight: 400;
  line-height: 1.2;
  color: var(--text-primary);
}

/* ── LAYOUT UTILITIES ── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 5%;
}

.section-pad {
  padding: 100px 0;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  align-items: center;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

/* ── SECTION LABELS ── */
.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 20px;
}

.section-eyebrow::before {
  content: '';
  display: block;
  width: 28px;
  height: 2px;
  background: currentColor;
  flex-shrink: 0;
}

.section-title {
  font-size: clamp(2rem, 3.5vw, 2.8rem);
  line-height: 1.18;
  color: var(--navy);
  margin-bottom: 24px;
}

.section-lead {
  font-size: 1.1rem;
  line-height: 1.75;
  color: var(--text-muted);
  max-width: 580px;
}

/* ── SCROLL REVEAL ── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s var(--ease), transform 0.65s var(--ease);
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ── PLACEHOLDER IMAGES ── */
.img-placeholder {
  background: linear-gradient(135deg, #8b6f47 0%, #5c3d2e 100%);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: rgba(255,255,255,0.5);
  font-size: 1.6rem;
  text-align: center;
  padding: 20px;
}

.img-placeholder small {
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-family: 'Inter', sans-serif;
  opacity: 0.7;
}

/* ════════════════════════════════════════
   NAVIGATION
   ════════════════════════════════════════ */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 500;
  transition: background var(--duration) var(--ease),
              box-shadow var(--duration) var(--ease),
              border-color var(--duration) var(--ease);
  background: transparent;
  border-bottom: 1px solid transparent;
}

.site-nav.scrolled {
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(12px);
  border-bottom-color: var(--border);
  box-shadow: var(--shadow-sm);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 5%;
  height: 110px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
Ahero · Kisumu County, Kenya
.nav-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
  /* Keep logo vertically centred inside the 76px bar */
  height: 100%;
}

.nav-logo-img {
  height: 96px;
  width: auto;
  display: block;
  /* Transparent/dark nav → invert to white */
  filter: invert(1) brightness(2);
  transition: filter var(--duration), opacity var(--duration);
}

/* Scrolled nav turns white — show original black logo */
.site-nav.scrolled .nav-logo-img {
  filter: none;
}

.nav-logo:hover .nav-logo-img {
  opacity: 0.8;
}

/* Responsive logo size */
@media (max-width: 768px) {
  .nav-inner { height: 90px; }
  .nav-logo-img { height: 76px; }
}

@media (max-width: 480px) {
  .nav-inner { height: 80px; }
  .nav-logo-img { height: 64px; }
}

.logo-mark {
  width: 42px;
  height: 42px;
  background: var(--green);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background var(--duration);
}

.logo-mark svg {
  width: 20px;
  height: 20px;
  fill: white;
}

.nav-logo:hover .logo-mark {
  background: var(--navy);
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-text strong {
  font-family: 'Crimson Text', serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: white;
  line-height: 1.2;
  transition: color var(--duration);
}

.logo-text small {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.65);
  transition: color var(--duration);
}

.site-nav.scrolled .logo-text strong { color: var(--navy); }
.site-nav.scrolled .logo-text small  { color: var(--text-muted); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.85);
  transition: color var(--duration);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  right: 0;
  height: 1.5px;
  background: var(--gold-light);
  transform: scaleX(0);
  transition: transform var(--duration) var(--ease);
  transform-origin: left;
}

.nav-links a:hover { color: white; }
.nav-links a:hover::after { transform: scaleX(1); }

.site-nav.scrolled .nav-links a {
  color: var(--text-muted);
}

.site-nav.scrolled .nav-links a:hover {
  color: var(--navy);
}

.site-nav.scrolled .nav-links a::after {
  background: var(--green);
}

.nav-cta {
  background: var(--green) !important;
  color: white !important;
  padding: 10px 22px !important;
  border-radius: 50px !important;
  letter-spacing: 0.06em !important;
  transition: background var(--duration) !important;
}

.nav-cta::after { display: none !important; }

.nav-cta:hover {
  background: var(--navy) !important;
  color: white !important;
}

.site-nav.scrolled .nav-cta {
  background: var(--green) !important;
  color: white !important;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: white;
  border-radius: 2px;
  transition: all 0.3s var(--ease);
}

.site-nav.scrolled .nav-toggle span { background: var(--navy); }

.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }


/* ════════════════════════════════════════
   HERO
   ════════════════════════════════════════ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--navy);
  color: white;
}

/* Layered background: dark navy with subtle texture */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 70% 50%, rgba(45,106,79,0.35) 0%, transparent 60%),
    radial-gradient(ellipse at 20% 80%, rgba(201,146,10,0.12) 0%, transparent 50%);
  z-index: 1;
}

/* Subtle geometric pattern */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 60px 60px;
  z-index: 1;
}

.hero .container {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 5rem;
  align-items: center;
  min-height: 100vh;
  padding-top: 100px;
  padding-bottom: 60px;
}

.hero-content { max-width: 640px; }

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 50px;
  padding: 8px 18px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.9);
  margin-bottom: 2rem;
}

.hero-eyebrow .dot {
  width: 6px;
  height: 6px;
  background: var(--gold-light);
  border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.6; transform: scale(0.8); }
}

.hero-title {
  font-family: 'Crimson Text', serif;
  font-size: clamp(3rem, 5.5vw, 4.8rem);
  line-height: 1.08;
  font-weight: 400;
  color: white;
  margin-bottom: 1.75rem;
}

.hero-title .accent-word {
  color: var(--gold-light);
  position: relative;
  font-style: italic;
}

.hero-title .line-2 {
  display: block;
  color: rgba(255,255,255,0.85);
  font-size: 0.78em;
  margin-top: 0.2em;
}

.hero-description {
  font-size: 1.12rem;
  line-height: 1.75;
  color: rgba(255,255,255,0.75);
  margin-bottom: 2.5rem;
  max-width: 500px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 3.5rem;
}

/* Primary CTA — bold filled */
.btn-filled {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--gold);
  color: white;
  padding: 14px 28px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background var(--duration), transform var(--duration), box-shadow var(--duration);
  box-shadow: 0 4px 20px rgba(45,106,79,0.4);
}

.btn-filled:hover {
  background: var(--green-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(45,106,79,0.5);
}

.btn-filled svg { width: 16px; height: 16px; }

/* Outline CTA */
.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  color: rgba(255,255,255,0.9);
  padding: 14px 28px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1.5px solid rgba(255,255,255,0.3);
  transition: border-color var(--duration), color var(--duration), background var(--duration);
}

.btn-outline:hover {
  border-color: rgba(255,255,255,0.7);
  color: white;
  background: rgba(255,255,255,0.06);
}

/* Dark variant for light sections */
.btn-filled-dark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--navy);
  color: white;
  padding: 14px 28px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background var(--duration), transform var(--duration);
}

.btn-filled-dark:hover {
  background: var(--green);
  transform: translateY(-2px);
}

.hero-stats {
  display: flex;
  gap: 0;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: rgba(255,255,255,0.04);
  backdrop-filter: blur(8px);
}

.stat-item {
  flex: 1;
  padding: 20px 24px;
  text-align: center;
  border-right: 1px solid rgba(255,255,255,0.1);
}

.stat-item:last-child { border-right: none; }

.stat-number {
  font-family: 'Crimson Text', serif;
  font-size: 2.4rem;
  font-weight: 600;
  color: var(--gold-light);
  line-height: 1;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.6);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 500;
}

/* Hero visual side */
.hero-visual {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
}

.hero-img-main {
  width: 100%;
  aspect-ratio: 3/4;
  border-radius: var(--radius-xl);
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow-xl);
  border: 1px solid rgba(255,255,255,0.1);
}

.hero-img-main img,
.hero-img-main .img-placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  border-radius: var(--radius-xl);
  background: rgba(255,255,255,0.06);
  border: none;
  display: block;
}

.hero-main-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.hero-img-main .img-placeholder {
  color: rgba(255,255,255,0.4);
  font-size: 3rem;
}

.hero-badge-card {
  position: absolute;
  bottom: 24px;
  left: -28px;
  background: white;
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow-lg);
  min-width: 200px;
}

.badge-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #2d6a4f, #1a4d36);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.badge-body strong {
  display: block;
  font-size: 0.85rem;
  color: var(--navy);
  font-weight: 700;
  margin-bottom: 2px;
}

.badge-body small {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.hero-img-secondary {
  position: absolute;
  top: 48px;
  right: -24px;
  width: 42%;
  aspect-ratio: 1;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 3px solid var(--navy);
}

.hero-img-secondary img,
.hero-img-secondary .img-placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: calc(var(--radius-lg) - 3px);
  background: rgba(255,255,255,0.08);
  border: none;
  font-size: 1.2rem;
}

/* Scroll cue */
.hero-scroll-cue {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,0.4);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  cursor: pointer;
}

.scroll-mouse {
  width: 22px;
  height: 34px;
  border: 1.5px solid rgba(255,255,255,0.3);
  border-radius: 11px;
  display: flex;
  justify-content: center;
  padding-top: 6px;
}

.scroll-wheel {
  width: 3px;
  height: 7px;
  background: rgba(255,255,255,0.5);
  border-radius: 2px;
  animation: scroll-bounce 1.8s ease-in-out infinite;
}

@keyframes scroll-bounce {
  0%, 100% { opacity: 1; transform: translateY(0); }
  60%       { opacity: 0; transform: translateY(8px); }
}


/* ════════════════════════════════════════
   IMPACT BAR
   ════════════════════════════════════════ */
.impact-bar {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 0;
}

.impact-bar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 5%;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.impact-item {
  padding: 36px 28px;
  text-align: center;
  border-right: 1px solid var(--border);
  position: relative;
}

.impact-item:last-child { border-right: none; }

.impact-number {
  font-family: 'Crimson Text', serif;
  font-size: 3rem;
  font-weight: 600;
  color: var(--green);
  line-height: 1;
  margin-bottom: 6px;
}

.impact-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
}

.impact-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
  line-height: 1.4;
}


/* ════════════════════════════════════════
   ABOUT
   ════════════════════════════════════════ */
.about {
  background: var(--white);
  padding: 108px 0;
}

.about-text {
  padding-right: 20px;
}

.about-text p {
  font-size: 1rem;
  line-height: 1.85;
  color: var(--text-body);
  margin-bottom: 18px;
}

.about-text p strong { color: var(--navy); }

.about-pull-quote {
  margin-top: 40px;
  padding: 28px 32px;
  background: var(--surface);
  border-left: 3px solid var(--green);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.about-pull-quote p {
  font-family: 'Crimson Text', serif;
  font-size: 1.2rem;
  font-style: italic;
  color: var(--navy);
  line-height: 1.55;
  margin: 0;
}

.about-pull-quote cite {
  display: block;
  font-family: 'Inter', sans-serif;
  font-style: normal;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--green);
  margin-top: 12px;
}

/* About image mosaic */
.about-images {
  position: relative;
}

.img-mosaic {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 12px;
  height: 520px;
}

.mosaic-main {
  grid-row: span 2;
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.mosaic-main img,
.mosaic-main .img-placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-xl);
}

.mosaic-sm {
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.mosaic-sm img,
.mosaic-sm .img-placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-lg);
}

.mosaic-accent {
  background: var(--green);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  text-align: center;
  color: white;
}

.mosaic-accent .accent-num {
  font-family: 'Crimson Text', serif;
  font-size: 2.4rem;
  font-weight: 600;
  line-height: 1;
  margin-bottom: 6px;
}

.mosaic-accent .accent-text {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
  color: rgba(255,255,255,0.85);
}


/* ════════════════════════════════════════
   PROGRAMS
   ════════════════════════════════════════ */
.programs {
  background: var(--off-white);
  padding: 108px 0;
}

.programs-header {
  max-width: 560px;
  margin-bottom: 64px;
}

.programs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.program-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  transition: border-color var(--duration), box-shadow var(--duration), transform var(--duration);
  position: relative;
  overflow: hidden;
}

.program-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--green), var(--green-light));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease);
}

.program-card:hover {
  border-color: transparent;
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.program-card:hover::before { transform: scaleX(1); }

.program-icon-wrap {
  width: 52px;
  height: 52px;
  background: var(--surface);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 24px;
  transition: background var(--duration);
}

.program-card:hover .program-icon-wrap {
  background: rgba(45,106,79,0.12);
}

.program-card h3 {
  font-size: 1.1rem;
  color: var(--navy);
  margin-bottom: 12px;
  font-weight: 600;
  font-family: 'Crimson Text', serif;
  font-size: 1.2rem;
}

.program-card p {
  font-size: 0.9rem;
  line-height: 1.75;
  color: var(--text-muted);
}

.program-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 20px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--green);
  transition: gap var(--duration), color var(--duration);
}

.program-link:hover { gap: 10px; color: var(--navy); }
.program-link svg { width: 14px; height: 14px; }


/* ════════════════════════════════════════
   SCRIPTURE BANNER
   ════════════════════════════════════════ */
.scripture-banner {
  background: var(--navy);
  padding: 80px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.scripture-banner::before {
  content: '"';
  position: absolute;
  top: -40px;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Crimson Text', serif;
  font-size: 20rem;
  color: rgba(255,255,255,0.03);
  line-height: 1;
  pointer-events: none;
}

.scripture-text {
  font-family: 'Crimson Text', serif;
  font-size: clamp(1.5rem, 3vw, 2.4rem);
  font-style: italic;
  color: white;
  line-height: 1.45;
  max-width: 760px;
  margin: 0 auto 20px;
  position: relative;
  z-index: 1;
}

.scripture-ref {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-light);
  position: relative;
  z-index: 1;
}


/* ════════════════════════════════════════
   SUPPORT / DONATE
   ════════════════════════════════════════ */
.support {
  background: var(--white);
  padding: 108px 0;
}

.support-header {
  max-width: 520px;
  margin-bottom: 64px;
}

.support-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: start;
}

/* M-Pesa card */
.mpesa-card {
  background: var(--navy);
  border-radius: var(--radius-xl);
  padding: 48px;
  color: white;
  position: relative;
  overflow: hidden;
}

.mpesa-card::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -60px;
  width: 200px;
  height: 200px;
  background: rgba(45,106,79,0.2);
  border-radius: 50%;
}

.mpesa-card::after {
  content: '';
  position: absolute;
  bottom: -40px;
  left: -40px;
  width: 160px;
  height: 160px;
  background: rgba(201,146,10,0.12);
  border-radius: 50%;
}

.mpesa-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
  position: relative;
  z-index: 1;
}

.mpesa-logo {
  height: 44px;
  width: auto;
  display: block;
  flex-shrink: 0;
  object-fit: contain;
}

.mpesa-header h3 {
  font-family: 'Crimson Text', serif;
  font-size: 1.5rem;
  color: white;
  font-weight: 400;
}

.mpesa-header p {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.6);
  margin-top: 2px;
}

.mpesa-steps {
  list-style: none;
  counter-reset: steps;
  margin-bottom: 32px;
  position: relative;
  z-index: 1;
}

.mpesa-steps li {
  counter-increment: steps;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 14px;
  font-size: 0.92rem;
  color: rgba(255,255,255,0.8);
  line-height: 1.55;
}

.mpesa-steps li::before {
  content: counter(steps);
  min-width: 26px;
  height: 26px;
  background: rgba(255,255,255,0.12);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
  color: white;
}

.mpesa-steps li strong { color: white; }

.paybill-display {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-lg);
  padding: 20px 28px;
  display: flex;
  gap: 40px;
  position: relative;
  z-index: 1;
}

.paybill-field small {
  display: block;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.5);
  margin-bottom: 4px;
}

.paybill-field strong {
  font-family: 'Crimson Text', serif;
  font-size: 1.9rem;
  color: var(--gold-light);
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* Wishlist card */
.wishlist-card {
  background: var(--off-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 40px;
}

.wishlist-card h3 {
  font-family: 'Crimson Text', serif;
  font-size: 1.4rem;
  color: var(--navy);
  margin-bottom: 8px;
  font-weight: 400;
}

.wishlist-intro {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 28px;
  line-height: 1.6;
}

.wishlist-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.92rem;
  color: var(--text-body);
}

.wishlist-item:last-of-type { border-bottom: none; }

.tag {
  display: inline-flex;
  align-items: center;
  font-size: 0.65rem;
  padding: 4px 12px;
  border-radius: 50px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.tag-needed {
  background: var(--surface);
  color: var(--text-muted);
}

.tag-urgent {
  background: rgba(45,106,79,0.12);
  color: var(--green);
}

.wishlist-cta {
  margin-top: 28px;
}


/* ════════════════════════════════════════
   GALLERY
   ════════════════════════════════════════ */
.gallery {
  background: var(--surface);
  padding: 108px 0;
}

.gallery-header {
  max-width: 520px;
  margin-bottom: 56px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-template-rows: auto auto;
  gap: 14px;
}

.g-item {
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
}

.g-item img,
.g-item .img-placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-lg);
  transition: transform 0.5s var(--ease);
}

.g-item:hover img { transform: scale(1.04); }

.g-item:nth-child(1) { grid-column: span 5; aspect-ratio: 4/3; }
.g-item:nth-child(2) { grid-column: span 4; aspect-ratio: 4/3; }
.g-item:nth-child(3) { grid-column: span 3; aspect-ratio: 4/3; }
.g-item:nth-child(4) { grid-column: span 3; aspect-ratio: 1; }
.g-item:nth-child(5) { grid-column: span 4; aspect-ratio: 4/3; }
.g-item:nth-child(6) { grid-column: span 5; aspect-ratio: 4/3; }

.g-item .img-placeholder {
  height: 100%;
  min-height: 200px;
  font-size: 1.2rem;
  background: linear-gradient(135deg, #8b6f47 0%, #5c3d2e 100%);
  border-radius: var(--radius-lg);
}


/* ── GALLERY HOMEPAGE EXTRAS ── */
.gallery-header-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 48px;
  flex-wrap: wrap;
}

.gallery-header-row .section-title { margin-bottom: 8px; }
.gallery-view-all { align-self: flex-end; flex-shrink: 0; }

.g-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
}

/* .g-item-label removed — no filename overlay on gallery previews */

.gallery-footer {
  text-align: center;
  margin-top: 10px;
}

.gal-empty {
  text-align: center;
  padding: 80px 24px;
  color: rgba(255,255,255,0.35);
}

.gal-empty-icon {
  font-size: 3rem;
  margin-bottom: 16px;
}

/* ════════════════════════════════════════
   CONTACT
   ════════════════════════════════════════ */
.contact {
  background: var(--white);
  padding: 108px 0;
}

.contact-inner {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 72px;
  align-items: start;
}

.contact-left .section-lead {
  margin-bottom: 40px;
}

.contact-details {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 22px;
  margin-bottom: 36px;
}

.contact-details li {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.contact-icon-wrap {
  width: 40px;
  height: 40px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.9rem;
}

.contact-detail-body strong {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--navy);
  margin-bottom: 3px;
}

.contact-detail-body span,
.contact-detail-body a {
  font-size: 0.95rem;
  color: var(--text-body);
  transition: color var(--duration);
}

.contact-detail-body a:hover { color: var(--green); }

.social-links {
  display: flex;
  gap: 12px;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border: 1.5px solid var(--border);
  border-radius: 50px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-body);
  text-decoration: none;
  transition: border-color var(--duration), color var(--duration), background var(--duration);
}

.social-link:hover {
  border-color: var(--green);
  color: var(--green);
  background: rgba(45,106,79,0.04);
}

/* Contact CTA panel */
.contact-panel {
  background: var(--navy);
  border-radius: var(--radius-xl);
  padding: 52px 48px;
  color: white;
  position: relative;
  overflow: hidden;
}

.contact-panel::before {
  content: '';
  position: absolute;
  top: -80px;
  right: -80px;
  width: 240px;
  height: 240px;
  background: rgba(45,106,79,0.25);
  border-radius: 50%;
}

.contact-panel h3 {
  font-family: 'Crimson Text', serif;
  font-size: 1.9rem;
  color: white;
  font-weight: 400;
  line-height: 1.2;
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
}

.contact-panel p {
  font-size: 0.95rem;
  line-height: 1.75;
  color: rgba(255,255,255,0.7);
  margin-bottom: 32px;
  position: relative;
  z-index: 1;
}

.contact-panel-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  z-index: 1;
}

.contact-panel-actions .btn-filled {
  justify-content: center;
}

.contact-panel-actions .btn-outline {
  justify-content: center;
}


/* ════════════════════════════════════════
   FOOTER
   ════════════════════════════════════════ */
.site-footer {
  background: var(--navy);
  color: white;
}

.footer-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 72px 5% 56px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 56px;
}

.footer-brand-logo {
  display: inline-flex;
  text-decoration: none;
  margin-bottom: 20px;
}

.footer-logo-img {
  height: 160px;
  width: auto;
  display: block;
  filter: invert(1) brightness(2);
  transition: opacity var(--duration);
}

.footer-brand-logo:hover .footer-logo-img {
  opacity: 0.8;
}

@media (max-width: 640px) {
  .footer-logo-img { height: 120px; }
}

.footer-tagline {
  font-size: 0.92rem;
  line-height: 1.75;
  color: rgba(255,255,255,0.55);
  max-width: 340px;
  margin-bottom: 24px;
}

.footer-social {
  display: flex;
  gap: 10px;
}

.footer-social a {
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  transition: background var(--duration), color var(--duration), border-color var(--duration);
}

.footer-social a:hover {
  background: var(--green);
  border-color: var(--green);
  color: white;
}

.footer-col-title {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  margin-bottom: 20px;
}

.footer-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-nav-list a {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  transition: color var(--duration);
}

.footer-nav-list a:hover { color: white; }

.footer-contact-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-contact-list li {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.6);
  line-height: 1.5;
}

.footer-contact-list a {
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  transition: color var(--duration);
}

.footer-contact-list a:hover { color: white; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 24px 5%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-bottom p {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.35);
}

.footer-verse {
  font-family: 'Crimson Text', serif;
  font-style: italic;
  font-size: 0.88rem;
  color: rgba(255,255,255,0.45);
}


/* ════════════════════════════════════════
   RESPONSIVE — TABLET (≤ 960px)
   ════════════════════════════════════════ */
@media (max-width: 960px) {
  .section-pad { padding: 80px 0; }

  .hero .container {
    grid-template-columns: 1fr;
    gap: 3rem;
    padding-top: 120px;
    padding-bottom: 80px;
    text-align: center;
  }

  .hero-content { max-width: none; }
  .hero-description { margin: 0 auto 2.5rem; }

  .hero-actions { justify-content: center; }

  .hero-stats { max-width: 480px; margin: 0 auto; }

  .hero-visual {
    display: none; /* Hide on tablet for cleaner layout */
  }

  .impact-bar-inner { grid-template-columns: repeat(2, 1fr); }
  .impact-item:nth-child(2) { border-right: none; }
  .impact-item:nth-child(1),
  .impact-item:nth-child(2) { border-bottom: 1px solid var(--border); }

  .grid-2 { grid-template-columns: 1fr; gap: 48px; }

  .about { padding: 80px 0; }
  .about-text { padding-right: 0; }
  .img-mosaic { height: 340px; }

  .programs-grid { grid-template-columns: 1fr 1fr; }

  .support-grid { grid-template-columns: 1fr; }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: unset;
  }

  .g-item { grid-column: span 1 !important; aspect-ratio: 4/3 !important; }

  .contact-inner { grid-template-columns: 1fr; gap: 48px; }

  .footer-main { grid-template-columns: 1fr 1fr; gap: 40px; }
  .footer-brand { grid-column: span 2; }
}


/* ════════════════════════════════════════
   RESPONSIVE — MOBILE (≤ 640px)
   ════════════════════════════════════════ */
@media (max-width: 640px) {
  .hero .container { padding-top: 100px; }

  .hero-title { font-size: clamp(2.4rem, 9vw, 3.2rem); }

  .hero-stats {
    flex-direction: column;
    border: none;
    gap: 0;
  }

  .stat-item {
    border-right: none;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding: 16px 20px;
  }

  .stat-item:last-child { border-bottom: none; }

  .impact-bar-inner { grid-template-columns: 1fr 1fr; }

  .programs-grid { grid-template-columns: 1fr; }

  .mpesa-card { padding: 32px 24px; }
  .wishlist-card { padding: 28px 24px; }

  .contact-panel { padding: 36px 28px; }

  .footer-main { grid-template-columns: 1fr; gap: 32px; }
  .footer-brand { grid-column: auto; }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 8px;
  }

  /* ── Mobile nav overlay ── */
  .nav-toggle { display: flex; }

  .nav-links {
    /* Full-screen overlay — sits above everything including the navbar */
    position: fixed;
    inset: 0;
    z-index: 600;
    background: var(--navy);

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 0;
    list-style: none;

    /* Hidden state */
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-12px);
    transition:
      opacity   0.28s var(--ease),
      transform 0.28s var(--ease),
      visibility 0s linear 0.28s;
  }

  .nav-links.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
    transition:
      opacity   0.28s var(--ease),
      transform 0.28s var(--ease),
      visibility 0s linear 0s;
  }

  /* Subtle radial glow behind the links */
  .nav-links::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
      radial-gradient(ellipse at 50% 40%, rgba(45,106,79,0.25) 0%, transparent 65%);
    pointer-events: none;
  }

  .nav-links li {
    width: 100%;
    text-align: center;
    /* Stagger links in */
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
  }

  .nav-links.open li {
    opacity: 1;
    transform: none;
  }

  /* Stagger delays */
  .nav-links.open li:nth-child(1) { transition-delay: 0.07s; }
  .nav-links.open li:nth-child(2) { transition-delay: 0.11s; }
  .nav-links.open li:nth-child(3) { transition-delay: 0.15s; }
  .nav-links.open li:nth-child(4) { transition-delay: 0.19s; }
  .nav-links.open li:nth-child(5) { transition-delay: 0.23s; }
  .nav-links.open li:nth-child(6) { transition-delay: 0.27s; }

  .nav-links a {
    display: block;
    padding: 18px 0;
    font-size: 1.4rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.04em !important;
    color: rgba(255,255,255,0.75) !important;
    text-transform: uppercase;
    border-bottom: none !important;
    transition: color 0.2s !important;
  }

  .nav-links a::after { display: none !important; }

  .nav-links a:hover { color: white !important; }

  /* Donate CTA inside overlay */
  .nav-cta {
    margin-top: 12px;
    display: inline-block !important;
    background: var(--green) !important;
    color: white !important;
    padding: 14px 36px !important;
    border-radius: 50px !important;
    font-size: 1rem !important;
    letter-spacing: 0.06em !important;
  }

  .nav-cta:hover { background: var(--green-light) !important; }

  /* Close button rendered inside the overlay */
  .nav-overlay-close {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 44px;
    height: 44px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    font-size: 1.2rem;
    line-height: 1;
    transition: background 0.2s;
    /* Hidden when overlay is closed */
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s, background 0.2s;
  }

  .nav-links.open .nav-overlay-close {
    opacity: 1;
    pointer-events: auto;
    transition-delay: 0.15s;
  }

  .nav-overlay-close:hover { background: rgba(255,255,255,0.18); }

  .paybill-display { flex-direction: column; gap: 16px; }
}


/* ════════════════════════════════════════
   GALLERY PAGE
   ════════════════════════════════════════ */

/* ── Hero ── */
.gal-hero {
  background: var(--navy);
  padding: 130px 0 52px;
  text-align: center;
}

.gal-hero-title {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  color: #fff;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 10px;
}

.gal-hero-sub {
  color: rgba(255,255,255,0.45);
  font-size: 0.95rem;
  margin: 0;
  letter-spacing: 0.04em;
}

/* ── Grid ── */
.gal-section {
  background: #111;
  padding: 20px 0 60px;
}

.gal-grid {
  columns: 4 220px;
  column-gap: 5px;
  padding: 0 5px;
}

.gal-item {
  break-inside: avoid;
  margin-bottom: 5px;
  position: relative;
  overflow: hidden;
  cursor: zoom-in;
  background: #1c1c1c;
  /* Prevent any border-radius gaps */
  border-radius: 2px;
}

.gal-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.gal-item:hover img {
  transform: scale(1.05);
}

/* Hover overlay — just a slight darkening + centered icon */
.gal-hover {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.28s ease, background 0.28s ease;
}

.gal-item:hover .gal-hover {
  opacity: 1;
  background: rgba(0, 0, 0, 0.28);
}

.gal-hover-icon {
  width: 44px;
  height: 44px;
  border: 1.5px solid rgba(255,255,255,0.8);
  border-radius: 50%;
  background: rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transform: scale(0.8);
  transition: transform 0.25s ease;
}

.gal-item:hover .gal-hover-icon {
  transform: scale(1);
}

/* Deferred / reveal */
.gal-item.gal-deferred { display: none; }

@keyframes gal-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

.gal-item.gal-reveal {
  animation: gal-in 0.32s ease both;
}

/* Sentinel + Loading */
#gal-sentinel {
  height: 1px;
  margin: 16px 0;
}

#gal-loading {
  display: flex;
  justify-content: center;
  padding: 36px;
}

.gal-spinner {
  width: 30px;
  height: 30px;
  border: 2.5px solid rgba(255,255,255,0.1);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}

/* ── Lightbox ── */
.gal-lb {
  position: fixed;
  inset: 0;
  z-index: 900;
  background: rgba(5, 5, 8, 0.97);
  display: flex;
  align-items: center;
  justify-content: center;
}

.gal-lb[hidden] { display: none; }

.gal-lb-img-wrap {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 56px 80px;
  box-sizing: border-box;
}

.gal-lb-img-wrap img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 3px;
  user-select: none;
  -webkit-user-drag: none;
  animation: gal-lb-in 0.22s ease both;
}

@keyframes gal-lb-in {
  from { opacity: 0; transform: scale(0.95); }
  to   { opacity: 1; transform: none; }
}

.gal-lb-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.18s, color 0.18s;
  z-index: 10;
}

.gal-lb-close:hover {
  background: rgba(255,255,255,0.16);
  color: #fff;
}

.gal-lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.18s, color 0.18s, opacity 0.18s;
  z-index: 10;
}

.gal-lb-nav:hover:not(:disabled) {
  background: rgba(255,255,255,0.14);
  color: #fff;
}

.gal-lb-nav:disabled {
  opacity: 0.2;
  cursor: default;
}

.gal-lb-prev { left: 18px; }
.gal-lb-next { right: 18px; }

/* ── Counter badge ── */
.gal-lb-counter {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.75rem;
  color: rgba(255,255,255,0.38);
  letter-spacing: 0.1em;
  white-space: nowrap;
  pointer-events: none;
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .gal-grid { columns: 3 180px; }
}

@media (max-width: 560px) {
  .gal-hero { padding: 110px 0 40px; }
  .gal-grid { columns: 2 140px; column-gap: 3px; padding: 0 3px; }
  .gal-item { margin-bottom: 3px; }
  .gal-lb-img-wrap { padding: 56px 10px 48px; }
  .gal-lb-prev { left: 8px; }
  .gal-lb-next { right: 8px; }
  .gal-lb-nav { width: 38px; height: 38px; }
}

/* ── [Deprecated gp-hero placeholder so the old template doesn't break] ── */
.gp-hero {
  background: var(--navy);
  color: white;
  padding: 120px 0 72px;
  position: relative;
  overflow: hidden;
}

.gp-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 80% 40%, rgba(45,106,79,0.3) 0%, transparent 55%),
    radial-gradient(ellipse at 10% 90%, rgba(201,146,10,0.1) 0%, transparent 50%);
}

.gp-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 60px 60px;
}

.gp-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.5);
  margin-bottom: 40px;
  position: relative;
  z-index: 1;
}

.gp-breadcrumb a {
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  transition: color var(--duration);
}

.gp-breadcrumb a:hover { color: white; }

.gp-breadcrumb-sep { display: flex; align-items: center; opacity: 0.4; }

.gp-breadcrumb span[aria-current] { color: rgba(255,255,255,0.9); }

.gp-hero-inner {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  position: relative;
  z-index: 1;
}

.gp-hero-text { max-width: 640px; }

.gp-title {
  font-family: 'Crimson Text', serif;
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  font-weight: 400;
  color: white;
  line-height: 1.1;
  margin-bottom: 20px;
}

.gp-lead {
  font-size: 1.05rem;
  line-height: 1.75;
  color: rgba(255,255,255,0.7);
  max-width: 560px;
}

.gp-hero-meta {
  display: flex;
  gap: 16px;
  flex-shrink: 0;
}

.gp-meta-card {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-lg);
  padding: 20px 28px;
  text-align: center;
  min-width: 96px;
  backdrop-filter: blur(8px);
}

.gp-meta-num {
  font-family: 'Crimson Text', serif;
  font-size: 2.2rem;
  font-weight: 600;
  color: var(--gold-light);
  line-height: 1;
  margin-bottom: 4px;
}

.gp-meta-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.5);
  font-weight: 600;
}

/* ── Filter Bar ── */
.gp-filter-wrap {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 76px;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.gp-filters {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding: 14px 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.gp-filters::-webkit-scrollbar { display: none; }

.gp-filter-btn {
  flex-shrink: 0;
  background: none;
  border: 1.5px solid var(--border);
  border-radius: 50px;
  padding: 8px 20px;
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--duration) var(--ease);
  letter-spacing: 0.02em;
}

.gp-filter-btn:hover {
  border-color: var(--green);
  color: var(--green);
  background: rgba(45,106,79,0.04);
}

.gp-filter-btn.active {
  background: var(--navy);
  border-color: var(--navy);
  color: white;
}

/* ── Gallery Section ── */
.gp-section {
  background: var(--off-white);
  padding: 48px 0 80px;
}

/* ════════════════════════════════════════
   MASONRY GALLERY
   CSS multi-column — images keep natural
   aspect ratios, Pinterest-style layout.
   ════════════════════════════════════════ */

/*
  columns: N SIZE  →  browser auto-fills columns, each ≥ SIZE.
  At 1400px → ~5 cols | 1024px → ~4 | 700px → ~3 | 480px → ~2
  No media queries required for column count.
*/
.gp-masonry {
  columns: 4 220px;
  column-gap: 10px;
}

/* ── Card ── */
.gp-card {
  break-inside: avoid;    /* never split a card across columns */
  margin-bottom: 10px;
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: zoom-in;
  background: var(--muted-bg);
  display: block;         /* needed for break-inside */
}

.gp-card:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 3px;
}

/* ── Image — fills card width, height is natural ── */
.gp-card img {
  width: 100%;
  height: auto;          /* natural aspect ratio — the masonry magic */
  display: block;
  transition: transform 0.45s var(--ease);
  will-change: transform;
}

.gp-card:hover img,
.gp-card:focus-visible img {
  transform: scale(1.06);
}

/* ── Hover overlay — slides up from bottom ── */
.gp-card-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 14px;
  /* two-stop gradient: top-left badge readable, bottom info readable */
  background:
    linear-gradient(to bottom,  rgba(10,18,40,0.45) 0%, transparent 30%),
    linear-gradient(to top,     rgba(10,18,40,0.85) 0%, transparent 55%);
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}

.gp-card:hover .gp-card-overlay,
.gp-card:focus-visible .gp-card-overlay {
  opacity: 1;
}

/* Category badge — top-left */
.gp-card-cat {
  display: inline-block;
  align-self: flex-start;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  backdrop-filter: blur(6px);
  border-radius: 50px;
  padding: 4px 10px;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.9);
}

/* Bottom row: title + zoom icon */
.gp-card-bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
}

.gp-card-title {
  font-family: 'Crimson Text', serif;
  font-size: 1rem;
  font-weight: 400;
  color: white;
  line-height: 1.25;
  flex: 1;
  /* clamp to 2 lines */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.gp-card-zoom {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  backdrop-filter: blur(4px);
  transition: background 0.2s;
}

.gp-card:hover .gp-card-zoom { background: rgba(255,255,255,0.22); }

/* ── Deferred / filtered states ── */
.gp-card.gp-deferred  { display: none; }
.gp-card.gp-filtered  { display: none; }

/* Fade-in animation when a deferred card is revealed */
.gp-card.gp-reveal {
  animation: gp-card-in 0.4s var(--ease) both;
}

@keyframes gp-card-in {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

/* ── Infinite scroll chrome ── */
.gp-sentinel {
  height: 1px;
  margin-top: 24px;
}

.gp-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 40px 0;
  font-size: 0.82rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

.gp-spinner {
  width: 32px;
  height: 32px;
  border: 2.5px solid var(--border);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.gp-end {
  text-align: center;
  padding: 36px 0 8px;
  font-size: 0.82rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

.gp-end strong { color: var(--navy); }

/* ── Filter count badge ── */
.gp-filter-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  background: rgba(0,0,0,0.08);
  border-radius: 50px;
  font-size: 0.68rem;
  font-weight: 700;
  margin-left: 6px;
  line-height: 1;
}

.gp-filter-btn.active .gp-filter-count {
  background: rgba(255,255,255,0.2);
}

/* ── Empty state ── */
.gp-empty-state {
  text-align: center;
  padding: 100px 20px;
}

.gp-empty-icon {
  font-size: 3.5rem;
  margin-bottom: 20px;
  opacity: 0.35;
}

.gp-empty-state h2 {
  font-family: 'Crimson Text', serif;
  font-size: 1.8rem;
  color: var(--navy);
  font-weight: 400;
  margin-bottom: 10px;
}

.gp-empty-state p {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.gp-empty-folders {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.gp-empty-folders code {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 6px 12px;
  font-size: 0.82rem;
  color: var(--green);
  font-family: 'Courier New', monospace;
}

/* ══════════════════════════════════════
   LIGHTBOX
   ══════════════════════════════════════ */
.lb-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8,12,26,0.97);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  backdrop-filter: blur(8px);
}

.lb-overlay[hidden] { display: none; }

/* Animate in each time */
.lb-overlay:not([hidden]) {
  animation: lb-in 0.22s var(--ease) both;
}

@keyframes lb-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.lb-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  max-width: 920px;
  width: 100%;
  animation: lb-up 0.28s var(--ease) both;
}

@keyframes lb-up {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}

.lb-img-wrap {
  width: 100%;
  max-height: 72vh;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  display: flex;
  align-items: center;
  justify-content: center;
}

.lb-img-wrap img {
  max-width: 100%;
  max-height: 72vh;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

.lb-caption {
  text-align: center;
  max-width: 580px;
  padding: 0 16px;
}

.lb-cat {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-light);
  display: block;
  margin-bottom: 8px;
}

.lb-title {
  font-family: 'Crimson Text', serif;
  font-size: 1.55rem;
  color: white;
  font-weight: 400;
  margin-bottom: 0;
  line-height: 1.25;
}

.lb-counter {
  display: block;
  font-size: 0.7rem;
  color: rgba(255,255,255,0.28);
  margin-top: 10px;
  letter-spacing: 0.12em;
}

/* Buttons */
.lb-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 42px;
  height: 42px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 50%;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.3s;
  z-index: 2;
}

.lb-close:hover { background: rgba(255,255,255,0.16); transform: rotate(90deg); }

.lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 50%;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.2s;
  z-index: 2;
}

.lb-prev { left: 16px; }
.lb-next { right: 16px; }
.lb-nav:hover { background: rgba(255,255,255,0.16); }
.lb-prev:hover { transform: translateY(-50%) translateX(-3px); }
.lb-next:hover { transform: translateY(-50%) translateX(3px); }
.lb-nav:disabled { opacity: 0.18; cursor: default; pointer-events: none; }

/* ── CTA Strip ── */
.gp-cta-strip {
  background: var(--white);
  border-top: 1px solid var(--border);
  padding: 56px 0;
}

.gp-cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}

.gp-cta-title {
  font-family: 'Crimson Text', serif;
  font-size: 1.6rem;
  color: var(--navy);
  font-weight: 400;
  margin-bottom: 8px;
}

.gp-cta-text {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.65;
  max-width: 520px;
}

.gp-cta-actions {
  display: flex;
  gap: 12px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.gp-cta-actions .btn-outline {
  border-color: var(--border);
  color: var(--text-body);
}

.gp-cta-actions .btn-outline:hover {
  border-color: var(--green);
  color: var(--green);
}

/* ══════════════════════════════════════
   EXPANDING FEATURED GRID
   Click a cell → it animates to fill the
   whole container (CodePen-style).
   ══════════════════════════════════════ */

.exp-section {
  background: var(--navy);
  padding: 0;           /* flush against hero bottom */
}

/* The grid container — must be position:relative so
   the overlay can be absolutely positioned inside it */
.exp-gallery {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  /* No gap — cells touch each other for a tight mosaic feel */
  gap: 3px;
  background: var(--navy); /* gap colour */
}

/* Each square cell */
.exp-c {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 1;
  background: var(--navy);
}

.exp-c img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 450ms cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.exp-c:hover img,
.exp-c:focus-visible img {
  transform: scale(1.08);
}

.exp-c:focus-visible {
  outline: 3px solid var(--gold-light);
  outline-offset: -3px;
  z-index: 1;
}

/* Expand icon shown on hover */
.exp-c-hover {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 18, 40, 0);
  color: white;
  opacity: 0;
  transition: opacity 0.3s, background 0.3s;
}

.exp-c:hover .exp-c-hover,
.exp-c:focus-visible .exp-c-hover {
  opacity: 1;
  background: rgba(10, 18, 40, 0.35);
}

/* ── The expanding overlay — created by JS ── */
.exp-overlay {
  position: absolute;
  z-index: 20;
  overflow: hidden;
  cursor: pointer;
  background: var(--navy);

  /* Start from the clicked cell's position (set inline by JS) */
  /* Animate position + size with the same cubic-bezier as CodePen */
  transition:
    left   420ms cubic-bezier(0.4, 0, 0.2, 1),
    top    420ms cubic-bezier(0.4, 0, 0.2, 1),
    width  400ms ease,
    height 350ms ease,
    border-radius 350ms ease;
}

/* Expanded state — fills the full container */
.exp-overlay.exp-open {
  left:   0 !important;
  top:    0 !important;
  width:  100% !important;
  height: 100% !important;
  border-radius: 0;
  transition-delay: 0ms; /* no delay on open */
}

.exp-overlay img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Caption bar at the bottom of the expanded overlay */
.exp-overlay-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 32px 28px 28px;
  background: linear-gradient(to top, rgba(10,18,40,0.88) 0%, transparent 100%);
  transform: translateY(100%);
  transition: transform 0.35s var(--ease) 0.3s; /* delayed until expand done */
}

.exp-overlay.exp-open .exp-overlay-caption {
  transform: none;
}

.exp-overlay-label {
  display: block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 6px;
}

.exp-overlay-title {
  font-family: 'Crimson Text', serif;
  font-size: 1.5rem;
  font-weight: 400;
  color: white;
  line-height: 1.2;
}

/* Close button inside the expanded overlay */
.exp-overlay-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  cursor: pointer;
  opacity: 0;
  transform: scale(0.7) rotate(90deg);
  transition: opacity 0.25s var(--ease) 0.32s,
              transform 0.25s var(--ease) 0.32s,
              background 0.18s;
}

.exp-overlay.exp-open .exp-overlay-close {
  opacity: 1;
  transform: none;
}

.exp-overlay-close:hover {
  background: rgba(255,255,255,0.22);
}

/* ── Gallery Page Responsive ── */
@media (max-width: 960px) {
  .gp-hero { padding: 110px 0 56px; }
  .gp-hero-inner { flex-direction: column; align-items: flex-start; gap: 32px; }
  .gp-hero-meta { align-self: flex-start; }
  .gp-cta-inner { flex-direction: column; align-items: flex-start; }
  /* columns: auto-adjusts, no override needed */
}

@media (max-width: 640px) {
  .gp-filter-wrap { top: 76px; }
  /* force 2 cols minimum on narrow phones */
  .gp-masonry { columns: 2 160px; column-gap: 8px; }
  .gp-card { margin-bottom: 8px; }
  .lb-nav { display: none; }
  .lb-stage { gap: 14px; }
  .lb-title { font-size: 1.2rem; }
  .gp-cta-actions { width: 100%; flex-direction: column; }
  .gp-cta-actions .btn-filled,
  .gp-cta-actions .btn-outline { justify-content: center; }
}
