/**
 * The Ladd Firm — footer.
 *
 * Targets Astra HFB footer classes. All values measured off the design; see
 * .claude/docs/measured-design-spec.md.
 *
 * Astra's three footer rows carry the design's three bands, in visual order:
 *   above   -> the 3-column grid   (415 / 296 / 296, gap 56, pad 72/48, bg #2B2B2B)
 *   primary -> legal links + copyright  (border-top hairline, pad-block 22)
 *   below   -> bar-required disclaimer  (bg #1F1F1F, pad-block 20)
 */

/* ----------------------------------------------------------------- ground ---- */

/**
 * Astra paints each footer row through an attribute selector at 0-2-0:
 *   .site-above-footer-wrap[data-section="section-above-footer-builder"]   #eeeeee
 *   .site-primary-footer-wrap[data-section="section-primary-footer-builder"] #f9f9f9
 *   .site-below-footer-wrap[data-section="section-below-footer-builder"]   var(--ast-global-color-4)
 * A plain class selector loses to all three, which left the whole footer light.
 * Matched at the same specificity (confirmed with CDP CSS.getMatchedStylesForNode).
 */
.site-footer,
.ast-footer-overlay,
.site-above-footer-wrap[data-section="section-above-footer-builder"],
.site-primary-footer-wrap[data-section="section-primary-footer-builder"] {
	background-color: var(--ladd-bg-footer);
	color: var(--ladd-footer-text);
}

.site-footer {
	font-family: var(--ladd-font-body);
	font-size: 16px;
	line-height: 1.6;
}

/* Astra paints footer widget areas with global colour 4 — the same slot that made the
   above-header bar grey. On a dark footer that would be a light block. */
.site-footer .widget,
.site-footer .ast-builder-layout-element {
	background-color: transparent;
	color: inherit;
}

/* ----------------------------------------------------- row 1: the main grid ---- */

.site-above-footer-wrap[data-section="section-above-footer-builder"] > .ast-builder-grid-row,
.site-above-footer-wrap .ast-builder-grid-row {
	display: grid;
	/* Measured 415.047 / 296.469 / 296.469 with a 56px gap inside 1120px of usable
	   width. Expressed as ratios so it stays correct if the container changes. */
	grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr);
	gap: 56px;
	align-items: start;
	width: 100%;
}
/* NOTE: at 922-1023 Astra's tablet grid outranks this since the breakpoint moved to
   1240; header.css ("breakpoint move: undo side effects") restates it at a higher weight. */

/* The gutter belongs on .ast-builder-grid-row, which is the element that already
   carries max-width: 1200px. `.ast-builder-grid-row-container` is NOT a separate
   wrapper — it is the same element as .site-above-footer-wrap, so a descendant
   selector for it never matches. Without the padding here the columns measured
   448/320/320 across a full 1200 instead of the design's 415/296/296 inside 1120. */
.site-above-footer-wrap .ast-builder-grid-row,
.site-primary-footer-wrap .ast-builder-grid-row,
.site-below-footer-wrap .ast-builder-grid-row {
	box-sizing: border-box;
	max-width: var(--ladd-container-max);
	margin-inline: auto;
	padding-inline: var(--ladd-gutter);
}

/* Astra's HTML and widget components default to centred (column 1) and right-aligned
   (last column) inside the footer grid. The design is left-aligned throughout. */
.site-footer .ast-builder-layout-element,
.site-footer .ast-builder-html-element,
.site-footer .footer-widget-area,
.site-footer .ast-header-html {
	text-align: left;
	justify-content: flex-start;
}

.site-above-footer-wrap > .ast-container {
	padding-top: 72px;
	padding-bottom: 48px;
}

/* Column 1 — brand */

.ladd-footer__logo-link { display: inline-block; }

.ladd-footer__logo {
	/* The logo is the orange/grey mark on a dark ground; it reads as-is, so no
	   filter or knockout is applied. */
	display: block;
	height: auto;
	max-width: 100%;
}

.ladd-footer__descriptor {
	margin: var(--ladd-space-6) 0 var(--ladd-space-7);
	max-width: 40ch;
	font-size: 16px;
	line-height: 1.65;
	color: var(--ladd-footer-text);
}

