/* 
 * Malayali Muslims USA (MMUSA) Design System
 * Light/white warm theme with Deep Emerald and Gold accents
 */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,600;9..144,700&family=Public+Sans:ital,wght@0,400;0,500;0,600;1,400&display=swap');

:root {
  /* Palette */
  --bg-page: #FAF8F3;
  --bg-card: #FFFFFF;
  --bg-card-alt: #F4EFE6;
  --primary: #1F4D3D;
  --primary-hover: #163A2E;
  --primary-light: #EBF2EE;
  --accent-gold: #C9A227;
  --accent-gold-soft: #F9F4E5;
  --text-main: #22221F;
  --text-muted: #6B6B63;
  --border-subtle: #E8E4D8;
  --border-strong: #D1CBBF;
  
  /* Typography */
  --font-heading: 'Fraunces', Georgia, serif;
  --font-body: 'Public Sans', system-ui, -apple-system, sans-serif;
  
  /* Radii & Shadows */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-full: 9999px;
  --shadow-subtle: 0 4px 16px rgba(34, 34, 31, 0.04);
  --shadow-lift: 0 8px 24px rgba(31, 77, 61, 0.08);

  /* Layout */
  --max-width: 1160px;
  --header-height: 96px;
  --transition-fast: 0.2s ease;
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.65;
  color: var(--text-main);
  background-color: var(--bg-page);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--primary);
  line-height: 1.2;
  letter-spacing: -0.015em;
}

h1 {
  font-size: clamp(2.3rem, 4.5vw, 3.4rem);
  font-weight: 700;
}

h2 {
  font-size: clamp(1.85rem, 3.2vw, 2.5rem);
  font-weight: 600;
}

h3 {
  font-size: clamp(1.35rem, 2.2vw, 1.75rem);
  font-weight: 600;
}

h4 {
  font-size: 1.15rem;
  font-weight: 600;
}

p {
  color: var(--text-main);
  font-size: 1.05rem;
  line-height: 1.65;
}

p.lead {
  font-size: 1.2rem;
  line-height: 1.6;
  color: var(--text-muted);
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--primary-hover);
}

a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent-gold);
  outline-offset: 3px;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Container & Sections */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.section {
  padding-top: 5rem;
  padding-bottom: 5rem;
}

.section-tight {
  padding-top: 3.5rem;
  padding-bottom: 3.5rem;
}

.section-alt {
  background-color: #FFFFFF;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.85rem 1.65rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background-color: var(--primary);
  color: #FFFFFF;
  border-color: var(--primary);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  border-color: var(--primary-hover);
  color: #FFFFFF;
  transform: translateY(-1px);
}

.btn-outline {
  background-color: transparent;
  color: var(--primary);
  border-color: var(--primary);
}

.btn-outline:hover {
  background-color: var(--primary-light);
  color: var(--primary);
  transform: translateY(-1px);
}

.btn-outline-light {
  background-color: rgba(255, 255, 255, 0.08);
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, 0.55);
}

.btn-outline-light:hover {
  background-color: rgba(255, 255, 255, 0.18);
  border-color: #FFFFFF;
  color: #FFFFFF;
  transform: translateY(-1px);
}

.btn-gold {
  background-color: var(--accent-gold);
  color: #FFFFFF;
  border-color: var(--accent-gold);
}

.btn-gold:hover {
  background-color: #B59020;
  border-color: #B59020;
  color: #FFFFFF;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.05rem;
}

/* Header & Navigation */
.site-header {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background-color: var(--bg-page);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition-fast), background-color var(--transition-fast), box-shadow var(--transition-fast);
  min-height: var(--header-height);
  display: flex;
  align-items: center;
}

.site-header.scrolled {
  border-bottom-color: var(--border-subtle);
  background-color: rgba(250, 248, 243, 0.96);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow-subtle);
}

.header-inner {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
  color: var(--primary);
}

/* Scaled Up Logo */
.brand-logo {
  width: 72px;
  height: 72px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.35rem;
  line-height: 1.15;
  color: var(--primary);
  letter-spacing: -0.01em;
}

.brand-sub {
  font-size: 0.775rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  font-weight: 600;
  text-transform: uppercase;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.nav-link {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-main);
  padding: 0.4rem 0.2rem;
  position: relative;
  transition: color var(--transition-fast);
}

.nav-link:hover {
  color: var(--primary);
}

.nav-link.active {
  color: var(--primary);
  font-weight: 600;
}

.nav-link.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--accent-gold);
}

.nav-donate-btn {
  background-color: var(--primary);
  color: #FFFFFF !important;
  font-weight: 600;
  padding: 0.65rem 1.45rem;
  border-radius: var(--radius-md);
  margin-left: 0.5rem;
}

.nav-donate-btn:hover {
  background-color: var(--primary-hover);
  color: #FFFFFF !important;
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  padding: 0.5rem;
  color: var(--primary);
  cursor: pointer;
  border-radius: var(--radius-sm);
}

