/* Wildwood Zoological Society
   Palette and roles come from the society's signage style guide. */

:root {
  --olive: #46541D;        /* primary branding, buttons, navigation */
  --olive-dark: #36411A;
  --blue: #184D73;         /* secondary headings, educational content */
  --brown: #6A421F;        /* accent headings, nature programming */
  --purple: #5B3B69;       /* membership, community, calls to action */
  --purple-dark: #482E54;
  --parchment: #EFE3CA;    /* page background */
  --panel: #F7F0DF;        /* content panels */
  --rule: #D8C8A6;
  --ink: #2B2417;
  --ink-soft: #5A4E3A;

  --serif: "Alegreya", Georgia, serif;
  --sans: "Alegreya Sans", "Segoe UI", system-ui, sans-serif;
  --hand: "Kalam", "Segoe Print", cursive;

  /* Type scale, ratio ~1.25 from an 18px base */
  --step--1: 0.875rem;
  --step-0: 1.125rem;
  --step-1: 1.4rem;
  --step-2: 1.75rem;
  --step-3: clamp(1.9rem, 1.5rem + 1.6vw, 2.2rem);
  --step-4: clamp(2.3rem, 1.6rem + 3vw, 3.4rem);

  --measure: 68ch;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --radius: 6px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--parchment);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--step-0);
  line-height: 1.6;
}

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

a { color: var(--blue); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 3px solid var(--purple); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 800;
  line-height: 1.12;
  margin: 0 0 0.5em;
  text-wrap: balance;
}
h1 { font-size: var(--step-4); color: var(--olive); letter-spacing: -0.01em; }
h2 { font-size: var(--step-3); color: var(--blue); }
h3 { font-size: var(--step-1); color: var(--brown); font-weight: 700; }
p { margin: 0 0 1em; }

.icon { width: 1.1em; height: 1.1em; fill: currentColor; flex: none; vertical-align: -0.15em; }

.wrap { width: 100%; max-width: 72rem; margin-inline: auto; padding-inline: var(--gutter); }
.prose { max-width: var(--measure); }
.prose > * + h2, .prose > * + h3 { margin-top: 1.6em; }

.hand { font-family: var(--hand); color: var(--brown); font-size: 1.3em; line-height: 1.3; }

.skip-link { position: absolute; left: -999px; top: 0.5rem; background: var(--panel); padding: 0.5rem 1rem; z-index: 10; }
.skip-link:focus { left: 0.5rem; }

/* Buttons */
.button {
  display: inline-flex; align-items: center; gap: 0.5em;
  padding: 0.65em 1.3em;
  border: 2px solid var(--olive);
  border-radius: 999px;
  background: var(--olive);
  color: #fff;
  font: 700 1rem/1.2 var(--sans);
  text-decoration: none;
  cursor: pointer;
}
.button:hover { background: var(--olive-dark); border-color: var(--olive-dark); }
.button-purple { background: var(--purple); border-color: var(--purple); }
.button-purple:hover { background: var(--purple-dark); border-color: var(--purple-dark); }
.button-ghost { background: transparent; color: var(--olive); }
.button-ghost:hover { background: var(--olive); color: #fff; }
.button-small { padding: 0.45em 1em; font-size: 0.95rem; }

/* Header */
/* Light header so the full-colour logo sits on the surface it was drawn for. */
.site-header { background: var(--panel); border-bottom: 1px solid var(--rule); position: relative; z-index: 5; }
.header-inner { display: flex; align-items: center; gap: 1.5rem; padding-block: 0.5rem; }
.brand { display: block; margin-right: auto; border-radius: var(--radius); }
.brand-logo { height: clamp(4rem, 2rem + 5vw, 7rem); width: auto; }

.site-nav { display: flex; align-items: center; gap: 1.25rem; }
.site-nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: 0.25rem 1.1rem; margin: 0; padding: 0; }
.site-nav ul a { color: var(--olive); text-decoration: none; font-weight: 700; padding: 0.3em 0; border-bottom: 2px solid transparent; }
.site-nav ul a:hover, .site-nav ul a[aria-current] { border-bottom-color: var(--olive); }

