/*
Theme Name: Peña Charitable Foundation
Theme URI: https://penafoundation.org
Author: Peña Foundation
Author URI: https://penafoundation.org
Description: Official WordPress theme for The Peña Charitable Foundation — a dignified, trust-evoking design for a global philanthropic organisation.
Version: 3.0.3
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: pena-foundation
Tags: charity, foundation, nonprofit, philanthropy, dark, elegant
*/

/* ============================================================
   DESIGN TOKENS
   ============================================================ */
:root {
  /* Palette */
  --navy:        #0F1B2D;
  --navy-mid:    #162338;
  --navy-light:  #1E3050;
  --slate:       #4A6A8A;
  --gold:        #C9A84C;
  --gold-light:  #E2C26E;
  --gold-dim:    #A08030;
  --cream:       #F7F4EF;
  --cream-dim:   #EDE8DF;
  --white:       #FFFFFF;
  --text-dark:   #0F1B2D;
  --text-muted:  #6B7A8D;
  --text-light:  #BFCAD7;

  /* Typography */
  --font-display: 'Cormorant Garant', 'Georgia', serif;
  --font-body:    'Inter', 'Helvetica Neue', sans-serif;

  /* Spacing */
  --section-pad:  6rem 0;
  --max-width:    1200px;
  --gutter:       2rem;

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

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background-color: var(--cream);
  color: var(--text-dark);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s var(--ease);
}

ul {
  list-style: none;
}

/* ============================================================
   TYPOGRAPHY SCALE
   ============================================================ */
.display-xl {
  font-family: var(--font-display);
  font-size: clamp(3rem, 6vw, 5.5rem);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.display-lg {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4vw, 3.6rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.015em;
}

.display-md {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 2.5vw, 2.4rem);
  font-weight: 600;
  line-height: 1.25;
}

.eyebrow {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.lead {
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  line-height: 1.8;
  font-weight: 400;
}

/* ============================================================
   LAYOUT UTILITIES
   ============================================================ */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.container--narrow {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section {
  padding: var(--section-pad);
}

.section--dark {
  background-color: var(--navy);
  color: var(--cream);
}

.section--navy-mid {
  background-color: var(--navy-mid);
  color: var(--cream);
}

.section--cream {
  background-color: var(--cream);
  color: var(--text-dark);
}

.section--cream-dim {
  background-color: var(--cream-dim);
  color: var(--text-dark);
}

.text-gold    { color: var(--gold); }
.text-slate   { color: var(--slate); }
.text-muted   { color: var(--text-muted); }
.text-light   { color: var(--text-light); }
.text-center  { text-align: center; }
.text-cream   { color: var(--cream); }
.italic       { font-style: italic; }

/* ============================================================
   GOLD DIVIDER
   ============================================================ */
.gold-rule {
  width: 3rem;
  height: 2px;
  background: var(--gold);
  margin: 1.25rem 0 1.5rem;
}

.gold-rule--center {
  margin: 1.25rem auto 1.5rem;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.85rem 2rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.25s var(--ease);
  text-decoration: none;
}

.btn--gold {
  background: var(--gold);
  color: var(--navy);
  border-color: var(--gold);
}

.btn--gold:hover {
  background: var(--gold-light);
  border-color: var(--gold-light);
  color: var(--navy);
  transform: translateY(-1px);
}

.btn--outline-gold {
  background: transparent;
  color: var(--gold);
  border-color: var(--gold);
}

.btn--outline-gold:hover {
  background: var(--gold);
  color: var(--navy);
}

.btn--outline-cream {
  background: transparent;
  color: var(--cream);
  border-color: var(--cream);
}

.btn--outline-cream:hover {
  background: var(--cream);
  color: var(--navy);
}

/* ============================================================
   SITE HEADER / NAV
   ============================================================ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 0;
  overflow: visible;
  transition: background 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.site-header.scrolled {
  background: rgba(15, 27, 45, 0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(201, 168, 76, 0.15);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 18px 2rem 0;
  height: 118px;
  overflow: visible;
}

/* ── Logo ── */
.site-logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  line-height: 0;
  padding-top: 10px;
  overflow: visible;
}

/* WP custom logo outputs its own <a> — make it inline-flex */
.site-logo a,
.site-logo .custom-logo-link {
  display: inline-flex;
  align-items: center;
  line-height: 0;
  overflow: visible;
}

/*
 * Logo image sizing.
 * WP's the_custom_logo() injects inline width/height attributes on the <img>.
 * We use !important to win that battle. The logo PNG is a wide horizontal
 * image — we set a generous max-height so it's clearly legible in the header,
 * with width auto so it scales proportionally.
 */
.site-logo img,
.site-logo .custom-logo,
.site-logo .custom-logo-link img {
  display: block !important;
  width: auto !important;
  height: auto !important;
  max-height: 100px !important;
  max-width: 320px !important;
  object-fit: contain;
}

/* ── Nav ── */
.site-nav {
  display: flex;
  align-items: center;
  height: 100%;
}

/* The <ul class="site-nav__list"> wp_nav_menu outputs */
ul.site-nav__list {
  display: flex;
  flex-direction: row;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  height: 100%;
}

ul.site-nav__list > li {
  display: flex;
  align-items: center;
  height: 100%;
  margin: 0;
  padding: 0;
}

/* Kill any WP-generated sub-menu dropdowns */
ul.site-nav__list li ul {
  display: none !important;
}

/* Nav links */
ul.site-nav__list > li > a {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 0.9rem;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(247, 244, 239, 0.8);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s;
}

ul.site-nav__list > li > a:hover,
ul.site-nav__list > li.current-menu-item > a,
ul.site-nav__list > li.current-menu-ancestor > a {
  color: var(--gold);
}

/* CTA pill — assign CSS class "nav-cta" to the last menu item in WP Admin > Menus */
ul.site-nav__list > li.nav-cta > a {
  margin-left: 0.4rem;
  padding: 0 1.1rem !important;
  height: 36px !important;
  background: var(--gold);
  color: var(--navy) !important;
  font-weight: 700 !important;
  display: inline-flex !important;
  align-items: center !important;
}

ul.site-nav__list > li.nav-cta > a:hover {
  background: var(--gold-light);
  color: var(--navy) !important;
}

/* ── Hamburger ── */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 0.25rem;
  background: none;
  border: none;
  flex-shrink: 0;
}

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

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