.mobile-toggle svg {
  width: 28px;
  height: 28px;
  stroke: var(--primary);
  display: block;
}

/* Mobile Drawer */
.mobile-nav-drawer {
  display: none;
  position: fixed;
  top: var(--header-height);
  left: 0;
  width: 100%;
  height: calc(100vh - var(--header-height));
  background-color: var(--bg-page);
  padding: 2rem 1.5rem;
  border-top: 1px solid var(--border-subtle);
  overflow-y: auto;
  z-index: 999;
  flex-direction: column;
  gap: 1.25rem;
}

.mobile-nav-drawer.open {
  display: flex;
}

.mobile-nav-drawer .nav-link {
  font-size: 1.25rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border-subtle);
}

.mobile-nav-drawer .nav-donate-btn {
  margin-top: 1rem;
  text-align: center;
  padding: 0.85rem;
  font-size: 1.1rem;
  margin-left: 0;
}

/* Photo Placeholders (clean, no icon inside) */
.photo-placeholder {
  width: 100%;
  background: linear-gradient(135deg, #F5F1E8 0%, #EFE9DC 100%);
  border: 1px dashed #D1CBBF;
  border-radius: var(--radius-md);
  padding: 2.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.85rem;
  color: var(--primary);
  min-height: 240px;
  position: relative;
  overflow: hidden;
}

.photo-placeholder .ph-label {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--primary);
  background-color: rgba(255, 255, 255, 0.9);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  max-width: 90%;
  line-height: 1.4;
}

.photo-placeholder .ph-note {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Stat Bar (Horizontal Strip) */
.stat-bar {
  background-color: var(--primary);
  color: #FFFFFF;
  padding: 2.75rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  align-items: center;
}

.stat-item {
  text-align: center;
  padding: 0.5rem 1rem;
  border-right: 1px solid rgba(255, 255, 255, 0.15);
}

.stat-item:last-child {
  border-right: none;
}

.stat-number {
  font-family: var(--font-heading);
  font-size: clamp(2.2rem, 3.6vw, 3rem);
  font-weight: 700;
  color: var(--accent-gold);
  line-height: 1.1;
  margin-bottom: 0.35rem;
}

.stat-label {
  font-size: 0.925rem;
  color: #E2EAE5;
  font-weight: 500;
  line-height: 1.35;
}

/* Asymmetric 2-Column Alternate Blocks (What We Do) */
.alternate-block {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 3.5rem;
  align-items: center;
  margin-bottom: 4.5rem;
}

.alternate-block:last-child {
  margin-bottom: 0;
}

.alternate-block.reverse {
  grid-template-columns: 1.15fr 1fr;
}

.alternate-block.reverse .block-visual {
  order: 2;
}

.alternate-block.reverse .block-content {
  order: 1;
}

.block-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
}

/* Heading with Icon directly on the left on the same line */
.heading-with-icon {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 0.25rem;
}

.heading-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  background-color: var(--primary-light);
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.heading-icon svg {
  width: 22px;
  height: 22px;
  stroke: var(--primary);
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.heading-with-icon h3 {
  margin: 0;
  color: var(--primary);
}

/* Event Cards */
.event-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
  margin-top: 2rem;
}

.event-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: transform var(--transition-fast), border-color var(--transition-fast);
  display: flex;
  flex-direction: column;
}

.event-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
}

.event-card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.event-tag {
  font-size: 0.775rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-gold);
  margin-bottom: 0.5rem;
}

.event-card h4 {
  font-size: 1.2rem;
  margin-bottom: 0.65rem;
}

