/*
Theme Name: MyPragati
Theme URI: https://mypragati.in
Author: MyPragati
Author URI: https://mypragati.in
Description: A warm, earthy fundraising theme for MyPragati — a community-driven child education initiative in the Eastern Himalayas. Single-page landing focused on storytelling and donations.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: mypragati
Tags: nonprofit, fundraising, education, one-page, custom-menu, custom-logo, featured-images
*/

/* ========================
   Design tokens
   ======================== */
:root {
  --background: #fbf6ee;
  --foreground: #2b1f12;
  --muted: #f0e6d2;
  --muted-foreground: #6b5a45;
  --card: #ffffff;
  --card-border: #e8dcc4;
  --border: #e2d4b8;
  --primary: #c2410c;        /* terracotta */
  --primary-foreground: #ffffff;
  --secondary: #4d6b3a;      /* moss green */
  --accent: #d99a2b;         /* soft saffron */
  --ring: #c2410c;
  --radius: 12px;

  --font-serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-sans: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ========================
   Reset & base
   ======================== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--background);
  color: var(--foreground);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: 0; background: transparent; color: inherit; }
input { font-family: inherit; }
::selection { background: rgba(194, 65, 12, 0.18); color: var(--primary); }

h1, h2, h3, h4 { font-family: var(--font-serif); font-weight: 500; line-height: 1.15; margin: 0; color: var(--foreground); }

/* ========================
   Layout helpers
   ======================== */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.container-wide { max-width: 1400px; margin: 0 auto; padding: 0 1.5rem; }
.section { padding: 6rem 1.5rem; }
.section-lg { padding: 8rem 1.5rem; }
.text-center { text-align: center; }

/* ========================
   Buttons
   ======================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.75rem 1.5rem;
  border-radius: 9999px;
  background: var(--primary);
  color: var(--primary-foreground);
  border: 1px solid var(--primary);
  transition: all 0.2s ease;
  white-space: nowrap;
}
.btn:hover { background: #a3360a; border-color: #a3360a; box-shadow: 0 8px 16px -8px rgba(194,65,12,0.5); transform: translateY(-1px); }
.btn-lg { font-size: 1.05rem; padding: 1rem 2rem; height: 3.5rem; }
.btn-outline {
  background: transparent;
  color: var(--foreground);
  border-color: var(--border);
}
.btn-outline:hover { background: var(--muted); border-color: var(--muted-foreground); transform: none; box-shadow: none; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }

/* ========================
   Form inputs
   ======================== */
.input {
  width: 100%;
  height: 3rem;
  padding: 0 1rem;
  font-size: 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
  color: var(--foreground);
  transition: border 0.2s, box-shadow 0.2s;
}
.input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(194,65,12,0.15);
}
.label { display: block; font-size: 0.875rem; font-weight: 500; margin-bottom: 0.5rem; color: var(--foreground); }

/* ========================
   Navigation
   ======================== */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 2rem;
  background: rgba(251, 246, 238, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(226, 212, 184, 0.5);
}
.site-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
}
.site-brand svg { color: var(--primary); }
.site-menu {
  display: none;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.9rem;
  font-weight: 500;
}
.site-menu a { color: rgba(43, 31, 18, 0.7); transition: color 0.2s; }
.site-menu a:hover, .site-menu .current-menu-item > a { color: var(--primary); }
@media (min-width: 768px) { .site-menu { display: flex; } }

/* Mobile menu toggle */
.menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem; height: 2.5rem;
  border-radius: 8px;
  margin-right: 0.5rem;
}
.menu-toggle:hover { background: var(--muted); }
@media (min-width: 768px) { .menu-toggle { display: none; } }

.mobile-menu {
  display: none;
  position: fixed;
  top: 70px; left: 0; right: 0;
  background: var(--background);
  border-bottom: 1px solid var(--border);
  padding: 1rem 2rem;
  z-index: 49;
  box-shadow: 0 8px 24px -12px rgba(0,0,0,0.1);
}
.mobile-menu.is-open { display: block; }
.mobile-menu ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.mobile-menu a { display: block; padding: 0.75rem 0; font-weight: 500; }

/* ========================
   Hero
   ======================== */