.hero__bg {
  position: absolute;
  inset: 0;
  background-image: url('https://penafoundation.org/wp-content/uploads/2025/06/IMG_5520.jpg');
  background-size: cover;
  background-position: center 30%;
  opacity: 0.18;
}

.hero__gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(15, 27, 45, 0.95) 0%,
    rgba(15, 27, 45, 0.7) 50%,
    rgba(15, 27, 45, 0.85) 100%
  );
}

.hero__content {
  position: relative;
  z-index: 2;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 8rem 2rem 9rem;
}

.hero__label {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.hero__label::before {
  content: '';
  display: block;
  width: 2rem;
  height: 1px;
  background: var(--gold);
}

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(3.2rem, 7vw, 6.5rem);
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: -0.02em;
  color: var(--white);
  max-width: 820px;
  margin-bottom: 1.75rem;
}

.hero__title em {
  font-style: italic;
  color: var(--gold-light);
}

.hero__subtitle {
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  line-height: 1.75;
  color: rgba(247, 244, 239, 0.75);
  max-width: 560px;
  margin-bottom: 2.75rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

.hero__scroll {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: rgba(247, 244, 239, 0.4);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  z-index: 2;
}

.hero__scroll-line {
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, rgba(201, 168, 76, 0.6), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.4; transform: scaleY(1); }
  50% { opacity: 1; transform: scaleY(0.6); }
}

/* ============================================================
   IMPACT STRIP
   ============================================================ */
.impact-strip {
  background: var(--gold);
  padding: 0;
}

.impact-strip__inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  max-width: var(--max-width);
  margin: 0 auto;
}

.impact-stat {
  padding: 2.25rem 2rem;
  text-align: center;
  border-right: 1px solid rgba(15, 27, 45, 0.12);
}

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

.impact-stat__number {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 3.5vw, 3rem);
  font-weight: 700;
  color: var(--navy);
  line-height: 1;
  margin-bottom: 0.35rem;
}

.impact-stat__label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(15, 27, 45, 0.65);
}

/* ============================================================
   MISSION & VISION
   ============================================================ */