.event-meta {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.event-meta svg {
  width: 16px;
  height: 16px;
  stroke: var(--accent-gold);
  stroke-width: 2;
  fill: none;
  flex-shrink: 0;
}

.event-card p {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 1.25rem;
}

.event-link {
  margin-top: auto;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.event-link svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

/* Testimonial Auto-Rotating Carousel */
.statement-block {
  background-color: #FFFFFF;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  padding: 5rem 0;
  position: relative;
}

.carousel-container {
  max-width: 840px;
  margin: 0 auto;
  text-align: center;
  position: relative;
}

.quote-mark {
  font-family: var(--font-heading);
  font-size: 3.5rem;
  line-height: 1;
  color: var(--accent-gold);
  margin-bottom: 0.5rem;
}

.testimonial-track {
  position: relative;
  min-height: 180px;
}

.testimonial-slide {
  display: none;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}

.testimonial-slide.active {
  display: block;
  opacity: 1;
}

.statement-quote {
  font-family: var(--font-heading);
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
  font-weight: 600;
  line-height: 1.45;
  color: var(--primary);
  margin-bottom: 1.5rem;
}

.statement-attribution {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Carousel Controls */
.carousel-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  margin-top: 2.25rem;
}

.carousel-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  background-color: var(--bg-page);
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.carousel-btn:hover {
  background-color: var(--primary);
  color: #FFFFFF;
  border-color: var(--primary);
}

.carousel-btn svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.carousel-dots {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.carousel-dot {
  width: 11px;
  height: 11px;
  border-radius: var(--radius-full);
  background-color: var(--border-subtle);
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.carousel-dot.active {
  background-color: var(--primary);
  transform: scale(1.25);
}







/* Get Involved 2-Column Banner */
.get-involved-card {
  background-color: #FFFFFF;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 3.25rem;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 2.5rem;
  align-items: center;
}

.get-involved-actions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: flex-start;
}

/* Activities Page 2-Column Category Rows */
.activity-row {
  padding: 3.5rem 0;
  border-bottom: 1px solid var(--border-subtle);
}

.activity-row:nth-child(even) {
  background-color: #FFFFFF;
}

.activity-row:last-child {
  border-bottom: none;
}

.activity-grid {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 3.5rem;
}

.activity-header-side {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.85rem;
}

.activity-icon-box {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background-color: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.activity-icon-box svg {
  width: 26px;
  height: 26px;
  stroke: var(--primary);
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.activity-list-side {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.activity-item {
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-subtle);
}

.activity-item:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.activity-item-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 0.3rem;
}

.activity-item-desc {
  font-size: 0.98rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* Donate Page Components */
.donate-impact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
  margin-top: 2rem;
}

.impact-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 2.25rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.impact-icon-wrap {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-sm);
  background-color: var(--accent-gold-soft);
  color: var(--accent-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.5rem;
  flex-shrink: 0;
}

.impact-icon-wrap svg {
  width: 24px;
  height: 24px;
  stroke: var(--accent-gold);
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.impact-card h4 {
  color: var(--primary);
  font-size: 1.2rem;
}

.impact-card p {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.give-box {
  background-color: #FFFFFF;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2.75rem;
  margin-top: 3rem;
}

.amount-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.5rem 0;
}

.amount-btn {
  padding: 0.75rem 1.45rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background-color: var(--bg-page);
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.amount-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.amount-btn.selected {
  background-color: var(--primary);
  color: #FFFFFF !important;
  border-color: var(--primary);
}

.amount-input-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.amount-input {
  width: 170px;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-size: 1.05rem;
  font-family: var(--font-body);
}

.freq-toggle {
  display: inline-flex;
  background-color: var(--bg-page);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.3rem;
  gap: 0.3rem;
  margin-bottom: 1.5rem;
}

.freq-btn {
  padding: 0.55rem 1.35rem;
  border: none;
  background: none;
  font-family: var(--font-body);
  font-size: 0.925rem;
  font-weight: 600;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.freq-btn.active {
  background-color: var(--primary);
  color: #FFFFFF;
}

/* Transparency Note Banner */
.transparency-banner {
  background-color: var(--primary-light);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-sm);
  padding: 1.35rem 1.5rem;
  margin-top: 2rem;
  font-size: 0.95rem;
  color: var(--primary);
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
}

.transparency-banner svg {
  width: 22px;
  height: 22px;
  stroke: var(--primary);
  stroke-width: 2;
  fill: none;
  flex-shrink: 0;
  margin-top: 2px;
}

/* Contact Page Components */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 3.5rem;
}

.contact-card-info {
  background-color: #FFFFFF;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 2.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.info-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.info-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background-color: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.info-icon svg {
  width: 22px;
  height: 22px;
  stroke: var(--primary);
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.info-content h4 {
  font-size: 1rem;
  margin-bottom: 0.2rem;
  color: var(--primary);
}

.info-content a, .info-content p {
  font-size: 0.95rem;
  color: var(--text-main);
}

/* Form Styles */
.contact-form-container {
  background-color: #FFFFFF;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 2.5rem;
}

.form-group {
  margin-bottom: 1.35rem;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 0.4rem;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text-main);
  background-color: #FFFFFF;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(31, 77, 61, 0.12);
  outline: none;
}

.form-textarea {
  min-height: 120px;
  resize: vertical;
}

.form-feedback {
  display: none;
  padding: 1rem;
  border-radius: var(--radius-sm);
  margin-top: 1.25rem;
  font-size: 0.95rem;
}

.form-feedback.success {
  display: block;
  background-color: #EBF7EE;
  color: #1F4D3D;
  border: 1px solid #C1E6CB;
}

/* Join Us CTA Card */
.join-us-card {
  background: linear-gradient(135deg, #1F4D3D 0%, #163A2E 100%);
  color: #FFFFFF;
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  margin-top: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.join-us-card h3 {
  color: #FFFFFF;
  margin-bottom: 0.5rem;
}

.join-us-card p {
  color: #E2EAE5;
  font-size: 1rem;
}

/* Footer with Scaled Logo */
.site-footer {
  background-color: #FFFFFF;
  border-top: 1px solid var(--border-subtle);
  padding-top: 4rem;
  padding-bottom: 2.5rem;
  margin-top: auto;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--border-subtle);
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.footer-brand .brand-logo {
  width: 68px;
  height: 68px;
}

.footer-tagline {
  font-size: 1rem;
  color: var(--primary);
  font-style: italic;
  font-weight: 500;
}

.footer-col h5 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: var(--primary);
  margin-bottom: 1rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.footer-links a {
  font-size: 0.95rem;
  color: var(--text-muted);
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--primary);
}

/* Social Links Bar (Fixed visibility with explicit stroke/fill) */
.social-links-bar {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-top: 0.75rem;
}

.social-btn {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  background-color: var(--bg-page);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary) !important;
  transition: all var(--transition-fast);
}

.social-btn:hover {
  background-color: var(--primary);
  color: #FFFFFF !important;
  border-color: var(--primary);
  transform: translateY(-2px);
}

.social-btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
  display: block;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 2rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Callout Box */
.callout-box {
  background-color: var(--accent-gold-soft);
  border: 1px solid #E4D8B4;
  border-radius: var(--radius-md);
  padding: 2rem;
  text-align: center;
  font-size: 1.15rem;
  color: var(--primary);
}

.callout-box a {
  font-weight: 700;
  text-decoration: underline;
  color: var(--primary);
}

/* Responsive Media Queries */
@media (max-width: 992px) {
  .alternate-block, .alternate-block.reverse {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .alternate-block.reverse .block-visual {
    order: 1;
  }
  
  .alternate-block.reverse .block-content {
    order: 2;
  }
  
  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
    row-gap: 2rem;
  }
  
  .stat-item:nth-child(2) {
    border-right: none;
  }
  
  .event-cards-grid {
    grid-template-columns: 1fr;
  }
  
  .get-involved-card {
    grid-template-columns: 1fr;
  }
  
  .activity-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .donate-impact-grid {
    grid-template-columns: 1fr;
  }
  
  .contact-layout {
    grid-template-columns: 1fr;
  }
  
  .footer-top {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .join-us-card {
    flex-direction: column;
    text-align: center;
    align-items: center;
  }
}

@media (max-width: 860px) {
  :root {
    --header-height: 84px;
  }

  .brand-logo {
    width: 60px;
    height: 60px;
  }

  .main-nav {
    display: none;
  }
  
  .mobile-toggle {
    display: block;
  }
  
  .section {
    padding-top: 3.5rem;
    padding-bottom: 3.5rem;
  }
}

@media (max-width: 540px) {
  .stat-grid {
    grid-template-columns: 1fr;
  }
  
  .stat-item {
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    padding-bottom: 1.25rem;
  }
  
  .stat-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
  }
  
  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .heading-with-icon {
    flex-direction: row;
    align-items: center;
  }
}

/* Responsive Image Styling */
.hero-img-wrap {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-lift);
}

.hero-img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  display: block;
}

.feature-img-wrap {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-subtle);
}

.feature-img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  display: block;
}

.event-card-img-wrap {
  width: 100%;
  height: 200px;
  overflow: hidden;
  border-bottom: 1px solid var(--border-subtle);
}

.event-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform var(--transition-fast);
}

