/* =========================================================================
   Brutalist Tech — Footer (Newsletter)  ·  tmpl-brutalist-tech--footer--newsletter--0
   Site-wide footer chrome (rendered on Home, Services, and every page via
   footer.php → template-parts/footer.php). Bento-grid over a dark-gradient
   overlay with brutalist decorative layers (plus-pattern, confetti, wave-top).

   All values reference design tokens (assets/css/design-tokens.css) — no
   hard-coded hex, font, spacing, or shadow values. Class names match
   template-parts/footer.php; the entrance hooks (.is-visible / [data-bt-anim]
   / --bt-delay) are driven by
   assets/js/footer-tmpl-brutalist-tech--footer--newsletter--0.js.
   ========================================================================= */

/* ---- Shell: transparent base + dark-gradient overlay ---- */
.bt-footer {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	margin-top: var(--space-24);
	padding: 0;
	background: transparent;
	color: var(--color-on-dark);
	font-family: var(--font-body);
}

/* dark-gradient overlay — sits behind content, above the transparent base */
.bt-footer::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -2;
	background:
		radial-gradient(120% 140% at 12% 0%, rgba(var(--color-primary-rgb), 0.28) 0%, transparent 55%),
		linear-gradient(160deg, var(--color-neutral-900) 0%, var(--color-neutral-800) 100%);
}

/* ---- Decorative: wave-top edge ---- */
.bt-footer__wave {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	line-height: 0;
	z-index: -1;
	transform: translateY(-98%);
	color: var(--color-neutral-900);
}

.bt-footer__wave svg {
	display: block;
	width: 100%;
	height: clamp(24px, 4vw, 44px);
	fill: currentColor;
}

