:root {
  --cream: #FBF4E9;
  --cream-deep: #F3E7D3;
  --ink: #2C2418;
  --terracotta: #D8683F;
  --terracotta-deep: #B84E2A;
  --gold: #E8AC4F;
  --teal: #4E8C82;
  --lavender: #9C8AC4;
  --white: #FFFDF9;
  --max: 1180px;
  --radius-soft: 40% 60% 55% 45% / 45% 40% 60% 55%;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Open Sans", sans-serif;
  background: var(--cream);
  color: var(--ink);
  line-height: 1.65;
  font-size: 17px;
}

h1, h2, h3, h4, .display {
  font-family: "Rubik", sans-serif;
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 0.5em;
}

h1 { font-size: calc(clamp(2.2rem, 5vw, 3.6rem) * var(--size-scale, 1)); }
h2 { font-size: calc(clamp(1.7rem, 3.5vw, 2.5rem) * var(--size-scale, 1)); }
h3 { font-size: 1.4rem; }

/* Admin-entered text keeps whatever line breaks were typed — a single Enter
   shows as a line break instead of silently collapsing like normal HTML. */
p { margin: 0 0 1em; white-space: pre-line; font-size: calc(1em * var(--size-scale, 1)); }

a { color: var(--terracotta-deep); }
a:hover { color: var(--terracotta); }

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

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 28px;
}

.pride-rule {
  height: 5px;
  width: 100%;
  background: linear-gradient(90deg, #E76F51, #E8AC4F, #F1D661, #4E8C82, #4D7EA8, #9C8AC4);
}

/* ---------- Nav ---------- */
.site-header {
  background: var(--cream);
  position: sticky;
  top: 0;
  z-index: 50;
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max);
  margin: 0 auto;
  padding: 18px 28px;
  gap: 20px;
  flex-wrap: wrap;
}

.brand {
  font-family: "Rubik", sans-serif;
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}
.brand span { color: var(--terracotta); }
.brand:hover { text-decoration: none; }

.nav-links {
  display: flex;
  gap: 22px;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}

.nav-links a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.98rem;
  padding-bottom: 3px;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s;
}
.nav-links a:hover { border-color: var(--terracotta); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  flex: 0 0 auto;
}
.nav-toggle span {
  display: block;
  width: 100%;
  height: 3px;
  border-radius: 2px;
  background: var(--ink);
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

@media (max-width: 880px) {
  .nav-toggle { display: flex; }
  .nav-links {
    display: none;
    width: 100%;
    flex-direction: column;
    gap: 2px;
    padding: 14px 0 6px;
  }
  .nav-links.open { display: flex; }
  .nav-links a { display: block; padding: 12px 6px; border-bottom: 1px solid var(--cream-deep); }
  .nav-links a:hover { border-bottom-color: var(--terracotta); }
  .nav-donate { display: inline-block; margin-top: 10px; text-align: center; border-bottom: none !important; }
}

.nav-donate {
  background: var(--terracotta);
  color: white !important;
  padding: 9px 20px;
  border-radius: 999px;
  border-bottom: none !important;
}
.nav-donate:hover { background: var(--terracotta-deep); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 14px 30px;
  border-radius: 999px;
  font-weight: 700;
  font-family: "Rubik", sans-serif;
  font-size: 1.02rem;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease;
}
.btn:hover { transform: translateY(-2px); text-decoration: none; }
.btn-terracotta { background: var(--terracotta); color: white; }
.btn-terracotta:hover { background: var(--terracotta-deep); color: white; }
.btn-gold { background: var(--gold); color: var(--ink); }
.btn-outline { background: transparent; border: 2px solid var(--ink); color: var(--ink); }
.btn-white { background: var(--white); color: var(--ink); }
.btn-small { padding: 9px 18px; font-size: 0.9rem; }

/* ---------- Full-bleed hero ---------- */
.hero-full {
  position: relative;
  min-height: 78vh;
  display: flex;
  align-items: flex-end;
  background-size: cover;
  background-position: center;
  color: white;
  overflow: hidden;
}
.hero-full.no-image {
  background: linear-gradient(135deg, var(--terracotta) 0%, var(--gold) 55%, var(--teal) 100%);
}
.hero-full::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(30,20,10,0.75) 0%, rgba(30,20,10,0.15) 55%, rgba(30,20,10,0.05) 100%);
}
.hero-full-inner {
  position: relative;
  z-index: 2;
  padding: 64px 28px 72px;
  max-width: var(--max);
  margin: 0 auto;
  width: 100%;
}
.hero-full h1 { color: white; max-width: 760px; }
.hero-full p { max-width: 560px; font-size: calc(1.2rem * var(--size-scale, 1)); }
.hero-full-actions { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 20px; }