.event-card:hover .event-card-img {
  transform: scale(1.04);
}

/* ==========================================================================
   Navigation Dropdown & Expanded Site Architecture
   ========================================================================== */
.nav-item-dropdown {
  position: relative;
  display: flex;
  align-items: center;
}

.dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-main);
  padding: 0.4rem 0.2rem;
  transition: color var(--transition-fast);
}

.dropdown-toggle:hover,
.nav-item-dropdown:hover .dropdown-toggle,
.nav-item-dropdown.active .dropdown-toggle {
  color: var(--primary);
}

.dropdown-toggle svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  stroke-width: 2.2;
  transition: transform var(--transition-fast);
}

.nav-item-dropdown:hover .dropdown-toggle svg,
.nav-item-dropdown.open .dropdown-toggle svg {
  transform: rotate(180deg);
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  min-width: 210px;
  background-color: #FFFFFF;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: 0 10px 28px rgba(31, 77, 61, 0.1);
  padding: 0.5rem 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity var(--transition-fast), transform var(--transition-fast), visibility var(--transition-fast);
  z-index: 1050;
  list-style: none;
}

.nav-item-dropdown:hover .dropdown-menu,
.nav-item-dropdown:focus-within .dropdown-menu,
.nav-item-dropdown.open .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-main);
  transition: background-color var(--transition-fast), color var(--transition-fast);
  text-decoration: none;
}

.dropdown-item:hover,
.dropdown-item:focus {
  background-color: var(--primary-light);
  color: var(--primary);
}

.dropdown-item.active {
  color: var(--primary);
  font-weight: 600;
  background-color: var(--primary-light);
}

.dropdown-item svg {
  width: 16px;
  height: 16px;
  stroke: var(--primary);
  flex-shrink: 0;
}

/* Mobile Drawer Sub-navigation */
.mobile-nav-group {
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid var(--border-subtle);
}

