/* zoa-fund base.css — overrides + additions on top of theme.json tokens.
   theme.json already provides colors, spacing, font sizes. This file holds:
   - design components that theme.json can't fully express (eyebrows, cards, hero, etc.)
   - responsive tweaks
*/

:root {
  --burgundy:       #4A1C20;
  --berry:          #802D4F;
  --orange:         #D15440;
  --dark-evergreen: #0F2C25;
  --dark-teal:      #295844;
  --moss:           #4D7D3B;
  --oat-milk:       #F6EFDE;
  --rule:           rgba(74, 28, 32, 0.12);
  --muted:          rgba(74, 28, 32, 0.55);

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-24: 6rem;

  --container-max: 64rem;
  --measure: 36rem;

  --fs-eyebrow: 0.8125rem;
  --fs-body:    1.0625rem;
  --fs-lead:    1.1875rem;
}

/* Site-wide body rhythm */
body {
  font-feature-settings: "kern" 1, "liga" 1;
  -webkit-font-smoothing: antialiased;
}
a { text-underline-offset: 3px; text-decoration-thickness: 1px; }

/* Eyebrow utility (small uppercase label above headings) */
.eyebrow,
p.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: var(--fs-eyebrow);
  font-weight: 700;
  color: var(--muted);
  margin: 0 0 var(--space-3);
}
.eyebrow--accent { color: var(--orange); }
.has-dark-evergreen-background-color .eyebrow,
.has-burgundy-background-color .eyebrow {
  color: rgba(246,239,222,0.7);
}

/* Lead paragraph (slightly larger, shorter line length) */
.lead,
p.lead {
  font-size: var(--fs-lead);
  line-height: 1.5;
  max-width: var(--measure);
  margin-bottom: var(--space-6);
}

/* Dark section default text color */
.has-dark-evergreen-background-color,
.has-burgundy-background-color,
.has-berry-background-color {
  color: var(--oat-milk);
}
.has-dark-evergreen-background-color a,
.has-burgundy-background-color a,
.has-berry-background-color a {
  color: var(--oat-milk);
  text-decoration-color: rgba(246,239,222,0.5);
}

/* Card — used in patterns. Group block with .card class. */
.card {
  background: rgba(255,255,255,0.4);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.has-dark-evergreen-background-color .card {
  background: rgba(255,255,255,0.05);
  border-color: rgba(246, 239, 222, 0.15);
}
.card h3 { margin: 0; line-height: 1.2; }
.card p  { margin: 0; font-size: 1rem; line-height: 1.5; }
.card a { color: inherit; text-decoration: none; }
.card a:hover { color: var(--orange); }

/* Card with top photo (issue cards) */
.card--photo {
  padding: 0;
  overflow: hidden;
}
.card--photo img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4/3;
  object-fit: cover;
}
.card--photo .card__inner {
  padding: var(--space-6);
  display: flex; flex-direction: column; gap: var(--space-3);
}

/* Site header / footer (template parts) */
.site-header {
  border-bottom: 1px solid var(--rule);
  padding: var(--space-4) 0;
}
.site-header__inner {
  max-width: var(--container-max);
  margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--space-6);
}
.site-header__brand {
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--burgundy);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.site-nav ul {
  list-style: none; padding: 0; margin: 0;
  display: flex; gap: var(--space-6);
}
.site-nav a {
  color: var(--burgundy);
  text-decoration: none;
  font-weight: 500;
}
.site-nav a:hover { color: var(--orange); }
.site-nav .current-menu-item a,
.site-nav [aria-current="page"] {
  color: var(--orange);
}

.site-footer {
  background: var(--dark-evergreen);
  color: var(--oat-milk);
  padding: var(--space-16) 0 var(--space-8);
  margin-top: var(--space-24);
}
.site-footer__inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-6);
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--space-12);
}
.site-footer__col h3 {
  font-size: var(--fs-eyebrow);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(246,239,222,0.6);
  margin: 0 0 var(--space-4);
  font-weight: 700;
}
.site-footer__col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--space-2); }
.site-footer__col a {
  color: var(--oat-milk);
  text-decoration: none;
  opacity: 0.85;
}
.site-footer__col a:hover { opacity: 1; color: var(--oat-milk); text-decoration: underline; }
.site-footer__base {
  max-width: var(--container-max);
  margin: var(--space-12) auto 0;
  padding: var(--space-6) var(--space-6) 0;
  border-top: 1px solid rgba(246,239,222,0.1);
  font-size: 0.875rem;
  color: rgba(246,239,222,0.6);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: var(--space-3);
}

@media (max-width: 720px) {
  .site-footer__inner { grid-template-columns: 1fr; gap: var(--space-8); }
  .site-header__inner { flex-direction: column; align-items: flex-start; gap: var(--space-3); }
  .site-nav ul { flex-wrap: wrap; gap: var(--space-4); }
}

