/*
 * Women Who Build — Footer & Header additions
 *
 * Extends the base components.css with:
 *   – Footer top orange rule + breathing room below it
 *   – Footer logo image (approved brand asset)
 *   – Brand column, 4+4 nav, email that never wraps
 *   – Supporting pages without Legal/Explore/Contact headings
 *   – Bottom bar: copyright + Privacy / Terms / Accessibility
 *   – Mobile close button
 *
 * Design principles:
 *   Black background · white type · restrained orange
 *   No gradients · no heavy shadows · no rounded cards
 */

/* ── Footer top rule — thin orange horizontal detail ── */
.footer-top-rule {
	width: 100%;
	height: 2px;
	background: var(--wwb-orange);
}

/* Breathing room BELOW the orange line, not above it */
.site-footer {
	padding-top: 0;
	overflow-x: clip;
}

.site-footer .footer-grid {
	padding-top: clamp(56px, 7vw, 96px);
	padding-bottom: clamp(40px, 5vw, 64px);
	grid-template-columns: minmax(0, 1.15fr) minmax(0, 1.35fr) minmax(0, 1fr);
	gap: clamp(32px, 4vw, 64px);
	align-items: start;
}

/* ── Footer logo image ── */
.footer-logo-link {
	display: inline-block;
	margin-bottom: 20px;
	text-decoration: none;
	line-height: 0;
	max-width: 100%;
}

.footer-logo-link:hover {
	opacity: 0.85;
}

.footer-logo-img {
	display: block;
	width: min(220px, 58vw);
	height: auto;
	max-width: 100%;
	filter: brightness(0) invert(1);
	object-fit: contain;
	object-position: left center;
}

/* ── Footer brand column ── */
.footer-brand-col .footer-brand-line {
	font-family: var(--wwb-font-display);
	font-size: clamp(1.05rem, 2.2vw, 1.3rem);
	color: var(--wwb-orange);
	letter-spacing: 0.04em;
	text-transform: uppercase;
	margin: 0 0 10px;
	line-height: 1.1;
	overflow-wrap: break-word;
}

.footer-brand-col .footer-brand-support {
	font-size: 0.88rem;
	color: rgba(255, 255, 255, 0.6);
	max-width: 26ch;
	line-height: 1.6;
	margin: 0 0 20px;
	overflow-wrap: break-word;
}

/* Hide leftover heading class if any template still emits it */
.site-footer .footer-heading {
	display: none;
}

/* ── 4 + 4 navigation ── */
.footer-nav {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0 32px;
	min-width: 0;
}

.footer-nav-col {
	list-style: none;
	margin: 0;
	padding: 0;
	min-width: 0;
}

.footer-nav-col li + li,
.footer-supporting li + li {
	margin-top: 10px;
}

.footer-nav-col a,
.footer-supporting a {
	white-space: nowrap;
}

/* ── Email — NEVER wrap ── */
.footer-email-wrap {
	margin: 0 0 20px;
	min-width: 0;
	max-width: 100%;
}

.footer-email {
	display: inline-block;
	max-width: 100%;
	font-size: 0.9rem;
	line-height: 1.3;
	color: var(--wwb-white);
	white-space: nowrap;
	overflow-wrap: normal;
	word-break: keep-all;
	text-decoration: none;
	border-bottom: 1px solid rgba(255, 255, 255, 0.25);
	padding-bottom: 1px;
	transition: color 0.15s, border-color 0.15s;
}

.footer-email:hover {
	color: var(--wwb-orange);
	border-color: var(--wwb-orange);
}

.footer-supporting {
	list-style: none;
	margin: 0;
	padding: 0;
}

.footer-supporting a {
	font-size: 0.82rem;
	color: rgba(255, 255, 255, 0.62);
}

.footer-supporting a:hover {
	color: var(--wwb-orange);
}

/* ── Bottom bar ── */
.site-footer .footer-base {
	border-top: 1px solid rgba(255, 255, 255, 0.12);
	padding: 18px 0 22px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 16px 24px;
	flex-wrap: wrap;
	color: rgba(255, 255, 255, 0.62);
	font-size: 0.82rem;
}

.footer-copyright {
	margin: 0;
	white-space: nowrap;
}

.footer-base-links {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 0;
	margin: 0;
}

.footer-base-links a {
	margin-left: 0;
	margin-right: 16px;
	color: rgba(255, 255, 255, 0.62);
	font-size: 0.82rem;
}

.footer-base-links a:last-child {
	margin-right: 0;
}