.hero {
  position: relative;
  min-height: 95vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding-top: 5rem;
}
.hero-bg {
  position: absolute; inset: 0;
  z-index: 0;
}
.hero-bg img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.hero-bg::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(to top, var(--background) 0%, rgba(251,246,238,0.6) 60%, rgba(0,0,0,0.2) 100%);
}
.hero-content {
  position: relative;
  z-index: 1;
  max-width: 64rem;
  margin: 0 auto;
  padding: 0 1.5rem;
  text-align: center;
}
.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(255,255,255,0.8);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(226, 212, 184, 0.5);
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--primary);
  margin-bottom: 2rem;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.hero h1 {
  font-size: clamp(2.5rem, 7vw, 6rem);
  margin-bottom: 1.5rem;
}
.hero-lead {
  font-size: clamp(1rem, 2vw, 1.25rem);
  max-width: 36rem;
  margin: 0 auto 2.5rem;
  color: rgba(43, 31, 18, 0.8);
  font-weight: 500;
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  align-items: center;
}
.hero-cta .btn-lg { box-shadow: 0 12px 24px -8px rgba(194,65,12,0.4); }
.hero-link {
  display: inline-flex;
  align-items: center;
  height: 3.5rem;
  padding: 0 1.5rem;
  font-weight: 500;
  color: rgba(43, 31, 18, 0.7);
  transition: color 0.2s;
}
.hero-link:hover { color: var(--foreground); }

/* ========================
   Story section
   ======================== */
.story-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4rem;
  align-items: center;
}
@media (min-width: 768px) {
  .story-grid { grid-template-columns: 1fr 1fr; gap: 6rem; }
}
.story-image-wrap { position: relative; }
.story-image-main {
  aspect-ratio: 3/4;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
}
.story-image-main img { width: 100%; height: 100%; object-fit: cover; }
.story-image-accent {
  display: none;
  position: absolute;
  bottom: -2rem; right: -2rem;
  width: 12rem; aspect-ratio: 1/1;
  border-radius: 16px;
  overflow: hidden;
  border: 8px solid var(--background);
  box-shadow: 0 20px 40px -10px rgba(0,0,0,0.2);
}
@media (min-width: 768px) { .story-image-accent { display: block; } }
.story-image-accent img { width: 100%; height: 100%; object-fit: cover; }
.story-text h2 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 2rem; }
.story-text p { color: var(--muted-foreground); font-size: 1.05rem; margin: 0 0 1.5rem; line-height: 1.7; }
.story-text p.emphasis { color: var(--foreground); font-weight: 500; }

/* ========================
   Stats / Impact
   ======================== */
.stats-section {
  padding: 5rem 1.5rem;
  background: var(--card);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  scroll-margin-top: 6rem;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  text-align: center;
}
@media (min-width: 768px) { .stats-grid { grid-template-columns: repeat(4, 1fr); gap: 3rem; } }
.stat-num {
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 5vw, 3.75rem);
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.75rem;
}
.stat-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted-foreground);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ========================
   Quote section
   ======================== */
.quote-section { position: relative; overflow: hidden; }
.quote-icon { color: rgba(107, 90, 69, 0.3); margin: 0 auto 2rem; display: block; }
.quote-text {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  line-height: 1.4;
  margin-bottom: 2.5rem;
}
.quote-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}
.quote-divider .line { width: 3rem; height: 1px; background: var(--border); }
.quote-divider p {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted-foreground);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin: 0;
}
.quote-section .quote-foot {
  margin-top: 2rem;
  color: var(--muted-foreground);
  max-width: 36rem;
  margin-left: auto;
  margin-right: auto;
}

/* ========================
   Transparency / Pillars
   ======================== */
.transparency-section {
  background: var(--card);
  border-top: 1px solid var(--border);
  scroll-margin-top: 6rem;
}
.transparency-section .section-head { text-align: center; margin-bottom: 4rem; }
.transparency-section h2 { font-size: clamp(2rem, 4vw, 2.5rem); margin-bottom: 1rem; }
.transparency-section .section-head p { color: var(--muted-foreground); max-width: 36rem; margin: 0 auto; }

.pillars { display: grid; grid-template-columns: 1fr; gap: 2rem; }
@media (min-width: 768px) { .pillars { grid-template-columns: repeat(3, 1fr); } }
.pillar-card {
  background: var(--background);
  padding: 2rem;
  border-radius: 16px;
  border: 1px solid var(--border);
  transition: box-shadow 0.3s;
}
.pillar-card:hover { box-shadow: 0 8px 24px -10px rgba(0,0,0,0.1); }
.pillar-icon {
  width: 3rem; height: 3rem;
  background: rgba(194, 65, 12, 0.1);
  color: var(--primary);
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}
.pillar-card h3 { font-family: var(--font-sans); font-size: 1.25rem; font-weight: 700; margin-bottom: 0.75rem; }
.pillar-card p { color: var(--muted-foreground); margin: 0; line-height: 1.7; }
.transparency-cta { text-align: center; margin-top: 4rem; }