.hero-plain {
  padding: 90px 28px 60px;
  text-align: center;
}
.hero-plain p { max-width: 620px; margin: 0 auto; font-size: calc(1.15rem * var(--size-scale, 1)); }

/* ---------- Split sections (alternating image/text) ---------- */
.split-section {
  display: grid;
  grid-template-columns: 3fr 2fr;
  align-items: center;
  gap: 56px;
  max-width: var(--max);
  margin: 0 auto;
  padding: 70px 28px;
}
.split-section.reverse { grid-template-columns: 2fr 3fr; }
.split-section.reverse .split-text { order: -1; }
.split-media {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-soft);
  overflow: hidden;
}
.split-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(var(--photo-zoom, 1));
  transform-origin: var(--photo-origin, 50% 50%);
}
.media-placeholder {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-soft);
  background: linear-gradient(135deg, var(--teal), var(--lavender));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-family: "Rubik", sans-serif;
  font-weight: 700;
  text-align: center;
  padding: 20px;
}
.split-text h2 { color: var(--terracotta-deep); }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--teal);
  margin-bottom: 10px;
  display: block;
}

/* ---------- Organic section dividers ---------- */
.divider {
  width: 100%;
  height: 70px;
  display: block;
  margin-top: -2px;
}

/* ---------- Stats band ---------- */
.stats-band {
  background: var(--terracotta);
  color: white;
  padding: 56px 28px;
}
.stats-row {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 32px;
  text-align: center;
}
.stat-num {
  font-family: "Rubik", sans-serif;
  font-weight: 700;
  font-size: 3rem;
  display: block;
}
.stat-label { font-size: 0.95rem; opacity: 0.9; }

/* ---------- Quote / testimonial ---------- */
.quote-band {
  padding: 80px 28px;
  text-align: center;
  background: var(--cream-deep);
}
.quote-band blockquote {
  max-width: 760px;
  margin: 0 auto;
  font-family: "Rubik", sans-serif;
  font-size: calc(clamp(1.4rem, 3vw, 2rem) * var(--size-scale, 1));
  font-weight: 500;
  color: var(--ink);
  position: relative;
  white-space: pre-line;
}
.quote-band cite {
  display: block;
  margin-top: 20px;
  font-style: normal;
  font-weight: 700;
  color: var(--terracotta-deep);
  font-size: calc(1rem * var(--size-scale, 1));
}

/* ---------- Photo mosaic (gallery, no uniform card grid) ---------- */
.mosaic {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: 140px;
  gap: 14px;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 28px 70px;
}
.mosaic a, .mosaic .mosaic-item {
  display: block;
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  cursor: pointer;
}
.mosaic img {
  width: 100%; height: 100%; object-fit: cover;
  transform: scale(var(--photo-zoom, 1));
  transform-origin: var(--photo-origin, 50% 50%);
  transition: transform 0.4s ease;
}
.mosaic a:hover img { transform: scale(calc(var(--photo-zoom, 1) * 1.06)); }
.mosaic .span-2-2 { grid-column: span 2; grid-row: span 2; }
.mosaic .span-2-1 { grid-column: span 2; }
.mosaic .span-3-2 { grid-column: span 3; grid-row: span 2; }
.mosaic .span-1-1 { grid-column: span 1; }
@media (max-width: 760px) {
  .mosaic { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 160px; }
  .mosaic .span-2-2, .mosaic .span-3-2, .mosaic .span-2-1 { grid-column: span 2; }
}