/* ── Wordmark text fallback ── */
.wordmark-text,
.footer-wordmark-text {
	font-family: var(--wwb-font-display);
	font-size: clamp(1.2rem, 3vw, 1.8rem);
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--wwb-black);
	white-space: nowrap;
}

.footer-wordmark-text {
	color: var(--wwb-white);
}

/* ── Mobile menu close button ── */
.menu-close {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	border: 0;
	background: transparent;
	padding: 0;
	cursor: pointer;
	color: var(--wwb-black);
	flex-shrink: 0;
}

.menu-close:hover {
	color: var(--wwb-orange);
}

.icon-close {
	display: block;
	width: 24px;
	height: 24px;
}

/* =========================================================================
   DESKTOP / WIDE
   ========================================================================= */

@media (min-width: 1240px) {
	.footer-logo-img {
		width: min(240px, 18vw);
	}
}

@media (min-width: 1920px) {
	.footer-logo-img {
		width: 240px;
	}
}

/* =========================================================================
   TABLET PORTRAIT — 768 / 820 / 834
   Brand on first row; nav 4+4 + email share the second row
   ========================================================================= */

@media (min-width: 768px) and (max-width: 1239px) {
	.site-footer .footer-grid {
		grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
		gap: 40px 48px;
	}

	.footer-brand-col {
		grid-column: 1 / -1;
	}

	.footer-nav {
		gap: 0 40px;
	}
}

/* Tablet landscape 1024 / 1180 / 1194 — three columns when width allows */
@media (min-width: 1024px) and (max-width: 1239px) {
	.site-footer .footer-grid {
		grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.3fr) minmax(0, 1fr);
	}

	.footer-brand-col {
		grid-column: auto;
	}
}

/* =========================================================================
   PHONE PORTRAIT — 320 / 375 / 390 / 430
   ========================================================================= */

@media (max-width: 767px) {
	.site-footer .footer-grid {
		grid-template-columns: 1fr;
		gap: clamp(28px, 6vw, 40px);
		padding-top: clamp(44px, 10vw, 64px);
	}

	.footer-brand-col {
		border-bottom: 1px solid rgba(255, 255, 255, 0.1);
		padding-bottom: clamp(24px, 5vw, 32px);
	}

	.footer-logo-img {
		width: min(180px, 52vw);
	}

	.footer-nav {
		gap: 0 24px;
	}

	.footer-nav-col a {
		white-space: normal;
	}

	.site-footer .footer-base {
		flex-direction: column;
		align-items: flex-start;
		gap: 12px;
	}

	.footer-copyright {
		white-space: normal;
	}

	.footer-base-links a {
		margin-right: 14px;
	}
}

/* 320px — keep email on one line by shrinking type, never wrapping */
@media (max-width: 374px) {
	.footer-logo-img {
		width: min(150px, 70vw);
	}

	.footer-brand-col .footer-brand-line {
		font-size: 1rem;
	}

	.footer-email {
		font-size: 0.72rem;
		letter-spacing: -0.01em;
	}

	.footer-nav {
		gap: 0 16px;
	}

	.footer-nav-col a {
		font-size: 0.88rem;
		white-space: normal;
	}
}

/* =========================================================================
   PHONE LANDSCAPE — 568×320, 667×375, 736×414, 844×390, 932×430
   Use width; do not treat as desktop. Keep footer compact.
   ========================================================================= */

@media (orientation: landscape) and (max-height: 500px) and (max-width: 932px) {
	.site-footer .footer-grid {
		grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.25fr);
		gap: 20px 32px;
		padding-top: 36px;
		padding-bottom: 24px;
	}

	.footer-brand-col {
		grid-column: auto;
		border-bottom: 0;
		padding-bottom: 0;
	}

	.footer-logo-img {
		width: min(160px, 28vw);
		margin-bottom: 12px;
	}

	.footer-brand-col .footer-brand-support {
		display: none;
	}

	.footer-meta {
		grid-column: 1 / -1;
		display: flex;
		flex-wrap: wrap;
		align-items: baseline;
		justify-content: space-between;
		gap: 12px 24px;
	}

	.footer-email-wrap {
		margin-bottom: 0;
	}

	.footer-supporting {
		display: flex;
		flex-wrap: wrap;
		gap: 8px 18px;
	}

	.footer-supporting li + li {
		margin-top: 0;
	}

	.site-footer .footer-base {
		flex-direction: row;
		flex-wrap: wrap;
		padding-block: 12px 16px;
	}
}

@media (orientation: landscape) and (max-height: 430px) and (max-width: 736px) {
	.footer-email {
		font-size: 0.78rem;
	}

	.footer-nav-col a {
		font-size: 0.88rem;
	}
}