/* ========================
   Gallery
   ======================== */
.gallery-section { padding: 0.5rem 0; scroll-margin-top: 6rem; }
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
}
@media (min-width: 768px) { .gallery-grid { grid-template-columns: repeat(6, 1fr); } }
.gallery-item {
  aspect-ratio: 1/1;
  overflow: hidden;
  background: var(--muted);
}
.gallery-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.7s ease;
}
.gallery-item:hover img { transform: scale(1.05); }

/* ========================
   Footer
   ======================== */
.site-footer {
  background: var(--foreground);
  color: var(--background);
  padding: 5rem 1.5rem 3rem;
  scroll-margin-top: 6rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem 4rem;
  max-width: 1200px;
  margin: 0 auto;
}
@media (min-width: 640px)  { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 960px)  { .footer-grid { grid-template-columns: 1.6fr 1fr 1fr; } }
.footer-brand { font-family: var(--font-serif); font-size: 1.875rem; font-weight: 700; display: flex; align-items: center; gap: 0.5rem; margin-bottom: 1.5rem; }
.footer-brand svg { color: var(--primary); }
.footer-tagline { color: rgba(251,246,238, 0.7); margin-bottom: 2rem; max-width: 24rem; line-height: 1.6; }
.footer-info { display: flex; flex-direction: column; gap: 0.75rem; color: rgba(251,246,238, 0.8); }
.footer-info > div { display: flex; align-items: center; gap: 0.75rem; }
.footer-info svg { color: var(--primary); flex-shrink: 0; }
.footer-info a:hover { color: var(--primary); }

/* Footer link columns */
.footer-col-title {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(251,246,238,0.42);
  margin: 0 0 1rem;
}
.footer-link-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.footer-link-list a {
  color: rgba(251,246,238, 0.68);
  font-size: 0.9rem;
  transition: color 0.2s;
}
.footer-link-list a:hover { color: var(--accent); }

.footer-bottom {
  max-width: 1200px;
  margin: 5rem auto 0;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255, 0.1);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  font-size: 0.875rem;
  color: rgba(251,246,238, 0.4);
}
@media (min-width: 768px) { .footer-bottom { flex-direction: row; } }
.footer-bottom .values { display: flex; gap: 1.5rem; }
.footer-bottom .values span:hover { color: white; cursor: default; }

/* ========================
   Donation modal
   ======================== */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.55);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 1rem;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.modal-overlay.is-open { display: flex; opacity: 1; }
.modal {
  background: var(--card);
  border-radius: 16px;
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px -12px rgba(0,0,0,0.4);
  border: 1px solid var(--card-border);
  transform: translateY(8px);
  transition: transform 0.25s ease;
}
.modal-overlay.is-open .modal { transform: translateY(0); }
.modal-head {
  background: rgba(194, 65, 12, 0.05);
  padding: 1.5rem;
  border-bottom: 1px solid rgba(194, 65, 12, 0.1);
}
.modal-head h3 {
  font-size: 1.5rem;
  display: flex; align-items: center; gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.modal-head h3 svg { color: var(--primary); fill: var(--primary); }
.modal-head p { color: var(--muted-foreground); margin: 0; }
.modal-body { padding: 1.5rem; }

.tier { display: block; width: 100%; text-align: left; padding: 1rem; border: 1px solid var(--border); border-radius: 12px; background: var(--card); transition: all 0.2s; margin-bottom: 1rem; }
.tier:hover { border-color: rgba(194, 65, 12, 0.4); background: var(--muted); }
.tier.is-selected { border-color: var(--primary); background: rgba(194,65,12,0.05); box-shadow: 0 1px 2px rgba(0,0,0,0.05); }
.tier-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.25rem; }
.tier-amount { font-weight: 700; font-size: 1.125rem; display: inline-flex; align-items: center; }
.tier-label { font-size: 0.875rem; font-weight: 500; color: var(--primary); }
.tier-desc { font-size: 0.875rem; color: var(--muted-foreground); margin: 0; line-height: 1.6; }