/* ---------- Milestones ---------- */
.milestone-list {
  max-width: 760px;
  margin: 0 auto;
  padding: 20px 28px 70px;
}
.milestone {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 20px;
  padding: 16px 0;
  border-bottom: 1px solid var(--cream-deep);
}
.milestone .yr {
  font-family: "Rubik", sans-serif;
  font-weight: 700;
  color: var(--terracotta-deep);
  font-size: 1.3rem;
}

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--ink);
  color: var(--white);
  text-align: center;
  padding: 80px 28px;
}
.cta-band h2 { color: white; }
.cta-band p { max-width: 560px; margin: 0 auto 28px; opacity: 0.9; }

/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.in-view { opacity: 1; transform: translateY(0); }

/* ---------- Simple content sections (about/faq/blog text pages) ---------- */
.content-section {
  max-width: 760px;
  margin: 0 auto;
  padding: 60px 28px;
}
.content-section h2 { color: var(--terracotta-deep); }

/* ---------- FAQ ---------- */
.faq-item {
  max-width: 760px;
  margin: 0 auto 18px;
  padding-bottom: 18px;
  border-bottom: 2px solid var(--cream-deep);
}
.faq-item summary {
  font-family: "Rubik", sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
  cursor: pointer;
  padding: 6px 0;
}
.faq-item p { margin-top: 10px; color: #4a4030; }
.faq-category { color: var(--teal); text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.8rem; font-weight: 700; margin: 40px auto 12px; max-width: 760px; padding: 0 28px; }

/* ---------- Blog ---------- */
.blog-list { max-width: var(--max); margin: 0 auto; padding: 20px 28px 70px; }
.blog-entry {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 32px;
  padding: 32px 0;
  border-bottom: 1px solid var(--cream-deep);
  align-items: center;
}
.blog-thumb { border-radius: 24px; aspect-ratio: 4/3; overflow: hidden; }
.blog-thumb img {
  width: 100%; height: 100%; object-fit: cover;
  transform: scale(var(--photo-zoom, 1));
  transform-origin: var(--photo-origin, 50% 50%);
}
.blog-entry .cat { color: var(--teal); font-weight: 700; font-size: 0.8rem; text-transform: uppercase; }
.blog-entry h3 { margin: 6px 0 8px; }
.blog-entry .meta { color: #6b5f4d; font-size: 0.9rem; }
@media (max-width: 640px) { .blog-entry { grid-template-columns: 1fr; } }

.post-header { max-width: 760px; margin: 0 auto; padding: 60px 28px 20px; }
.post-header .cat { color: var(--teal); font-weight: 700; text-transform: uppercase; font-size: 0.85rem; }
.post-hero-wrap { max-width: var(--max); margin: 0 auto; border-radius: 30px; aspect-ratio: 16/7; overflow: hidden; }
.post-hero-img {
  width: 100%; height: 100%; object-fit: cover;
  transform: scale(var(--photo-zoom, 1));
  transform-origin: var(--photo-origin, 50% 50%);
}
.post-body { max-width: 720px; margin: 30px auto 70px; padding: 0 28px; font-size: 1.1rem; }
.post-body h2 { margin-top: 1.6em; }

/* ---------- Events ---------- */
.event-row {
  display: flex;
  gap: 24px;
  align-items: center;
  padding: 26px 0;
  border-bottom: 1px solid var(--cream-deep);
  max-width: var(--max);
  margin: 0 auto;
}
.event-date-badge {
  background: var(--terracotta);
  color: white;
  border-radius: 16px;
  width: 76px;
  height: 76px;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: "Rubik", sans-serif;
}
.event-date-badge .day { font-size: 1.6rem; font-weight: 700; line-height: 1; }
.event-date-badge .mon { font-size: 0.8rem; text-transform: uppercase; }
.event-row h3 { margin: 0 0 4px; }
.event-row .loc { color: #6b5f4d; }

/* ---------- Donate page ---------- */
.zeffy-section {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px 28px 50px;
}
.zeffy-embed-wrap {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 1200px;
  border-radius: 30px;
  box-shadow: var(--shadow, 0 4px 20px rgba(44,36,24,0.06));
}
.zeffy-embed-wrap iframe {
  position: absolute;
  border: none;
  width: 100%;
  height: 100%;
}
.zeffy-placeholder {
  text-align: center;
  padding: 50px 30px;
  border-radius: 30px;
  background: var(--cream-deep);
}

.donate-options {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
  max-width: var(--max);
  margin: 0 auto;
  padding: 20px 28px 80px;
  justify-content: center;
}
.donate-option {
  flex: 1 1 280px;
  max-width: 340px;
  text-align: center;
  padding: 36px 26px;
  border-radius: var(--radius-soft);
  background: var(--cream-deep);
}
.donate-option h3 { color: var(--terracotta-deep); }
.donate-option img.qr { width: 160px; margin: 16px auto; border-radius: 12px; }

/* ---------- Forms ---------- */
form.simple-form { max-width: 560px; margin: 0 auto; padding: 0 28px 70px; }
form label { display: block; font-weight: 700; margin: 16px 0 6px; font-family: "Rubik", sans-serif; }
form input[type="text"], form input[type="email"], form input[type="tel"],
form input[type="url"], form input[type="password"], form input[type="date"],
form input[type="number"], form select, form textarea {
  width: 100%;
  padding: 12px 16px;
  border-radius: 14px;
  border: 2px solid var(--cream-deep);
  font-family: inherit;
  font-size: 1rem;
  background: white;
}
form textarea { min-height: 120px; resize: vertical; }
.inline-size-select {
  width: auto;
  display: inline-block;
  padding: 3px 8px;
  margin-left: 10px;
  font-size: 0.8rem;
  font-weight: 400;
  border-radius: 8px;
  border: 2px solid var(--cream-deep);
  vertical-align: middle;
}
.hp-field { position: absolute; left: -9999px; top: -9999px; width: 1px; height: 1px; overflow: hidden; }
.required-mark { color: var(--terracotta-deep); }

/* Admin-adjustable text size. Sets a scale multiplier only — every rule that
   can carry this class computes its own font-size as calc(base * var(--size-scale, 1))
   (see h1/h2/p/.hero-full p/.hero-plain p/.quote-band blockquote/.quote-band cite).
   Setting font-size directly here would win by specificity over element-specific
   rules like ".quote-band blockquote" and silently override its font-size back down. */
.text-size-sm { --size-scale: 0.75; }
.text-size-md { --size-scale: 1; }
.text-size-lg { --size-scale: 1.3; }
.text-size-xl { --size-scale: 1.6; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: #E9E0CF;
  padding: 60px 28px 30px;
  margin-top: 0;
}
.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}
.footer-inner h4 { color: white; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 8px; }
.footer-links a { color: #E9E0CF; text-decoration: none; }
.footer-links a:hover { color: var(--gold); }
.social-row { display: flex; gap: 14px; margin-top: 14px; }
.social-row a {
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255,255,255,0.1);
  display: flex; align-items: center; justify-content: center;
  color: white; text-decoration: none; font-weight: 700;
}
.social-row a:hover { background: var(--terracotta); }
.footer-bottom {
  max-width: var(--max); margin: 40px auto 0; padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.15);
  font-size: 0.85rem; color: #B8AD97;
}

/* ---------- Lightbox ---------- */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(20, 16, 10, 0.92);
  z-index: 100;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 90vw; max-height: 80vh; border-radius: 16px; }
