/*
 * footer.css — site footer.
 *
 * Figma: "Foooter" frame, node 45:1177. Five columns on --surface-deep, a
 * hairline rule, then the copyright and legal links.
 *
 * The artboard lays the columns out across a 1620px content box; this site's
 * column is 1280px. Rather than converting each width to a percentage, the
 * grid track list carries the artboard's own pixel figures as fr units —
 * 307fr 305fr 207fr 214fr 319fr is literally the five measured widths, and
 * the browser scales them to whatever the column actually is.
 */

.siteFooter {
	background: var(--surface-deep);
	color: var(--warm-sand);
}

.footerInner {
	width: min(100% - (var(--gutter) * 2), var(--container));
	margin-inline: auto;
	padding-block: clamp(48px, 5.2vw, 84px) clamp(28px, 3vw, 48px);
}

.footerGrid {
	display: grid;
	grid-template-columns: 307fr 305fr 207fr 214fr 319fr;
	gap: clamp(28px, 3vw, 44px);
	align-items: start;
}

/* ------------------------------------------------------------- Brand */

.footerLogoLink {
	display: inline-block;
}

.footerLogo {
	display: block;
	width: auto;
	height: clamp(96px, 8vw, 110px);
}

.footerTagline {
	margin-top: clamp(20px, 2.2vw, 32px);
	max-width: 32ch;
	font-family: var(--font-body);
	font-size: 16px;
	line-height: 1.625;
	color: var(--warm-sand);
}

.footerSocialList {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	margin: clamp(24px, 2.4vw, 32px) 0 0;
	padding: 0;
	list-style: none;
}

.footerSocialLink {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	/* 6.2:1 against the mark, measured — the tint is light enough to read as a
	   button without the glyph losing contrast. */
	background: rgba(241, 240, 240, 0.18);
	color: var(--warm-sand);
	transition: background-color 0.2s var(--ease), color 0.2s var(--ease);
}

.footerSocialLink:hover,
.footerSocialLink:focus-visible {
	background: var(--accent);
	color: #fff;
}

/* ------------------------------------------------------------ Columns */

.footerColTitle {
	font-size: 22px;
	line-height: 1.455;
	font-weight: 400;
	text-transform: capitalize;
	color: var(--warm-sand);
}

.footerLinkList,
.footerContactList {
	display: flex;
	flex-direction: column;
	margin: 10px 0 0;
	padding: 0;
	list-style: none;
}

.footerLinkList {
	gap: 5px;
}

.footerContactList {
	gap: 12px;
}

.footerLink,
.footerContactText {
	font-family: var(--font-body);
	font-size: 16px;
	line-height: 1.625;
	color: var(--warm-sand);
}

a.footerLink {
	text-decoration: none;
	transition: color 0.18s var(--ease);
}