/* ── Card hover states ──────────────────────────────────────── */
.wp-block-group.is-style-card,
.wp-block-group.is-style-card-photo,
.wp-block-group.is-style-person-card {
  transition: border-color 200ms ease, transform 200ms ease, box-shadow 200ms ease;
}
.wp-block-group.is-style-card:hover,
.wp-block-group.is-style-card-photo:hover {
  border-color: rgba(74, 28, 32, 0.35);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(74, 28, 32, 0.06);
}
.wp-block-group.is-style-person-card:has(a):hover .wp-block-post-title {
  color: var(--orange);
}
.is-style-card-photo img,
.is-style-person-card img {
  transition: transform 400ms ease;
}
.is-style-card-photo:hover img,
.is-style-person-card:hover img {
  transform: scale(1.02);
}

/* ── Byline ─────────────────────────────────────────────────── */
.byline { gap: var(--space-3) !important; font-size: 0.9375rem; color: var(--muted); margin: var(--space-4) 0 var(--space-2); }
.byline .wp-block-post-author-name,
.byline .wp-block-post-date,
.byline time { color: var(--muted); font-size: 0.9375rem; }
.byline__sep { color: var(--muted); margin: 0; }

/* ── Pullquote with attribution ─────────────────────────────── */
.pullquote-attributed {
  max-width: var(--measure);
  margin: var(--space-12) auto;
  padding: var(--space-8) 0;
  border-top: 2px solid var(--orange);
  border-bottom: 2px solid var(--orange);
  text-align: left;
}
.pullquote-attributed__quote {
  font-size: 1.5rem;
  line-height: 1.4;
  font-weight: 600;
  color: var(--berry);
  margin: 0 0 var(--space-4);
}
.pullquote-attributed__attribution {
  color: var(--muted) !important;
  margin: 0;
}

/* ── Stats row (KPIs) ────────────────────────────────────────── */
.stats-row {
  margin: var(--space-12) auto;
  padding: var(--space-8) 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.stats-row .stat__num {
  font-size: clamp(2.5rem, 5vw, 4rem) !important;
  font-weight: 700;
  line-height: 1;
  color: var(--berry);
  margin: 0 0 var(--space-2);
  letter-spacing: -0.02em;
}
.stats-row .is-style-eyebrow { color: var(--muted); margin: 0; }

/* ── Photo essay block ──────────────────────────────────────── */
.photo-essay {
  margin: var(--space-16) auto;
}
.photo-essay .wp-block-image {
  margin-bottom: var(--space-4);
}
.photo-essay .is-style-caption {
  max-width: 32rem;
  margin: 0 auto;
}

/* ── Related notes rail ─────────────────────────────────────── */
.related-notes {
  margin-top: var(--space-16) !important;
}

/* ── Drop cap (long-form notes) ─────────────────────────────── */
.wp-block-paragraph.is-style-drop-cap:first-of-type::first-letter,
.wp-block-paragraph.is-style-drop-cap::first-letter {
  font-size: 3.5em;
  line-height: 0.85;
  font-weight: 700;
  color: var(--berry);
  float: left;
  margin: 0.05em 0.08em 0 0;
  font-family: inherit;
}

/* ── Animal silhouette divider (core/separator style variation) ─ */
.wp-block-separator.is-style-animal-silhouette {
  border: 0;
  text-align: center;
  margin: var(--space-16) auto;
  height: 24px;
  background: transparent;
  position: relative;
  overflow: visible;
  max-width: 200px;
  opacity: 0.5;
}
.wp-block-separator.is-style-animal-silhouette::before {
  content: "";
  display: block;
  height: 1px;
  background: var(--rule);
  position: absolute;
  inset: 50% 0 auto 0;
}
.wp-block-separator.is-style-animal-silhouette::after {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 36px;
  height: 24px;
  background: var(--bg);
  /* Inline SVG: simple rat silhouette */
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 36 24'><path fill='black' d='M2 12c0-3 3-5 6-5h2c4 0 7-3 12-3 6 0 10 4 12 7-1 0-3-1-5-1l3 3-5-1 2 3-5-1 1 3h-3l1 2H8c-3 0-6-2-6-7zm3-1a1 1 0 100-2 1 1 0 000 2z'/></svg>");
  mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 36 24'><path fill='black' d='M2 12c0-3 3-5 6-5h2c4 0 7-3 12-3 6 0 10 4 12 7-1 0-3-1-5-1l3 3-5-1 2 3-5-1 1 3h-3l1 2H8c-3 0-6-2-6-7zm3-1a1 1 0 100-2 1 1 0 000 2z'/></svg>");
  background: var(--burgundy);
  mask-repeat: no-repeat;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: contain;
}

/* Post-title block: size is driven by the heading level the editor picks,
   not by a fixed override. Element styles (h1/h2/h3) take care of size. */
h1.wp-block-post-title {
  font-size: var(--wp--preset--font-size--alpha);
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 var(--space-3);
}
h2.wp-block-post-title {
  font-size: var(--wp--preset--font-size--beta);
  line-height: 1.15;
  font-weight: 700;
  margin: 0 0 var(--space-3);
}
h3.wp-block-post-title {
  font-size: var(--wp--preset--font-size--gamma);
  line-height: 1.2;
  font-weight: 700;
  margin: 0 0 var(--space-2);
}

/* Post-date used as an eyebrow in card patterns */
.wp-block-post-date.is-style-eyebrow time,
.wp-block-post-date.is-style-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: var(--fs-eyebrow);
  font-weight: 700;
  color: var(--muted);
  display: block;
  margin: 0 0 var(--space-3);
}

