/* Page components used by the block patterns (patterns.php): split hero, list rows, call-to-action band. */

/* split hero: text on the container edge, photo runs to the screen edge */
.fc-hero { display: grid; grid-template-columns: 1.25fr 1fr; min-height: min(66vh, 600px); background: var(--fc-bone); margin-block: 0 !important; }
.fc-hero .fc-hero__text { padding: var(--fc-section) var(--fc-m) var(--fc-section) var(--fc-edge); display: flex; flex-direction: column; justify-content: center; gap: 22px; }
.fc-hero h1 { font: 600 var(--fc-fs-display)/1 var(--fc-serif); letter-spacing: -.03em; max-width: 12ch; margin: 0; }
.fc-hero p { font-size: var(--fc-fs-lead); line-height: 1.5; max-width: var(--fc-measure-lead); margin: 0; }
.fc-hero .fc-hero__photo { position: relative; min-height: 340px; margin: 0; }
.fc-hero .fc-hero__photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* list rows: title, text, thumbnail; tone steps instead of lines */
.fc-row { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 5fr) 160px; gap: clamp(24px, 4vw, 56px); align-items: center; padding: 24px 28px; text-decoration: none; color: inherit; }
.fc-row:nth-child(odd) { background: var(--fc-paper); }
.fc-row h3 { font: 600 var(--fc-fs-title)/1.15 var(--fc-serif); margin: 0; }
.fc-row p { margin: 0; max-width: 60ch; }
.fc-row img { width: 160px; aspect-ratio: var(--fc-ratio-thumb); object-fit: cover; }

/* call-to-action band */
.fc-cta { background: var(--fc-heath); color: var(--fc-ink); display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 80px); align-items: start; padding: var(--fc-section) var(--fc-edge); margin-block: 0 !important; }
.fc-cta h2 { font: 600 var(--fc-fs-h2)/1.05 var(--fc-serif); letter-spacing: -.025em; margin: 0; }
.fc-cta p { font-size: var(--fc-fs-lead); margin: 0 0 22px; }
.fc-cta .wp-block-button__link { background: var(--fc-ink); color: var(--fc-white); border-radius: 0; font-weight: 700; padding: 14px 26px; }

@media (max-width: 900px) {
	.fc-hero, .fc-cta { grid-template-columns: 1fr; }
	.fc-hero .fc-hero__text { padding: var(--fc-m); }
	.fc-row { grid-template-columns: 1fr; padding: 20px; }
	.fc-row img { max-width: 260px; width: 100%; }}

/* WordPress wraps a group's content in an extra div; let our grids see through it (same trick the existing site CSS uses for fom- groups) */
.wp-block-group[class*="fc-"] > .wp-block-group__inner-container { display: contents; }

/* Forms (membership join, renew and cash forms from the Community Membership plugin). Brand components: every value comes from
   the tokens above, and buttons are the standard primary button (.wp-block-button__link), so nothing here is specific to one page.
   Rules start with `body` so they win over the plugin's small built-in styles. */