.mobile-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.6rem 0;
  background: none;
  border: none;
  font-family: var(--font-body);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--primary);
  cursor: pointer;
  text-align: left;
}

.mobile-group-header svg {
  width: 18px;
  height: 18px;
  stroke: var(--primary);
  transition: transform var(--transition-fast);
}

.mobile-group-header.open svg {
  transform: rotate(180deg);
}

.mobile-group-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding-left: 1rem;
  padding-bottom: 0.75rem;
}

.mobile-sublink {
  font-size: 1.05rem;
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.25rem 0;
}

.mobile-sublink:hover,
.mobile-sublink.active {
  color: var(--primary);
  font-weight: 600;
}

/* ==========================================================================
   Gallery Page Styles
   ========================================================================== */
.gallery-intro {
  max-width: 780px;
  margin-bottom: 2.5rem;
}

.gallery-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 2.5rem;
}

.filter-btn {
  padding: 0.55rem 1.25rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  background-color: var(--bg-card);
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.925rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.filter-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.filter-btn.active {
  background-color: var(--primary);
  color: #FFFFFF !important;
  border-color: var(--primary);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.75rem;
}

.gallery-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
  display: flex;
  flex-direction: column;
}

.gallery-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-lift);
}

.gallery-card-img-wrap {
  width: 100%;
  height: 230px;
  overflow: hidden;
  position: relative;
  background-color: var(--bg-card-alt);
}

.gallery-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.gallery-card:hover .gallery-card-img {
  transform: scale(1.05);
}

.gallery-card-body {
  padding: 1.35rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.gallery-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  font-size: 0.775rem;
}

.gallery-tag {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-gold);
}

.gallery-date {
  color: var(--text-muted);
}

.gallery-card-title {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
  color: var(--primary);
}

.gallery-card-loc {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.gallery-card-loc svg {
  width: 15px;
  height: 15px;
  stroke: var(--accent-gold);
}

.gallery-card-desc {
  font-size: 0.925rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-top: auto;
}

/* ==========================================================================
   Stories Page Styles
   ========================================================================== */
.stories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.story-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 2.25rem 2rem;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.story-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-subtle);
}

.story-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.story-badge {
  font-size: 0.775rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
  background-color: var(--primary-light);
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-full);
}

.story-quote-symbol {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  line-height: 1;
  color: var(--accent-gold);
}

.story-text {
  font-size: 1.025rem;
  line-height: 1.65;
  color: var(--text-main);
  margin-bottom: 1.75rem;
  flex-grow: 1;
}

.story-author-box {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-subtle);
}

.story-avatar {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background-color: var(--primary);
  color: var(--accent-gold);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.story-author-info {
  display: flex;
  flex-direction: column;
}

.story-author-name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--primary);
}

.story-author-meta {
  font-size: 0.825rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Community Network Page Styles
   ========================================================================== */
.network-region-block {
  margin-bottom: 4rem;
}

.network-region-block:last-child {
  margin-bottom: 0;
}

.region-header {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--border-subtle);
}

.region-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background-color: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.region-icon svg {
  width: 20px;
  height: 20px;
  stroke: var(--primary);
}

.region-header h2 {
  font-size: 1.65rem;
  margin: 0;
}

.chapters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 1.5rem;
}

.chapter-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.65rem;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.chapter-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
}

.chapter-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.chapter-card h3 {
  font-size: 1.25rem;
  color: var(--primary);
  margin-bottom: 0.25rem;
}

.chapter-status {
  font-size: 0.725rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-full);
  background-color: #EBF7EE;
  color: #1F4D3D;
  border: 1px solid #C1E6CB;
}

.chapter-desc {
  font-size: 0.925rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 1.25rem;
  flex-grow: 1;
}

.chapter-action {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.875rem;
  color: var(--primary);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

/* ==========================================================================
   Youth Page Styles
   ========================================================================== */
.youth-banner {
  background: linear-gradient(135deg, #1F4D3D 0%, #163A2E 100%);
  color: #FFFFFF;
  border-radius: var(--radius-lg);
  padding: 3.5rem;
  margin-bottom: 3.5rem;
}

.youth-banner h2 {
  color: #FFFFFF;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  margin-bottom: 1rem;
}

.youth-banner p {
  color: #E2EAE5;
  font-size: 1.1rem;
  max-width: 760px;
  line-height: 1.65;
}

.youth-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.75rem;
  margin-bottom: 4rem;
}

.youth-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 2rem 1.75rem;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.youth-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
}

.youth-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.65rem;
  color: var(--primary);
}

.youth-card p {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1.25rem;
  flex-grow: 1;
}

.youth-card-link {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

/* ==========================================================================
   About Us: Our Focus Section Styles
   ========================================================================== */
.focus-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.75rem;
  margin-top: 2.5rem;
}

.focus-card {
  background-color: #FFFFFF;
  border: 1px solid var(--border-subtle);
  border-top: 3px solid var(--accent-gold);
  border-radius: var(--radius-md);
  padding: 2rem 1.75rem;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.focus-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-subtle);
}