a.footerLink:hover,
a.footerLink:focus-visible {
	color: var(--accent-on-dark);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.footerContactItem {
	display: flex;
	align-items: flex-start;
	gap: 14px;
}

/* Solid warm-sand disc with the glyph knocked out in the surface colour,
   as drawn on the artboard (nodes 45:1215, 45:1221, 45:1227). */
.footerContactIcon {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: var(--warm-sand);
	color: var(--surface-deep);
}

/* tfr_icon_phone() is shared with the header, where it renders larger; the
   footer disc needs it at a fixed 16px whatever the helper's own size is. */
.footerContactIcon svg {
	width: 16px;
	height: 16px;
}

/* --------------------------------------------------------- Newsletter */

/*
 * Gravity Forms markup, scoped to this block — the plugin's own stylesheet is
 * dequeued site-wide (see inc/forms.php), so these rules are the only styling
 * the newsletter form gets.
 */
.footerNewsletter .gform_wrapper {
	margin-top: 10px;
}

.footerNewsletter .gform_fields {
	display: grid;
	gap: 16px;
	margin: 0;
	padding: 0;
	list-style: none;
}

/*
 * The artboard shows no label — the placeholder carries the field's meaning
 * visually. The label still has to exist for a screen reader, so it is
 * clipped rather than display:none'd, which would remove it from the
 * accessibility tree along with the pixels.
 */
.footerNewsletter .gfield_label {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

.footerNewsletter input[type="text"],
.footerNewsletter input[type="email"] {
	width: 100%;
	min-height: 50px;
	padding: 0 24px;
	/* 3.4:1 against --surface-deep, measured — WCAG 1.4.11 wants 3:1 for a
	   control's own boundary, and the artboard's hairline only reaches 1.4:1. */
	border: 1px solid rgba(246, 242, 234, 0.45);
	border-radius: var(--radius-pill);
	background: transparent;
	font-family: var(--font-body);
	font-size: 16px;
	line-height: 1.625;
	color: var(--warm-sand);
}

.footerNewsletter input::placeholder {
	/* 6.0:1 — muted enough to read as a placeholder, still legible. */
	color: rgba(246, 242, 234, 0.7);
	opacity: 1;
}

.footerNewsletter input:focus-visible {
	outline: 2px solid var(--accent-on-dark);
	outline-offset: 2px;
	border-color: transparent;
}

/* The submit is the shared .pillBtn (see inc/forms.php, which swaps Gravity
   Forms' <input> for a real <button>), so it needs no geometry here — only
   the gap the artboard puts above it. */
.footerNewsletter .gform_footer {
	margin-top: 12px;
}

.footerNewsletter .gfield_required {
	color: var(--accent-on-dark);
}

.footerNewsletter .validation_message,
.footerNewsletter .gform_validation_errors {
	margin-top: 8px;
	font-family: var(--font-body);
	font-size: 14px;
	line-height: 1.5;
	/* On --surface-deep a saturated red drops below 4.5:1; the light sand with
	   an underline carries the error without relying on hue alone. */
	color: var(--warm-sand);
	text-decoration: underline;
}

/* ---------------------------------------------------------- Trust badges */

/* LegitScript and the accepted-payment strip, drawn straight onto the
   surface just above the rule. */
.footerTrust {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 24px;
	margin-top: clamp(32px, 3.4vw, 52px);
}

.footerTrustLink {
	display: inline-flex;
	align-items: center;
	border-radius: 4px;
}

.footerTrustLink:focus-visible {
	outline: 2px solid var(--accent-on-dark);
	outline-offset: 4px;
}

/* One fixed height for every badge image, so LegitScript and the MediCard /
   iFinance artwork always match whatever their native sizes are. The width
   and height attributes on the <img> still reserve the box (no CLS); width:auto
   keeps each logo's own ratio. */
.footerTrustImg {
	display: block;
	width: auto;
	height: 90px;
}

/* The MediCard / iFinance artwork is visually heavier than the other badges
   at the shared height, so it is set 10px shorter to sit level with them. */
.footerTrustImgMedicard {
	height: 80px;
}

/* Accepted payment methods — inline SVG, so no request and no blur. Visa and
   Mastercard keep their own white card tile (their marks are only specified
   on white); the three generic methods are line icons in the footer's sand. */
.footerPay {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 16px 20px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.footerPayItem {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	color: var(--warm-sand);
}

.footerPayCard,
.footerPayIcon {
	display: block;
}

.footerPayLabel {
	font-family: var(--font-body);
	font-size: 12px;
	line-height: 1.2;
	text-align: center;
	white-space: nowrap;
}

/* ---------------------------------------------------------- Bottom bar */

.footerBottom {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 5px;
	margin-top: clamp(28px, 3vw, 44px);
	padding-top: clamp(24px, 2.6vw, 38px);
	border-top: 1px solid rgba(246, 242, 234, 0.15);
}

.footerCopy {
	font-family: var(--font-body);
	font-size: 16px;
	line-height: 1.625;
	color: var(--warm-sand);
}

.footerLegalList {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

/* The artboard separates the two legal links with a pipe. It is punctuation
   between list items, not content, so it is drawn rather than typed. */
.footerLegalList li + li::before {
	content: "|";
	margin-right: 8px;
	color: rgba(246, 242, 234, 0.5);
}

/* --------------------------------------------------------------- Small */

@media (max-width: 1100px) {
	.footerGrid {
		grid-template-columns: 307fr 305fr 207fr 214fr;
	}

	.footerNewsletter {
		grid-column: 1 / -1;
	}
}

@media (max-width: 860px) {
	.footerGrid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.footerNewsletter {
		grid-column: auto;
	}
}

@media (max-width: 560px) {
	.footerGrid {
		grid-template-columns: minmax(0, 1fr);
	}

	.footerBottom {
		justify-content: flex-start;
	}

	.footerBottom,
	.footerBottom * {
		font-size: 14px;
	}
}