.divider-or {
  position: relative;
  text-align: center;
  margin: 1rem 0;
}
.divider-or::before {
  content: "";
  position: absolute; top: 50%; left: 0; right: 0;
  height: 1px;
  background: var(--border);
}
.divider-or span {
  position: relative;
  background: var(--card);
  padding: 0 0.75rem;
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--muted-foreground);
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

.input-with-icon { position: relative; }
.input-with-icon svg {
  position: absolute; left: 0.75rem; top: 50%; transform: translateY(-50%);
  color: var(--muted-foreground);
  pointer-events: none;
}
.input-with-icon .input { padding-left: 2.5rem; height: 3rem; font-size: 1.05rem; font-weight: 500; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-group { margin-bottom: 1rem; }
.form-help { font-size: 0.75rem; color: var(--muted-foreground); margin: 0.5rem 0 0; }
.modal-actions { display: flex; gap: 0.75rem; padding-top: 1rem; }
.modal-actions .btn-back { width: 33%; }
.modal-actions .btn-confirm { width: 67%; }

.success {
  text-align: center;
  padding: 2.5rem 2rem;
}
.success-icon {
  width: 5rem; height: 5rem;
  background: rgba(194, 65, 12, 0.1);
  border-radius: 9999px;
  display: inline-flex;
  align-items: center; justify-content: center;
  color: var(--primary);
  margin-bottom: 1rem;
}
.success h3 { font-size: 2rem; margin-bottom: 0.75rem; }
.success-lead { color: var(--muted-foreground); margin: 0 auto 1.5rem; max-width: 22rem; line-height: 1.6; font-size: 1.05rem; }
.success-receipt {
  background: rgba(240, 230, 210, 0.4);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
  text-align: left;
  font-size: 0.875rem;
  color: var(--muted-foreground);
  max-width: 22rem;
  margin: 0 auto 1.5rem;
}
.success-receipt p { margin: 0; }
.success-receipt p + p { margin-top: 0.25rem; }

/* ========================
   Toast
   ======================== */
.toast-wrap {
  position: fixed;
  bottom: 1.5rem; right: 1.5rem;
  z-index: 200;
  display: flex; flex-direction: column; gap: 0.5rem;
  pointer-events: none;
}
.toast {
  background: var(--foreground);
  color: var(--background);
  padding: 1rem 1.25rem;
  border-radius: 12px;
  box-shadow: 0 12px 24px -8px rgba(0,0,0,0.3);
  max-width: 22rem;
  font-size: 0.9rem;
  line-height: 1.4;
  pointer-events: auto;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.25s, transform 0.25s;
}
.toast.is-open { opacity: 1; transform: translateY(0); }
.toast strong { display: block; margin-bottom: 0.25rem; font-weight: 600; }

/* ========================
   Reveal animation
   ======================== */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.8s ease, transform 0.8s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ========================
   Utilities
   ======================== */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* ==========================================================
   VISUAL UPGRADE — decorative layers, ornaments, patterns
   ========================================================== */

/* Subtle paper-grain texture across the whole page */
body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.35;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.7  0 0 0 0 0.55  0 0 0 0 0.3  0 0 0 0.08 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  mix-blend-mode: multiply;
}
.site-nav, .site-footer, .modal-overlay, .toast-wrap, .mobile-menu { z-index: 50; }

/* Prayer-flag bunting decoration */
.prayer-flags {
  position: relative;
  height: 78px;
  pointer-events: none;
  overflow: hidden;
}
.prayer-flags svg { width: 100%; height: 100%; display: block; }
.prayer-flags--top { margin-bottom: -1px; }
.prayer-flags--bottom { margin-top: -1px; transform: scaleY(-1); }

/* Mountain silhouette dividers */
.mountain-divider {
  display: block;
  width: 100%;
  height: 90px;
  color: var(--card);
}
.mountain-divider svg { width: 100%; height: 100%; display: block; }
.mountain-divider--inverse { color: var(--background); }

/* Section eyebrow tag */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--primary);
  background: rgba(194, 65, 12, 0.08);
  padding: 0.4rem 0.9rem;
  border-radius: 9999px;
  margin-bottom: 1.25rem;
}
.eyebrow::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 4px rgba(194, 65, 12, 0.18);
}

