/* WordPress-only adjustments. The static CSS is copied unchanged; anything the block
   theme's extra wrappers need lives here. */
.site-header-part, .site-footer-part { display: contents; }
.wp-site-blocks { display: block; }

/* The contact form's honeypot field. It must stay in the tab order of no one, be
   invisible to a sighted visitor and be announced to no assistive technology, while
   still being present enough for a bot filling every field to fill it too. */
.field-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* The contact form's outcome after the handler redirects back. It sits at the top of the
   form, where the #contact-result fragment lands, so the result is in view without
   scrolling. form.js focuses it, and the outline shows where focus went. */
.form-result { margin: 0 0 var(--space-6); padding: 16px 20px; border-radius: var(--radius-md); border: 2px solid var(--color-forest); background: var(--color-sand); color: var(--color-forest); font-weight: 700; font-size: var(--step-0); }
.form-result.is-error { border-color: var(--color-ember); color: var(--color-ink); }
.form-result:focus { outline: 3px solid var(--color-gold); outline-offset: 3px; }

/* core/image wraps a full-bleed photo in a figure where the static markup has a bare
   picture, so the figure fills the frame the way the picture does. */
.hero-home-media .wp-block-image, .photo-backdrop .wp-block-image { margin: 0; width: 100%; height: 100%; }

/* Block editor only. Every rule below either names a class the editor alone adds
   (.block-editor-block-list__block, .editor-post-title, .wp-block-button__link, which
   the buttons filter replaces on the front end) or matches what a render filter
   already adds there, so the front end is unchanged. The render filters that finish
   the static markup do not run in the editor, and these rules stand in for them. */

/* The page title field sits in the content column like the rest of the page. */
.editor-post-title { max-width: var(--content-max); margin-inline: auto; padding-inline: var(--gutter); }

/* A page hero with a photo splits into copy and photo, as has-media does on the front end. */
@media (min-width: 900px) {
  .page-hero:has(.page-hero-media) .page-hero-inner { grid-template-columns: 1.1fr 0.9fr; }
}

/* The editor's block wrappers are position: relative, which would pull the full-bleed
   photos into the flow, and the image block sets an inline height: auto on its img. */
.block-editor-block-list__block.hero-home-media, .block-editor-block-list__block.photo-backdrop { position: absolute; }
.block-editor-block-list__block.photo-backdrop::after { content: ""; position: absolute; inset: 0; z-index: 1; background: rgba(17, 17, 17, 0.72); }
.page-hero-media.block-editor-block-list__block img,
.media-split-media.block-editor-block-list__block img,
.hero-home-media .block-editor-block-list__block img,
.photo-backdrop .block-editor-block-list__block img { height: 100% !important; }

/* Cards take the full row until the front end's span filter counts them, so the
   editor gives each grid its usual row instead. */
.features > .block-editor-block-list__block, .values-grid-list > .block-editor-block-list__block,
.checklist > .block-editor-block-list__block { --card-span: 3; --card-span-md: 6; --card-span-sm: 6; }
.program-cards > .block-editor-block-list__block, .numbered-cards > .block-editor-block-list__block,
.resource-cards > .block-editor-block-list__block { --card-span: 6; }

/* Mandatory snapping pulls the opportunities row back to a card edge while an editor
   selects or drags a block inside it, so the editor scrolls it freely. */
.editor-styles-wrapper .carousel-track { scroll-snap-type: none; }
.editor-styles-wrapper .photo-track { scroll-snap-type: none; }

/* core/button drawn as the static .btn: the first button primary, later ones ghost,
   unless a button's own style says otherwise. */
.wp-block-button .wp-block-button__link {
  --btn-bg: var(--color-gold); --btn-fg: var(--color-ink);
  display: inline-flex; align-items: center; gap: 0.6em;
  padding: 0.95em 1.6em; border-radius: 999px; border: 1.5px solid var(--btn-bg);
  background: var(--btn-bg); color: var(--btn-fg); font-family: var(--font-body); font-weight: 700; font-size: var(--step--1);
  letter-spacing: 0.02em; line-height: 1;
}
.wp-block-button .wp-block-button__link::after { content: "→" / ""; }
.wp-block-button + .wp-block-button .wp-block-button__link,
.wp-block-button.is-style-ghost .wp-block-button__link { --btn-bg: transparent; --btn-fg: var(--color-forest); border-color: var(--color-forest); }
.wp-block-button.is-style-primary .wp-block-button__link { --btn-bg: var(--color-gold); --btn-fg: var(--color-ink); border-color: var(--btn-bg); }
.hero-actions .wp-block-button + .wp-block-button .wp-block-button__link,
.cta-band-actions .wp-block-button + .wp-block-button .wp-block-button__link { --btn-fg: var(--color-on-dark); border-color: var(--color-on-dark); }
.wp-block-button.btn-lg .wp-block-button__link { font-size: var(--step-0); padding: 1.1em 2em; }