/* ---- Decorative: plus-pattern layer ---- */
.bt-footer__plus {
	position: absolute;
	inset: 0;
	z-index: -1;
	pointer-events: none;
	opacity: 0.5;
	background-image:
		linear-gradient(rgba(255, 255, 255, 0.06) 1.5px, transparent 1.5px),
		linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1.5px, transparent 1.5px);
	background-size: 28px 28px;
	background-position: center;
	-webkit-mask-image: radial-gradient(120% 90% at 85% 10%, #000 0%, transparent 62%);
	        mask-image: radial-gradient(120% 90% at 85% 10%, #000 0%, transparent 62%);
}

/* ---- Decorative: confetti dots ---- */
.bt-footer__confetti {
	position: absolute;
	inset: 0;
	z-index: -1;
	pointer-events: none;
}

.bt-footer__dot {
	position: absolute;
	width: 10px;
	height: 10px;
	border-radius: var(--radius-sm);
	opacity: 0.85;
}

.bt-footer__dot--1 { top: 12%; left: 46%; background: var(--color-accent-500); transform: rotate(18deg); }
.bt-footer__dot--2 { top: 24%; left: 72%; background: var(--color-primary-400); border-radius: var(--radius-full); }
.bt-footer__dot--3 { top: 62%; left: 58%; background: var(--color-signature-mint); transform: rotate(-12deg); }
.bt-footer__dot--4 { top: 18%; left: 88%; width: 14px; height: 14px; background: transparent; border: 2px solid var(--color-accent-400); border-radius: var(--radius-full); }
.bt-footer__dot--5 { top: 70%; left: 82%; background: var(--color-primary-300); transform: rotate(24deg); }

/* ---- Container: max-w-6xl (~1152px) ---- */
.bt-footer__inner {
	position: relative;
	max-width: 1152px;
	margin: 0 auto;
	padding: var(--space-20) var(--container-padding) var(--space-10);
}

/* ---- Bento grid: brand cell + 3 nav columns (4 desktop cols) ---- */
.bt-footer__grid {
	display: grid;
	grid-template-columns: 1.6fr 1fr 1fr 1fr;
	gap: var(--space-10) var(--space-8);
	align-items: start;
}

/* ---- Brand cell (logo → promise → newsletter → social) ---- */
.bt-footer__brand {
	display: flex;
	flex-direction: column;
	gap: var(--space-5);
}

.bt-footer__logo {
	display: flex;
	align-items: center;
}

.bt-footer__logo img {
	max-width: 180px;
	height: auto;
}

.bt-footer__wordmark {
	display: inline-flex;
	align-items: center;
	gap: var(--space-2);
	text-decoration: none;
	color: var(--color-on-dark);
	font-family: var(--font-heading);
	font-weight: var(--weight-bold);
	font-size: var(--text-xl);
	letter-spacing: var(--letter-snug);
}

.bt-footer__wordmark-mark {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2rem;
	height: 2rem;
	border-radius: var(--radius-md);
	background: var(--color-primary-500);
	color: var(--color-on-primary);
	font-size: var(--text-base);
}

.bt-footer__wordmark-text {
	line-height: 1;
}

.bt-footer__promise {
	margin: 0;
	max-width: 42ch;
	color: rgba(255, 255, 255, 0.72);
	font-size: var(--text-base);
	line-height: var(--leading-normal);
}

/* ---- Newsletter block ---- */
.bt-footer__newsletter {
	position: relative;
	padding: var(--space-6);
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: var(--radius-2xl);
	background: rgba(255, 255, 255, 0.04);
}

.bt-footer__nl-title {
	margin: 0 0 var(--space-2);
	color: var(--color-on-dark);
	font-family: var(--font-heading);
	/* 3xl heading, brutalist-heavy weight 900, tracking 0em, left aligned */
	font-size: var(--text-3xl);
	font-weight: 900;
	letter-spacing: var(--letter-normal);
	line-height: var(--leading-tight);
	text-align: left;
}

.bt-footer__nl-sub {
	margin: 0 0 var(--space-5);
	max-width: 48ch;
	color: rgba(255, 255, 255, 0.7);
	/* subheading: lg */
	font-size: var(--text-lg);
	line-height: var(--leading-snug);
}

.bt-footer__nl-note {
	margin: 0 0 var(--space-4);
	padding: var(--space-2) var(--space-3);
	border-radius: var(--radius-md);
	font-size: var(--text-sm);
	font-weight: var(--weight-medium);
}

.bt-footer__nl-note--ok {
	background: rgba(22, 163, 74, 0.16);
	color: #bff0cf;
}

.bt-footer__nl-note--error {
	background: rgba(220, 38, 38, 0.16);
	color: #f7c4c4;
}

.bt-footer__nl-form {
	margin: 0;
}

/* honeypot — visually removed, kept in DOM for bots */
.bt-footer__hp {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

/* accessible label kept off-screen */
.bt-footer__nl-label {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

.bt-footer__nl-fields {
	display: flex;
	gap: var(--space-2);
	flex-wrap: wrap;
}

.bt-footer__nl-input {
	flex: 1 1 12rem;
	min-width: 0;
	height: 48px;
	padding: 0 var(--space-4);
	border: 1px solid rgba(255, 255, 255, 0.2);
	border-radius: var(--radius-full);
	background: rgba(255, 255, 255, 0.06);
	color: var(--color-on-dark);
	font-family: var(--font-body);
	font-size: var(--text-base);
	transition: border-color var(--duration-normal) var(--ease-default),
		box-shadow var(--duration-normal) var(--ease-default);
}

.bt-footer__nl-input::placeholder {
	color: rgba(255, 255, 255, 0.45);
}

.bt-footer__nl-input:focus-visible {
	outline: none;
	border-color: var(--color-primary-400);
	box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb), 0.3);
}

/* ---- Subscribe CTA — glow-pulse on hover ---- */
.bt-footer__nl-btn {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 48px;
	padding: 0 var(--space-6);
	border: 0;
	border-radius: var(--radius-full);
	background: var(--color-accent-500);
	color: var(--color-neutral-900);
	font-family: var(--font-heading);
	font-weight: var(--weight-bold);
	font-size: var(--text-base);
	letter-spacing: var(--letter-snug);
	cursor: pointer;
	transition: background var(--duration-normal) var(--ease-default),
		transform var(--duration-fast) var(--ease-default),
		box-shadow var(--duration-normal) var(--ease-default);
}

.bt-footer__nl-btn:hover {
	background: var(--color-accent-400);
	animation: bt-footer-glow-pulse 1600ms var(--ease-default) infinite;
}

.bt-footer__nl-btn:focus-visible {
	outline: 2px solid var(--color-primary-300);
	outline-offset: 2px;
}

@keyframes bt-footer-glow-pulse {
	0%, 100% { box-shadow: 0 0 0 rgba(var(--color-accent-rgb), 0.0); }
	50%      { box-shadow: 0 0 24px rgba(var(--color-accent-rgb), 0.55); }
}

/* ---- Social links ---- */
.bt-footer__social {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-2);
	margin: var(--space-2) 0 0;
	padding: 0;
	list-style: none;
}

.bt-footer__social-item {
	margin: 0;
}

.bt-footer__social-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border: 1px solid rgba(255, 255, 255, 0.16);
	border-radius: var(--radius-full);
	color: rgba(255, 255, 255, 0.82);
	transition: color var(--duration-normal) var(--ease-default),
		border-color var(--duration-normal) var(--ease-default),
		background var(--duration-normal) var(--ease-default),
		transform var(--duration-fast) var(--ease-default);
}

.bt-footer__social-link:hover {
	color: var(--color-neutral-900);
	background: var(--color-primary-300);
	border-color: var(--color-primary-300);
	transform: translateY(-2px);
}

