/* ═══════════════════════════════════════════════════════════════════
   FUNDRAISER TEMPLATE — generic, brandable
   Every fundraiser event renders through /pages/fundraiser-template.html.
   Consumers can override brand via the `--fr-brand-*` custom properties
   which fall through to site defaults. Layout + spacing + type come
   from the centralized styles.css + token system on the rest of the site.
   ═══════════════════════════════════════════════════════════════════ */

:root {
  --fr-primary: var(--fr-brand-primary, #CB6330);
  --fr-primary-dark: var(--fr-brand-primary-dark, #A34F24);
  --fr-accent: var(--fr-brand-accent, #FECE00);
  --fr-dark: #0D1B1E;
  --fr-cream: #FDF8F0;
  --fr-warm: #F5EDE0;
  --fr-ink: #232323;
  --fr-ink-muted: #5C4A3A;
  --fr-border: #E4DDD2;
}

.fr-loading { text-align: center; padding: 8rem 2rem; color: var(--fr-ink-muted); }
[hidden] { display: none !important; }

/* ═══════════════════════════════════════════════════════════════════
   Hero — flexible treatment (logo, photo, or both on brand atmosphere)
   ═══════════════════════════════════════════════════════════════════ */
.fr-hero {
  position: relative;
  overflow: hidden;
  min-height: 560px;
  padding-top: 80px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  isolation: isolate;
  background: var(--fr-dark);
}

/* The hero photo (when present) lives behind the content, tinted for legibility */
.fr-hero-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
/* Dark scrim so white text reads on any photo */
.fr-hero-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(13,27,30,0.60) 0%, rgba(13,27,30,0.50) 40%, rgba(13,27,30,0.85) 100%);
  pointer-events: none;
}

/* Scoped brand atmosphere — topographic + grain + brand-tinted blobs.
   Only appears when the page has no hero photo (treatment = atmosphere). */
.fr-hero--atmosphere { background: var(--fr-dark); }
.fr-hero--atmosphere .fr-hero-atmosphere {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}
.fr-hero-atmosphere::before {
  content: '';
  position: absolute;
  inset: -5%;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 800 800'><g fill='none' stroke='white' stroke-width='1.1' stroke-linecap='round' opacity='0.25'><path d='M0 40 C 200 75, 600 5, 800 40'/><path d='M0 120 C 220 85, 580 155, 800 120'/><path d='M0 200 C 180 240, 620 165, 800 200'/><path d='M0 280 C 260 310, 540 250, 800 280'/><path d='M0 360 C 200 395, 600 320, 800 360'/><path d='M0 440 C 240 475, 560 405, 800 440'/><path d='M0 520 C 180 485, 620 555, 800 520'/><path d='M0 600 C 220 635, 580 570, 800 600'/><path d='M0 680 C 260 645, 540 715, 800 680'/><path d='M0 760 C 200 795, 600 725, 800 760'/></g></svg>");
  background-size: 800px 800px;
  background-repeat: repeat;
  opacity: 0.5;
  animation: fr-atm-drift 120s linear infinite;
  will-change: transform;
}
.fr-hero-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.65;
  pointer-events: none;
  will-change: transform;
  animation: fr-atm-breathe 14s ease-in-out infinite;
}
.fr-hero-blob--a { background: radial-gradient(circle, var(--fr-primary) 0%, transparent 70%); top: -120px; right: -100px; width: 560px; height: 560px; }
.fr-hero-blob--b { background: radial-gradient(circle, var(--fr-accent)  0%, transparent 70%); bottom: -160px; left: -100px; width: 520px; height: 520px; animation-delay: -4s; animation-duration: 18s; }
.fr-hero-blob--c { background: radial-gradient(circle, #ffffff           0%, transparent 70%); top: 30%; left: 30%; width: 380px; height: 380px; opacity: 0.18; animation-delay: -7s; animation-duration: 22s; }

@keyframes fr-atm-drift {
  0%   { transform: translate(0, 0); }
  50%  { transform: translate(-14px, 10px); }
  100% { transform: translate(0, 0); }
}
@keyframes fr-atm-breathe {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(18px, -10px) scale(1.06); }
}

/* Hero content — always on top, always white */
.fr-hero-inner {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 1.5rem 3.5rem;
  width: 100%;
  color: #fff;
}
.fr-hero-inner, .fr-hero-inner * { color: inherit; }
.fr-hero-logo {
  display: block;
  max-height: 80px;
  max-width: min(360px, 70vw);
  width: auto;
  margin-bottom: 1.75rem;
  filter: drop-shadow(0 2px 20px rgba(0,0,0,0.45));
}
.fr-eyebrow {
  display: inline-block;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fr-accent);
  font-weight: 700;
  margin-bottom: 1rem;
}
.fr-hero h1 {
  font-family: 'Lora', Georgia, serif;
  font-size: clamp(2.4rem, 5vw, 4rem);
  line-height: 1.05;
  font-weight: 700;
  color: #fff;
  margin: 0 0 0.85rem;
  letter-spacing: -0.015em;
}
.fr-tagline {
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  font-weight: 400;
  color: rgba(255,255,255,0.92);
  max-width: 62ch;
  margin: 0 0 1.75rem;
  line-height: 1.55;
}
.fr-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 2rem;
  font-size: 0.92rem;
  color: rgba(255,255,255,0.88);
  margin-bottom: 2rem;
}
.fr-hero-meta-item { display: flex; flex-direction: column; gap: 0.2rem; }
.fr-hero-meta-item-label {
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fr-accent);
  font-weight: 800;
  text-shadow: 0 1px 2px rgba(0,0,0,0.45);
}
.fr-hero-meta-item-value { color: #fff; font-weight: 500; }
.fr-ctas { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.fr-btn {
  display: inline-block;
  padding: 0.85rem 1.75rem;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: 'DM Sans', system-ui, sans-serif;
  border-radius: 999px;
  text-decoration: none;
  transition: transform 0.15s ease-out, background 0.2s, border-color 0.2s, color 0.2s;
  border: 2px solid transparent;
  cursor: pointer;
  letter-spacing: 0.01em;
}
.fr-btn-primary { background: var(--fr-primary); color: #fff; }
.fr-btn-primary:hover { background: var(--fr-primary-dark); transform: translateY(-1px); color: #fff; }
.fr-btn-secondary { background: transparent; color: #fff; border-color: rgba(255,255,255,0.45); }
.fr-btn-secondary:hover { background: rgba(255,255,255,0.1); border-color: #fff; color: #fff; }

/* ═══════════════════════════════════════════════════════════════════
   Sections
   ═══════════════════════════════════════════════════════════════════ */
.fr-section {
  padding: 3rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
}
.fr-section + .fr-section { padding-top: 1rem; }
.fr-section--compact { padding-top: 2rem; padding-bottom: 1rem; }
.fr-section--wide { max-width: none; padding-left: 0; padding-right: 0; background: var(--fr-cream); }
.fr-section--wide > .fr-section-inner { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.fr-section-head { margin-bottom: 1.75rem; max-width: 65ch; }
.fr-section-label {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fr-primary);
  font-weight: 700;
  margin-bottom: 0.6rem;
  display: block;
}
.fr-section-title {
  font-family: 'Lora', Georgia, serif;
  font-size: clamp(1.75rem, 3vw, 2.4rem);
  font-weight: 600;
  color: var(--fr-ink);
  margin: 0;
  letter-spacing: -0.01em;
  line-height: 1.15;
}
.fr-section-subtitle {
  margin-top: 0.65rem;
  color: var(--fr-ink-muted);
  max-width: 60ch;
  line-height: 1.6;
}

/* ═══════════════════════════════════════════════════════════════════
   About / Body content
   ═══════════════════════════════════════════════════════════════════ */
.fr-about-body { max-width: 70ch; line-height: 1.75; color: var(--fr-ink); font-size: 1.02rem; }
.fr-about-body p { margin-bottom: 1rem; }
.fr-about-body h2, .fr-about-body h3 { margin-top: 1.75rem; margin-bottom: 0.5rem; color: var(--fr-ink); font-family: 'Lora', serif; }

/* ═══════════════════════════════════════════════════════════════════
   Progress
   ═══════════════════════════════════════════════════════════════════ */
.fr-progress-box {
  background: var(--fr-cream);
  padding: 2rem 2.25rem;
  border-radius: 16px;
  border: 1px solid var(--fr-border);
  max-width: 720px;
}
.fr-progress-stats { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 0.9rem; }
.fr-progress-raised { font-size: 2rem; font-weight: 700; color: var(--fr-primary); font-family: 'Lora', serif; }
.fr-progress-goal { font-size: 0.95rem; color: var(--fr-ink-muted); }
.fr-progress-bar {
  height: 12px;
  background: rgba(0,0,0,0.06);
  border-radius: 999px;
  overflow: hidden;
}
.fr-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--fr-primary), var(--fr-accent));
  transition: width 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.fr-progress-donors { margin-top: 0.65rem; font-size: 0.82rem; color: var(--fr-ink-muted); }

/* ═══════════════════════════════════════════════════════════════════
   Partners strip
   ═══════════════════════════════════════════════════════════════════ */
.fr-partners-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: center;
  padding: 1.75rem 2rem;
  background: #fff;
  border-radius: 16px;
  border: 1px solid var(--fr-border);
}
.fr-partner {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  align-items: flex-start;
  min-width: 140px;
}
.fr-partner img {
  max-height: 52px;
  max-width: 160px;
  width: auto;
  height: auto;
  object-fit: contain;
  margin-bottom: 0.15rem;
}
.fr-partner-name { font-weight: 700; font-size: 0.92rem; color: var(--fr-ink); }
.fr-partner-relationship { font-size: 0.7rem; color: var(--fr-ink-muted); text-transform: uppercase; letter-spacing: 0.1em; }

/* ═══════════════════════════════════════════════════════════════════
   Sponsorship tier matrix (user loves this — preserve look)
   ═══════════════════════════════════════════════════════════════════ */
.fr-tiers-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--fr-border);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 4px 18px rgba(0,0,0,0.04);
}
.fr-tiers-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  min-width: 780px;
  font-family: 'DM Sans', system-ui, sans-serif;
}
.fr-tiers-table th,
.fr-tiers-table td {
  padding: 0.9rem 1rem;
  text-align: center;
  border-bottom: 1px solid var(--fr-border);
}
.fr-tiers-table thead th {
  background: var(--fr-dark);
  color: #fff;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding-top: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 3px solid var(--fr-primary);
}
.fr-tier-name { font-size: 0.88rem; font-weight: 700; letter-spacing: 0.04em; display: block; color: #fff; }
.fr-tier-amount { font-size: 1.15rem; font-weight: 700; color: var(--fr-accent); letter-spacing: 0; text-transform: none; margin-top: 0.2rem; display: block; font-family: 'Lora', serif; }
.fr-tiers-table tbody th {
  text-align: left;
  font-weight: 600;
  color: var(--fr-ink);
  background: var(--fr-cream);
  min-width: 220px;
}
.fr-tiers-table tbody tr:hover td,
.fr-tiers-table tbody tr:hover th { background: var(--fr-warm); }
.fr-star { color: var(--fr-primary); font-size: 1.15rem; }

/* ═══════════════════════════════════════════════════════════════════
   Gallery — horizontal carousel with scroll-snap + arrow controls
   ═══════════════════════════════════════════════════════════════════ */
.fr-gallery {
  position: relative;
}
.fr-gallery-track {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 0.5rem 0.25rem;
  list-style: none;
  margin: 0;
}
.fr-gallery-track::-webkit-scrollbar { display: none; }
.fr-gallery-slide {
  flex: 0 0 calc((100% - 2rem) / 3);
  scroll-snap-align: start;
  min-width: 0;
}
.fr-gallery-slide img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.3s, box-shadow 0.3s;
  background: var(--fr-cream);
  display: block;
}
.fr-gallery-slide img:hover {
  transform: scale(1.02);
  box-shadow: 0 10px 28px rgba(0,0,0,0.18);
}
.fr-gallery-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.75rem;
  gap: 1rem;
}
.fr-gallery-arrow {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--fr-border);
  color: var(--fr-ink);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.15s;
  flex-shrink: 0;
}
.fr-gallery-arrow:hover { background: var(--fr-primary); color: #fff; border-color: var(--fr-primary); transform: translateY(-1px); }
.fr-gallery-arrow:disabled { opacity: 0.35; cursor: not-allowed; transform: none; background: #fff; color: var(--fr-ink); border-color: var(--fr-border); }
.fr-gallery-dots {
  display: flex;
  gap: 0.4rem;
  flex: 1;
  justify-content: center;
  align-items: center;
}
.fr-gallery-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(0,0,0,0.18);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}
.fr-gallery-dot.is-active { background: var(--fr-primary); transform: scale(1.35); }

@media (max-width: 900px) {
  .fr-gallery-slide { flex-basis: calc((100% - 1rem) / 2); }
}
@media (max-width: 600px) {
  .fr-gallery-slide { flex-basis: 85%; }
}

/* ═══════════════════════════════════════════════════════════════════
   Downloads grid
   ═══════════════════════════════════════════════════════════════════ */
.fr-downloads-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}
.fr-download {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 1.05rem 1.15rem;
  background: #fff;
  border: 1px solid var(--fr-border);
  border-radius: 12px;
  color: var(--fr-ink);
  text-decoration: none;
  transition: transform 0.15s ease-out, border-color 0.2s, background 0.2s;
}
.fr-download:hover {
  border-color: var(--fr-primary);
  background: var(--fr-cream);
  transform: translateY(-1px);
}
.fr-download-icon {
  width: 38px;
  height: 38px;
  background: var(--fr-warm);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--fr-primary);
}
.fr-download-title { font-weight: 600; font-size: 0.95rem; color: var(--fr-ink); }
.fr-download-type { font-size: 0.7rem; color: var(--fr-ink-muted); text-transform: uppercase; letter-spacing: 0.1em; }

