/*
 * Loaded after the Kadence and WordPress block CSS and BEFORE brand.css, so that brand.css still wins
 * every tie. It makes the block wrappers behave like the plain divs of the static site:
 *
 *   static:     <section class="X"> <div class="wrap"> ...content... </div> </section>
 *   WordPress:  Row Layout (htmlTag section, className "X")
 *                 > .kt-row-column-wrap            display: contents (no box)
 *                 > Column (className "wrap")       a plain block, brand .X .wrap rules apply
 *                   > .kt-inside-inner-col          display: contents (no box)
 *                     > ...content blocks...
 *
 * A second column with className "deco" (also display: contents) holds pieces the static markup puts
 * beside the .wrap (hero photo and jay, large decorative feathers), so they position against the section.
 */

/* Row Layouts used as brand sections: the column wrapper disappears */
.kb-row-layout-wrap > .kt-row-column-wrap:has(> .wp-block-kadence-column.wrap) { display: contents; }

/* Brand columns: plain blocks (Kadence makes every column a flex column) */
.wp-block-kadence-column:where(.wrap, .deco) { display: block; min-height: 0; }
.wp-block-kadence-column:where(.wrap, .deco) > .kt-inside-inner-col { display: contents; }
.wp-block-kadence-column.deco { display: contents; }

/* WordPress adds 24px between blocks in groups and flow layouts; the brand spacing rules decide instead */
:where(.wrap) .wp-block-group > *, :where(.wrap) .is-layout-flow > *, :where(.wrap) .is-layout-constrained > * { margin-block: 0; }
.wp-block-group { margin-block: 0; }
.wp-block-image { margin: 0; }

/*
 * Astra's content typography uses .entry-content selectors that outrank brand.css's plain element rules.
 * Restate the brand element defaults here at Astra's level; brand.css (next) still wins every class rule.
 */
.entry-content :where(h1, h2, h3, h4, h5, h6) { margin: 0; line-height: 1.04; color: inherit; }
.entry-content :where(h2) { font-size: clamp(1.7rem, 2.7vw, 2.45rem); font-weight: 500; color: var(--aubergine); }
.entry-content :where(h3) { font-size: 1.25rem; font-weight: 700; line-height: 1.2; }
:where(.entry-content) p { margin-bottom: 0; }
/* Astra styles bare ul/ol and b/strong (ol, ul { margin: 0 0 1.5em 3em }; b, strong { font-weight: 700 }).
   Same low specificity here, so these beat Astra but every brand class rule still wins. */
:where(.entry-content) :is(ul, ol) { margin: 0; padding: 0; }
:where(.entry-content) :is(b, strong) { font-weight: bolder; }
:where(.entry-content) address { margin: 0; }

/* Astra gives every content paragraph margin-bottom: 1.6em (.entry-content p). The brand design has none;
   any brand rule that sets a paragraph margin (it loads after this file) still wins. */
.entry-content p { margin-bottom: 0; }

/* Astra colors every blockquote (blockquote { color: ... }); the brand quotes inherit their band's color */
.entry-content blockquote { color: inherit; position: static; font-size: inherit; font-style: normal; margin: 0; padding: 0; border: 0; background: none; }

/* Astra sets h1 to 600; the static h1 is the browser's bold (brand rules still win) */
.entry-content h1 { font-weight: 700; }
