/*
 * Friends of Russell Farm - supplementary styles
 *
 * Colours, fonts and spacing live in theme.json. This file only holds things
 * theme.json cannot express: sticky positioning, hover states, and a few
 * layout details from the design.
 *
 * Colour values below reference theme.json presets, so changing a colour there
 * changes it here too. Avoid hard-coding new hex values in this file.
 */

:root {
  --forf-border: var(--wp--custom--color--border, #E4DAC4);
  --forf-muted: var(--wp--custom--color--muted, #8A7B62);
  --forf-body: var(--wp--custom--color--body, #3B3427);
  --forf-on-green-muted: var(--wp--custom--color--on-green-muted, #D9CFB6);
}

/* ---------- Announcement bar ---------- */

.forf-announce { padding: 10px 20px; }

.forf-announce__text {
  margin: 0;
  font-size: 15px;
  letter-spacing: 0.02em;
  color: var(--wp--preset--color--linen);
}

.forf-announce a { color: var(--wp--preset--color--linen); }
.forf-announce a:hover { color: var(--wp--preset--color--harvest-gold); }

.forf-announce__years {
  color: var(--wp--preset--color--harvest-gold);
  font-family: var(--wp--preset--font-family--bitter);
  font-weight: 700;
}

/* The announcement bar is suppressed on the 150th page, which has its own
   1877-2027 banner in the hero. */
.page-150-years .forf-announce { display: none; }

/* ---------- Header ---------- */

.forf-header {
  /* Header geometry, declared once. The mobile toggle offset is derived from
     these, so changing the logo size does not strand the close button. */
  --forf-logo-size: 54px;
  --forf-header-row: calc(var(--forf-logo-size) + 28px); /* 14px padding, top and bottom */
  --forf-toggle-size: 44px;
  --forf-panel-pad-top: 10px;

  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(253, 251, 244, 0.96);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--forf-border);
}

.forf-header__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 24px;
  gap: 20px;
}

.forf-lockup .wp-block-site-logo img {
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 2px var(--forf-border);
  display: block;
}

.forf-lockup__text { line-height: 1.1; }

/* Shared eyebrow treatment: tracked caps, used across every page. */
.forf-eyebrow {
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin: 0;
}

.forf-lockup__pre {
  font-size: 11px;
  color: var(--wp--preset--color--deep-gold);
}

.forf-lockup__name,
.forf-lockup__name a {
  font-size: 20px;
  color: var(--wp--preset--color--farm-green);
  text-decoration: none;
}

.forf-header__right { gap: 22px; }

/* ---------- Desktop navigation ---------- */

.forf-nav .wp-block-navigation__container { gap: 22px; }

.forf-header .forf-nav .wp-block-navigation-item__content {
  font-size: 15px;
  font-weight: 600;
  color: var(--wp--custom--color--copy);
  text-decoration: none;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
}

.forf-header .forf-nav .wp-block-navigation-item__content:hover {
  color: var(--wp--preset--color--barn-red);
}

/* Current page gets the gold underline. */
.forf-header .forf-nav .current-menu-item > .wp-block-navigation-item__content {
  border-bottom-color: var(--wp--preset--color--deep-gold);
}

/* The 150th link is called out in gold on the desktop bar. The mobile panel
   uses the standard link colours instead. */
@media (min-width: 1120px) {
  .forf-header .forf-nav .forf-nav__anniv .wp-block-navigation-item__content { color: #8A6A1E; }
}

/* Mobile-only items, hidden on the desktop bar. */
.forf-header .forf-nav .forf-nav__home,
.forf-header .forf-nav .forf-nav__cta { display: none; }

/* ---------- Header buttons ---------- */

.forf-header .wp-block-button.forf-btn--join > .wp-block-button__link,
.forf-header .wp-block-button.forf-btn--donate > .wp-block-button__link {
  font-size: 15px;
  font-weight: 700;
  border-radius: 999px;
  border-width: 2px;
  border-style: solid;
}

.forf-header .wp-block-button.forf-btn--join > .wp-block-button__link {
  padding: 8px 18px;
  color: var(--wp--preset--color--farm-green);
  border-color: var(--wp--preset--color--farm-green);
  background: transparent;
}

.forf-header .wp-block-button.forf-btn--join > .wp-block-button__link:hover {
  background: var(--wp--preset--color--farm-green);
  color: var(--wp--preset--color--cream);
}

.forf-header .wp-block-button.forf-btn--donate > .wp-block-button__link {
  padding: 8px 20px;
  color: var(--wp--preset--color--paper);
  background: var(--wp--preset--color--barn-red);
  border-color: var(--wp--preset--color--barn-red);
}

.forf-header .wp-block-button.forf-btn--donate > .wp-block-button__link:hover {
  background: var(--wp--custom--color--barn-red-hover, #7C3423);
  border-color: var(--wp--custom--color--barn-red-hover, #7C3423);
}

/* ---------- Mobile navigation ---------- */

/*
 * The design switches to a hamburger below 1120px. Core's "mobile" overlay
 * setting hard-codes 600px, so the range is extended here: below 1120 the
 * inline list is hidden and the toggle is shown.
 */
@media (max-width: 1119.98px) {
  .forf-header .wp-block-navigation__responsive-container:not(.is-menu-open) {
    display: none !important;
  }

  .forf-header .wp-block-navigation__responsive-container-open:not(.always-shown) {
    display: flex !important;
  }

  /* Join is hidden on mobile; Donate stays. */
  .forf-header .forf-btn--join { display: none; }

  /* The design puts the toggle last, to the right of Donate. */
  .forf-header__right > .wp-block-navigation { order: 2; }
  .forf-header__right > .wp-block-buttons { order: 1; }

  .forf-header .forf-nav .forf-nav__home,
  .forf-header .forf-nav .forf-nav__cta { display: flex; }

  /* Hamburger box, matching the design's 44px bordered square. */
  .forf-header .wp-block-navigation__responsive-container-open {
    width: 44px;
    height: 44px;
    padding: 10px;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--wp--preset--color--farm-green);
    border-radius: 10px;
    background: none;
    color: var(--wp--preset--color--farm-green);
  }

  /*
   * The navigation element would otherwise be the containing block for the
   * absolutely positioned panel, which is only as wide as the toggle (44px).
   * Making it static resolves the panel against .forf-header instead.
   */
  .forf-header .wp-block-navigation { position: static; }

  /*
   * Core treats the open menu as a modal and locks body scroll. Ours is a
   * dropdown, so the lock is unwanted: it removes the scrollbar and shifts the
   * header sideways as the panel opens.
   */
  html.has-modal-open,
  body.has-modal-open {
    overflow: auto;
  }

  /* The panel drops below the header rather than covering the screen. */
  .forf-header .wp-block-navigation__responsive-container.is-menu-open {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    bottom: auto;
    display: block;
    padding: 10px 24px 18px;
    background: var(--wp--preset--color--paper);
    border-top: 1px solid var(--forf-border);
    z-index: 60;
    overflow: visible;
  }

  /*
   * Core drives the open menu's layout through custom properties, which for a
   * right-justified desktop bar resolve to row / flex-end / center. Left
   * unchanged they collapse each link to the width of its own text. Overriding
   * the variables is cleaner than fighting the individual rules.
   */
  .forf-header .wp-block-navigation__responsive-container.is-menu-open,
  .forf-header .wp-block-navigation__responsive-container.is-menu-open
    .wp-block-navigation__container.items-justified-right {
    --navigation-layout-direction: column;
    --navigation-layout-justify: flex-start;
    --navigation-layout-justification-setting: flex-start;
    --navigation-layout-align: stretch;
    --navigation-layout-wrap: nowrap;
  }

  /* Core reserves 56px of top padding for its own close button placement. */
  .forf-header .wp-block-navigation__responsive-container.is-menu-open
    .wp-block-navigation__responsive-container-content {
    display: block;
    width: 100%;
    padding-top: 0;
  }

  /* The nav block carries items-justified-right for the desktop bar; the
     mobile panel lists items left-aligned and full width. */
  .forf-header .is-menu-open .wp-block-navigation__container,
  .forf-header .is-menu-open .wp-block-navigation__container.items-justified-right {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
  }

  /* Core sets the list items to align-items:flex-end in the open menu, which
     collapses each link to the width of its own text and right-aligns it. */
  .forf-header .is-menu-open .wp-block-navigation-item {
    width: 100%;
    align-items: stretch;
  }

  .forf-header .wp-block-navigation__responsive-container.is-menu-open
    .wp-block-navigation-item__content {
    width: 100%;
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 13px 4px;
    font-size: 17px;
    font-weight: 600;
    color: var(--wp--preset--color--farm-green);
    border-bottom: 1px solid #EDE4CE;
    justify-content: flex-start;
  }

  .forf-header .is-menu-open .current-menu-item > .wp-block-navigation-item__content {
    color: var(--wp--preset--color--barn-red);
  }

  /* Last row is the membership call to action, drawn as an outline button. */
  .forf-header .is-menu-open .forf-nav__cta .wp-block-navigation-item__content {
    box-sizing: border-box;
    justify-content: center;
    margin-top: 10px;
    font-size: 16px;
    font-weight: 700;
    border: 2px solid var(--wp--preset--color--farm-green);
    border-radius: 999px;
    padding: 11px 18px;
  }

  /*
   * Core puts the close control inside the panel. Position it back over the
   * toggle so the control appears to toggle in place, as the design does.
   *
   * The offsets are measured against the panel's content box, so they account
   * for both the 82px header row (54px logo + 14px padding top and bottom) and
   * the panel's own 10px/24px padding. If the logo size changes, re-check them.
   */
  /* Belt and braces: while the panel is open the toggle is hidden, so the two
     controls can never both be on screen even if the offset is ever wrong.
     visibility (not display) keeps the header layout from shifting. */
  .forf-header .wp-block-navigation:has(.is-menu-open)
    .wp-block-navigation__responsive-container-open {
    visibility: hidden;
  }

  .forf-header .wp-block-navigation__responsive-container-close {
    position: absolute;
    /* Centre the control on the header row it replaces, then allow for the
       panel's own top padding, since the offset resolves against the panel's
       content box. */
    top: calc(
      -1 * ((var(--forf-header-row) + var(--forf-toggle-size)) / 2)
      - var(--forf-panel-pad-top)
    );
    right: 0;
    width: var(--forf-toggle-size);
    height: var(--forf-toggle-size);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--wp--preset--color--farm-green);
    border-radius: 10px;
    background: var(--wp--preset--color--paper);
    color: var(--wp--preset--color--farm-green);
  }
}

/* ---------- Buttons ---------- */

/* Secondary: outline in farm green, fills on hover. */
.wp-block-button.is-style-outline > .wp-block-button__link {
  border: 2px solid var(--wp--preset--color--farm-green);
  color: var(--wp--preset--color--farm-green);
  padding: 11px 24px;
}

.wp-block-button.is-style-outline > .wp-block-button__link:hover {
  background: var(--wp--preset--color--farm-green);
  color: var(--wp--preset--color--cream);
}

.forf-btn--accent .wp-block-button__link:hover {
  background: var(--wp--custom--color--harvest-gold-hover, #C6892F);
}

/* ---------- Footer ---------- */

/*
 * The footer uses its own darker green (#24331F) rather than Farm Green, per
 * the design. These tones are footer chrome and live in theme.json's custom
 * section, deliberately not in the editor colour palette.
 */
.forf-footer {
  background: var(--wp--custom--color--footer-bg);
  color: var(--wp--custom--color--footer-text);
}

.forf-footer__grid {
  max-width: 1200px;
  margin: 0 auto;
  padding: 64px 24px 40px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 40px;
  align-items: start;
}

.forf-footer__brand { display: flex; flex-direction: column; gap: 14px; }

.forf-footer__lockup .wp-block-site-logo img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  box-shadow: 0 0 0 2px rgba(217, 164, 65, 0.6);
}

.forf-footer__pre {
  margin: 0;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--wp--preset--color--harvest-gold);
  font-weight: 700;
}

.forf-footer__name a,
.forf-footer__name {
  font-size: 18px;
  color: var(--wp--preset--color--paper);
  text-decoration: none;
}

.forf-footer__blurb {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  max-width: 34ch;
  color: var(--wp--custom--color--footer-text);
}

.forf-footer__head {
  margin: 0 0 14px;
  font-family: var(--wp--preset--font-family--source-sans);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--wp--custom--color--footer-muted);
}

.forf-footer__links,
.forf-footer__address {
  margin: 0;
  font-size: 15px;
  line-height: 1.7;
  color: var(--wp--custom--color--footer-text);
}

.forf-footer__address { margin-top: 18px; }

.forf-footer a {
  color: var(--wp--custom--color--footer-link);
  text-decoration: none;
}

.forf-footer a:hover {
  color: var(--wp--preset--color--harvest-gold);
  text-decoration: underline;
}

.forf-footer__nav .wp-block-navigation__container { gap: 9px; }

.forf-footer__nav a { font-size: 15px; }

/* Footer buttons are smaller than body buttons: 14px in a tighter pill. */
.forf-footer__btn .wp-block-button__link {
  font-size: 14px;
  padding: 8px 18px;
  color: var(--wp--preset--color--paper);
}

.forf-footer__btn--join .wp-block-button__link {
  color: var(--wp--custom--color--footer-bg);
}

.forf-footer__btn .wp-block-button__link:hover { text-decoration: none; }

/* ---------- Footer bottom bar ---------- */

.forf-footer__bar { border-top: 1px solid var(--wp--custom--color--footer-rule); }

.forf-footer__legal {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 24px;
  font-size: 13.5px;
  color: var(--wp--custom--color--footer-muted);
}

/* ---------- Long-form content ---------- */

/* Deliberately no blanket paragraph colour here. Setting one outranks the
   on-dark helpers (.forf-on-green, .forf-hero__lead) and makes text on the
   green and hero sections unreadable. Body colour comes from theme.json. */

.wp-block-post-featured-image img {
  border-radius: 16px;
}

/* ---------- Accessibility ---------- */

/* Never remove this. It is how keyboard users see where they are. */
:where(a, button, input, textarea, select, [tabindex]):focus-visible {
  outline: 3px solid var(--wp--preset--color--barn-red);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Sections ---------- */

.forf-section--paper { border-top: 1px solid #EDE4CE; border-bottom: 1px solid #EDE4CE; }

/* ---------- Hero ---------- */

.forf-hero__title { max-width: 15ch; text-wrap: pretty; }

.forf-hero__lead {
  color: #EFE7D2;
  font-size: 19px;
  line-height: 1.55;
  max-width: 56ch;
  text-wrap: pretty;
}

.forf-hero__lead strong { color: var(--wp--preset--color--paper); }

/* Outline button on a dark background. */
.wp-block-button.forf-btn--on-dark.is-style-outline > .wp-block-button__link {
  border-color: rgba(253, 251, 244, 0.7);
  color: var(--wp--preset--color--paper);
}

.wp-block-button.forf-btn--on-dark.is-style-outline > .wp-block-button__link:hover {
  background: rgba(253, 251, 244, 0.14);
  color: var(--wp--preset--color--paper);
}

/* ---------- Mission statement ---------- */

.forf-statement {
  font-size: clamp(21px, 2.4vw, 27px);
  line-height: 1.5;
  text-wrap: pretty;
}

.forf-pills { gap: 12px; }

.forf-pill {
  font-size: 14px;
  background: var(--wp--preset--color--linen);
  color: #4A4234;
  font-weight: 700;
  border-radius: 999px;
  padding: 8px 18px;
  margin: 0;
}

/* ---------- Cards ---------- */

.forf-card {
  background: var(--wp--preset--color--paper);
  border: 1px solid var(--forf-border);
  border-radius: 14px;
  padding: 32px 28px;
}

.forf-card p:not(.forf-card__icon) { color: #4A4234; }

.forf-card__icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  margin: 0 0 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--wp--preset--color--paper);
  font-family: var(--wp--preset--font-family--bitter);
  font-weight: 700;
  font-size: 18px;
}

.forf-card__icon--red   { background: var(--wp--preset--color--barn-red); }
.forf-card__icon--green { background: var(--wp--preset--color--farm-green); }
.forf-card__icon--gold  { background: var(--wp--preset--color--deep-gold); }

/* Media card: image bleeds to the card edge. */
.forf-card--media { padding: 0; overflow: hidden; }

.forf-card__media { margin: 0; }

.forf-card__media img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}

.forf-card__body { padding: 26px 26px 30px; }

.forf-card__body > * + * { margin-top: 12px; }

/* ---------- Text links with arrows ---------- */

.forf-textlink a {
  font-weight: 700;
  color: var(--wp--preset--color--barn-red);
  text-decoration: none;
}

.forf-textlink a:hover {
  color: var(--wp--custom--color--barn-red-hover, #7C3423);
  text-decoration: underline;
}

/* ---------- 150th anniversary band ---------- */

.forf-years {
  font-weight: 700;
  font-size: 30px;
  letter-spacing: 0.06em;
  margin: 0;
}

.forf-on-green { color: var(--forf-on-green-muted); max-width: 52ch; }

.forf-image--raised img { box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35); }

.forf-image--raised figcaption { color: #B8AE93; font-size: 14px; margin-top: 12px; }

/* ---------- Event card ---------- */

.forf-event {
  border: 1px solid var(--forf-border);
  border-radius: 14px;
  padding: 28px;
  display: flex;
  gap: 22px;
  align-items: flex-start;
}

.forf-event__date {
  background: var(--wp--preset--color--farm-green);
  color: var(--wp--preset--color--paper);
  border-radius: 10px;
  padding: 12px 16px;
  text-align: center;
  line-height: 1.1;
  margin: 0;
  flex-shrink: 0;
}

.forf-event__month {
  display: block;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--wp--preset--color--harvest-gold);
  font-weight: 700;
}

.forf-event__day {
  display: block;
  font-family: var(--wp--preset--font-family--bitter);
  font-weight: 700;
  font-size: 28px;
}

.forf-event__body > * + * { margin-top: 8px; }

/* ---------- Newsletter list ---------- */

.forf-postlist__row {
  padding: 14px 6px;
  border-bottom: 1px solid #EDE4CE;
  gap: 16px;
}

.forf-postlist__row:hover { background: var(--wp--preset--color--cream); }

.forf-postlist__row .wp-block-post-title a {
  font-weight: 600;
  color: var(--wp--preset--color--farm-green);
  text-decoration: none;
}

.forf-postlist__row .wp-block-post-date {
  color: var(--forf-muted);
  white-space: nowrap;
  margin: 0;
}

/* ---------- Testimonials ---------- */

.forf-quote {
  background: var(--wp--preset--color--paper);
  border: 1px solid var(--forf-border);
  border-radius: 14px;
  padding: 32px;
}

.forf-quote__text {
  font-style: italic;
  font-size: 20px;
  line-height: 1.5;
  color: var(--wp--preset--color--farm-green);
  margin: 0 0 16px;
}

.forf-quote__cite {
  font-weight: 700;
  color: var(--forf-muted);
  margin: 0;
}

/* ---------- Small screens ---------- */

@media (max-width: 781px) {
  .forf-event { flex-direction: column; }
  .forf-hero__title { max-width: none; }
}

/* ---------- Facts panel (About) ---------- */

.forf-facts { border-radius: 16px; padding: 32px 34px; }

.forf-facts__label {
  font-weight: 700;
  color: var(--wp--preset--color--harvest-gold);
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0 0 4px;
}

.forf-facts__value {
  margin: 0 0 18px;
  color: #EFE7D2;
  line-height: 1.5;
  font-size: 15.5px;
}

.forf-facts__value:last-child { margin-bottom: 0; }

/* ---------- Stat cards ---------- */

.forf-stat {
  background: var(--wp--preset--color--paper);
  border: 1px solid var(--forf-border);
  border-radius: 12px;
  padding: 22px;
  text-align: center;
}

.forf-stat__figure {
  font-weight: 700;
  font-size: 34px;
  margin: 0;
  line-height: 1.1;
}

.forf-stat__figure--red   { color: var(--wp--preset--color--barn-red); }
.forf-stat__figure--green { color: var(--wp--preset--color--farm-green); }
.forf-stat__figure--gold  { color: var(--wp--preset--color--deep-gold); }

.forf-stat__label {
  font-size: 14px;
  color: var(--forf-muted);
  font-weight: 600;
  margin: 6px 0 0;
}

/* ---------- Interior page heads ---------- */

.forf-pagehead .forf-on-green { max-width: 60ch; }

.forf-lead {
  font-size: 20px;
  line-height: 1.6;
  max-width: 62ch;
  text-wrap: pretty;
}

/* ---------- Membership tiers ---------- */

.forf-tier { display: flex; flex-direction: column; }

.forf-tier__price { font-weight: 700; font-size: 40px; margin: 8px 0 0; line-height: 1.1; }

.forf-tier__unit {
  display: block;
  font-family: var(--wp--preset--font-family--source-sans);
  font-size: 14px;
  font-weight: 600;
  color: var(--forf-muted);
  letter-spacing: 0;
}

.forf-tier__alt { margin: 10px 0 0; color: var(--forf-muted); font-size: 15px; }

.forf-tier__list { margin: 18px 0 24px; padding-left: 20px; }

.forf-tier__list li { margin-bottom: 8px; color: #4A4234; }

/* Push the button to the bottom so tiers line up. */
.forf-tier .wp-block-buttons { margin-top: auto; }

.forf-tier--featured { border-color: var(--wp--preset--color--harvest-gold); border-width: 2px; }

.forf-tier__badge {
  display: inline-block;
  background: var(--wp--preset--color--harvest-gold);
  color: var(--wp--preset--color--farm-green);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 5px 14px;
  margin: 0 0 12px;
}

.forf-namelist { padding-left: 20px; }

.forf-namelist li { margin-bottom: 6px; color: #4A4234; }

/* ---------- Call-to-action band ---------- */

.forf-cta {
  border-radius: 16px;
  padding: 32px 34px;
  gap: 24px;
}

.forf-cta .wp-block-buttons { flex-shrink: 0; }

/* ---------- Link rows (external destinations) ---------- */

.forf-linkrow { margin: 0 0 12px; }

.forf-linkrow a {
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: var(--wp--preset--color--paper);
  border: 1px solid var(--forf-border);
  border-radius: 12px;
  padding: 18px 20px;
  text-decoration: none;
}

.forf-linkrow a:hover {
  border-color: var(--wp--preset--color--harvest-gold);
  background: var(--wp--preset--color--cream);
}

.forf-linkrow__title { font-weight: 700; color: var(--wp--preset--color--farm-green); }

.forf-linkrow__sub { font-size: 14px; color: var(--forf-muted); }

/* ---------- Archive rows ---------- */

.forf-archiverow { margin: 0; }

.forf-archiverow a {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 6px;
  border-bottom: 1px solid #EDE4CE;
  text-decoration: none;
  font-weight: 600;
  color: var(--wp--preset--color--farm-green);
}

.forf-archiverow a:hover { background: var(--wp--preset--color--cream); }

.forf-archiverow__date {
  color: var(--forf-muted);
  white-space: nowrap;
  font-weight: 400;
}

/* ---------- Note boxes ---------- */

.forf-note { border-radius: 12px; padding: 24px 26px; }

.forf-note__title { font-weight: 700; color: var(--wp--preset--color--farm-green); margin: 0 0 6px; }

.forf-give__note { color: var(--forf-muted); }

/* ---------- Small screens ---------- */

@media (max-width: 781px) {
  .forf-cta { flex-direction: column; align-items: flex-start; }
}

/* ---------- Cover blocks (hero sections) ---------- */

/*
 * Heroes deliberately avoid the block editor's contentPosition setting.
 * Setting it makes core apply `width: auto` to .wp-block-cover__inner-container
 * (via a doubled-class selector at specificity 0,5,0), which shrink-wraps the
 * container to its text and breaks alignment with the 1200px site container.
 * Instead the cover stays a plain flex container and we place content here.
 */
.forf-hero {
  align-items: flex-end;
}

.forf-hero > .wp-block-cover__inner-container > .wp-block-group.is-layout-constrained {
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

/* ---------- Measure vs alignment ---------- */

/*
 * WordPress constrained layouts centre every child with
 * `margin-left/right: auto !important`, so anything given a max-width for
 * readable line length gets centred rather than left-aligned under its heading.
 *
 * Setting `margin-left: 0` is not right either: the child's containing block is
 * the full-bleed section, not the 1200px column, so it would sit ~96px left of
 * the heading. Instead reproduce the container's own centring offset, which
 * puts narrow text exactly on the content column's left edge at any width.
 * !important is required to beat core's own !important.
 */
.forf-hero__title,
.forf-hero__lead,
.forf-lead,
.forf-pagehead .forf-on-green {
  margin-left: max(0px, calc((100% - 1200px) / 2)) !important;
  margin-right: auto !important;
}

/*
 * The design darkens heroes with a directional gradient, heaviest at the
 * bottom-left where the text sits, rather than an even wash. A flat dim leaves
 * the eyebrow and heading low-contrast wherever the photo is bright.
 */
.forf-hero > .wp-block-cover__background {
  background: linear-gradient(
    15deg,
    rgba(30, 40, 26, 0.88) 0%,
    rgba(30, 40, 26, 0.55) 45%,
    rgba(30, 40, 26, 0.12) 100%
  ) !important;
  opacity: 1 !important;
}

/* ---------- Root rhythm ---------- */

/*
 * Core puts a 24px block gap between the top-level header / main / footer
 * blocks. The design runs them flush, so the sticky header meets the hero with
 * no cream strip between them.
 */
.wp-site-blocks > * {
  margin-block-start: 0;
}

/* =========================================================================
   Per-page type, matched to the design artboards.

   The design does not use one heading scale across the site: section headings
   run 24 / 26 / 28 / 30 / 34 / 36 / 40 / 42 depending on the page. theme.json
   carries the general scale for editors; these rules pin the exact values the
   artboards use. Sizes are scoped by the slug body class from forf_body_class().
   ========================================================================= */

/* Body copy inside sections is #4A4234, a touch warmer than the ink used for
   headings. On-dark helpers are excluded so they keep their own colour. */
.forf-section p:not([class*="forf-"]):not([class*="has-text-color"]),
.forf-card p:not([class*="forf-"]),
.forf-event__body p:not([class*="forf-"]),
.forf-note p:not([class*="forf-"]) {
  color: var(--wp--custom--color--copy);
}

/* ---- Home ---- */

.home .forf-hero__title,
.page-home .forf-hero__title { font-size: 64px; }

/* The two feature bands run a step larger than the other section headings. */
.page-home .forf-section--paper h2,
.page-home .forf-section--green h2 { font-size: 42px; }

.page-home .forf-section--paper .wp-block-column p:not(.forf-textlink),
.page-home .forf-section--green .forf-on-green { font-size: 17px; }

/* Hero buttons are larger than the site default. */
.forf-hero .wp-block-button:not(.is-style-forf-text) > .wp-block-button__link { font-size: 17px; padding: 14px 32px; }
.forf-hero .wp-block-button.is-style-outline > .wp-block-button__link { padding: 12px 30px; }

/* ---- About ---- */

.page-about .forf-section h2 { font-size: 30px; }

/* ---- Membership ---- */

.page-membership .forf-tier h2 { font-size: 24px; }
.page-membership .forf-tier__price { font-size: 46px; color: var(--wp--preset--color--ink); }
.page-membership .forf-tier__alt { color: var(--forf-muted); font-weight: 600; }
.page-membership .forf-tier__alt strong { color: var(--wp--preset--color--ink); font-weight: 700; }
.page-membership .forf-tier .wp-block-button__link { padding: 13px 26px; }

/* The featured badge uses Deep Gold, not Harvest Gold. */
.forf-tier__badge {
  background: var(--wp--preset--color--deep-gold);
  color: var(--wp--preset--color--paper);
}

/* ---- Volunteer ---- */

.page-volunteer .forf-lead { font-size: 19px; color: var(--wp--custom--color--body); }

/* ---- Events ---- */

.page-events .forf-section h2 { font-size: 28px; }
.page-events .forf-card h3,
.page-events .forf-event__body h3 { font-size: 20px; }
.page-events .forf-linkrow__title { font-size: 18px; }

/* ---- Newsletter ---- */

.page-newsletter .forf-section h3 { font-size: 26px; }

/* The archive link is drawn as an outline button, not a text link. */
.page-newsletter .forf-note .forf-textlink a {
  display: inline-block;
  padding: 11px 24px;
  border: 2px solid var(--wp--preset--color--farm-green);
  border-radius: 999px;
  color: var(--wp--preset--color--farm-green);
  text-decoration: none;
}

.page-newsletter .forf-note .forf-textlink a:hover {
  background: var(--wp--preset--color--farm-green);
  color: var(--wp--preset--color--cream);
}

/* ---- 150th anniversary ---- */

.page-150-years .forf-pagehead h1 { font-size: 58px; }
.page-150-years .forf-years { font-size: 36px; }
.page-150-years .forf-section h2 { font-size: 36px; }
.page-150-years .forf-image--raised figcaption { color: var(--wp--custom--color--footer-muted); }

/* The four "dreaming up" cards head with tracked labels, not headings. */
.page-150-years .forf-card h3 {
  font-family: var(--wp--preset--font-family--source-sans);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--wp--preset--color--deep-gold);
}

/* ---- Donate ---- */

.page-donate .forf-section h2 { font-size: 28px; }
.page-donate .forf-card h3 { font-size: 19px; }
.page-donate .forf-give .wp-block-button__link { font-size: 18px; padding: 16px 42px; }
.page-donate .forf-give__note { font-size: 14px; color: var(--forf-muted); }

/* ---- Contact ---- */

.page-contact .forf-section h2 { font-size: 24px; }
.page-contact .wp-block-column .forf-card h2 { font-size: 20px; }
.page-contact .forf-textlink a { font-weight: 600; }

/* ---- Page-head intros ---- */

.forf-pagehead .forf-on-green { font-size: 18px; }

/* ---- Corrections from the second diff pass ---- */

.forf-event__body h3 { font-size: 20px; }

.page-membership .forf-tier p.forf-tier__price { color: var(--wp--preset--color--ink); }
.page-membership .forf-tier p.forf-tier__alt { color: var(--forf-muted); }
.page-membership .forf-tier p.forf-tier__badge { color: var(--wp--preset--color--paper); }
.page-membership .forf-tier--aside h2 { font-size: 22px; }
.page-membership .forf-tier .is-style-outline > .wp-block-button__link { padding: 11px 22px; }

.page-volunteer .forf-card h3 { font-size: 20px; }
.forf-cta h2, .forf-cta h3 { font-size: 26px; }
.forf-cta .wp-block-button__link { font-size: 17px; padding: 14px 30px; }

/* ---- Corrections from the third diff pass ---- */

.forf-event__title { font-size: 20px; }

/* Membership roll headings are tracked labels, not headings. */
.page-membership .forf-section--paper h2 { font-size: 36px; }
.page-membership .forf-section--paper h3 {
  font-family: var(--wp--preset--font-family--source-sans);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--forf-muted);
}
.page-membership .forf-tier--aside p a { font-weight: 700; }

.page-events .forf-linkrow__sub { font-size: 15px; }
.page-events .forf-note__title { font-size: 18px; }
.page-events .forf-note a { font-weight: 700; }

.page-150-years .forf-years { letter-spacing: 0.08em; }
.page-150-years .forf-card h3 { letter-spacing: 0.1em; }
.page-150-years .forf-pagehead .wp-block-button__link {
  font-size: 17px;
  padding: 14px 30px;
  color: var(--wp--custom--color--footer-bg);
}
.page-150-years .forf-pagehead .is-style-outline > .wp-block-button__link {
  padding: 12px 28px;
  color: var(--wp--preset--color--paper);
}
.page-150-years .forf-cta h3 { font-size: 24px; }
.page-150-years .forf-cta .wp-block-button__link { font-size: 16px; padding: 13px 28px; }
.page-150-years .forf-card p a { font-weight: 700; }

.page-donate p.forf-give__note { font-size: 14px; color: var(--forf-muted); }

.page-contact .wp-block-column .forf-card h2 { font-size: 22px; }
.page-contact .wp-block-column .forf-card:last-child:not(.forf-form-card) h2 { font-size: 20px; }
.page-contact .wp-block-column .forf-card.forf-form-card h2 { font-size: 24px; }
.page-contact .forf-textlink a { font-weight: 700; }
.page-contact .wp-block-column .forf-card:last-child .forf-textlink a { font-weight: 600; }

/* Core's navigation colour rules outrank a plain .forf-footer a. */
.forf-footer .wp-block-navigation .wp-block-navigation-item__content,
.forf-footer .forf-footer__explore a { color: var(--wp--custom--color--footer-link); }

.forf-footer p.forf-footer__name a,
.forf-footer .wp-block-site-title a { color: var(--wp--preset--color--paper); }

/* ---------- Tertiary CTA ("Text link" button style) ---------- */

/*
 * The design puts a plain underlined link on the same row as the primary and
 * secondary buttons, not on a line of its own. Registered as a core/button
 * style so it appears in the editor's Styles panel next to Fill and Outline.
 */
.wp-block-button.is-style-forf-text > .wp-block-button__link {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--wp--preset--color--barn-red);
  text-decoration: underline;
  text-decoration-color: rgba(158, 70, 50, 0.4);
  text-underline-offset: 4px;
}

.wp-block-button.is-style-forf-text > .wp-block-button__link:hover {
  background: transparent;
  color: var(--wp--custom--color--barn-red-hover, #7C3423);
}

/* On a hero photo it reads in the light cream used for the lead paragraph. */
.forf-hero .wp-block-button.is-style-forf-text > .wp-block-button__link {
  font-weight: 600;
  color: #EFE7D2;
  text-decoration-color: rgba(239, 231, 210, 0.5);
}

.forf-hero .wp-block-button.is-style-forf-text > .wp-block-button__link:hover {
  color: var(--wp--preset--color--paper);
}

/* =========================================================================
   CTA hover states, matched to the design.

   Buttons that set a colour in the editor get a preset class such as
   .has-harvest-gold-background-color, which WordPress emits with !important.
   A plain hover rule therefore does nothing, which left every gold button
   unchanged on hover. These rules match that !important deliberately.
   ========================================================================= */

/* Accent (Harvest Gold) buttons darken to Deep Gold. */
.wp-block-button.forf-btn--accent > .wp-block-button__link:hover,
.forf-footer__btn--join .wp-block-button__link:hover,
.wp-block-button.forf-footer__btn--join > .wp-block-button__link:hover {
  background-color: var(--wp--custom--color--harvest-gold-hover, #C6892F) !important;
}

/* Footer links go gold on hover. The Explore column is plain links, so it needs
   its own rule at the same weight as the colour rule that sets its resting
   state, or that rule wins on hover too. */
.forf-footer .forf-footer__explore a:hover,
.forf-footer .wp-block-navigation .wp-block-navigation-item__content:hover,
.forf-footer .forf-footer__links a:hover {
  color: var(--wp--preset--color--harvest-gold);
}

/* Archive rows highlight against their own section background: the listing sits
   on Cream and lifts to Paper, while the home teaser sits on Paper and settles
   to Cream. */
.page-newsletter .forf-postlist__row:hover {
  background: var(--wp--preset--color--paper);
}

/* The anniversary head's outline button uses a slightly softer wash than the
   home hero's. */
.page-150-years .forf-pagehead .wp-block-button.is-style-outline > .wp-block-button__link:hover {
  background: rgba(253, 251, 244, 0.12);
}

/* External link rows outline in Deep Gold, not Harvest Gold. */
.forf-linkrow a:hover {
  border-color: var(--wp--preset--color--deep-gold);
}

/* ---------- Search ---------- */

.forf-search__form { max-width: 560px; }

.forf-search__form .wp-block-search__input {
  border: 1px solid var(--forf-border);
  border-radius: 999px 0 0 999px;
  padding: 12px 20px;
  font-size: 16px;
  background: var(--wp--preset--color--paper);
  color: var(--wp--preset--color--ink);
}

.forf-search__form .wp-block-search__button {
  border: 0;
  border-radius: 0 999px 999px 0;
  padding: 12px 24px;
  font-weight: 700;
  font-size: 16px;
  background: var(--wp--preset--color--harvest-gold);
  color: var(--wp--preset--color--farm-green);
  cursor: pointer;
}

.forf-search__form .wp-block-search__button:hover {
  background: var(--wp--custom--color--harvest-gold-hover, #C6892F);
}

.forf-search__summary {
  margin: 0 0 32px;
  color: var(--forf-muted);
  font-size: 17px;
}

.forf-search__summary strong { color: var(--wp--preset--color--ink); }

/* ---------- Search results ---------- */

.forf-result {
  padding: 22px 0;
  border-bottom: 1px solid #EDE4CE;
}

.forf-result .wp-block-post-title { margin: 0 0 4px; }

.forf-result .wp-block-post-title a {
  color: var(--wp--preset--color--farm-green);
  text-decoration: none;
}

.forf-result .wp-block-post-title a:hover {
  color: var(--wp--preset--color--barn-red);
  text-decoration: underline;
}

.forf-result__date {
  margin: 0 0 8px;
  color: var(--wp--preset--color--deep-gold);
  font-weight: 600;
}

.forf-result__snippet {
  margin: 0;
  color: var(--wp--custom--color--copy);
  line-height: 1.6;
}

/* The matched words. Underlined as well as highlighted, so the match is still
   obvious to anyone who cannot distinguish the background tint. */
.forf-result mark {
  background: var(--wp--preset--color--linen);
  color: var(--wp--preset--color--ink);
  padding: 0 2px;
  border-radius: 2px;
  text-decoration: underline;
  text-decoration-color: var(--wp--preset--color--deep-gold);
  text-underline-offset: 2px;
}

.forf-pagination { margin-top: 32px; }

.forf-pagination a,
.forf-pagination .page-numbers {
  color: var(--wp--preset--color--barn-red);
  text-decoration: none;
  font-weight: 600;
}

.forf-pagination .current { color: var(--forf-muted); }