.focus-card-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background-color: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.focus-card-icon svg {
  width: 22px;
  height: 22px;
  stroke: var(--primary);
  stroke-width: 2;
  fill: none;
}

.focus-card h3 {
  font-size: 1.2rem;
  color: var(--primary);
  margin-bottom: 0.65rem;
}

.focus-card p {
  font-size: 0.95rem;
  color: var(--text-main);
  line-height: 1.6;
}


/* ==========================================================================
   Cinematic Layered Hero Section
   ========================================================================== */
.hero-cinematic {
  position: relative;
  min-height: 100svh;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: var(--bg-main);
  background-image: 
    radial-gradient(ellipse 95% 65% at 75% 12%, rgba(243, 233, 210, 0.55) 0%, rgba(250, 248, 243, 0.1) 70%),
    linear-gradient(180deg, rgba(250, 248, 243, 0) 65%, rgba(31, 77, 61, 0.06) 100%);
  padding: clamp(5.5rem, 12vh, 8.5rem) 0 clamp(4.5rem, 8vh, 6.5rem) 0;
}

.hero-cinematic .container {
  position: relative;
  z-index: 2;
  width: 100%;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 560px;
  text-align: left;
}

.hero-eyebrow {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent-gold);
  margin-bottom: 0.85rem;
  opacity: 0;
  transform: translateY(8px);
  animation: heroFadeIn 0.5s ease-out 0.05s forwards;
}

.hero-headline {
  font-family: var(--font-heading);
  font-size: clamp(2.35rem, 4.4vw, 3.6rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--primary);
  margin-bottom: 1.25rem;
}

.hero-word {
  display: inline-block;
  opacity: 0;
  transform: translateY(14px);
  animation: heroWordReveal 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: calc(var(--word-index, 0) * 90ms + 100ms);
}

@keyframes heroWordReveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-subhead {
  font-size: clamp(1.05rem, 1.3vw, 1.18rem);
  line-height: 1.65;
  color: var(--text-main);
  margin-bottom: 2rem;
  max-width: 540px;
  opacity: 0;
  transform: translateY(12px);
  animation: heroFadeIn 0.55s ease-out 0.72s forwards;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  opacity: 0;
  transform: translateY(10px);
  animation: heroFadeIn 0.5s ease-out 0.88s forwards;
}

@keyframes heroFadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Layer 2: Skyline Silhouette (Inline SVG, Translucent Emerald) */
.hero-skyline-layer {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  pointer-events: none;
  z-index: 1;
  line-height: 0;
  will-change: transform;
}

.hero-skyline {
  display: block;
  width: 100%;
  height: clamp(150px, 26vh, 250px);
}

/* Layer 3: Crescent Accent (Thin Gold Outline, Slow Drift) */
.hero-crescent-wrap {
  position: absolute;
  top: 10%;
  right: 9%;
  z-index: 1;
  pointer-events: none;
  will-change: transform;
}

.hero-crescent {
  width: clamp(95px, 12vw, 140px);
  height: clamp(95px, 12vw, 140px);
  display: block;
  animation: crescentDrift 75s ease-in-out infinite;
  transform-origin: 50% 50%;
}

@keyframes crescentDrift {
  0% {
    transform: rotate(0deg) translate(0, 0);
  }
  30% {
    transform: rotate(4deg) translate(6px, -10px);
  }
  65% {
    transform: rotate(-3deg) translate(-5px, 8px);
  }
  100% {
    transform: rotate(0deg) translate(0, 0);
  }
}

/* Layer 5: Scroll Cue */
.hero-scroll-cue {
  position: absolute;
  bottom: 1.75rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  color: var(--primary);
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.78;
  transition: opacity 0.35s ease, transform 0.35s ease, color 0.2s ease;
}

.hero-scroll-cue:hover {
  opacity: 1;
  color: var(--accent-gold);
}

.hero-scroll-cue svg {
  animation: scrollBounce 2.2s ease-in-out infinite;
}

@keyframes scrollBounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(5px);
  }
  60% {
    transform: translateY(2px);
  }
}

.hero-scroll-cue.is-hidden {
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
}

/* Prefers Reduced Motion: Disable all motion and reveals */
@media (prefers-reduced-motion: reduce) {
  .hero-eyebrow,
  .hero-word,
  .hero-subhead,
  .hero-actions {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }
  .hero-crescent {
    animation: none !important;
    transform: none !important;
  }
  .hero-crescent-wrap,
  .hero-skyline-layer {
    transform: none !important;
  }
  .hero-scroll-cue,
  .hero-scroll-cue svg {
    animation: none !important;
  }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .hero-cinematic {
    min-height: calc(100svh - 68px);
    padding: 3.5rem 0 5rem 0;
  }
  .hero-crescent-wrap {
    top: 6%;
    right: 5%;
    opacity: 0.65;
  }
  .hero-skyline {
    height: 130px;
    opacity: 0.8;
  }
}