/* Column headings, all three columns */

.ladd-footer__heading,
.site-footer .widget-title,
.site-footer .widget .wp-block-heading {
	margin: 0 0 var(--ladd-space-5);
	font-family: var(--ladd-font-body);
	font-size: 14px;
	font-weight: 700;
	line-height: 1.4;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--ladd-footer-heading);
}

/* ------------------------------------------------------------ social icons ---- */

.ladd-social {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
	margin: 0;
	padding: 0;
	list-style: none;
}

/* base.css gives list items an accent dot; the social row is not prose. */
.ladd-social > .ladd-social__item::before { content: none; }

.ladd-social__item {
	margin: 0;
	padding: 0;
	list-style: none;
}

.ladd-social__link {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	border-radius: 50%;
	background-color: var(--ladd-accent);
	border: 1px solid var(--ladd-accent);
	color: #FFFFFF;
	transition:
		background-color var(--ladd-duration-fast) var(--ladd-ease),
		border-color var(--ladd-duration-fast) var(--ladd-ease);
}

.ladd-social__link:hover,
.ladd-social__link:focus {
	background-color: var(--ladd-accent-hover);
	border-color: var(--ladd-accent-hover);
	color: #FFFFFF;
}

.ladd-social__svg {
	display: block;
	width: 19px;
	height: 19px;
}

/* ------------------------------------------------------- column 2: menus ---- */

.site-footer .widget_nav_menu ul,
.site-footer .wp-block-navigation ul {
	display: flex;
	flex-direction: column;
	gap: 11px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.site-footer .widget_nav_menu li {
	margin: 0;
	padding: 0;
	list-style: none;
}

/* Cancel base.css's prose bullet inside the footer menus. */
.site-footer .widget_nav_menu li::before { content: none; }

.site-footer .widget_nav_menu a,
.site-footer .wp-block-navigation a {
	font-size: 16px;
	font-weight: 400;
	line-height: 1.4;
	color: var(--ladd-footer-link);
	text-decoration: none;
}

.site-footer .widget_nav_menu a:hover,
.site-footer .widget_nav_menu a:focus {
	color: var(--ladd-accent);
}

/* ----------------------------------------------------- column 3: contact ---- */

.ladd-footer__office + .ladd-footer__office { margin-top: var(--ladd-space-6); }

.ladd-footer__office-name {
	margin: 0 0 var(--ladd-space-2);
	font-family: var(--ladd-font-heading);
	font-size: 16px;
	font-weight: var(--ladd-weight-heading);
	line-height: 1.3;
	color: #FFFFFF;
}

/* [company-phone] and [company-email] each render their own anchor. */
.ladd-footer__phone,
.ladd-footer__email {
	margin: 0 0 var(--ladd-space-2);
}

.ladd-footer__phone a,
.ladd-footer__email a {
	font-size: 16px;
	font-weight: 700;
	color: var(--ladd-footer-link);
	text-decoration: none;
	overflow-wrap: anywhere;
}

.ladd-footer__phone a:hover,
.ladd-footer__email a:hover,
.ladd-footer__phone a:focus,
.ladd-footer__email a:focus {
	color: var(--ladd-accent);
}

.ladd-footer__email { margin-top: var(--ladd-space-6); }

.ladd-footer__address {
	margin: 0;
	font-style: normal;
	font-size: 16px;
	line-height: 1.6;
	color: var(--ladd-footer-text);
}

/* -------------------------------------------------- row 2: legal + copyright ---- */

.site-primary-footer-wrap {
	border-top: 1px solid var(--ladd-footer-rule);
}

.site-primary-footer-wrap > .ast-container {
	padding-top: 22px;
	padding-bottom: 22px;
}

.site-primary-footer-wrap .ast-builder-grid-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--ladd-space-5);
	width: 100%;
}

/* The legal menu is horizontal in this row, unlike the vertical Quick Links. */
.site-primary-footer-wrap .widget_nav_menu ul {
	flex-direction: row;
	flex-wrap: wrap;
	gap: var(--ladd-space-5);
}