/* ── Block style variations ─────────────────────────────────── */

/* Paragraph: eyebrow */
.wp-block-paragraph.is-style-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: var(--fs-eyebrow);
  font-weight: 700;
  color: var(--muted);
  margin: 0 0 var(--space-3);
}
.has-dark-evergreen-background-color .is-style-eyebrow,
.has-burgundy-background-color .is-style-eyebrow {
  color: rgba(246, 239, 222, 0.7);
}

/* Paragraph: lead */
.wp-block-paragraph.is-style-lead {
  font-size: var(--fs-lead);
  line-height: 1.5;
  max-width: var(--measure);
  margin-bottom: var(--space-6);
}

/* Paragraph: caption */
.wp-block-paragraph.is-style-caption {
  font-size: 0.875rem;
  color: var(--muted);
  font-style: italic;
}

/* Group: card */
.wp-block-group.is-style-card {
  background: rgba(255, 255, 255, 0.4);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.has-dark-evergreen-background-color .is-style-card {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(246, 239, 222, 0.15);
}

/* Group: card with top photo */
.wp-block-group.is-style-card-photo {
  background: rgba(255, 255, 255, 0.4);
  border: 1px solid var(--rule);
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.is-style-card-photo .wp-block-post-featured-image img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.is-style-card-photo .card__inner,
.is-style-card-photo > * {
  padding-left: var(--space-6);
  padding-right: var(--space-6);
}
.is-style-card-photo .wp-block-post-featured-image {
  padding-left: 0;
  padding-right: 0;
}
.is-style-card-photo .card__inner {
  padding-top: var(--space-6);
  padding-bottom: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.has-dark-evergreen-background-color .is-style-card-photo {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(246, 239, 222, 0.15);
}

/* Group: person card */
.wp-block-group.is-style-person-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.is-style-person-card .wp-block-post-featured-image img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 4px;
}
.is-style-person-card .wp-block-post-title {
  margin: var(--space-2) 0 0;
  font-size: var(--fs-lead);
}
.is-style-person-card .wp-block-post-excerpt {
  margin: 0;
  color: var(--muted);
  font-size: 0.9375rem;
}

/* Group: callout */
.wp-block-group.is-style-callout {
  background: rgba(209, 84, 64, 0.08);
  border-left: 3px solid var(--orange);
  padding: var(--space-4) var(--space-6);
  margin: var(--space-6) 0;
  border-radius: 4px;
}

/* List: checklist */
.wp-block-list.is-style-checklist {
  list-style: none;
  padding-left: 0;
}
.wp-block-list.is-style-checklist li {
  position: relative;
  padding-left: 1.75rem;
  margin-bottom: var(--space-3);
}
.wp-block-list.is-style-checklist li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--orange);
  font-weight: 700;
}
.has-dark-evergreen-background-color .wp-block-list.is-style-checklist li::before {
  color: var(--orange);
}

/* Pullquote: brand */
.wp-block-pullquote.is-style-brand {
  border-top: 2px solid var(--orange);
  border-bottom: 2px solid var(--orange);
  padding: var(--space-8) 0;
  margin: var(--space-10) 0;
  text-align: left;
}
.wp-block-pullquote.is-style-brand blockquote {
  font-size: 1.5rem;
  line-height: 1.4;
  font-style: normal;
  font-weight: 600;
  color: var(--berry);
}
.wp-block-pullquote.is-style-brand cite {
  color: var(--muted);
  font-size: 0.875rem;
  font-style: normal;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Photo figure (matches our Eleventy <picture> pattern) */
figure.photo {
  margin: var(--space-10, var(--space-8)) auto;
  max-width: var(--container-max);
}
figure.photo img {
  width: 100%; height: auto;
  border-radius: 4px;
  aspect-ratio: var(--photo-ratio, 16/9);
  object-fit: cover;
  display: block;
}
figure.photo figcaption {
  font-size: 12px;
  color: var(--muted);
  margin-top: var(--space-2);
  text-align: right;
  font-style: italic;
}