.mission-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.mission-block {
  padding: 5rem 3.5rem;
}

.mission-block--mission {
  background: var(--navy);
}

.mission-block--vision {
  background: var(--navy-light);
}

.mission-block__icon {
  width: 2.5rem;
  height: 2.5rem;
  margin-bottom: 1.5rem;
  opacity: 0.6;
}

/* ============================================================
   FOUNDERS SECTION
   ============================================================ */
.founders {
  background: var(--cream);
}

.founders__header {
  text-align: center;
  margin-bottom: 4rem;
}

.founders-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  max-width: 820px;
  margin: 0 auto;
}

.founder-card {
  position: relative;
  overflow: hidden;
}

.founder-card__img-wrap {
  aspect-ratio: 3/4;
  max-width: 340px;
  margin: 0 auto;
  overflow: hidden;
  margin-bottom: 0;
  background: var(--navy-mid);
}

.founder-card__img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.6s var(--ease);
}

.founder-card:hover .founder-card__img-wrap img {
  transform: scale(1.03);
}

.founder-card__body {
  padding: 2rem 0 0;
}

.founder-card__name {
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 0.75rem;
}

.founder-card__bio {
  font-size: 0.9rem;
  line-height: 1.8;
  color: var(--text-muted);
}

/* ============================================================
   WHO WE SUPPORT
   ============================================================ */
.who-we-support {
  background: var(--navy);
}

.who-we-support__header {
  text-align: center;
  margin-bottom: 3.5rem;
}

/* 4 columns so 7 items = 4+3, no orphaned single item */
.charities-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-bottom: 3.5rem;
}

/* Centre a final row of two cards on desktop so the logo cards stay visually balanced. */
@media (min-width: 1025px) {
  .charities-grid .charity-item:nth-last-child(2):nth-child(4n + 1) {
    grid-column: 2;
  }
}

.charity-item {
  background: var(--white);
  border-radius: 2px;
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
  min-height: 160px;
}

.charity-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
}

/* Logos shown at natural colour on white background — no invert */
.charity-item__logo {
  width: 100%;
  max-width: 140px;
  width:140px;
  height:110px;
  object-fit: contain;
  object-position: center;
  /* No filter — logos shown as-is on white card */
  transition: opacity 0.25s;
}

.charity-item:hover .charity-item__logo {
  opacity: 0.85;
}

.charity-item__name {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: center;
  color: var(--navy);
  line-height: 1.4;
}

/* Gallery strip */
.gallery-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.5rem;
  margin-top: 3rem;
}

.gallery-strip__item {
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--navy-light);
}

.gallery-strip__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.75;
  transition: opacity 0.3s, transform 0.4s var(--ease);
}

.gallery-strip__item:hover img {
  opacity: 1;
  transform: scale(1.05);
}

/* ============================================================
   QUOTE SECTION
   ============================================================ */
.quote-section {
  background: var(--navy-mid);
  padding: 7rem 0;
  text-align: center;
}

.quote-section__mark {
  font-family: var(--font-display);
  font-size: 5rem;
  line-height: 0.5;
  color: var(--gold);
  opacity: 0.3;
  display: block;
  margin-bottom: 1.5rem;
}

.quote-section__text {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.4rem);
  font-weight: 500;
  font-style: italic;
  line-height: 1.4;
  color: var(--cream);
  max-width: 820px;
  margin: 0 auto 2rem;
}

.quote-section__attr {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
}

/* ============================================================
   HOW WE HELP SECTION
   ============================================================ */
.how-we-help {
  background: var(--cream-dim);
}

.pillars-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 3.5rem;
}

.pillar-card {
  background: var(--white);
  padding: 2.75rem 2.25rem;
  border-top: 3px solid var(--gold);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.pillar-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(15, 27, 45, 0.1);
}

.pillar-card__icon {
  width: 2.5rem;
  height: 2.5rem;
  margin-bottom: 1.5rem;
  color: var(--gold);
}

.pillar-card__title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 0.75rem;
}

.pillar-card__text {
  font-size: 0.9rem;
  line-height: 1.8;
  color: var(--text-muted);
}

/* ============================================================
   CTA BAND
   ============================================================ */