/* Hero — extra ornaments */
.hero { padding-top: 6.5rem; }
.hero-bg::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(70% 50% at 50% 100%, rgba(251,246,238,1) 0%, rgba(251,246,238,0) 60%),
    radial-gradient(40% 35% at 15% 30%, rgba(217, 154, 43, 0.18), transparent 70%),
    radial-gradient(40% 35% at 85% 25%, rgba(77, 107, 58, 0.18), transparent 70%);
  z-index: 1;
}
.hero-bg img { transform: scale(1.05); }
.hero-content { padding-top: 1rem; }
.hero h1 .accent {
  display: inline-block;
  position: relative;
  color: var(--primary);
  font-style: italic;
}
.hero h1 .accent::after {
  content: "";
  position: absolute;
  left: 4%; right: 4%; bottom: 6%;
  height: 0.35em;
  z-index: -1;
  border-radius: 4px;
  transform: skewX(-8deg);
}
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1.5rem 2.25rem;
  margin-top: 3rem;
  color: rgba(43, 31, 18, 0.7);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.04em;
}
.hero-meta strong {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.6rem;
  color: var(--primary);
  font-weight: 700;
  line-height: 1;
  margin-bottom: 0.2rem;
}
.hero-meta .sep { width: 1px; height: 28px; background: rgba(43,31,18,0.18); }

.scroll-cue {
  position: absolute;
  bottom: 1.75rem; left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  color: rgba(43,31,18,0.6);
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
}
.scroll-cue::after {
  content: "";
  width: 1px; height: 36px;
  background: linear-gradient(to bottom, currentColor, transparent);
  animation: cue 1.8s ease-in-out infinite;
}
@keyframes cue {
  0%, 100% { opacity: 0.3; transform: scaleY(0.6); }
  50% { opacity: 1; transform: scaleY(1); }
}

/* Story — polaroid stack */
.story-image-wrap { padding: 1rem; }
.story-image-main {
  position: relative;
  border: 10px solid #fff;
  border-radius: 6px;
  box-shadow: 0 30px 60px -20px rgba(0,0,0,0.35);
  transform: rotate(-2deg);
  transition: transform 0.5s ease;
}
.story-image-wrap:hover .story-image-main { transform: rotate(0deg); }
.story-image-main::after {
  content: "";
  position: absolute; inset: -6px;
  border: 1px dashed rgba(194, 65, 12, 0.25);
  border-radius: 8px;
  pointer-events: none;
}
.story-image-accent {
  border: 8px solid #fff;
  transform: rotate(5deg);
  width: 13rem;
  bottom: -1rem; right: -1.5rem;
  transition: transform 0.5s ease;
}
.story-image-wrap:hover .story-image-accent { transform: rotate(-1deg); }
.story-image-tape {
  display: none;
  position: absolute;
  top: -10px; left: 50%;
  transform: translateX(-50%) rotate(-3deg);
  width: 90px; height: 24px;
  background: rgba(217, 154, 43, 0.55);
  box-shadow: 0 4px 8px -3px rgba(0,0,0,0.15);
  z-index: 2;
}
@media (min-width: 768px) { .story-image-tape { display: block; } }

/* Sticker badge */
.sticker {
  position: absolute;
  top: -1.5rem; left: -1.5rem;
  width: 96px; height: 96px;
  border-radius: 50%;
  background: var(--accent);
  color: #2b1f12;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.1;
  box-shadow: 0 12px 24px -10px rgba(0,0,0,0.35);
  transform: rotate(-12deg);
  z-index: 3;
}
.sticker::before {
  content: "";
  position: absolute; inset: 6px;
  border: 1px dashed rgba(43,31,18,0.5);
  border-radius: 50%;
}

/* Stats — circles + decoration */
.stats-section { position: relative; }
.stats-section::before, .stats-section::after {
  content: "";
  position: absolute;
  width: 240px; height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(217,154,43,0.18), transparent 70%);
  pointer-events: none;
}
.stats-section::before { top: 0px; left: 0px; }
.stats-section::after { bottom: 0px; right: 0px; background: radial-gradient(circle, rgba(77,107,58,0.18), transparent 70%); }
.stats-grid > div {
  position: relative;
  padding: 1.5rem 1rem;
}
.stats-grid > div:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 25%; bottom: 25%;
  right: -1.5rem;
  width: 1px;
  background: var(--border);
  display: none;
}
@media (min-width: 768px) { .stats-grid > div:not(:last-child)::after { display: block; } }
.stat-num {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat-bullet {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(194,65,12,0.1);
  color: var(--primary);
  margin-bottom: 1rem;
}

/* Quote — decorative quotes */
.quote-section {
  background:
    radial-gradient(60% 50% at 50% 0%, rgba(217,154,43,0.12), transparent 70%),
    var(--background);
}
.quote-text { position: relative; padding: 0 2rem; }
.quote-text::before, .quote-text::after {
  position: absolute;
  font-family: var(--font-serif);
  font-style: normal;
  font-size: 7rem;
  line-height: 1;
  color: rgba(194,65,12,0.18);
}
.quote-text::before { content: "\201C"; top: -2.5rem; left: -1rem; }
.quote-text::after { content: "\201D"; bottom: -4.5rem; right: -1rem; }

/* Pillars — richer cards */
.pillar-card {
  position: relative;
  overflow: hidden;
}
.pillar-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 60%, rgba(194,65,12,0.05));
  pointer-events: none;
}
.pillar-card::after {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 4px; height: 0;
  background: var(--primary);
  transition: height 0.4s ease;
}
.pillar-card:hover::after { height: 100%; }
.pillar-num {
  font-family: var(--font-serif);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--accent);
  margin-bottom: 0.5rem;
  display: block;
}

