/* =====================================================================
   FAS Foundation — Shared Design System
   Carries the fas-render (Ragon-inspired) visual language onto the static
   Foundation site: white-dominant, muted gold (#B08D57), navy ink,
   Space Grotesk + DM Sans, tinted-white bands, gold accent-bar cards.

   Loaded AFTER each page's inline <style>, so equal-specificity rules here
   win. Restyle only — never rename ids/classes the inline JS depends on.
   ===================================================================== */

/* ------------------------------------------------------------------ */
/* 1. Design tokens — override the per-page :root vars                  */
/* ------------------------------------------------------------------ */
:root {
  /* Brand ink */
  --primary: #1c243c;
  --primary-dark: #151b2d;
  --primary-light: #2d3748;

  /* Muted gold accent (replaces the old bright #f4b41a everywhere) */
  --accent: #b08d57;
  --accent-dark: #8c6e40;
  --accent-light: #c3b299;      /* soft gold — for use on navy */

  /* Surfaces — white-dominant */
  --background: #ffffff;
  --surface: #ffffff;
  --surface-alt: #fafaf8;
  --surface-tint: #f5f9fc;      /* barely-there blue-white */
  --mist: #eaf1f8;              /* soft blue mist */
  --haze: #f7f5f1;             /* warm cream haze */
  --light: #ffffff;

  /* Text */
  --text: #1c243c;
  --body-text: #4a4f5c;
  --muted: #6b7280;
  --gray: #6b7280;
  --light-gray: #e6e8ee;
  --border: #e6e8ee;

  /* Shadows (exact fas-render values) */
  --shadow: rgba(28, 36, 60, 0.1);
  --shadow-dark: rgba(28, 36, 60, 0.2);
  --shadow-card: 0 1px 2px rgba(28, 36, 60, 0.04), 0 8px 24px -12px rgba(28, 36, 60, 0.16);
  --shadow-soft: 0 4px 24px -8px rgba(28, 36, 60, 0.12);
  --shadow-lift: 0 18px 40px -16px rgba(28, 36, 60, 0.25);

  /* Type families */
  --font-display: "Space Grotesk", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-body: "DM Sans", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* ------------------------------------------------------------------ */
/* 2. Base typography                                                   */
/* ------------------------------------------------------------------ */
body {
  font-family: var(--font-body);
  color: var(--body-text);
  background-color: var(--surface);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--primary);
  letter-spacing: -0.01em;
}

a { transition: color 0.25s ease, background 0.25s ease, border-color 0.25s ease; }

/* ------------------------------------------------------------------ */
/* 3. Layout helpers                                                    */
/* ------------------------------------------------------------------ */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Oversized editorial display type */
.display-xl {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.02em;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
}
.display-lg {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
  font-size: clamp(2rem, 4.5vw, 3.25rem);
}

/* Faint dot-grid texture for tinted bands */
.bg-dots {
  background-image: radial-gradient(rgba(28, 36, 60, 0.05) 1px, transparent 1px);
  background-size: 22px 22px;
}