.nav-toggle {
  display: none; align-items: center; gap: 0.4rem;
  background: transparent; color: var(--olive); border: 2px solid var(--rule);
  border-radius: var(--radius); padding: 0.4rem 0.75rem; font: 500 1rem var(--sans); cursor: pointer;
}

@media (max-width: 62rem) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 1rem;
    background: var(--panel); border-bottom: 1px solid var(--rule); padding: 1rem var(--gutter) 1.5rem;
  }
  .site-nav.is-open { display: flex; }
  .site-nav ul { flex-direction: column; }
  .site-nav ul a { display: block; padding: 0.5rem 0; }
  .site-nav .nav-join { align-self: flex-start; }
}

/* Hero: the one bold moment. Photo (or deep olive) with a pine treeline
   cut from the parchment along its lower edge. */
.hero {
  position: relative;
  background: var(--olive-dark);
  color: #fff;
  overflow: hidden;
  isolation: isolate;
}
.hero-image { position: absolute; inset: 0; z-index: -2; }
.hero-image img { width: 100%; height: 100%; object-fit: cover; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgb(30 36 14 / 0.15) 0%, rgb(30 36 14 / 0.7) 100%);
}
.hero-inner { padding-block: clamp(4rem, 12vw, 9rem) clamp(5.5rem, 12vw, 8.5rem); }
.hero h1 { color: #fff; max-width: 16ch; font-size: clamp(2.6rem, 1.6rem + 4.5vw, 4.6rem); margin-bottom: 0.2em; }
.hero .hand { color: var(--parchment); font-size: clamp(1.4rem, 1.1rem + 1.2vw, 2rem); margin: 0; transform: rotate(-1.5deg); transform-origin: left; }
.hero-small .hero-inner { padding-block: clamp(2.5rem, 7vw, 5rem) clamp(4.5rem, 9vw, 6rem); }
.hero-small h1 { font-size: var(--step-4); max-width: 24ch; }
.hero-intro { max-width: 52ch; font-size: var(--step-1); line-height: 1.45; margin: 0.4em 0 0; opacity: 0.95; }

.treeline { position: absolute; left: 0; bottom: -1px; width: 100%; height: clamp(48px, 8vw, 110px); }
.treeline-back { fill: var(--parchment); opacity: 0.45; }
.treeline-front { fill: var(--parchment); }

/* Sections */
.section { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.section + .section { padding-top: 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.section-head h2 { margin: 0; }

.panel { background: var(--panel); border: 1px solid var(--rule); border-radius: var(--radius); padding: clamp(1.25rem, 3vw, 2rem); }

/* Home: mission / vision */
.statements { display: grid; gap: clamp(1.5rem, 4vw, 3.5rem); grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); }
.statement h2 { color: var(--olive); }
.statement p { font-family: var(--serif); font-size: var(--step-1); line-height: 1.5; font-weight: 500; }

/* Home: values, a quiet row of icons */
.values { list-style: none; margin: 0; padding: 0; display: grid; gap: 2rem 2.5rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); }
.value-icon {
  display: grid; place-items: center; width: 3.5rem; height: 3.5rem; margin-bottom: 0.75rem;
  border-radius: 50%; border: 2px solid var(--brown); color: var(--brown);
}
.value-icon .icon { width: 1.7rem; height: 1.7rem; }
.values h3 { margin-bottom: 0.3em; }
.values p { color: var(--ink-soft); margin: 0; }

/* Post list */
.posts { display: grid; gap: 2.5rem 2rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); }
.post-card { display: flex; flex-direction: column; }
.post-card img { aspect-ratio: 3 / 2; object-fit: cover; width: 100%; border-radius: var(--radius); margin-bottom: 1rem; }
.post-card .placeholder-img {
  aspect-ratio: 3 / 2; border-radius: var(--radius); margin-bottom: 1rem;
  background: var(--olive); display: grid; place-items: center; color: var(--parchment);
}
.post-card .placeholder-img .icon { width: 3rem; height: 3rem; opacity: 0.6; }
@media (max-width: 40rem) { .post-card .placeholder-img { display: none; } }
.post-card h3 { font-size: var(--step-1); margin-bottom: 0.25em; }
.post-card h3 a { color: var(--ink); text-decoration: none; }
.post-card h3 a:hover { color: var(--blue); text-decoration: underline; }
.post-meta { color: var(--ink-soft); font-size: var(--step--1); margin-bottom: 0.5em; }