/* Allocation bars */
.allocation {
  margin-top: 4rem;
  display: grid;
  gap: 1.25rem;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}
.allocation-row { font-size: 0.9rem; }
.allocation-row .top {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.4rem;
  font-weight: 600;
  color: var(--foreground);
}
.allocation-row .bar {
  height: 10px;
  background: var(--muted);
  border-radius: 9999px;
  overflow: hidden;
  position: relative;
}
.allocation-row .fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 9999px;
  width: 0;
  transition: width 1.6s cubic-bezier(.2,.8,.2,1);
}
.allocation-row.is-visible .fill { width: var(--w, 0%); }
.allocation-row.moss .fill { background: linear-gradient(90deg, var(--secondary), #7a9c5a); }
.allocation-row.saffron .fill { background: linear-gradient(90deg, var(--accent), #f1c45a); }

/* Gallery — masonry-style grid */
@media (min-width: 768px) {
  .gallery-grid {
    grid-template-columns: repeat(6, 1fr);
    grid-auto-rows: 180px;
    gap: 0.75rem;
  }
  .gallery-item { aspect-ratio: auto; border-radius: 6px; }
  .gallery-item:nth-child(1) { grid-column: span 3; grid-row: span 2; }
  .gallery-item:nth-child(2) { grid-column: span 2; }
  .gallery-item:nth-child(3) { grid-column: span 1; grid-row: span 2; }
  .gallery-item:nth-child(4) { grid-column: span 2; }
  .gallery-item:nth-child(5) { grid-column: span 2; }
  .gallery-item:nth-child(6) { grid-column: span 3; }
}
.gallery-item {
  position: relative;
  border-radius: 6px;
  overflow: hidden;
}
.gallery-item::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(43,31,18,0.55), transparent 50%);
  opacity: 0;
  transition: opacity 0.4s;
}
.gallery-item:hover::after { opacity: 1; }
.gallery-caption {
  position: absolute;
  bottom: 0.75rem; left: 1rem; right: 1rem;
  color: #fff;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.95rem;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s, transform 0.4s;
  z-index: 2;
}
.gallery-item:hover .gallery-caption { opacity: 1; transform: translateY(0); }

.gallery-section { position: relative; }
.gallery-header {
  text-align: center;
  padding: 5rem 1.5rem 3rem;
  max-width: 640px;
  margin: 0 auto;
}
.gallery-header h2 { font-size: clamp(2rem, 4vw, 2.5rem); margin-bottom: 1rem; }
.gallery-header p { color: var(--muted-foreground); margin: 0; }

/* CTA banner above footer */
.cta-banner {
  position: relative;
  padding: 5rem 1.5rem;
  background:
    linear-gradient(135deg, rgba(43,31,18,0.85), rgba(43,31,18,0.65)),
    url("") center/cover;
  color: var(--background);
  overflow: hidden;
}
.cta-banner .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}
.cta-banner h2 {
  color: var(--background);
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  max-width: 36rem;
  margin: 0;
}
.cta-banner p { margin: 0.75rem 0 0; color: rgba(251,246,238,0.75); max-width: 36rem; }
.cta-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='60' height='60' viewBox='0 0 60 60'><path d='M0 30 L15 12 L30 30 L45 8 L60 30' fill='none' stroke='rgba(255,255,255,0.06)' stroke-width='1.5'/></svg>");
  opacity: 0.6;
  pointer-events: none;
}