.bt-footer__social-link:focus-visible {
	outline: 2px solid var(--color-primary-300);
	outline-offset: 2px;
}

.bt-footer__social-link svg {
	display: block;
}

/* ---- Nav columns ---- */
.bt-footer__col {
	display: flex;
	flex-direction: column;
	gap: var(--space-3);
}

.bt-footer__col-title {
	margin: 0 0 var(--space-1);
	color: var(--color-on-dark);
	font-family: var(--font-heading);
	font-size: var(--text-sm);
	font-weight: var(--weight-bold);
	text-transform: uppercase;
	letter-spacing: var(--letter-wide);
}

.bt-footer__links {
	margin: 0;
	padding: 0;
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: var(--space-2);
}

.bt-footer__links-item {
	margin: 0;
}

.bt-footer__link {
	display: inline-block;
	color: rgba(255, 255, 255, 0.7);
	text-decoration: none;
	font-size: var(--text-base);
	line-height: var(--leading-snug);
	transition: color var(--duration-normal) var(--ease-default),
		transform var(--duration-fast) var(--ease-default);
}

.bt-footer__link:hover {
	color: var(--color-on-dark);
	transform: translateX(3px);
}

.bt-footer__link:focus-visible {
	outline: 2px solid var(--color-primary-300);
	outline-offset: 2px;
	border-radius: var(--radius-sm);
}

/* ---- Bottom bar: copyright + warranty badge + legal ---- */
.bt-footer__bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--space-4) var(--space-6);
	margin-top: var(--space-12);
	padding-top: var(--space-6);
	border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.bt-footer__copy {
	margin: 0;
	color: rgba(255, 255, 255, 0.6);
	font-size: var(--text-sm);
}

.bt-footer__badge {
	display: inline-flex;
	align-items: center;
	gap: var(--space-2);
	padding: var(--space-1) var(--space-3);
	border: 1px solid rgba(var(--color-accent-rgb), 0.5);
	border-radius: var(--radius-full);
	color: var(--color-accent-300);
	font-size: var(--text-xs);
	font-weight: var(--weight-semibold);
	text-transform: uppercase;
	letter-spacing: var(--letter-wide);
}

.bt-footer__badge-dot {
	width: 8px;
	height: 8px;
	border-radius: var(--radius-full);
	background: var(--color-accent-500);
}

.bt-footer__legal {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-2) var(--space-5);
	margin: 0 0 0 auto;
	padding: 0;
	list-style: none;
}

.bt-footer__legal-link {
	color: rgba(255, 255, 255, 0.55);
	text-decoration: none;
	font-size: var(--text-sm);
	transition: color var(--duration-normal) var(--ease-default);
}

.bt-footer__legal-link:hover {
	color: var(--color-on-dark);
}

.bt-footer__legal-link:focus-visible {
	outline: 2px solid var(--color-primary-300);
	outline-offset: 2px;
	border-radius: var(--radius-sm);
}

/* ---- Entrance: fade-up (1000ms) with 200ms stagger ---- */
[data-bt-anim] {
	opacity: 0;
	transform: translateY(24px);
	transition: opacity 1000ms var(--ease-out), transform 1000ms var(--ease-out);
	transition-delay: calc(var(--bt-delay, 0) * 200ms);
	will-change: opacity, transform;
}

.bt-footer.is-visible [data-bt-anim] {
	opacity: 1;
	transform: none;
}

/* ---- Responsive: tablet = 2-col ---- */
@media (max-width: 1024px) {
	.bt-footer__grid {
		grid-template-columns: 1fr 1fr;
	}

	/* brand cell (newsletter) spans the full tablet row */
	.bt-footer__brand {
		grid-column: 1 / -1;
	}
}

/* ---- Responsive: mobile = single column, hidden decorative aside ---- */
@media (max-width: 640px) {
	.bt-footer__inner {
		padding: var(--space-16) var(--container-padding) var(--space-8);
	}

	.bt-footer__grid {
		grid-template-columns: 1fr;
		gap: var(--space-8);
	}

	.bt-footer__brand {
		grid-column: auto;
	}

	/* hidden-aside: drop the brutalist decorative layers on small screens */
	.bt-footer__plus,
	.bt-footer__confetti {
		display: none;
	}

	.bt-footer__bar {
		flex-direction: column;
		align-items: flex-start;
	}

	.bt-footer__legal {
		margin-left: 0;
	}
}

/* ---- Reduced motion: no pulse, no travel ---- */
@media (prefers-reduced-motion: reduce) {
	.bt-footer__nl-btn:hover {
		animation: none;
	}

	[data-bt-anim] {
		opacity: 1;
		transform: none;
		transition: none;
	}
}