/* ═══════════════════════════════════════════════════════════════════
   Contacts
   ═══════════════════════════════════════════════════════════════════ */
.fr-contacts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}
.fr-contact-card {
  padding: 1.35rem 1.5rem;
  border: 1px solid var(--fr-border);
  border-radius: 12px;
  background: #fff;
}
.fr-contact-name { font-weight: 700; font-size: 1.1rem; color: var(--fr-ink); font-family: 'Lora', serif; }
.fr-contact-role { font-size: 0.8rem; color: var(--fr-ink-muted); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 0.8rem; }
.fr-contact-card a {
  display: block;
  color: var(--fr-primary);
  text-decoration: none;
  font-size: 0.92rem;
  padding: 0.2rem 0;
}
.fr-contact-card a:hover { text-decoration: underline; }

/* ═══════════════════════════════════════════════════════════════════
   Footer CTA
   ═══════════════════════════════════════════════════════════════════ */
.fr-footer-cta {
  background: var(--fr-dark);
  color: #fff;
  padding: 5rem 1.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.fr-footer-cta h2 {
  font-family: 'Lora', Georgia, serif;
  font-size: clamp(1.9rem, 3.5vw, 2.75rem);
  font-weight: 600;
  margin-bottom: 0.85rem;
  color: #fff;
  letter-spacing: -0.01em;
}
.fr-footer-cta p {
  color: rgba(255,255,255,0.8);
  max-width: 52ch;
  margin: 0 auto 2rem;
  line-height: 1.6;
}

/* ═══════════════════════════════════════════════════════════════════
   Lightbox
   ═══════════════════════════════════════════════════════════════════ */
.fr-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}
.fr-lightbox.open { display: flex; }
.fr-lightbox img { max-width: 100%; max-height: 100%; border-radius: 10px; }
.fr-lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 2.5rem;
  cursor: pointer;
  line-height: 1;
}

/* ═══════════════════════════════════════════════════════════════════
   Reveal animations (triggered by the site's existing motion.js)
   ═══════════════════════════════════════════════════════════════════ */
.fr-reveal-up { opacity: 0; transform: translateY(24px); transition: opacity 0.7s cubic-bezier(0.22,1,0.36,1), transform 0.7s cubic-bezier(0.22,1,0.36,1); }
.fr-reveal-up.fr-in-view { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  .fr-hero-blob, .fr-hero-atmosphere::before { animation: none; }
  .fr-reveal-up { opacity: 1; transform: none; transition: none; }
}

@media (max-width: 640px) {
  .fr-hero { min-height: 440px; }
  .fr-hero-inner { padding: 3rem 1rem 2.5rem; }
  .fr-hero-logo { max-height: 80px; }
  .fr-section { padding: 3rem 1rem; }
  .fr-tiers-table thead th { padding-left: 0.5rem; padding-right: 0.5rem; }
  .fr-tiers-table tbody th { min-width: 160px; font-size: 0.82rem; }
  .fr-progress-box { padding: 1.5rem; }
  .fr-partners-strip { padding: 1.25rem; gap: 1.25rem; }
}