/* Footer enhancements */
.site-footer { position: relative; }
.site-footer::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 6px;
  background: linear-gradient(90deg,
    #c2410c 0%, #c2410c 20%,
    #ffffff 20%, #ffffff 40%,
    #4d6b3a 40%, #4d6b3a 60%,
    #d99a2b 60%, #d99a2b 80%,
    #1e40af 80%, #1e40af 100%);
  opacity: 0.85;
}
.values { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.values span {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.35rem 0.8rem;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 9999px;
}


/* ==========================================================
   NESTED MENUS (depth=2 dropdowns)
   ========================================================== */

/* Desktop: site menu items become dropdown anchors */
.site-menu { position: relative; align-items: center; }
.site-menu li { position: relative; }
.site-menu li > a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 0;
  white-space: nowrap;
}
.site-menu .menu-item-has-children > a::after {
  content: "";
  display: inline-block;
  width: 0; height: 0;
  margin-left: 0.25rem;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 4px solid currentColor;
  opacity: 0.6;
  transition: transform 0.2s;
}
.site-menu .menu-item-has-children:hover > a::after,
.site-menu .menu-item-has-children:focus-within > a::after { transform: rotate(180deg); }

/* Submenu: hidden dropdown */
.site-menu .sub-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translate(-50%, 8px);
  min-width: 220px;
  margin: 0;
  padding: 0.5rem;
  list-style: none;
  background: #fff;
  border: 1px solid var(--card-border);
  border-radius: 12px;
  box-shadow: 0 16px 40px -12px rgba(0,0,0,0.18);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
  z-index: 60;
}
.site-menu .sub-menu::before {
  content: "";
  position: absolute;
  top: -6px; left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 12px; height: 12px;
  background: #fff;
  border-top: 1px solid var(--card-border);
  border-left: 1px solid var(--card-border);
}
.site-menu li:hover > .sub-menu,
.site-menu li:focus-within > .sub-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(-50%, 0);
}
.site-menu .sub-menu li { width: 100%; }
.site-menu .sub-menu a {
  display: block;
  padding: 0.6rem 0.85rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  color: rgba(43,31,18,0.8);
  white-space: nowrap;
}
.site-menu .sub-menu a:hover,
.site-menu .sub-menu .current-menu-item > a {
  background: var(--muted);
  color: var(--primary);
}

/* Hover-bridge so the dropdown stays open while moving cursor down */
.site-menu .menu-item-has-children::before {
  content: "";
  position: absolute;
  left: 0; right: 0;
  top: 100%;
  height: 12px;
}

/* Mobile menu nested */
.mobile-menu ul,
.mobile-menu .mobile-menu-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.mobile-menu .sub-menu {
  list-style: none;
  margin: 0 0 0.5rem 0;
  padding: 0 0 0.25rem 1rem;
  border-left: 2px solid var(--border);
}
.mobile-menu .sub-menu a {
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--muted-foreground);
  padding: 0.5rem 0;
}
.mobile-menu .menu-item-has-children > a::after {
  content: " \203A";
  color: var(--primary);
  margin-left: 0.25rem;
}

/* ==========================================================
   INNER PAGES (page.php, single.php, index.php, 404.php)
   ========================================================== */