/* ==========================================================================
   Intro Hero: Mosaic Zoom
   A grid of community photographs opens at a distance, drifts into place,
   then zooms until the centre frame fills the viewport and the headline lands.
   ========================================================================== */
.intro-hero {
  --intro-h: calc(100vh - var(--header-height));
  --intro-gap: 7vh;
  --intro-start-scale: 0.36;
  --intro-scrim: linear-gradient(
    180deg,
    rgba(14, 33, 26, 0.62) 0%,
    rgba(14, 33, 26, 0.50) 45%,
    rgba(14, 33, 26, 0.72) 100%
  );

  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: var(--intro-h);
  overflow: hidden;
  background-color: #14261F;
}

@supports (height: 100svh) {
  .intro-hero {
    --intro-h: calc(100svh - var(--header-height));
  }
}

/* Mosaic ------------------------------------------------------------------ */
.intro-mosaic {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 0;
  display: flex;
  align-items: center;
  gap: var(--intro-gap);
  transform: translate(-50%, -50%) scale(var(--intro-start-scale));
  transform-origin: 50% 50%;
  will-change: transform;
  animation: introZoom 1600ms cubic-bezier(0.55, 0, 0.25, 1) 400ms forwards;
}

.intro-mosaic-col {
  flex: none;
  width: 100vw;
}

.intro-mosaic-col-inner {
  display: flex;
  flex-direction: column;
  gap: var(--intro-gap);
  will-change: transform;
}

/* The centre column settles at zero so its middle frame lands dead centre. */
.intro-mosaic-col-inner.is-center {
  transform: translateY(26%);
  animation: introDriftCenter 1250ms cubic-bezier(0.45, 0, 0.25, 1) forwards;
}

.intro-mosaic-col-inner.is-reversed {
  transform: translateY(-28%);
  animation: introDriftSide 1250ms cubic-bezier(0.45, 0, 0.25, 1) forwards;
}

.intro-tile {
  position: relative;
  width: 100vw;
  height: var(--intro-h);
  overflow: hidden;
}

.intro-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* hero-community.jpg is a tall portrait; a centre crop lands on flat black
   cloth, so the focus frame is pulled up to the crowd and calligraphy band. */
.intro-tile.is-focus img {
  object-position: 50% 18%;
}

.intro-tile-scrim {
  position: absolute;
  inset: 0;
  opacity: 0;
  background-image: var(--intro-scrim);
  animation: introScrim 650ms ease 1350ms forwards;
}

/* Overlay content --------------------------------------------------------- */
.intro-hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  text-align: center;
  padding-bottom: 2.5rem;
}

.intro-eyebrow,
.intro-title,
.intro-lead,
.intro-actions {
  opacity: 0;
  transform: translateY(18px);
  animation: introRise 850ms cubic-bezier(0.22, 0.61, 0.24, 1) forwards;
}

.intro-eyebrow { animation-delay: 1700ms; }
.intro-title   { animation-delay: 1820ms; }
.intro-lead    { animation-delay: 1950ms; }
.intro-actions { animation-delay: 2080ms; }

.intro-eyebrow {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #E8C55A;
  margin-bottom: 1.15rem;
}

.intro-title {
  max-width: 18ch;
  margin: 0 auto;
  color: #FFFFFF;
  font-size: clamp(2.4rem, 5.8vw, 4.5rem);
  font-weight: 600;
  line-height: 1.12;
  text-wrap: balance;
  text-shadow: 0 2px 34px rgba(10, 24, 19, 0.5);
}

.intro-lead {
  max-width: 60ch;
  margin: 1.5rem auto 0 auto;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(1.02rem, 1.5vw, 1.18rem);
  line-height: 1.6;
  text-shadow: 0 1px 20px rgba(10, 24, 19, 0.45);
}

.intro-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-top: 2.25rem;
}

/* Scroll cue (reuses .hero-scroll-cue, recoloured for the dark frame) ------ */
.intro-hero .hero-scroll-cue {
  color: rgba(255, 255, 255, 0.88);
  opacity: 0;
  animation: introCue 700ms ease 2400ms forwards;
}

.intro-hero .hero-scroll-cue:hover {
  color: #E8C55A;
}

/* Re-enable the JS hide-on-scroll by dropping the fill-forward animation. */
.intro-hero .hero-scroll-cue.is-hidden {
  animation: none;
  opacity: 0;
  transform: translate(-50%, 12px);
}

/* Keyframes --------------------------------------------------------------- */
@keyframes introZoom {
  from { transform: translate(-50%, -50%) scale(var(--intro-start-scale)); }
  to   { transform: translate(-50%, -50%) scale(1); }
}

@keyframes introDriftCenter {
  from { transform: translateY(26%); }
  to   { transform: translateY(0); }
}

@keyframes introDriftSide {
  from { transform: translateY(-28%); }
  to   { transform: translateY(-8%); }
}

@keyframes introScrim {
  to { opacity: 1; }
}

