/* Newsletter + Instagram footer band — Phase D3.6.
   Sits directly above the site footer (see inc/newsletter.php, hooked at
   wp_footer priority 4, one tick before the footer's priority 5). Two-column
   on desktop (heading/blurb/Instagram left, form right), stacks at ≤782px.
   Every color/spacing value is a token so the band morphs with the active
   audience segment like the rest of the chrome. */

.at-newsletter {
	background: var(--at-ink);
	color: var(--at-on-dark);
}

.at-newsletter__inner {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: var(--at-space-12);
	padding-block: var(--at-space-16);
}

.at-newsletter__intro {
	max-width: 30rem;
}

.at-newsletter__heading {
	font-size: var(--at-fs-500);
	margin: 0 0 var(--at-space-3);
	color: var(--at-on-dark);
}

.at-newsletter__blurb {
	margin: 0 0 var(--at-space-6);
	color: var(--at-on-dark-muted);
	font-size: var(--at-fs-200);
}

/* Quiet Instagram line: glyph + handle, no button styling. */
.at-newsletter__insta {
	display: inline-flex;
	align-items: center;
	gap: var(--at-space-2);
	color: var(--at-on-dark-muted);
	font-size: var(--at-fs-200);
	font-weight: 500;
	text-decoration: none;
	transition: color .18s ease;
}
.at-newsletter__insta:hover {
	color: var(--at-accent);
}
.at-newsletter__insta-icon {
	display: inline-flex;
}

.at-newsletter__form-wrap {
	flex: 0 0 auto;
	width: 100%;
	max-width: 26rem;
}

.at-newsletter__form {
	display: flex;
	flex-direction: column;
	gap: var(--at-space-3);
}

.at-newsletter__row {
	display: flex;
	gap: var(--at-space-2);
}

.at-newsletter__input {
	flex: 1 1 auto;
	min-width: 0;
	padding: var(--at-space-4);
	/* Blocksy's global input[type=email] rules outrank a single class, so the
	   fill/text/placeholder need !important to hold on the dark band. */
	border: 1px solid transparent !important;
	border-radius: var(--at-radius-sm);
	background: var(--at-surface) !important;
	color: var(--at-text) !important;
	font-family: var(--at-font-sans);
	font-size: var(--at-fs-200);
	box-shadow: 0 1px 2px rgba(0, 0, 0, .28);
}
.at-newsletter__input::placeholder {
	color: #8b9099 !important;
	opacity: 1 !important;
}
.at-newsletter__input:focus-visible {
	outline: 2px solid var(--at-accent);
	outline-offset: 2px;
}

.at-newsletter__submit {
	flex: 0 0 auto;
	white-space: nowrap;
}

/* Honeypot field — visually hidden but still reachable by scrapers that
   ignore CSS, and never announced to assistive tech. */
.at-newsletter__hp {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

.at-newsletter__consent {
	display: flex;
	align-items: flex-start;
	gap: var(--at-space-2);
	font-size: var(--at-fs-100);
	color: var(--at-on-dark-muted);
	line-height: var(--at-lh-body);
}
.at-newsletter__consent input[type="checkbox"] {
	margin-top: .2em;
	flex: 0 0 auto;
}
.at-newsletter__consent a {
	color: var(--at-on-dark);
	text-decoration: underline;
}
.at-newsletter__consent a:hover {
	color: var(--at-accent);
}

/* One quiet, token-driven style for all three states — the copy carries the
   meaning, not a traffic-light palette (no hue exists in tokens.css for
   "error", and this band shouldn't invent one). Success is picked out with
   the accent border so it still reads as a small win. */
.at-newsletter__feedback {
	margin: 0 0 var(--at-space-3);
	padding: var(--at-space-2) var(--at-space-3);
	border-radius: var(--at-radius-sm);
	background: var(--at-surface);
	color: var(--at-text);
	border: 1px solid var(--at-border);
	font-size: var(--at-fs-100);
	font-weight: 600;
}
.at-newsletter__feedback--ok {
	border-color: var(--at-accent);
	color: var(--at-accent);
}

/* Stack at the WP admin-breakpoint convention (782px) used elsewhere in the
   theme's responsive chrome. */
@media (max-width: 782px) {
	.at-newsletter__inner {
		flex-direction: column;
		gap: var(--at-space-8);
	}
	.at-newsletter__form-wrap {
		max-width: none;
	}
	.at-newsletter__row {
		flex-direction: column;
		align-items: stretch;
	}
	.at-newsletter__submit {
		width: 100%;
	}
}