/* Tinted section tones — add as extra classes on <section> */
.sec-tint  { background: linear-gradient(to bottom, #ffffff, #f5f9fc, #eaf1f8); }
.sec-mist  { background: #eaf1f8; }
.sec-blue  { background: linear-gradient(to bottom right, #f5f9fc, #eaf1f8); }
.sec-cream { background: linear-gradient(to bottom, #ffffff, #f7f5f1); }
.sec-alt   { background: var(--surface-alt); }
.sec-dark  { background: var(--primary); color: #fff; }
.sec-dark h1, .sec-dark h2, .sec-dark h3, .sec-dark h4 { color: #fff; }

/* ------------------------------------------------------------------ */
/* 4. Eyebrow / section labels                                         */
/*    Restyle the old pill "section-label" into a hairline-dash kicker  */
/* ------------------------------------------------------------------ */
.eyebrow,
.section-label,
.hero-eyebrow,
.donation-hero-eyebrow,
.project-label,
.problem-label {
  display: inline-flex !important;
  align-items: center;
  gap: 0.6rem;
  background: none !important;
  border: none !important;
  padding: 0 !important;
  color: var(--accent);
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border-radius: 0 !important;
}
.eyebrow::before,
.section-label::before,
.hero-eyebrow::before,
.donation-hero-eyebrow::before,
.project-label::before,
.problem-label::before {
  content: "";
  width: 24px;
  height: 1px;
  background: currentColor;
  opacity: 0.55;
}
/* On dark bands the kicker turns soft gold */
.hero-eyebrow,
.donation-hero-eyebrow,
.sec-dark .section-label,
.page-header .section-label { color: var(--accent-light); }

/* Section headings */
.section-title,
.problem-title,
.showcase-title {
  font-family: var(--font-display);
  color: var(--primary);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.12;
}
.section-subtitle { color: var(--body-text); }

/* ------------------------------------------------------------------ */
/* 5. Buttons — muted-gold pill language                               */
/* ------------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.75rem;
  border-radius: 9999px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.25s ease-in-out;
}
.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: var(--shadow-soft);
}
.btn-primary:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  color: #fff;
  box-shadow: var(--shadow-lift);
}

.btn-secondary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: var(--shadow-soft);
}
.btn-secondary:hover { background: #283149; border-color: #283149; color: #fff; }

/* Light/outline button — used in nav + on dark heroes */
.btn-light {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.6);
}
.btn-light:hover { background: #fff; color: var(--primary); border-color: #fff; }

/* Outline button on light backgrounds */
.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 1px solid rgba(28, 36, 60, 0.3);
}
.btn-outline:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

/* Stripe stays a distinct — but now pill — donate CTA */
.btn-stripe {
  border-radius: 9999px;
  box-shadow: var(--shadow-soft);
}

/* ------------------------------------------------------------------ */
/* 6. Cards                                                            */
/* ------------------------------------------------------------------ */
.card,
.testimonial-card {
  background: linear-gradient(to bottom, #ffffff, #f5f9fc);
  border: 1px solid rgba(230, 232, 238, 0.7);
  border-radius: 16px;
  box-shadow: var(--shadow-card);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.card:hover,
.testimonial-card:hover {
  transform: translateY(-6px);
  border-color: rgba(176, 141, 87, 0.3);
  box-shadow: var(--shadow-lift);
}

/* Signature card with animated gold accent bar (donate "ways to give") */
.alternative-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(to bottom, #ffffff, #f5f9fc);
  border: 1px solid rgba(230, 232, 238, 0.7);
  border-radius: 16px;
  box-shadow: var(--shadow-card);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.alternative-card::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 4px;
  background: linear-gradient(to right, var(--accent), var(--accent-light));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
  z-index: 3;
}
.alternative-card:hover {
  transform: translateY(-6px);
  border-color: rgba(176, 141, 87, 0.3);
  box-shadow: var(--shadow-lift);
}
.alternative-card:hover::before { transform: scaleX(1); }
/* accent bar follows the rounded top corners */
.alternative-card::before { border-radius: 16px 16px 0 0; }

/* Featured card carries the "recommended" pill instead of the accent bar —
   it sits at top:-12px, so this card must NOT clip its overflow */
.alternative-card.featured {
  overflow: visible;
  background: linear-gradient(to bottom, #ffffff, #f7f5f1);
  border: 1px solid rgba(176, 141, 87, 0.4);
}
.alternative-card.featured::before {
  border-radius: 9999px;
  background: var(--accent);
  color: #fff;
  box-shadow: var(--shadow-soft);
}
/* Benefits sub-panel + check bullets → muted-gold palette */
.alternative-benefits { background: rgba(176, 141, 87, 0.07); border-radius: 12px; }
.alternative-benefits h4 i { color: var(--accent); }
.alternative-benefits li::before { color: var(--accent); }

/* ---- Leadership / board cards — Ragon-style borderless portrait ------ */
/* (models fas-render components/TeamGrid.jsx: 4:5 portrait, text below,   */
/*  no box; whole card stays clickable to open the bio panel)             */
.board-section .board-grid {
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 2.5rem 2rem;
}
.board-section .board-member-card {
  background: none;
  border: none;
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
  cursor: pointer;
}
.board-section .board-member-card::before { display: none; }
.board-section .board-member-card:hover {
  transform: none;
  box-shadow: none;
  border: none;
}
.board-section .member-image {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface-alt);
  box-shadow: var(--shadow-card);
}
.board-section .member-image img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: top;
  transition: transform 0.9s ease-out;
}
.board-section .board-member-card:hover .member-image img { transform: scale(1.05); }
.board-section .member-info { padding: 1.25rem 0 0; }
.board-section .member-name {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.25;
  margin-bottom: 0.35rem;
  transition: color 0.25s ease;
}
.board-section .board-member-card:hover .member-name { color: var(--accent); }
.board-section .member-title {
  color: var(--muted);
  font-weight: 400;
  font-size: 0.9rem;
  line-height: 1.4;
  margin-bottom: 0.5rem;
}
.board-section .member-role {
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
  padding-bottom: 0;
}
.board-section .view-profile {
  border-top: none;
  padding-top: 0;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.85rem;
}
.board-section .board-member-card:hover .view-profile i { transform: translateX(4px); }
.board-section .view-profile i { transition: transform 0.2s ease; }

/* Icon tile inside "other ways to give" cards */
.alternative-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px; height: 56px;
  border-radius: 12px;
  background: linear-gradient(to bottom right, rgba(195, 178, 153, 0.25), rgba(176, 141, 87, 0.15));
  color: var(--accent);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}
.alternative-card:hover .alternative-icon {
  background: linear-gradient(to bottom right, var(--accent), var(--accent-dark));
  color: #fff;
}

/* Board member imagery + meta */
.member-name  { font-family: var(--font-display); color: var(--primary); }
.view-profile { color: var(--accent); font-weight: 600; }

/* ------------------------------------------------------------------ */
/* 7. FAQ accordion                                                    */
/* ------------------------------------------------------------------ */
.faq-item {
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
}
.faq-question { background: #fff; }
.faq-question:hover,
.faq-question.active { background: var(--surface-tint); color: var(--primary); }
.faq-icon { color: var(--accent); }

/* ------------------------------------------------------------------ */
/* 7b. Modern written-testimonials (homepage)                          */
/* ------------------------------------------------------------------ */
.testimonials {
  background: linear-gradient(to bottom, #ffffff, #f5f9fc 45%, #eaf1f8);
}
.testimonials .testimonials-header { margin-bottom: 3.5rem; }
.testimonials .testimonials-title {
  font-family: var(--font-display);
  color: var(--primary);
  font-weight: 700;
  letter-spacing: -0.02em;
}
.testimonials .testimonials-subtitle { color: var(--body-text); }

.testimonials .testimonial-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}
.testimonials .testimonial-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border: 1px solid rgba(230, 232, 238, 0.85);
  border-radius: 20px;
  padding: 2.5rem 1.85rem 1.85rem;
  box-shadow: var(--shadow-card);
  overflow: visible;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.testimonials .testimonial-card:hover {
  transform: translateY(-6px);
  border-color: rgba(176, 141, 87, 0.3);
  box-shadow: var(--shadow-lift);
}
/* Floating gold quote badge */
.testimonials .testimonial-mark {
  position: absolute;
  top: -20px;
  left: 1.85rem;
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff;
  font-size: 1.05rem;
  box-shadow: var(--shadow-soft);
}
/* Hide the old inline quotation glyph if present */
.testimonials .testimonial-quote { display: none; }
/* Gold star rating */
.testimonials .testimonial-stars {
  display: flex;
  gap: 0.28rem;
  color: var(--accent);
  font-size: 0.82rem;
  margin: 0.4rem 0 1.1rem;
}
.testimonials .testimonial-text {
  font-style: normal;
  color: #2d3748;
  font-size: 1.02rem;
  line-height: 1.72;
  flex-grow: 1;
  margin-bottom: 1.5rem;
}
.testimonials .testimonial-author {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-top: auto;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}
.testimonials .testimonial-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 0 0 3px rgba(176, 141, 87, 0.18);
}
.testimonials .testimonial-info h4,
.testimonials .testimonial-name {
  font-family: var(--font-display);
  color: var(--primary);
  font-weight: 700;
  font-size: 0.98rem;
  margin: 0 0 0.15rem;
}
.testimonials .testimonial-role {
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin: 0;
}
@media (max-width: 900px) {
  .testimonials .testimonial-cards { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .testimonials .testimonial-cards { grid-template-columns: 1fr; }
}

/* ------------------------------------------------------------------ */
/* 8. Navigation — white bar, navy ink, gold accents                   */
/* ------------------------------------------------------------------ */
.navbar {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  box-shadow: none;
}
.navbar.scrolled {
  background: rgba(255, 255, 255, 0.96);
  border-bottom-color: var(--border);
  box-shadow: var(--shadow-soft);
}
.logo-image { height: 42px; width: auto; }

.nav-link {
  color: rgba(28, 36, 60, 0.8);
  font-family: var(--font-body);
  font-weight: 500;
  letter-spacing: 0.01em;
}
.nav-link:hover,
.nav-link.active { color: var(--accent); }
/* Retune the animated underline to gold */
.nav-link::after { background: var(--accent) !important; }

.fas-link { color: var(--accent); font-weight: 600; }
.fas-link:hover { color: var(--accent-dark); }

/* Nav "Donate" CTA — force to the gold pill (was .btn-light, invisible on white) */
.navbar .nav-actions .btn,
.navbar .nav-actions .btn-light {
  background: var(--accent);
  color: #fff;
  border: 1px solid var(--accent);
  box-shadow: var(--shadow-soft);
}
.navbar .nav-actions .btn:hover,
.navbar .nav-actions .btn-light:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  color: #fff;
}

/* Legacy pages use an icon+text brand instead of the image logo */
.logo { color: var(--primary); font-family: var(--font-display); font-weight: 700; }
.logo span { color: var(--primary); }
.logo-icon { color: var(--accent); }

/* Hamburger bars → navy */
.hamburger span { background: var(--primary); }

/* Mobile drawer → navy panel, soft-gold active (matches fas-render) */
.mobile-menu { background: var(--primary); }
.mobile-nav-link { color: rgba(255, 255, 255, 0.9); }
.mobile-nav-link:hover,
.mobile-nav-link.active {
  background: rgba(255, 255, 255, 0.1);
  color: var(--accent-light);
}
.mobile-nav-link i { color: var(--accent-light); }
.mobile-menu-header { border-bottom-color: rgba(255, 255, 255, 0.1); }

/* ------------------------------------------------------------------ */
/* 9. Footer — navy, soft-gold hovers                                  */
/* ------------------------------------------------------------------ */
.footer { background: var(--primary); color: #fff; }
.footer-link { color: rgba(255, 255, 255, 0.7); }
.footer-link:hover { color: var(--accent-light); }
.footer-link::after { background: var(--accent-light) !important; }
.footer-bottom { border-top-color: rgba(255, 255, 255, 0.1); color: rgba(255, 255, 255, 0.45); }

/* ------------------------------------------------------------------ */
/* 10. Editorial hairline divider                                      */
/* ------------------------------------------------------------------ */
.fas-divider {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  height: 1px;
  background: rgba(28, 36, 60, 0.15);
}
.fas-divider--label {
  display: flex;
  align-items: center;
  gap: 1rem;
  height: auto;
  background: none;
}
.fas-divider--label::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 9999px;
  background: var(--accent);
  flex-shrink: 0;
}
.fas-divider--label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(28, 36, 60, 0.15);
}

/* ------------------------------------------------------------------ */
/* 11. Hero treatments                                                 */
/* ------------------------------------------------------------------ */
/* index hero — deep navy scrim; light Space Grotesk headline          */
.hero {
  background: var(--primary);
}
.hero-title {
  font-family: var(--font-display);
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: #fff;
  font-size: clamp(2.4rem, 5.6vw, 4rem);
}
.hero-text { color: rgba(255, 255, 255, 0.85); }

/* Restyle the hero slideshow nav dots to the pill style */
.nav-dot {
  background: rgba(255, 255, 255, 0.4) !important;
  border-radius: 9999px;
  transition: all 0.5s ease;
}
.nav-dot.active { background: #fff !important; }

/* board page-header + donate hero — navy bands */
.page-header { background: var(--primary); }
.page-title {
  font-family: var(--font-display);
  color: #fff;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.page-subtitle { color: rgba(255, 255, 255, 0.8); }

.donation-hero-title {
  font-family: var(--font-display);
  font-weight: 300;
  letter-spacing: -0.02em;
  color: #fff;               /* navy hero → white headline (was invisible) */
  line-height: 1.06;
}
.donation-hero-text { color: rgba(255, 255, 255, 0.85); }

/* ------------------------------------------------------------------ */
/* 12. Slide-in bio panel (board) — gold accents                       */
/* ------------------------------------------------------------------ */
/* Panel header is navy → name must be white, title soft gold */
.panel-name { font-family: var(--font-display); color: #fff; }
.panel-title { color: var(--accent-light); }
.panel-role { color: rgba(255, 255, 255, 0.75); }
#closePanel { color: #fff; }
#closePanel:hover { color: var(--accent-light); }
/* Bio section heading gold icon */
.panel-section h3 i, .panel-section i { color: var(--accent); }

/* ------------------------------------------------------------------ */
/* 13. Scrollbar                                                       */
/* ------------------------------------------------------------------ */
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: var(--accent-light); border-radius: 8px; }
::-webkit-scrollbar-track { background: #f1f1f1; }

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
  .btn:hover,
  .card:hover,
  .board-member-card:hover,
  .alternative-card:hover { transform: none; }
}