.lightbox-caption { color: white; text-align: center; margin-top: 12px; }
.lightbox-close {
  position: absolute; top: 24px; right: 32px;
  color: white; font-size: 2.2rem; cursor: pointer; background: none; border: none;
}
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.15);
  color: white;
  font-size: 2.4rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}
.lightbox-nav:hover { background: rgba(255, 255, 255, 0.3); }
.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }
@media (max-width: 640px) {
  .lightbox-nav { width: 44px; height: 44px; font-size: 1.9rem; }
  .lightbox-prev { left: 8px; }
  .lightbox-next { right: 8px; }
}

/* ---------- Flash ---------- */
.flash {
  max-width: 700px;
  margin: 16px auto;
  padding: 14px 22px;
  border-radius: 14px;
  background: var(--gold);
  font-weight: 700;
  text-align: center;
}

/* ---------- Admin ---------- */
.admin-shell { max-width: 900px; margin: 40px auto; padding: 0 28px 80px; }
.admin-nav { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 24px; }
.admin-panel {
  background: white; border-radius: 20px; padding: 30px; margin-bottom: 24px;
  box-shadow: 0 4px 20px rgba(44,36,24,0.06);
}
.admin-list-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 0; border-bottom: 1px solid var(--cream-deep);
}
.photo-bulk-toolbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 0; border-bottom: 1px solid var(--cream-deep); margin-bottom: 6px;
}
.admin-thumb-wrap { width: 76px; height: 76px; border-radius: 10px; overflow: hidden; flex: 0 0 auto; }
.admin-thumb {
  width: 100%; height: 100%; object-fit: cover;
  transform: scale(var(--photo-zoom, 1));
  transform-origin: var(--photo-origin, 50% 50%);
}

