/* ============================================================
   Benicians Adopting Benicia — site styles
   Editorial design system: Newsreader (serif) + Public Sans.
   Styling lives here as semantic classes and [data-r] attribute
   hooks; markup carries no presentational inline styles.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Newsreader:ital,opsz,wght@0,6..72,400;0,6..72,500;0,6..72,600;0,6..72,700;1,6..72,400;1,6..72,500;1,6..72,600&family=Public+Sans:wght@400;500;600;700;800&display=swap');

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: 'Public Sans', sans-serif;
  background: #fbf6ec;
  color: #1e2a4f;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
[data-site] { overflow-x: clip; min-height: 100vh; display: flex; flex-direction: column; }
[data-site] > main { flex: 1; }
::selection { background: #8c3a2b; color: #fbf6ec; }
img { max-width: 100%; }

/* ---------- Markdown-page prose (page.html layout) ---------- */
.page-prose { font-size: 17px; line-height: 1.7; color: #4f4a40; }
.page-prose h2 {
  font-family: 'Newsreader', serif; font-size: 30px; font-weight: 600;
  color: #1e2a4f; margin: 38px 0 12px;
}
.page-prose h3 {
  font-family: 'Newsreader', serif; font-size: 23px; font-weight: 600;
  color: #1e2a4f; margin: 28px 0 10px;
}
.page-prose p { margin: 0 0 18px; }
.page-prose a { color: #8c3a2b; font-weight: 600; text-decoration: none; }
.page-prose a:hover { text-decoration: underline; }
.page-prose ul { padding-left: 20px; margin: 0 0 18px; }
.page-prose li { margin-bottom: 8px; }
.page-prose strong { color: #2a3354; }
.page-prose hr { border: none; border-top: 1px solid #cdbf9f; margin: 32px 0; }

/* ---------- Nav links ---------- */
.nav-link { text-decoration: none; color: #3a3833; }
.nav-link[aria-current="page"] { color: #8c3a2b; }
.nav-donate { background: #8c3a2b; color: #fbf6ec; padding: 8px 18px; border-radius: 4px; text-decoration: none; letter-spacing: 0.08em; }

/* ---------- Layout: container system ----------
   .container centers; .container-pad adds the (near-universal) 40px
   horizontal gutter; .container-NNN sets max-width. Any class layered
   on top must only ever set top/bottom padding or margin (longhand),
   never the shorthand, or it will silently zero out container-pad. */
.container { margin-left: auto; margin-right: auto; }
.container-pad { padding-left: 40px; padding-right: 40px; }
.container-780  { max-width: 780px; }
.container-900  { max-width: 900px; }
.container-980  { max-width: 980px; }
.container-1000 { max-width: 1000px; }
.container-1100 { max-width: 1100px; }
.container-1180 { max-width: 1180px; }

/* ---------- Shared primitives ---------- */
.link-quiet { color: inherit; text-decoration: none; }
.card {
  background: #fff; border: 1px solid #cdbf9f;
  box-shadow: 0 20px 44px -26px rgba(30,42,79,0.5);
}
/* events.astro's location card uses a narrower left column than the
   shared g-split base rule; combining both selectors (rather than
   relying on file order) keeps this an unambiguous specificity win */
[data-r~="g-split"].card { grid-template-columns: 1.05fr 0.95fr; }

/* ---------- data-r element base styles ---------- */
[data-r~="wordmark"] {
  font-family: 'Newsreader', serif; font-size: 40px; font-weight: 600;
  letter-spacing: -0.01em; margin: 12px 0 5px;
}
[data-r~="subtitle"] {
  font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: #7d766a;
  margin: 1em 0;
}
[data-r~="t-page"] {
  font-family: 'Newsreader', serif; font-size: 54px; font-weight: 600;
  letter-spacing: -0.02em; line-height: 1.04; margin: 0 0 18px;
}
[data-r~="t-hero"] {
  font-family: 'Newsreader', serif; font-size: 62px; line-height: 1.02;
  font-weight: 600; letter-spacing: -0.02em; margin: 0 0 20px;
}
[data-r~="t-quote"] {
  font-family: 'Newsreader', serif; font-size: 30px; line-height: 1.4;
  font-weight: 500; font-style: italic; margin: 16px 0 0;
}
[data-r~="ledger-num"] {
  font-family: 'Newsreader', serif; font-size: 48px; color: #b08534;
  font-weight: 500; line-height: 1;
}
[data-r~="util"] {
  background: #1e2a4f; color: #d9d3c5; font-size: 11.5px; padding: 8px 40px;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 8px;
}
[data-r~="util"] span:first-child { text-transform: uppercase; letter-spacing: 0.16em; }
[data-r~="util"] span:last-child  { letter-spacing: 0.04em; }
[data-r~="nav"] {
  position: sticky; top: 0; z-index: 50; background: #fbf6ec;
  box-shadow: 0 1px 0 #cdbf9f; padding: 13px 0; border-top: 2px solid #1e2a4f;
  display: flex; justify-content: center; align-items: center; gap: 30px;
  flex-wrap: wrap; font-size: 12.5px; font-weight: 700; letter-spacing: 0.13em;
  text-transform: uppercase;
}
[data-r~="g-hero"] {
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 48px; align-items: center;
  padding-top: 50px; padding-bottom: 44px;
}
[data-r~="g-foot"] {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 48px;
  padding-top: 52px; padding-bottom: 52px;
}
[data-r~="g-split"] { display: grid; grid-template-columns: 1fr 1fr; gap: 0; align-items: stretch; }
[data-r~="cta-l"] { padding: 56px 48px 56px 0; }
[data-r~="cta-img"] { width: 100%; height: 300px; object-fit: cover; display: block; }
[data-r~="split-img"] { border-left: 1px solid #cdbf9f; }
[data-r~="split-img"] img { width: 100%; height: 100%; min-height: 340px; object-fit: cover; display: block; }
[data-r~="g4"] { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; }
[data-r~="g4"][data-r~="g-gallery"] { gap: 10px; }
[data-r~="g4cell"] { padding: 18px 22px 4px; border-top: 2px solid #1e2a4f; border-right: 1px solid #cdbf9f; }
[data-r~="g4cell"]:last-child { border-right: none; }
[data-r~="g4cell"] svg { width: 24px; height: 24px; }
[data-r~="g4cell"] > div { font-family: 'Newsreader', serif; font-size: 30px; color: #b08534; font-weight: 500; margin-top: 10px; }
[data-r~="g4cell"] h4 { font-family: 'Newsreader', serif; font-size: 23px; font-weight: 600; margin: 4px 0 8px; }
[data-r~="g4cell"] p { font-size: 13.5px; line-height: 1.6; color: #5c574e; margin: 0; }
[data-r~="ledger"] { display: grid; grid-template-columns: 96px 1fr auto; gap: 24px; align-items: center; padding: 32px 0; border-top: 1px solid #cdbf9f; }
[data-r~="ledger"][data-r~="ledger-2col"] { grid-template-columns: 96px 1fr; align-items: stretch; }
[data-r~="ledger-2col"] .ledger-p { margin-bottom: 18px; }
[data-r~="card-stack"] { display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap; padding: 40px; }
[data-r~="card-stack"] > div:first-child { display: flex; align-items: center; gap: 22px; }

/* ---------- Eyebrow & lead ---------- */
.eyebrow {
  font-size: 12px; font-weight: 700; letter-spacing: 0.2em;
  text-transform: uppercase; color: #b08534; margin-bottom: 14px;
}
.eyebrow.eyebrow-flush { margin-bottom: 0; }
.lead { font-size: 19px; line-height: 1.6; color: #4f4a40; margin: 0; }
.lead.lead-spaced { margin-bottom: 30px; }

/* ---------- Page header ---------- */
.page-header { max-width: 820px; margin: 0 auto; padding: 54px 40px 12px; text-align: center; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; font-size: 14px; font-weight: 700; letter-spacing: 0.04em;
  padding: 14px 26px; border-radius: 4px; text-decoration: none; white-space: nowrap;
}
.btn-lg { padding: 16px 34px; font-size: 15px; }
.btn-red         { background: #8c3a2b; color: #fbf6ec; }
.btn-navy        { background: #1e2a4f; color: #fbf6ec; }
.btn-gold        { background: #b08534; color: #1e2a4f; }
.btn-ghost-navy  { border: 1.5px solid #1e2a4f; color: #1e2a4f; }
.btn-ghost-cream { border: 1.5px solid #cdbf9f; color: #f3ead7; }
.btn-outline     { display: inline-flex; align-items: center; gap: 8px; border: 1px solid #cdbf9f; background: #fff; color: #1e2a4f; font-size: 13.5px; font-weight: 600; padding: 10px 18px; }
.btn-group       { display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------- Image frame ---------- */
.img-frame {
  padding: 10px; background: #fff; border: 1px solid #cdbf9f;
  box-shadow: 0 20px 44px -26px rgba(30,42,79,0.5);
}
.img-frame img { display: block; width: 100%; border: 1px solid #e2d7bf; }

/* ---------- Rule heading (h + extending line to the right) ---------- */
.rule-heading { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.rule-heading h2, .rule-heading h3 {
  font-family: 'Newsreader', serif; font-size: 30px; font-weight: 600;
  margin: 0; white-space: nowrap;
}
.rule-heading::after { content: ''; flex: 1; height: 1px; background: #cdbf9f; }

/* ---------- Section divider (label with flanking rules) ---------- */
.section-divider {
  display: flex; align-items: center; justify-content: center;
  gap: 16px; margin-bottom: 30px;
}
.section-divider.section-divider-tight { margin-bottom: 24px; }
.section-divider::before, .section-divider::after {
  content: ''; width: 48px; height: 1px; background: #cdbf9f; flex-shrink: 0;
}
.section-divider h2, .section-divider h3 {
  font-size: 13px; font-weight: 700; letter-spacing: 0.24em; text-transform: uppercase; margin: 0;
}

/* ---------- CTA banner ---------- */
.cta-banner { background: #1e2a4f; color: #f3ead7; padding: 48px; text-align: center; }
.cta-banner h2 {
  font-family: 'Newsreader', serif; font-size: 30px; font-weight: 600; margin: 0 0 12px;
}
.cta-banner p {
  font-size: 16px; line-height: 1.6; color: #cdd3e4; margin: 0 auto 24px; max-width: 34em;
}
.cta-banner .btn-group { justify-content: center; }

/* ---------- Pillar grid (2-col, borders between cells) ---------- */
.pillar-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border-top: 2px solid #1e2a4f; }
.pillar-grid > div { padding: 26px 30px; }
.pillar-grid > div:nth-child(odd) { border-right: 1px solid #cdbf9f; }
.pillar-grid > div:not(:nth-last-child(-n+2)) { border-bottom: 1px solid #cdbf9f; }
.pillar-grid > div > div { font-family: 'Newsreader', serif; font-size: 26px; color: #b08534; font-weight: 500; }
.pillar-grid h3 { font-family: 'Newsreader', serif; font-size: 24px; font-weight: 600; margin: 4px 0 10px; }
.pillar-grid p { font-size: 14.5px; line-height: 1.65; color: #5c574e; margin: 0; }

/* ---------- Ledger (Get Involved rows) ---------- */
.ledger-list { display: flex; flex-direction: column; padding-top: 46px; padding-bottom: 64px; }
.ledger-list > [data-r~="ledger"]:first-child { border-top: 2px solid #1e2a4f; }
.ledger-list > [data-r~="ledger"]:last-child  { border-bottom: 2px solid #1e2a4f; }
.ledger-h2 {
  font-family: 'Newsreader', serif; font-size: 27px; font-weight: 600; margin: 0 0 8px;
}
.ledger-p { font-size: 15px; line-height: 1.6; color: #5c574e; margin: 0; max-width: 42em; }

/* ---------- About page mission ---------- */
.mission-text { font-family: 'Newsreader', serif; font-size: 23px; line-height: 1.5; color: #2a3354; }
.mission-text p { margin: 0; }
.mission-text p:first-of-type::first-letter {
  float: left;
  font-family: 'Newsreader', serif;
  font-size: 74px;
  line-height: 0.78;
  font-weight: 600;
  color: #8c3a2b;
  padding: 6px 14px 0 0;
}

/* ---------- Header / masthead ---------- */
.masthead { padding-top: 22px; text-align: center; }
.masthead-logo-link { display: block; }
.masthead-logo-link img {
  width: 66px; height: 66px; border-radius: 50%; margin: 0 auto 14px;
  display: block; box-shadow: 0 6px 18px -8px rgba(30,42,79,0.5);
}
.masthead-rule-row { display: flex; align-items: center; justify-content: center; gap: 18px; }
.masthead-rule { flex: 1; height: 1px; background: #cdbf9f; max-width: 200px; }
.masthead-label { font-size: 10.5px; font-weight: 700; letter-spacing: 0.32em; text-transform: uppercase; color: #8c3a2b; white-space: nowrap; }
.masthead-wordmark-link { text-decoration: none; color: inherit; }

/* ---------- Footer ---------- */
.footer { background: #1e2a4f; color: #cdd3e4; margin-top: auto; }
.footer-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.footer-logo { width: 52px; height: 52px; border-radius: 50%; }
.footer-brand-name { font-family: 'Newsreader', serif; font-size: 19px; font-weight: 600; color: #fff; }
.footer-blurb { font-size: 14px; line-height: 1.6; color: #aab2cc; margin: 0; max-width: 30em; }
.footer-col-heading { font-size: 11px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: #b08534; margin: 0 0 16px; }
.footer-links { display: flex; flex-direction: column; gap: 11px; font-size: 14px; }
.footer-social { display: flex; gap: 16px; margin-bottom: 18px; }
.footer-social a { color: #aab2cc; }
.footer-social svg { width: 22px; height: 22px; }
.footer-phone { font-size: 14px; color: inherit; text-decoration: none; }
.footer-copyright { border-top: 1px solid rgba(255,255,255,0.12); text-align: center; padding: 18px; font-size: 12px; letter-spacing: 0.06em; color: #8b93b0; }

/* ---------- Homepage sections ---------- */
.text-accent { font-style: italic; color: #8c3a2b; }
.hero-lead { font-size: 18px; line-height: 1.65; color: #4f4a40; margin: 0 0 26px; max-width: 31em; }
.hero-frame-inner { border: 1px solid #e2d7bf; padding: 6px; }
.hero-frame-inner img { height: 320px; object-fit: cover; }
.hero-caption { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: #8a8275; text-align: center; padding: 10px 0 4px; }
.pillars-section { padding-top: 8px; padding-bottom: 52px; }
.quote-band { background: #1e2a4f; color: #f3ead7; padding: 56px 40px; text-align: center; }
.video-section { padding-top: 56px; padding-bottom: 8px; }
.video-frame { aspect-ratio: 16/9; overflow: hidden; border: 1px solid #e2d7bf; }
.video-frame iframe { display: block; }
.gallery-section { padding-top: 56px; padding-bottom: 56px; }
.gallery-heading-wrap { text-align: center; margin-bottom: 26px; }
.gallery-heading { font-family: 'Newsreader', serif; font-size: 34px; font-weight: 600; margin: 0 0 6px; }
.gallery-intro { font-size: 14px; color: #8a8275; margin: 0; letter-spacing: 0.02em; }
.gallery-item { display: block; }
.gallery-item img { width: 100%; height: 200px; object-fit: cover; border: 1px solid #cdbf9f; cursor: zoom-in; }
.events-cta-band { background: #f3e9d5; padding-top: 8px; }
.events-cta-heading { font-family: 'Newsreader', serif; font-size: 40px; font-weight: 600; line-height: 1.05; margin: 0 0 16px; }
.events-cta-copy { font-size: 16px; line-height: 1.65; color: #4f4a40; margin: 0 0 26px; max-width: 30em; }
.events-cta-img-wrap { align-self: end; }
.social-section { padding-top: 60px; padding-bottom: 60px; text-align: center; }
.social-heading { font-family: 'Newsreader', serif; font-size: 30px; font-weight: 600; margin: 0 0 6px; }
.social-intro { font-size: 15px; color: #8a8275; margin: 0 0 34px; }
.social-links { display: flex; justify-content: center; gap: 56px; flex-wrap: wrap; }
.social-links a { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.social-links svg { width: 36px; height: 36px; }
.social-links span { font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }

/* ---------- Events page ---------- */
.events-main { padding-top: 50px; padding-bottom: 64px; }
.fb-panel { padding: 40px; }
.fb-panel-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.icon-badge { width: 42px; height: 42px; border-radius: 50%; background: #1e2a4f; display: flex; align-items: center; justify-content: center; }
.icon-badge svg { width: 22px; height: 22px; }
.fb-intro { font-family: 'Newsreader', serif; font-size: 22px; line-height: 1.5; color: #2a3354; margin: 0 0 20px; }
.fb-note { font-size: 15px; line-height: 1.6; color: #5c574e; margin: 0 0 26px; }

/* ---------- Newsletter page ---------- */
.newsletter-card-section { padding-top: 46px; padding-bottom: 8px; }
.newsletter-icon { width: 64px; height: 80px; background: #f3e9d5; border: 1px solid #cdbf9f; position: relative; flex-shrink: 0; }
.newsletter-icon span { position: absolute; left: 8px; }
.newsletter-icon span:nth-child(1) { top: 10px; right: 8px;  height: 2px;   background: #b08534; }
.newsletter-icon span:nth-child(2) { top: 18px; right: 14px; height: 1.5px; background: #cdbf9f; }
.newsletter-icon span:nth-child(3) { top: 24px; right: 10px; height: 1.5px; background: #cdbf9f; }
.newsletter-icon span:nth-child(4) { top: 30px; right: 18px; height: 1.5px; background: #cdbf9f; }
.issue-title { font-family: 'Newsreader', serif; font-size: 26px; font-weight: 600; margin: 4px 0 0; }
.newsletter-content-section { padding-top: 30px; padding-bottom: 64px; }
.newsletter-prose { border-top: 1px solid #cdbf9f; padding-top: 28px; text-align: center; font-size: 16px; line-height: 1.65; color: #5c574e; }

/* ---------- About page ---------- */
.about-hero-section { padding-top: 40px; padding-bottom: 8px; }
.about-hero-section img { height: 380px; object-fit: cover; }
.about-mission-section { padding-top: 48px; padding-bottom: 8px; }
.about-pillars-section { margin-top: 50px; margin-bottom: 8px; }
.about-cta-section { margin-top: 40px; padding-bottom: 60px; }

/* ---------- Tablet / phone ( <= 820px ) ---------- */
@media (max-width: 820px) {
  [data-site] section { padding-left: 22px; padding-right: 22px; }
  [data-site] header .masthead { padding-left: 18px; padding-right: 18px; }
  [data-site] [data-r~="wordmark"] { font-size: 28px; }
  [data-site] [data-r~="subtitle"] { letter-spacing: 0.14em; font-size: 10px; }
  [data-site] [data-r~="nav"] { gap: 14px; font-size: 11px; letter-spacing: 0.1em; padding: 12px 0; }
  [data-site] [data-r~="g-hero"] { grid-template-columns: 1fr; gap: 30px; padding-top: 32px; padding-bottom: 34px; }
  [data-site] [data-r~="g-split"] { grid-template-columns: 1fr; }
  [data-site] [data-r~="g-foot"] { grid-template-columns: 1fr; gap: 30px; }
  [data-site] [data-r~="t-hero"]  { font-size: 42px; }
  [data-site] [data-r~="t-page"]  { font-size: 40px; }
  [data-site] [data-r~="t-quote"] { font-size: 23px; }
  [data-site] [data-r~="cta-l"]   { padding: 36px 0 0; }
  [data-site] [data-r~="cta-img"] { height: 240px; }
  [data-site] [data-r~="ledger"] { grid-template-columns: 1fr; gap: 6px; }
  [data-site] [data-r~="ledger-num"] { font-size: 34px; }
  [data-site] .cta-banner { padding: 34px 24px; }
  [data-site] .pillar-grid { grid-template-columns: 1fr; }
  [data-site] .pillar-grid > div:nth-child(odd) { border-right: none; }
  [data-site] .pillar-grid > div:not(:last-child) { border-bottom: 1px solid #cdbf9f; }
  [data-site] .page-header { padding-left: 22px; padding-right: 22px; }
  [data-site] [data-r~="split-img"] { border-left: none; border-top: 1px solid #cdbf9f; }
  [data-site] [data-r~="split-img"] img { min-height: 240px; }
}

/* ---------- Phone ( <= 520px ) ---------- */
@media (max-width: 520px) {
  [data-site] [data-r~="g4"] { grid-template-columns: 1fr 1fr; }
  /* !important: exact specificity tie with the base [data-r~="g4cell"]:last-child
     rule above; source order alone resolves it the same way since this block is
     physically last in the file, but !important makes that order-independent */
  [data-site] [data-r~="g4cell"] { border-right: none !important; }
  [data-site] [data-r~="t-hero"] { font-size: 34px; }
  [data-site] [data-r~="t-page"] { font-size: 33px; }
  [data-site] [data-r~="t-quote"] { font-size: 21px; line-height: 1.45; }
  /* !important: exact specificity tie with the base [data-r~="util"] span
     :first-child/:last-child rules above — same reasoning as g4cell */
  [data-site] [data-r~="util"] span { font-size: 10.5px !important; }
  [data-site] [data-r~="card-stack"] { flex-direction: column; align-items: flex-start; gap: 22px; }
}