.cta-band {
  background: var(--navy);
  padding: 5rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-band::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.cta-band__title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 600;
  color: var(--white);
  margin-bottom: 1rem;
}

.cta-band__sub {
  font-size: 1.05rem;
  color: rgba(247, 244, 239, 0.65);
  margin-bottom: 2.5rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

/* ============================================================
   SITE FOOTER
   ============================================================ */
.site-footer {
  background: #080F18;
  color: var(--text-light);
  padding: 4rem 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.footer-brand__logo {
  height: auto;
  width: auto;
  max-height: 110px;
  max-width: 300px;
  display: block;
  margin-bottom: 1.25rem;
}

.footer-brand__tagline {
  font-size: 0.88rem;
  line-height: 1.75;
  color: var(--text-muted);
  max-width: 280px;
}

.footer-col__title {
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.25rem;
}

.footer-col__links {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-col__links a {
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: color 0.2s;
}

.footer-col__links a:hover {
  color: var(--cream);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 0;
  font-size: 0.78rem;
  color: rgba(107, 122, 141, 0.6);
}

.footer-bottom__legal a {
  color: inherit;
}

.footer-bottom__legal a:hover {
  color: var(--text-muted);
}

/* ============================================================
   SKIP LINK (ACCESSIBILITY)
   ============================================================ */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  background: var(--gold);
  color: var(--navy);
  padding: 0.5rem 1rem;
  font-weight: 700;
  font-size: 0.85rem;
  z-index: 9999;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 0;
}

/* ============================================================
   PAGE: WHO WE SUPPORT (inner page)
   ============================================================ */
.page-hero {
  background: var(--navy);
  padding: 10rem 0 5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.support-orgs {
  padding: 5rem 0;
  background: var(--cream);
}

.org-block {
  margin-bottom: 5rem;
  padding-bottom: 5rem;
  border-bottom: 1px solid var(--cream-dim);
}

.org-block:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.org-block__header {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-bottom: 2rem;
}

.org-block__logo {
  width: 120px;
  height: 100px;
  object-fit: contain;
  flex-shrink: 0;
}

.org-block__name {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--navy);
}

.org-block__location {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-dim);
  margin-top: 0.25rem;
}

.org-gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.org-gallery img {
  aspect-ratio: 4/3;
  object-fit: cover;
  width: 100%;
  transition: opacity 0.25s;
}

.org-gallery img:hover {
  opacity: 0.85;
}

/* ============================================================
   PAGE: FOUNDERS (inner page)
   ============================================================ */
.founder-full {
  padding: 5rem 0;
  background: var(--cream);
}

.founder-full__block {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 4rem;
  align-items: start;
  margin-bottom: 5rem;
  padding-bottom: 5rem;
  border-bottom: 1px solid var(--cream-dim);
}

.founder-full__block:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.founder-full__block--reverse {
  grid-template-columns: 1fr 380px;
}

.founder-full__block--reverse .founder-full__img {
  order: 2;
}

.founder-full__block--reverse .founder-full__text {
  order: 1;
}

.founder-full__img img {
  width: 100%;
  aspect-ratio: 3/4;
  max-width: 340px;
  margin: 0 auto;
  object-fit: cover;
  object-position: top;
}

.founder-full__name {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 0.5rem;
}

.founder-full__title {
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold-dim);
  margin-bottom: 1.5rem;
}

.founder-full__bio {
  font-size: 1rem;
  line-height: 1.85;
  color: var(--text-muted);
}

/* ============================================================
   SCROLL FADE-IN ANIMATION
   ============================================================ */
.fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.65s var(--ease), transform 0.65s var(--ease);
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.stagger > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}