body .cmem-form, body .cmem-pay, body .cmem-success { max-width: 640px; font-family: var(--fc-sans); font-size: var(--fc-fs-small); color: var(--fc-ink); }
body .cmem-form .cmem-section, body .cmem-pay .cmem-section { margin: 2.25rem 0 1rem; font: 600 var(--fc-fs-title)/1.15 var(--fc-serif); color: var(--fc-ink); }
body .cmem-form .cmem-section:first-child, body .cmem-form .cmem-summary + .cmem-section, body .cmem-pay .cmem-section { margin-top: 0; }
body .cmem-form .cmem-field { margin: 0 0 1.5rem; }
body .cmem-form .cmem-field > label, body .cmem-form .cmem-field > legend, body .cmem-form .cmem-subfield > label { display: block; margin: 0 0 8px; padding: 0; font-size: var(--fc-fs-small); font-weight: 500; color: var(--fc-ink); }
body .cmem-form .cmem-req { font-weight: 400; color: var(--fc-muted); }
body .cmem-form .cmem-hint, body .cmem-form .cmem-notice, body .cmem-pay .cmem-hint { margin: 0 0 8px; font-size: var(--fc-fs-small); line-height: 1.45; color: var(--fc-muted); }
body .cmem-form .cmem-notice { margin-top: 1.5rem; }
body .cmem-form .cmem-subfield > label { font-weight: 400; color: var(--fc-muted); }
body .cmem-form .cmem-name-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { body .cmem-form .cmem-name-row { grid-template-columns: 1fr; }}
body .cmem-form :is(input[type="text"], input[type="email"], input[type="tel"], select, textarea) { box-sizing: border-box; width: 100%; height: var(--fc-field-h); padding: 0 12px; background: var(--fc-white); border: 2px solid var(--fc-field-border); border-radius: 0; box-shadow: none; font: 400 var(--fc-fs-small)/1.3 var(--fc-sans); color: var(--fc-ink); }
body .cmem-form :is(input, select, textarea):focus-visible { outline: 3px solid var(--fc-coast); outline-offset: 2px; }
body .cmem-form .cmem-choice { display: flex; align-items: center; gap: 12px; min-height: var(--fc-field-h); margin: 0; }
body .cmem-form .cmem-choice :is(input[type="radio"], input[type="checkbox"]) { flex: none; width: 24px; height: 24px; margin: 0; accent-color: var(--fc-forest); }
body .cmem-form .cmem-choice label { margin: 0; padding: 8px 0; font-size: var(--fc-fs-small); font-weight: 400; color: var(--fc-ink); }
body .cmem-form .cmem-fee, body .cmem-pay .cmem-fee { margin: 0 0 1rem; font-size: var(--fc-fs-body); font-weight: 600; }
body .cmem-pay p { font-size: var(--fc-fs-small); line-height: 1.5; }
/* messages */
body .cmem-form .cmem-error, body .cmem-pay .cmem-error { margin: 0 0 1.5rem; padding: 1rem 1.25rem; background: var(--fc-error-bg); border: 0; border-left: 4px solid var(--fc-error); border-radius: 0; color: var(--fc-ink); }
body .cmem-ok { margin: 0 0 1.5rem; padding: 1rem 1.25rem; background: var(--fc-ok-bg); border: 0; border-left: 4px solid var(--fc-forest); border-radius: 0; color: var(--fc-ink); }
body .cmem-ok p { margin: 0 0 .5rem; }
body .cmem-ok p:last-child { margin-bottom: 0; }
body .cmem-form .cmem-error p { margin: 0 0 .5rem; }
body .cmem-form .cmem-error ul { margin: 0 0 0 1.25rem; padding: 0; }
body .cmem-form .cmem-error a { color: var(--fc-ink); }
body .cmem-form .cmem-error-text { margin: 6px 0 0; font-size: var(--fc-fs-small); font-weight: 600; color: var(--fc-error-text); }
body .cmem-form .cmem-has-error :is(input[type="text"], input[type="email"], input[type="tel"]) { border-color: var(--fc-error); }
/* the card box frame on the payment step (Stripe draws the box itself) */
body .cmem-pay #cmem-checkout { margin: 0 0 1.5rem; padding: 12px; background: var(--fc-white); border: 2px solid var(--fc-field-border); border-radius: 0; }
body .cmem-pay .cmem-pay-back { margin: 0; }
/* the working state of a pressed button (the primary button itself is the theme's own) */
body .cmem-form .wp-block-button__link:disabled { opacity: .7; cursor: progress; }
/* the confirmation after a cash entry: big and plain, for volunteers who are not used to forms */
body .cmem-success { padding: 2rem 2rem 1.5rem; background: var(--fc-ok-bg); border-left: 8px solid var(--fc-forest); }
body .cmem-success__tick { width: 64px; height: 64px; margin: 0 0 1rem; border-radius: 50%; background: var(--fc-forest); color: var(--fc-white); font: 700 40px/64px var(--fc-sans); text-align: center; }
body .cmem-success__title { margin: 0 0 .5rem; font: 600 var(--fc-fs-h2s)/1.15 var(--fc-serif); }
body .cmem-success__lead { margin: 0 0 1.25rem; font-size: var(--fc-fs-lead); font-weight: 600; line-height: 1.3; }
body .cmem-success__details { display: grid; grid-template-columns: max-content 1fr; gap: 6px 20px; margin: 0 0 1.5rem; font-size: var(--fc-fs-body); }
body .cmem-success__details dt { margin: 0; font-weight: 400; color: var(--fc-muted); }
body .cmem-success__details dd { margin: 0; font-weight: 700; }
body .cmem-success__next { margin: 0 0 1.5rem; padding: 1rem 1.25rem; background: var(--fc-white); border: 2px solid var(--fc-field-border); font-size: var(--fc-fs-body); }
body .cmem-success__next ul { margin: .5rem 0 0 1.25rem; padding: 0; }
body .cmem-success__next li { margin: .25rem 0; }