/* Events: a ticket stub with the date torn off the left */
.event-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.event {
  display: grid; grid-template-columns: 5.5rem 1fr; align-items: stretch;
  background: var(--panel); border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden;
}
.event-date {
  display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 0.75rem 0.25rem;
  background: var(--brown); color: var(--parchment); text-align: center;
  border-right: 2px dashed var(--parchment);
}
.event-date .month { font-weight: 700; font-size: 1rem; }
.event-date .day { font: 800 2.4rem/1 var(--serif); }
.event-body { padding: 1rem 1.25rem; }
.event-body h3 { margin-bottom: 0.2em; font-size: var(--step-1); }
.event-body h3 a { color: var(--ink); text-decoration: none; }
.event-body h3 a:hover { color: var(--blue); text-decoration: underline; }
.event-body p { margin: 0.35em 0 0; }
.event-where { display: flex; flex-wrap: wrap; gap: 0.2rem 1.1rem; color: var(--ink-soft); font-size: var(--step--1); }
.event-where span { display: inline-flex; align-items: center; gap: 0.3rem; }
.tag { display: inline-block; font-size: 0.85rem; font-weight: 700; padding: 0.05em 0.6em; border-radius: 999px; color: #fff; background: var(--brown); }
.tag-community { background: var(--blue); }
.tag-board { background: var(--purple); }
.event-past .event-date { background: var(--ink-soft); }

/* Detail facts (event, volunteer, campaign) */
.facts { display: grid; gap: 0.6rem; margin: 0 0 2rem; padding: 1.25rem 1.5rem; }
.facts div { display: flex; gap: 0.6rem; align-items: baseline; }
.facts .icon { color: var(--brown); }

.layout-aside { display: grid; gap: 2.5rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 56rem) {
  .layout-aside { grid-template-columns: minmax(0, 1fr) 20rem; align-items: start; }
}

/* Membership band */
.band { background: var(--purple); color: #fff; }
.band .wrap { padding-block: clamp(2.5rem, 6vw, 4rem); display: flex; flex-wrap: wrap; gap: 1.5rem 3rem; align-items: center; justify-content: space-between; }
.band h2 { color: #fff; margin: 0 0 0.25em; }
.band p { margin: 0; max-width: 46ch; opacity: 0.92; }
.band .button { background: var(--parchment); border-color: var(--parchment); color: var(--purple); }
.band .button:hover { background: #fff; border-color: #fff; }

/* Fundraising */
.campaign { display: grid; gap: 1.5rem 2.5rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); align-items: center; padding-block: 2rem; border-top: 1px solid var(--rule); }
.campaign:first-of-type { border-top: 0; padding-top: 0; }
.campaign img { border-radius: var(--radius); aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.campaign h3 { font-size: var(--step-2); }
.campaign h3 a { color: inherit; text-decoration: none; }
.progress { margin: 1rem 0 1.25rem; }
.progress-bar { height: 0.85rem; background: var(--rule); border-radius: 999px; overflow: hidden; }
.progress-bar span { display: block; height: 100%; background: var(--olive); border-radius: inherit; }
.progress-text { margin-top: 0.4rem; font-size: var(--step--1); color: var(--ink-soft); }
.progress-text strong { color: var(--ink); font-size: 1.15rem; }

.sponsor-tier + .sponsor-tier { margin-top: 2rem; }
.sponsor-tier h3 { font-size: var(--step-0); color: var(--ink-soft); font-family: var(--sans); font-weight: 700; }
.sponsors { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 1.5rem 2.5rem; align-items: center; }
.sponsors a, .sponsors span { display: block; color: var(--ink); text-decoration: none; font-weight: 700; }
.sponsors img { max-height: 4.5rem; width: auto; }

/* Volunteer + meetings lists */
.list-plain { list-style: none; margin: 0; padding: 0; }
.opening { padding: 1.25rem 0; border-top: 1px solid var(--rule); }
.opening:first-child { border-top: 0; padding-top: 0.5rem; }
.opening h3 { margin-bottom: 0.2em; }
.opening h3 a { color: var(--ink); }
.opening p { margin: 0.35em 0 0; }
.group + .group { margin-top: 2.5rem; }

.meeting { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; align-items: baseline; justify-content: space-between; padding: 1rem 0; border-top: 1px solid var(--rule); }
.meeting:first-child { border-top: 0; }
.meeting-when { font-weight: 700; }
.meeting-title { color: var(--ink-soft); }
.meeting-docs { display: flex; gap: 1rem; flex-wrap: wrap; }
.meeting-docs a, .doc-link { display: inline-flex; align-items: center; gap: 0.35rem; font-weight: 500; }
.meeting-docs .missing { color: var(--ink-soft); font-style: italic; font-size: var(--step--1); }
.year-heading { font-size: var(--step-1); color: var(--brown); margin-top: 2rem; }

/* StreamField blocks */
.block-image { margin: 2rem 0; }
.block-image img { border-radius: var(--radius); }
.block-image figcaption { font-size: var(--step--1); color: var(--ink-soft); margin-top: 0.5rem; }
.block-image.full { margin-inline: calc(50% - min(50vw, 36rem) + var(--gutter)); }
.block-quote { margin: 2rem 0; padding: 0 0 0 1.5rem; border-left: 4px solid var(--brown); }
.block-quote p { font: 500 var(--step-2)/1.35 var(--serif); color: var(--brown); margin-bottom: 0.4em; }
.block-quote footer { font-family: var(--hand); color: var(--ink-soft); font-size: 1.15rem; }
.block-cta { margin: 2rem 0; padding: clamp(1.5rem, 4vw, 2.25rem); border-radius: var(--radius); color: #fff; }
.block-cta h2 { color: #fff; font-size: var(--step-2); margin-bottom: 0.3em; }
.block-cta .button { background: var(--parchment); border-color: var(--parchment); color: var(--ink); }
.block-cta .button:hover { background: #fff; border-color: #fff; }
.cta-olive { background: var(--olive); }
.cta-blue { background: var(--blue); }
.cta-brown { background: var(--brown); }
.cta-purple { background: var(--purple); }
.block-embed { margin: 2rem 0; }
.block-embed iframe { width: 100%; height: auto; aspect-ratio: 16 / 9; border: 0; border-radius: var(--radius); }

/* Pagination, empty states, search */
.pagination { display: flex; gap: 1rem; align-items: center; justify-content: center; margin-top: 3rem; }
.empty { color: var(--ink-soft); font-style: italic; }
.search-row { display: flex; gap: 0.5rem; }
input[type="search"] {
  flex: 1; min-width: 0; font: inherit; font-size: 1rem; padding: 0.5em 0.75em;
  border: 2px solid var(--rule); border-radius: var(--radius); background: #fff; color: var(--ink);
}
input[type="search"]:focus { border-color: var(--olive); outline: none; }
.search-results li { padding: 1rem 0; border-top: 1px solid var(--rule); }

/* Footer */
.site-footer { background: var(--ink); color: var(--parchment); margin-top: clamp(3rem, 8vw, 6rem); }
.footer-inner { display: grid; gap: 2rem; padding-block: 3rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); }
.footer-name { font: 800 1.35rem/1.2 var(--serif); }
.site-footer p { margin-bottom: 0.5em; opacity: 0.9; }
.site-footer a { color: var(--parchment); }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; align-content: start; }
.footer-links a { display: inline-flex; gap: 0.5rem; align-items: center; }
.footer-search label { display: block; font-weight: 700; margin-bottom: 0.5rem; }
.footer-search input[type="search"] { border-color: transparent; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Membership levels: a price list with dotted leaders, echoing the printed form */
.levels { list-style: none; margin: 0; padding: 0; max-width: 46rem; }
.level { padding: 0.9rem 0; }
.level + .level { border-top: 1px solid var(--rule); }
.level-line { display: flex; align-items: baseline; gap: 0.75rem; }
.level-name { font: 700 var(--step-1)/1.25 var(--serif); color: var(--ink); }
.level-leader { flex: 1; min-width: 1.5rem; border-bottom: 3px dotted var(--rule); transform: translateY(-0.3em); }
.level-price { font: 800 var(--step-1)/1 var(--serif); color: var(--purple); font-variant-numeric: lining-nums tabular-nums; }
.level-note { margin: 0.1rem 0 0; font-size: 1.15rem; }
.level-benefits { margin: 0.4rem 0 0; padding-left: 1.2rem; color: var(--ink-soft); }
.level-highlight .level-name { color: var(--purple); }
.level-highlight .level-leader { border-bottom-color: var(--purple); opacity: 0.5; }

.join-mail { max-width: 46rem; }
.join-mail h2 { font-size: var(--step-2); }
.join-mail address { font-style: normal; font-weight: 700; font-size: var(--step-1); line-height: 1.4; margin: 0 0 1.25rem; padding-left: 1rem; border-left: 4px solid var(--purple); }

/* Online join: the price list doubles as the level picker */
.join-form > * { max-width: 46rem; }
.join-step { border: 0; margin: 0 0 2.5rem; padding: 0; min-width: 0; }
.join-step legend { padding: 0; margin-bottom: 0.25rem; }
.join-step legend h2 { margin: 0; }
.join-hint { color: var(--ink-soft); margin: 0 0 0.75rem; }

.levels-selectable .level { padding: 0; }
.levels-selectable label { display: block; padding: 0.8rem 0.9rem; border-radius: var(--radius); cursor: pointer; }
.levels-selectable label:hover { background: var(--panel); }
.levels-selectable .level:has(input:checked) label { background: var(--panel); box-shadow: inset 4px 0 0 var(--purple); }
.levels-selectable .level:has(input:checked) + .level { border-top-color: transparent; }
.levels-selectable input[type="radio"] { width: 1.25rem; height: 1.25rem; margin: 0; accent-color: var(--purple); flex: none; align-self: center; }
.levels-selectable .level-benefits, .levels-selectable .level-note { margin-left: 2rem; }

.fields { display: grid; gap: 1rem 1.25rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); }
.field { display: flex; flex-direction: column; gap: 0.3rem; font-weight: 700; font-size: 1rem; }
.field-wide { grid-column: 1 / -1; }
.field-row { display: grid; grid-template-columns: 1fr 1.4fr; gap: 1.25rem; min-width: 0; }
.optional { font-weight: 400; color: var(--ink-soft); }
.field input {
  font: inherit; font-weight: 400; font-size: var(--step-0); padding: 0.55em 0.75em; min-width: 0; width: 100%;
  border: 2px solid var(--rule); border-radius: var(--radius); background: #fff; color: var(--ink);
}
.field input:focus { border-color: var(--olive); outline: none; box-shadow: 0 0 0 3px rgb(70 84 29 / 0.25); }

.join-pay { max-width: 28rem; }
.join-total { font: 700 var(--step-1)/1.3 var(--serif); color: var(--purple); }
.paypal-buttons { min-height: 3rem; }
.join-status { min-height: 1.6em; margin: 0.75rem 0 0; font-weight: 500; }
.join-status.is-error { color: #8A2A1B; }
.join-fine-print { font-size: var(--step--1); color: var(--ink-soft); }
.join-done h2, .join-done p { max-width: 46rem; }
