/**
 * Pattern: nordnatur-tech/site-footer (D6b — atom-first polish pass + 0.15.0 site-logo switch).
 *
 * 4-column dark footer with the NNT-logo-white.svg brand mark on the
 * left, three link columns, and a sub-footer below the grid carrying
 * copyright + legal links above a 1px white-10% top border. Always-on
 * enqueue: the footer template-part loads on every front-end view, and
 * a className sniff against post_content cannot reach FSE template-part
 * markup, so the conditional pattern used by hero-brand /
 * service-card-grid / tool-card-grid / case-study-grid does not apply
 * here. Same justification + same scoping discipline as D6a's site-
 * header.css. Stylesheet stays scoped under `.ntech-site-footer__*` so
 * it can ship sitewide without leaking onto other surfaces.
 *
 * CSS budget exception (CLAUDE.md rule 14, ongoing): plugin now ships
 * SEVEN CSS files (cf7-fields ~70 + hero-brand ~30 + service-card-grid
 * ~20 + tool-card-grid ~50 + case-study-grid ~25 + site-header ~40 +
 * site-footer ~30). All others either conditionally enqueue or scope
 * tightly; site-footer is the second always-on file (after D6a's
 * site-header — both for FSE template-part reasons). Documented in
 * CHANGELOG 0.12.0 / 0.12.1.
 *
 * Rules emitted, in order:
 *   1. Footer-grid layout — 4-col CSS grid (1.4fr / 1fr × 3) with 40px
 *      gap desktop, collapsing to 2-col 1fr × 2 with 32px gap at
 *      <=768px (wireframe lines 311–312).
 *   2. SVG logo image — `display: block` + `height: auto` on the inner
 *      img inside core/site-logo's `<div class="wp-block-site-logo">
 *      <a class="custom-logo-link"><img class="custom-logo"></a></div>`
 *      render. Belt-and-suspenders against WP core's own line-height: 0
 *      and height: auto defaults; rhythm below the logo comes from the
 *      pattern's `style.spacing.margin.bottom: var:preset|spacing|40`
 *      attribute on the site-logo block (16px painted gap to the
 *      blurb).
 *   3. Polish-pass-2 — zero blockGap-MT on the first non-heading
 *      sibling of each column so margin-collapse with the heading's
 *      explicit MB-16 paints the wireframe-true 16px painted gap (not
 *      24px from blockGap-MT-24 winning the collapse).
 *   4. Link list — list-style none + padding 0 + margin 0 + li MB 8px
 *      (wireframe lines 307–308).
 *   5. Footer link inverse — base rest, base-3 hover. Underline-on-
 *      hover already shipped by theme.json B2 (matches wireframe);
 *      pattern CSS only paints the colour pair, no decoration override.
 *   6. Sub-footer top border — 1px white-10%; the only border that has
 *      no Block Editor primitive (border-color block-supports needs a
 *      named theme slug, and `rgba(255,255,255,0.1)` isn't one).
 */

/* 1. Footer grid — wireframe-true 4-col on desktop, 2-col mobile. */
.ntech-site-footer__grid {
	display: grid;
	grid-template-columns: 1.4fr 1fr 1fr 1fr;
	gap: 2.5rem;        /* 40px */
}
@media (max-width: 768px) {
	.ntech-site-footer__grid {
		grid-template-columns: 1fr 1fr;
		gap: 2rem;        /* 32px */
	}
}

/* 2. SVG logo image. core/site-logo wraps the img in
   `<div class="wp-block-site-logo ntech-site-footer__logo"><a class="custom-logo-link" rel="home"><img class="custom-logo" .../></a></div>`.
   WP core's block stylesheet already sets `line-height: 0` on wrapper +
   anchor and `height: auto` on the img; this rule belt-and-suspenders
   the same outcomes (display: block kills any residual baseline gap;
   height: auto guarantees proportional scaling). The 16px painted gap
   below the logo comes from the pattern's `style.spacing.margin.bottom:
   var:preset|spacing|40` attribute on the site-logo block — verifies
   the polish-pass-2 margin-collapse arithmetic on rule 3 stays correct. */
.ntech-site-footer__logo img {
	display: block;
	height: auto;
}

/* 3. Polish-pass-2 — MT-zero on the first non-heading sibling so the
   heading's (or logo's) explicit MB-16 paints the wireframe-true 16px
   gap. Without this, blockGap-MT-24 on the next flow child wins the
   margin-collapse arithmetic (max(16, 24) = 24) and paints +8px drift.
   Specificity 0,2,1 (`.ntech-site-footer__col > .wp-block-list`) beats
   the blockGap-MT-24 rule (`:where(.is-layout-flow) > *`, specificity
   0,1,1) cleanly. */
.ntech-site-footer__col > .wp-block-list,
.ntech-site-footer__col-brand > .ntech-site-footer__blurb {
	margin-top: 0;
}

/* 4. Link lists — strip default ul styling + tighten per-item rhythm to
   wireframe-true 8px (spacing-20). */
.ntech-site-footer__links {
	list-style: none;
	margin: 0;
	padding: 0;
}
.ntech-site-footer__links li {
	margin-bottom: var(--wp--preset--spacing--20);
}
.ntech-site-footer__links li:last-child {
	margin-bottom: 0;
}

/* 5. Footer link inverse — base rest, base-3 hover. Specificity 0,1,1
   beats theme.json `:where(.wp-element-button), a:where(:not(...))`
   (0,1,0) cleanly. Underline-on-hover comes from theme.json B2's
   `styles.elements.link[":hover"].typography.textDecoration: underline`
   default — wireframe matches, no override needed. */
.ntech-site-footer a {
	color: var(--wp--preset--color--base);
}
.ntech-site-footer a:hover {
	color: var(--wp--preset--color--base-3);
}

/* 6. Sub-footer top border — 1px white-10%. The only piece pattern CSS
   carries for the sub-footer; flex layout + gap + MT + padding-top +
   font-size all serialise via Block Editor primitives on the
   `.ntech-site-footer__sub` group. */
.ntech-site-footer__sub {
	border-top: 1px solid rgba(255, 255, 255, 0.1);
}