.stagger.visible > *:nth-child(1) { transition-delay: 0s;    opacity: 1; transform: translateY(0); }
.stagger.visible > *:nth-child(2) { transition-delay: 0.1s;  opacity: 1; transform: translateY(0); }
.stagger.visible > *:nth-child(3) { transition-delay: 0.2s;  opacity: 1; transform: translateY(0); }
.stagger.visible > *:nth-child(4) { transition-delay: 0.3s;  opacity: 1; transform: translateY(0); }
.stagger.visible > *:nth-child(5) { transition-delay: 0.4s;  opacity: 1; transform: translateY(0); }
.stagger.visible > *:nth-child(6) { transition-delay: 0.5s;  opacity: 1; transform: translateY(0); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .impact-strip__inner {
    grid-template-columns: repeat(2, 1fr);
  }

  .impact-stat:nth-child(2) {
    border-right: none;
  }

  .impact-stat:nth-child(3) {
    border-top: 1px solid rgba(15, 27, 45, 0.12);
  }

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

  .charities-grid {
    grid-template-columns: repeat(3, 1fr);
  }

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

  .gallery-strip {
    grid-template-columns: repeat(3, 1fr);
  }

  .org-gallery {
    grid-template-columns: repeat(3, 1fr);
  }

  .founder-full__block,
  .founder-full__block--reverse {
    grid-template-columns: 1fr;
  }

  .founder-full__block--reverse .founder-full__img,
  .founder-full__block--reverse .founder-full__text {
    order: unset;
  }

  .founder-full__img img {
    aspect-ratio: 16/9;
    object-position: center 25%;
  }
}

@media (max-width: 768px) {
  :root {
    --section-pad: 4rem 0;
    --gutter: 1.25rem;
    --mobile-header-height: 118px;
  }

  html.nav-open,
  body.nav-open {
    overflow: hidden;
    overscroll-behavior: none;
    touch-action: none;
  }

  .site-header {
    background: rgba(15, 27, 45, 0.98);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 10000;
  }

  .site-header.menu-open,
  .site-header.scrolled.menu-open {
    background: rgba(15, 27, 45, 0.99);
    box-shadow: 0 1px 0 rgba(201, 168, 76, 0.18), 0 22px 50px rgba(0, 0, 0, 0.26);
  }

  .site-header__inner {
    position: relative;
    z-index: 10002;
  }

  .site-logo,
  .nav-toggle {
    position: relative;
    z-index: 10004;
  }

  .site-nav {
    display: flex;
    position: fixed;
    top: var(--mobile-header-height, 118px);
    left: 0;
    right: 0;
    bottom: auto;
    width: 100%;
    max-height: calc(100vh - var(--mobile-header-height, 118px));
    max-height: calc(100dvh - var(--mobile-header-height, 118px));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 1rem 1.25rem calc(1.5rem + env(safe-area-inset-bottom));
    background: rgba(15, 27, 45, 0.99);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid rgba(201, 168, 76, 0.18);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.32);
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    z-index: 10001;
    height: auto;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translate3d(0, -12px, 0);
    transition: opacity 0.22s var(--ease), transform 0.22s var(--ease), visibility 0.22s var(--ease);
  }

  .site-nav.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate3d(0, 0, 0);
  }

  ul.site-nav__list {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: min(100%, 420px);
    height: auto;
    gap: 0.4rem;
    margin: 0 auto;
    padding: 0;
  }

  ul.site-nav__list > li {
    display: block;
    height: auto;
    width: 100%;
    justify-content: initial;
  }

  ul.site-nav__list > li > a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 50px;
    height: auto;
    padding: 0.95rem 1rem;
    border: 1px solid rgba(247, 244, 239, 0.08);
    background: rgba(247, 244, 239, 0.035);
    color: rgba(247, 244, 239, 0.92);
    font-size: 0.9rem;
    line-height: 1.25;
    letter-spacing: 0.1em;
    text-align: center;
    white-space: normal;
  }

  ul.site-nav__list > li > a:hover,
  ul.site-nav__list > li.current-menu-item > a,
  ul.site-nav__list > li.current-menu-ancestor > a {
    color: var(--gold);
    border-color: rgba(201, 168, 76, 0.35);
    background: rgba(201, 168, 76, 0.08);
  }

  ul.site-nav__list > li.nav-cta > a {
    margin: 0.45rem 0 0;
    min-height: 50px;
    height: auto !important;
    width: 100%;
    padding: 0.9rem 1rem !important;
    border-color: var(--gold);
    background: var(--gold);
    color: var(--navy) !important;
  }

  .nav-toggle {
    display: flex;
    z-index: 10005;
  }

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

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

  .mission-block {
    padding: 3.5rem 1.5rem;
  }

  .founders-grid {
    grid-template-columns: 1fr;
    max-width: 420px;
  }

  .charities-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

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

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

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }

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

  .org-block__header {
    flex-direction: column;
    align-items: flex-start;
  }
}


