/* ==========================================================================
   BBI - Global Footer (0.3.0, contact/legal-nav extended 0.4.1;
   rebuilt on native Divi modules, 0.5.0; 0.5.1 brings in the 15 Nov
   theme-file-editor fix — top-block order/edges and legal-list bullets —
   catch-up copy, no behaviour change from what's been live since then)
   Reusable layer. Contains no page copy — every word comes from the Website
   Profile options page via inc/global-footer.php's per-row shortcode bridges
   ([bbi_footer_brand] etc. — Divi's own Dynamic Content cannot read Website
   Profile/ACF options-page fields, confirmed by testing), each pasted into
   its own Divi Text module inside the Theme Builder Global Footer Row. The
   old single-Code-module [bbi_global_footer] shortcode still exists for
   rollback but is unused by the live template.

   Required hooks:
     .bbi-footer[data-bbi-footer]   root, via Divi's own Attributes panel on
                                     the Section (0.5.0; previously the root
                                     <div> the single shortcode rendered)
     .bbi-footer__inner             max-width wrapper, via Attributes on the
                                     Column
     .bbi-footer__row-brand / __row-statement / __row-contact / __row-legal /
     __row-disclosure / __row-copyright
       (0.5.0) one per Divi Text module, via Attributes — the ≥768px rule
       (section 8) sizes these as the actual flex items; the semantic classes
       below are a level deeper now (inside each shortcode's own output) and
       flex-basis on them alone is a no-op
     .bbi-footer__brand             logo + brand name
     .bbi-footer__statement         short footer statement
     .bbi-footer__contact           public email + telephone + LinkedIn
     .bbi-footer__legal-nav / __legal-list / __link / __manage-consent
       (0.4.1: each legal link only renders if its page is published, and
       __manage-consent only renders if Complianz is active)
     .bbi-footer__disclosure        full registered-company disclosure
     .bbi-footer__copyright

   Black background, white text, true orange accents, Overpass. Restrained and
   compact by design — no multi-column corporate footer. Mobile-first; the
   ≥768px rule only rearranges rows onto shared lines, it never adds columns.

   Tokens fall back to the hero values when bbi-hero.css is absent, so this
   file works standalone on any page that only carries the global footer.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */

.bbi-footer {
	--bbi-footer-black: var(--bbi-black, #050505);
	--bbi-footer-white: var(--bbi-white, #f5f4f1);
	--bbi-footer-muted: var(--bbi-muted, #c5c3bf);
	--bbi-footer-orange: var(--bbi-orange, #ff5a00);
	--bbi-footer-font: var(
		--bbi-font,
		"Overpass",
		"Overpass Variable",
		-apple-system,
		BlinkMacSystemFont,
		"Segoe UI",
		Roboto,
		"Helvetica Neue",
		Arial,
		sans-serif
	);
	--bbi-footer-max: none;
	--bbi-footer-gutter: 24px;
	--bbi-footer-rule: rgba(245, 244, 241, 0.14);
}

@media (min-width: 480px) {
	.bbi-footer {
		--bbi-footer-gutter: 32px;
	}
}

@media (min-width: 990px) {
	.bbi-footer {
		--bbi-footer-gutter: 76px;
	}
}

/* --------------------------------------------------------------------------
   2. Root and layout
   -------------------------------------------------------------------------- */

.bbi-footer {
	background: var(--bbi-footer-black);
	color: var(--bbi-footer-white);
	font-family: var(--bbi-footer-font);
	overflow-x: hidden;
}

.bbi-footer * {
	box-sizing: border-box;
}

.bbi-footer__inner {
	max-width: var(--bbi-footer-max);
	margin-inline: auto;
	padding: clamp(28px, 5vw, 48px) var(--bbi-footer-gutter);
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 16px;
}

.bbi-footer :focus-visible {
	outline: 2px solid var(--bbi-footer-orange);
	outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   3. Brand
   -------------------------------------------------------------------------- */

.bbi-footer__brand {
	display: flex;
	align-items: center;
	gap: 10px;
}

.bbi-footer__logo {
	display: block;
	height: 32px;
	width: auto;
	max-width: 100%;
}

/* Typography (bold, 13px, uppercase, letter-spaced) is the Eyebrow Text
   Preset (Order of Work step 1), assigned in the Theme Builder — matches
   the header brand mark's treatment. Nothing to set here. */

/* --------------------------------------------------------------------------
   4. Statement — 14px, the Small/Footer Text Preset, assigned in the Theme
      Builder.
   -------------------------------------------------------------------------- */

.bbi-footer__statement {
	margin: 0;
	max-width: 46ch;
	line-height: 1.5;
	color: var(--bbi-footer-muted);
}

/* --------------------------------------------------------------------------
   5. Contact (email + social) — 14px, the Small/Footer Text Preset,
      assigned in the Theme Builder. The semibold weight and underline
      treatment stay here: link-specific decoration a Preset can't express.
   -------------------------------------------------------------------------- */

.bbi-footer__contact {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 16px;
}

.bbi-footer .bbi-wp-email-link,
.bbi-footer .bbi-wp-tel-link,
.bbi-footer .bbi-wp-social-link {
	color: var(--bbi-footer-white);
	font-weight: 600;
	text-decoration: underline;
	text-decoration-color: var(--bbi-footer-orange);
	text-underline-offset: 3px;
	text-decoration-thickness: 1px;
}

.bbi-footer .bbi-wp-email-link:hover,
.bbi-footer .bbi-wp-tel-link:hover,
.bbi-footer .bbi-wp-social-link:hover {
	text-decoration-thickness: 2px;
}

.bbi-footer .bbi-wp-social-links {
	margin: 0;
	padding: 0;
	list-style: none;
	display: flex;
	gap: 16px;
}

/* --------------------------------------------------------------------------
   6. Legal navigation — 14px, the Small/Footer Text Preset, assigned in the
      Theme Builder (raised from 13px so these links aren't tiny).
   -------------------------------------------------------------------------- */

.bbi-footer__legal-nav {
	width: 100%;
	border-top: 1px solid var(--bbi-footer-rule);
	padding-top: 14px;
}

.bbi-footer__legal-list {
	margin: 0;
	padding: 0;
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 8px 20px;
}

.bbi-footer .bbi-footer__legal-list {
	padding: 0;
	list-style: none;
}

.bbi-footer__link {
	color: var(--bbi-footer-muted);
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
}

.bbi-footer__link:hover,
.bbi-footer__link:focus-visible {
	color: var(--bbi-footer-white);
	text-decoration: underline;
	text-decoration-color: var(--bbi-footer-orange);
	text-underline-offset: 3px;
}

.bbi-footer__manage-consent {
	background: none;
	border: none;
	padding: 0;
	cursor: pointer;
	font: inherit;
}

/* --------------------------------------------------------------------------
   7. Disclosure and copyright — 14px, the Small/Footer Text Preset,
      assigned in the Theme Builder (raised from 12px: John's "not tiny"
      instruction, Order of Work step 2).
   -------------------------------------------------------------------------- */

.bbi-footer__disclosure {
	margin: 0;
	max-width: 72ch;
	line-height: 1.6;
	color: var(--bbi-footer-muted);
}

.bbi-footer__copyright {
	margin: 0;
	color: var(--bbi-footer-muted);
}

/* --------------------------------------------------------------------------
   8. ≥768px — share rows instead of stacking every element

      0.5.0: each row is now its own Divi Text module (the native-module
      footer), so the flex items .bbi-footer__inner actually lays out are
      those modules' own wrapper divs, not the semantic .bbi-footer__brand/
      __statement/etc. elements the shortcodes render — those are one level
      deeper now. Each module wrapper carries its own .bbi-footer__row-*
      class via Divi's Attributes panel for exactly this reason; sizing the
      semantic classes directly (as before 0.5.0) left every row's flex
      sizing a no-op, since flex-basis only does anything on a direct flex
      child, and produced overlapping rows at this breakpoint.
   -------------------------------------------------------------------------- */

@media (min-width: 768px) {
	.bbi-footer__inner {
		flex-direction: row;
		flex-wrap: wrap;
		align-items: center;
		justify-content: space-between;
	}

	.bbi-footer__row-brand {
		order: 1;
		flex: 0 1 auto;
	}

	.bbi-footer__row-contact {
		order: 2;
		margin-inline-start: auto;
	}

	.bbi-footer__row-statement {
		order: 3;
		width: 100%;
	}

	.bbi-footer__row-legal,
	.bbi-footer__row-disclosure,
	.bbi-footer__row-copyright {
		order: 4;
		width: 100%;
	}

	.bbi-footer__row-disclosure,
	.bbi-footer__row-copyright {
		border-top: none;
		padding-top: 0;
	}
}

/* --------------------------------------------------------------------------
   9. Reduced motion / high contrast — no animation is used, but keep the
      focus ring solid and opaque regardless of forced-colors mode.
   -------------------------------------------------------------------------- */

@media (forced-colors: active) {
	.bbi-footer :focus-visible {
		outline-color: Highlight;
	}
}