.table-scroll { overflow-x: auto; margin: 10px 0; }
.photo-table { width: 100%; border-collapse: collapse; }
.photo-table th {
  text-align: left; font-family: "Rubik", sans-serif; font-size: 0.75rem;
  text-transform: uppercase; letter-spacing: 0.05em; color: #6b5f4d;
  padding: 4px 10px 10px; border-bottom: 2px solid var(--cream-deep); white-space: nowrap;
}
.photo-table td { padding: 10px; border-bottom: 1px solid var(--cream-deep); vertical-align: middle; }
.photo-table input[type="text"], .photo-table input[type="date"] { min-width: 140px; }
.tag { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 0.75rem; font-weight: 700; }
.tag-draft { background: #F0E4C8; color: #7A5B10; }
.tag-published { background: #D9EEE0; color: #1F6B3B; }
.ai-assist-box { background: var(--cream-deep); border-radius: 16px; padding: 18px; margin: 14px 0; }
.ai-assist-box textarea { min-height: 70px; }

/* ---------- Photo crop editor ---------- */
.crop-stage {
  width: 420px;
  height: 420px;
  max-width: 100%;
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  background: var(--cream-deep);
  cursor: grab;
  touch-action: none;
}
.crop-stage.dragging { cursor: grabbing; }
.crop-stage img {
  position: absolute;
  left: 0;
  top: 0;
  max-width: none;
  user-select: none;
  -webkit-user-drag: none;
}
#zoom-slider { width: 100%; margin-top: 8px; }
.crop-preview-box {
  overflow: hidden;
  border-radius: 12px;
  background: var(--cream-deep);
  margin-bottom: 20px;
}
.crop-preview-box.wide { aspect-ratio: 21 / 9; }
.crop-preview-box.standard { aspect-ratio: 4 / 3; max-width: 260px; }
.crop-preview-img { width: 100%; height: 100%; object-fit: cover; }

@media (max-width: 800px) {
  .split-section { grid-template-columns: 1fr; }
  .split-section.reverse .split-text { order: 0; }
  .blog-entry { grid-template-columns: 1fr; }
}