.ladd-footer__copyright,
.site-primary-footer-wrap .ast-footer-copyright p {
	margin: 0;
	font-size: 15px;
	color: var(--ladd-footer-text);
}

/* ------------------------------------------------------ row 3: disclaimer ---- */

/* Same attribute-selector contest as the other two rows. */
.site-below-footer-wrap,
.site-below-footer-wrap[data-section="section-below-footer-builder"] {
	background-color: var(--ladd-bg-footer-deep);
}

.site-below-footer-wrap > .ast-container {
	padding-top: 20px;
	padding-bottom: 20px;
}

.site-below-footer-wrap .ast-builder-grid-row {
	width: 100%;
}

.ladd-footer__disclaimer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--ladd-space-8);
}

.ladd-footer__disclaimer p {
	margin: 0;
	max-width: 70ch;
	font-size: 14px;
	line-height: 1.5;
	color: #B9B4AC;
}

.ladd-footer__credit {
	flex: 0 0 auto;
	font-size: 14px;
	font-weight: 700;
	color: var(--ladd-footer-link);
	text-decoration: none;
	white-space: nowrap;
}

.ladd-footer__credit:hover { color: var(--ladd-accent); }

/**
 * The SMB Team mark in the credit.
 *
 * The <img> carries the artwork's intrinsic 724x197 so the browser reserves the right
 * aspect ratio before it loads; without a width here it renders at that full 724px, which
 * is wider than the disclaimer column. 132px matches the optical weight of the 14px
 * credit text it replaces. `display:block` kills the inline-baseline gap under it.
 */
.ladd-footer__credit-logo {
	display: block;
	width: 132px;
	height: auto;
}

/* The visible logo IS the credit, so the text is for screen readers only. Astra ships
   .screen-reader-text, but scope it here so the footer never collapses the link to
   zero size if that utility is ever dropped. */
.ladd-footer__credit {
	display: inline-flex;
	align-items: center;
	min-height: 24px;
}

/* --------------------------------------------------------------- responsive ---- */

@media (max-width: 921px) {
	.site-above-footer-wrap .ast-builder-grid-row {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
		gap: var(--ladd-space-9);
	}
	.site-above-footer-wrap > .ast-container {
		padding-top: 56px;
		padding-bottom: 40px;
	}
}

@media (max-width: 767px) {
	.site-above-footer-wrap .ast-builder-grid-row {
		grid-template-columns: minmax(0, 1fr);
		gap: var(--ladd-space-9);
	}
	.site-primary-footer-wrap .ast-builder-grid-row,
	.ladd-footer__disclaimer {
		flex-direction: column;
		align-items: flex-start;
		gap: var(--ladd-space-4);
	}
	.ladd-footer__descriptor { max-width: none; }
}

/**
 * Breathing room at the TOP of the footer only.
 *
 * This previously also targeted .site-primary-footer-wrap — the legal-links bar — which
 * gave one line of links (Disclaimer / Privacy Policy / Site Map / copyright) 72px above
 * and 45px below, a 143px band for 24px of text. The top padding belongs to the footer as
 * a whole, not to every row inside it.
 */
.site-footer .ast-builder-grid-row-container.site-above-footer-wrap {
	padding-top: 72px;
}

/* The legal-links bar sits tight to the block above it. */
.site-footer .site-primary-footer-wrap {
	padding-top: 22px;
	padding-bottom: 22px;
}

/**
 * [10] Each office as its own column, with the phone and address behind icons.
 *
 * The icon sits on its own flex track so multi-line addresses stay aligned to the text
 * rather than wrapping under the icon.
 */
.ladd-footer__contact .ladd-footer__heading {
	text-transform: uppercase;
	letter-spacing: 0.08em;
	font-size: 13px;
	font-weight: 700;
	margin-bottom: 18px;
}

.ladd-footer__phone {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 21px;
	font-weight: 700;
	margin-bottom: 14px;
}

.ladd-footer__phone a { color: inherit; text-decoration: none; }
.ladd-footer__phone a:hover { color: var(--ladd-accent); }