.inner-page {
  padding: 8rem 0 5rem;
  min-height: 70vh;
}
.single-post .inner-page {
  padding: 0 0 5rem;
}
.inner-container { max-width: 1200px; }
.inner-header { margin-bottom: 2.5rem; text-align: center; }
.single-post .inner-header {text-align: left;}
.inner-title {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(2rem, 5vw, 3.25rem);
  line-height: 1.15;
  margin: 0.5rem 0;
}
.inner-meta {
  font-size: 0.85rem;
  color: var(--muted-foreground);
  letter-spacing: 0.05em;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.inner-meta .dot { opacity: 0.5; }
.inner-thumb {
  margin: 0 0 2.5rem;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 25px 50px -18px rgba(0,0,0,0.25);
}
.inner-thumb img { width: 100%; height: auto; display: block; }
.inner-content {
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--foreground);
}
.inner-content > * + * { margin-top: 1.25rem; }
.inner-content h1, .inner-content h2, .inner-content h3,
.inner-content h4, .inner-content h5, .inner-content h6 {
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  line-height: 1.2;
}
.inner-content h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
.inner-content h3 { font-size: 1.35rem; }
.inner-content a { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }
.inner-content a:hover { color: #a3360a; }
.inner-content ul, .inner-content ol { padding-left: 1.4rem; }
.inner-content li + li { margin-top: 0.4rem; }
.inner-content blockquote {
  margin: 2rem 0;
  padding: 1rem 1.5rem;
  border-left: 4px solid var(--primary);
  background: var(--muted);
  border-radius: 0 10px 10px 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--foreground);
}
.inner-content img { border-radius: 10px; margin: 1.5rem auto; }
.inner-content figure { margin: 2rem 0; }
.inner-content figcaption { font-size: 0.85rem; color: var(--muted-foreground); text-align: center; margin-top: 0.5rem; }
.inner-content pre {
  background: #2b1f12;
  color: #fbf6ee;
  padding: 1rem 1.25rem;
  border-radius: 10px;
  overflow-x: auto;
  font-size: 0.9rem;
}
.inner-content code {
  background: var(--muted);
  padding: 0.1em 0.4em;
  border-radius: 4px;
  font-size: 0.92em;
}
.inner-content pre code { background: transparent; padding: 0; }
.inner-content table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; }
.inner-content th, .inner-content td { padding: 0.65rem 0.85rem; border: 1px solid var(--border); text-align: left; }
.inner-content th { background: var(--muted); font-weight: 600; }
.inner-footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--muted-foreground);
}
.inner-tags { margin-top: 0.5rem; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.inner-tags a {
  background: var(--muted);
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  font-size: 0.78rem;
  color: var(--muted-foreground);
}
.inner-tags a:hover { background: var(--primary); color: #fff; }

/* Blog post list */
.post-list { display: grid; gap: 2.5rem; }
.post-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  overflow: hidden;
  transition: box-shadow 0.3s, transform 0.3s;
}
#sb_instagram{padding-top: 2.5rem;}
@media (min-width: 640px) {
  .post-card { grid-template-columns: 50% 1fr; }
}
.post-card:hover { box-shadow: 0 20px 40px -20px rgba(0,0,0,0.18); transform: translateY(-2px); }
.post-card-thumb { display: block; overflow: hidden; background: var(--muted); }
.post-card-thumb img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4/3; }
.post-card-body { padding: 1.25rem 1.5rem 1.5rem; display: flex; flex-direction: column; gap: 0.6rem; }
.post-card-title { font-family: var(--font-serif); font-size: 1.4rem; line-height: 1.25; margin: 0.25rem 0 0; }
.post-card-title a:hover { color: var(--primary); }
.post-card-excerpt { color: var(--muted-foreground); font-size: 0.95rem; line-height: 1.6; }
.post-card .btn { align-self: flex-start; padding: 0.6rem 1.1rem; font-size: 0.85rem; }

.pagination {
  margin-top: 3rem;
  display: flex;
  justify-content: center;
}
.pagination .nav-links { display: inline-flex; flex-wrap: wrap; gap: 0.4rem; }
.pagination a, .pagination .current {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px; height: 40px;
  padding: 0 0.85rem;
  border-radius: 9999px;
  border: 1px solid var(--border);
  background: var(--card);
  font-weight: 500;
  font-size: 0.9rem;
}
.pagination a:hover { border-color: var(--primary); color: var(--primary); }
.pagination .current { background: var(--primary); color: #fff; border-color: var(--primary); }

.no-results { text-align: center; padding: 3rem 0; color: var(--muted-foreground); }
.no-results h2 { font-family: var(--font-serif); margin-bottom: 0.5rem; color: var(--foreground); }

/* Search form */
.search-form { display: flex; gap: 0.5rem; max-width: 480px; margin: 1.5rem auto 0; }
.search-form input[type="search"] {
  flex: 1;
  height: 3rem;
  padding: 0 1rem;
  border: 1px solid var(--border);
  border-radius: 9999px;
  background: var(--card);
  font: inherit;
}
.search-form input[type="submit"] {
  height: 3rem;
  padding: 0 1.5rem;
  border-radius: 9999px;
  border: 0;
  background: var(--primary);
  color: #fff;
  font-weight: 500;
  cursor: pointer;
}

/* Hide empty space below transparent nav on inner pages */
.inner-page { background: var(--background); }

/* ==========================================================
   NAV BREAKPOINT TWEAKS — treat tablets like mobile
   ========================================================== */
/* Show hamburger up through iPad (≤1024px), desktop menu only above */
@media (max-width: 1024px) {
  .site-menu { display: none !important; }
  .menu-toggle { display: inline-flex !important; }
  .site-nav > div > .btn[data-open-donate] { display: none !important; }
}
