/* ============================================================
   WordPress adaptation layer.
   site.css is the source stylesheet, ported. This file only bridges
   the gap between the source's hand-written markup and the markup
   core blocks produce. Keep design decisions out of here.
   ============================================================ */

/* Buttons: core/button wraps the link in two <div>s. display:contents removes
   both boxes, so the link lays out exactly like the source's <a class="btn">
   (inline-flex, centred by text-align, a direct flex/grid item). */
/* :root bumps this past core's `body .is-layout-flex { display:flex }`. */
:root :is(.wp-block-buttons, .wp-block-button) { display: contents; }


.partner-logo,
.partner-card-logo { flex: none; }
.partner-logo a { display: block; }

/* core/quote: the source's <blockquote> held the text directly. */
.quote-card .wp-block-quote > p { margin: 0; font: inherit; }

/* FAQ: core/details. The summary takes the source's .faq-q styles (ported in site.css). */
.faq-item > summary { display: block; list-style: none; }
.faq-item > summary::-webkit-details-marker { display: none; }
.faq-item > summary::marker { content: ''; }
.faq-item > summary:focus:not(:focus-visible) { outline: none; }
.faq-item > summary { -webkit-tap-highlight-color: transparent; }

/* A paragraph holding one lone link: the link was a direct (flex) child in the source. */
p.mr-link { display: contents; }

/* Cards that were one big <a>: the heading carries the link, stretched over the card. */
.is-linked { position: relative; }
.is-linked :is(h2, h3, h4) a { color: inherit; text-decoration: none; }
.is-linked :is(h2, h3, h4) a::after { content: ''; position: absolute; inset: 0; }

/* Template parts: the <nav>/<footer> part wrappers ARE the source's .nav/.footer. */
.wp-site-blocks > .wp-block-template-part:not(.nav):not(.footer) { display: contents; }
.mr-main > .wp-block-post-content { display: contents; }

/* The source reserved room for the sticky CTA on every mobile page, which left a
   74px strip under the footer wherever the bar doesn't exist. Only reserve it
   where the bar is actually on the page. */
@media (max-width: 720px) {
    body { padding-bottom: 0; }
    body:has(.sticky-cta) { padding-bottom: 88px; }
}

/* Mobile safety: transformed/oversized art must not create sideways scroll. */
html { overflow-x: hidden; overflow-x: clip; text-size-adjust: 100%; }

/* Region cards are rendered by [custom_coming_up style="region"] (mu-plugins/makeroom-events.php).
   These three rules are the source's inline styles on that markup. */
.grid-3.region-grid { background: transparent; gap: 24px; }
.region-card > .btn { margin-top: 18px; }
.region-contact a { color: var(--accent-bright); }

/* Keyboard focus on FAQ questions matches the source's button focus ring
   (<summary> isn't in site.css's :focus-visible selector list). */
.faq-item > summary:focus-visible { outline: 3px solid var(--info); outline-offset: 2px; }

/* ------------------------------------------------------------
   Design changes after the handoff (Jacob review, 2026-11-04).
   Here rather than site.css because port_css.py regenerates site.css.
   ------------------------------------------------------------ */

/* Homepage resources (4-book bundle) and Whiteboard Sessions travel (Houston Levee exterior)
   use the .host-photo.wide frame; only the spacing above "Where to stay" is new. */
.arrival-photo { margin-bottom: 36px; }
/* Resources page: same frame at the slot's original 16:9. */
.host-photo:is(.resources-set, .event-photo) { aspect-ratio: 16/9; }

/* About founders: team slot removed; photo at half its old height, text beside it.
   Mobile stacks text first, photo second. */
.founders-split > .host-photo { aspect-ratio: 8/5; }
@media (max-width: 980px) {
    .founders-split > .host-photo { order: 2; }
}

/* ---- mr-forms plugin ([mr_form] shortcode) ----
   Forms are defined in mu-plugins/makeroom-forms.php using the source classes
   (form-grid / field / wait-form / btn). These rules cover the few wrappers the
   plugin adds that the source markup didn't have. */
.mr-form-success.form-ok,
.mr-form-success.wait-ok { display: block; }
.mr-contact-form { margin-top: 26px; }
:is(.form-grid, .wait-form) > :is(.mr-submit, .mr-form-error) { grid-column: 1 / -1; margin: 0; }
.form-grid .mr-required { display: none; }          /* source marks optional fields instead */
.form-grid .field .mr-field-error { margin: 0; font-size: 13px; }
.wait-form > .mr-field { min-width: 0; margin: 0; }
.wait-form input { width: 100%; }
.wait-form :is(.mr-field-error, .mr-form-error) { margin: 4px 0 0; font-size: 14px; line-height: 1.5; color: #FFB4A8; }   /* = .form-err */
.mr-form-error p { margin: 0; }

/* Card with a button (Resources): button pinned to the card's bottom so a row lines up, compact so labels stay on one line. */
.out-card:has(> .wp-block-buttons) { display: flex; flex-direction: column; }
/* .wp-block-buttons and .btn are display:contents, so the link is the flex item. */
.out-card > p:has(+ .wp-block-buttons) { margin-bottom: 24px; }
.out-card .btn > .wp-block-button__link { margin-top: auto; align-self: flex-start; padding: 11px 18px; font-size: 12px; white-space: nowrap; }

/* .form-err is tuned for dark sections (pale pink); on the light Contact/International sections it needs a dark red to be readable. */
.section:not(.section-dark) .form-err { color: #B3261E; }