@media (max-width: 480px) {
  :root {
    --mobile-header-height: 112px;
  }

  .site-nav {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

@media (max-width: 410px) {
  .impact-strip__inner {
    grid-template-columns: 1fr;
  }

  .impact-stat {
    border-right: none;
    border-bottom: 1px solid rgba(15, 27, 45, 0.12);
  }

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

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

  .hero__actions {
    flex-direction: column;
    align-items: flex-start;
  }

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


/* Mobile gallery rendering fix: stack the home-page image strip so photos stay large and clear. */
@media (max-width: 600px) {
  .gallery-strip {
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-top: 2rem;
  }

  .gallery-strip__item {
    aspect-ratio: 4 / 3;
    width: 100%;
  }

  .gallery-strip__item img {
    opacity: 1;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
  }
}

/* ============================================================
   PRINT
   ============================================================ */
@media print {
  .site-header,
  .hero__scroll,
  .nav-toggle {
    display: none !important;
  }
  
  body {
    font-size: 12pt;
    color: #000;
    background: #fff;
  }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }

  .fade-up,
  .stagger > * {
    opacity: 1 !important;
    transform: none !important;
  }
}

.charities-grid{justify-items:center;}
.charity-item{width:100%;max-width:410px;}

/* ============================================================
   FIX: Who We Support desktop row alignment
   ============================================================ */
.who-we-support .charities-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 1.5rem !important;
  justify-items: stretch !important;
  align-items: stretch !important;
}

.who-we-support .charities-grid .charity-item {
  width: 100% !important;
  max-width: none !important;
}

/* When the last row has exactly two cards, place them under the two middle cards above. */
@media (min-width: 1025px) {
  .who-we-support .charities-grid .charity-item:nth-last-child(2):nth-child(4n + 1) {
    grid-column: 2 !important;
  }
}

@media (max-width: 1024px) {
  .who-we-support .charities-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 768px) {
  .who-we-support .charities-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 520px) {
  .who-we-support .charities-grid {
    grid-template-columns: 1fr !important;
  }
}


/* Strong mobile fix for About/Foundation image collage.
   The original layout uses inline two-column styles, so !important is needed here. */
@media (max-width: 768px) {
  #about .support-intro-grid {
    grid-template-columns: 1fr !important;
    gap: 2.5rem !important;
    align-items: stretch !important;
  }

  #about .support-image-grid {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
    width: 100% !important;
    margin-top: 0 !important;
  }

  #about .support-image-grid img {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    aspect-ratio: 4 / 3 !important;
    object-fit: cover !important;
    object-position: center !important;
    margin-top: 0 !important;
  }
}

@media (max-width: 480px) {
  #about .support-intro-grid {
    gap: 2rem !important;
  }

  #about .support-image-grid img {
    aspect-ratio: 1 / 1 !important;
  }
}

/* ============================================================
   FIX: Founders page mobile image cropping
   ============================================================
   The previous responsive rule forced the Dan and Sally portraits into
   a wide 16:9 crop on tablet/mobile. Let the images keep their natural
   proportions on smaller screens so faces and full portraits are not cut.
*/
@media (max-width: 1024px) {
  .founder-full__img {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    margin-bottom: 1.75rem;
  }

  .founder-full__img img {
    display: block !important;
    width: min(100%, 340px) !important;
    max-width: 340px !important;
    height: auto !important;
    aspect-ratio: auto !important;
    object-fit: contain !important;
    object-position: center top !important;
  }
}

@media (max-width: 768px) {
  .founder-full {
    padding: 4rem 0;
  }

  .founder-full__block,
  .founder-full__block--reverse {
    gap: 2rem;
    margin-bottom: 4rem;
    padding-bottom: 4rem;
  }

  .founder-full__block--reverse .founder-full__img,
  .founder-full__block--reverse .founder-full__text {
    order: unset !important;
  }

  .founders-together-grid {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
  }

  .founders-together-image {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    aspect-ratio: auto !important;
    object-fit: contain !important;
    object-position: center top !important;
  }
}

@media (max-width: 480px) {
  .founder-full__img img {
    width: min(100%, 300px) !important;
    max-width: 300px !important;
  }
}