@keyframes introRise {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes introCue {
  from { transform: translate(-50%, 12px); opacity: 0; }
  to   { transform: translate(-50%, 0); opacity: 0.85; }
}

/* Small screens: the mosaic is dropped for a single still frame, as on the
   reference site, so phones never paint fifteen full-viewport images. */
@media (max-width: 640px) {
  .intro-hero {
    background-image: var(--intro-scrim), url('../assets/hero-community.jpg');
    background-position: 50% 50%, 30% 50%;
    background-repeat: no-repeat, no-repeat;
    background-size: cover, cover;
    padding: 4rem 0;
  }

  .intro-mosaic {
    display: none;
  }

  .intro-title {
    max-width: 14ch;
  }
}

@media (prefers-reduced-motion: reduce) {
  .intro-mosaic {
    animation: none;
    transform: translate(-50%, -50%) scale(1);
  }
  .intro-mosaic-col-inner.is-center {
    animation: none;
    transform: translateY(0);
  }
  .intro-mosaic-col-inner.is-reversed {
    animation: none;
    transform: translateY(-8%);
  }
  .intro-tile-scrim {
    animation: none;
    opacity: 1;
  }
  .intro-eyebrow,
  .intro-title,
  .intro-lead,
  .intro-actions {
    animation: none;
    opacity: 1;
    transform: none;
  }
  .intro-hero .hero-scroll-cue {
    animation: none;
    opacity: 0.85;
  }
}

/* ==========================================================================
   Flow Panels: stacked programme panels that swing in on scroll
   Each panel pins once its bottom meets the viewport bottom while the next
   rotates up from its bottom-left corner and covers it. GSAP drives the
   transforms; without GSAP the panels simply stack as normal sections.
   ========================================================================== */
.flow-stack {
  position: relative;
}

.flow-panel {
  position: relative;
  width: 100%;
  min-height: 100vh;
  overflow: hidden;
}

.flow-panel-inner {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: clamp(1.75rem, 4vw, 3.25rem) clamp(1.25rem, 4vw, 4rem);
  transform-origin: bottom left;
  will-change: transform;
}

@supports (height: 100svh) {
  .flow-panel,
  .flow-panel-inner {
    min-height: 100svh;
  }
}

/* Panel themes ------------------------------------------------------------ */
.flow-panel.is-emerald {
  background-color: var(--primary);
  color: #FFFFFF;
}

.flow-panel.is-cream {
  background-color: var(--bg-card-alt);
  color: var(--text-main);
}

.flow-panel.is-ink {
  background-color: #22221F;
  color: #FFFFFF;
}

.flow-panel.is-gold {
  background-color: var(--accent-gold);
  color: #22221F;
}

/* Panel contents ---------------------------------------------------------- */
.flow-eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: inherit;
  opacity: 0.85;
}

.flow-rule {
  border: 0;
  border-top: 1px solid currentColor;
  opacity: 0.28;
  margin: clamp(0.8rem, 1.6vw, 1.4rem) 0;
}

.flow-title {
  font-family: var(--font-heading);
  font-size: clamp(2.4rem, 7.5vw, 7rem);
  font-weight: 700;
  line-height: 0.92;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: inherit;
  margin: 0;
}

.flow-lead {
  max-width: 52ch;
  font-size: clamp(1rem, 1.9vw, 1.4rem);
  line-height: 1.5;
  color: inherit;
}

.flow-details {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(1.1rem, 3vw, 2.5rem);
}

.flow-detail {
  flex: 1 1 190px;
  min-width: 170px;
}

.flow-detail-title {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}

.flow-detail p {
  font-size: clamp(0.85rem, 1.1vw, 0.97rem);
  line-height: 1.55;
  color: inherit;
  opacity: 0.78;
}

.flow-cta {
  margin-top: auto;
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.5rem;
  border: 1px solid currentColor;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: inherit;
  transition: background-color var(--transition-fast);
}

.flow-panel .flow-cta:hover {
  color: inherit;
  background-color: rgba(255, 255, 255, 0.15);
}

.flow-panel.is-cream .flow-cta:hover,
.flow-panel.is-gold .flow-cta:hover {
  background-color: rgba(34, 34, 31, 0.1);
}

/* The rotated panel is clipped by .flow-panel, but GSAP pins with fixed
   positioning, so nothing above may create a containing block. */
.flow-stack,
.flow-stack * {
  backface-visibility: hidden;
}

@media (max-width: 860px) {
  .flow-title {
    font-size: clamp(2.1rem, 11vw, 4rem);
  }

  .flow-detail {
    flex: 1 1 100%;
    min-width: 0;
  }

  .flow-details {
    gap: 0.9rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .flow-panel,
  .flow-panel-inner {
    min-height: 0;
  }

  .flow-panel-inner {
    transform: none;
    padding-top: clamp(3rem, 7vw, 5rem);
    padding-bottom: clamp(3rem, 7vw, 5rem);
  }
}