/**
 * The icons are CSS backgrounds, not inline SVG.
 *
 * Astra's footer HTML component strips <svg> from its stored markup on output, so an
 * inline icon never reached the page. A data: URI in ::before survives, needs no extra
 * request, and keeps the stored markup to text plus CFM shortcodes. The accent colour is
 * baked into each URI because a background image cannot inherit currentColor.
 */
.ladd-footer__phone,
.ladd-footer__address {
	position: relative;
	padding-left: 27px;
}

.ladd-footer__phone::before,
.ladd-footer__address::before {
	content: '';
	position: absolute;
	left: 0;
	width: 17px;
	height: 17px;
	background-repeat: no-repeat;
	background-size: contain;
}

/* handset */
.ladd-footer__phone::before {
	top: 50%;
	transform: translateY(-50%);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23D57534' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6A19.79 19.79 0 0 1 2.12 4.18 2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.1 9.9a16 16 0 0 0 6 6l1.26-1.26a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z'/%3E%3C/svg%3E");
}

/* map pin */
.ladd-footer__address::before {
	top: 4px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23D57534' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z'/%3E%3Ccircle cx='12' cy='10' r='3'/%3E%3C/svg%3E");
}

.ladd-footer__address {
	font-style: normal;
	line-height: 1.7;
	margin: 0;
}

/**
 * Four column tracks.
 *
 * Astra emitted `grid-template-columns` for only THREE tracks even with
 * `hba-footer-column: 4` stored and four section divs in the markup, so the Mississippi
 * column wrapped onto a row of its own. The brand column gets the extra width.
 */
@media (min-width: 1024px) {
	/* Brand about half, an office each taking a quarter. */
	.site-above-footer-wrap .ast-builder-grid-row {
		grid-template-columns: 2fr 1fr 1fr !important;
	}
}

.ladd-footer__email { margin-top: 14px; }

/* Four columns is tight for the brand blurb; give it a little more room than the rest. */
@media (min-width: 1024px) {
	.site-above-footer-wrap .site-footer-section:first-child { padding-right: 24px; }
}

/* The Mississippi column inherited a centred text-align from its footer HTML component
   (footer-html-3-alignment did not take), so its address sat centred beside Alabama's
   left-aligned one. Both blocks are pinned left here. */
.ladd-footer__contact,
.ladd-footer__contact .ladd-footer__address,
.ladd-footer__contact .ladd-footer__phone,
.ladd-footer__contact .ladd-footer__heading {
	text-align: left;
}

/**
 * The office map embeds.
 *
 * Google's iframe has no intrinsic aspect ratio, so the box is sized here and the iframe
 * fills it. Rounded to match the cards elsewhere, and the dark-footer treatment keeps it
 * from glaring against the near-black ground.
 */
/* The two office columns are flex columns so the maps can be pushed to the bottom and
   line up with each other — the Alabama column carries an extra line (the email), which
   otherwise left its map sitting ~36px lower than Mississippi's. */
/**
 * Top-align the footer columns.
 *
 * The grid stretches every section to the tallest (382.9px), but each section is a flex
 * box that CENTRES its content — so the shorter Mississippi column floated 19.7px down
 * and its map never lined up with Alabama's. Both columns now start at the same line, and
 * since they carry the same run of elements the maps align on their own.
 */
.site-above-footer-wrap .site-footer-section {
	justify-content: flex-start;
	align-items: flex-start;
}

.ladd-footer__contact { display: block; }

.ladd-map {
	margin-top: 18px;
	border-radius: var(--ladd-radius-card);
	overflow: hidden;
	line-height: 0;
}

.ladd-map iframe {
	display: block;
	width: 100%;
	height: 168px;
	border: 0;
}

@media (max-width: 1023px) {
	.ladd-map iframe { height: 200px; }
}


/* ---- 2026-11-17 revision ---- */

/* White logo on the dark footer (design: the colour logo through brightness(0) invert(1)). */
.ladd-footer__logo img,
img.ladd-footer__logo { filter: brightness(0) invert(1); }

/* Visible "Website by" before the SMB Team mark. */
.ladd-footer__credit { display: inline-flex; align-items: center; gap: 10px; }
.ladd-footer__credit-label { font-size: 13px; color: #8E8E90; white-space: nowrap; }
