/**
 * Essential Circuit newsletter, trust strip, and site footer.
 *
 * @package Essential_Circuit
 */

.ec-newsletter {
	margin-top: var(--ec-section-space-large);
	scroll-margin-top: 180px;
}

.ec-newsletter__card {
	display: grid;
	grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
	gap: clamp(2rem, 5vw, 5rem);
	align-items: center;
	overflow: hidden;
	padding: clamp(1.5rem, 4vw, 4rem);
	border: 1px solid #262626;
	border-radius: var(--ec-panel-radius);
	background:
		radial-gradient(circle at 12% 10%, rgba(255, 122, 0, 0.12), transparent 28%),
		#111;
	box-shadow: 0 24px 60px rgba(17, 17, 17, 0.16);
	color: #fff;
}

.ec-newsletter__eyebrow,
.ec-newsletter-preview__label {
	margin: 0;
	color: #ff9a3c;
	font-size: 0.75rem;
	font-weight: 800;
	letter-spacing: 0.1em;
	line-height: 1.4;
	text-transform: uppercase;
}

.ec-newsletter h2 {
	max-width: 700px;
	margin: 0.55rem 0 0.9rem;
	color: #fff;
	font-family: Poppins, Inter, sans-serif;
	font-size: clamp(2rem, 4vw, 3.4rem);
	letter-spacing: -0.035em;
	line-height: 1.08;
}

.ec-newsletter__subtitle {
	max-width: 700px;
	margin: 0;
	color: #d1d5db;
	font-size: clamp(1rem, 1.4vw, 1.08rem);
	line-height: 1.75;
}

.ec-newsletter__form {
	margin-top: 1.7rem;
}

.ec-newsletter__honeypot {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
}

.ec-newsletter__form > label {
	display: inline-block;
	margin-bottom: 0.5rem;
	color: #fff;
	font-size: 0.82rem;
	font-weight: 800;
}

.ec-newsletter__form-row {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 0.65rem;
}

.ec-newsletter__form input,
.ec-newsletter__form button {
	min-height: 50px;
	border-radius: 12px;
}

.ec-newsletter__form input {
	width: 100%;
	padding: 0.75rem 1rem;
	border: 1px solid #4b5563;
	background: #fff;
	color: #1f2937;
	font: inherit;
	outline: none;
	transition: border-color 160ms ease, box-shadow 160ms ease;
}

.ec-newsletter__form input::placeholder {
	color: #6b7280;
}

.ec-newsletter__form input[aria-invalid="true"] {
	border-color: #ef4444;
	box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.22);
}

.ec-newsletter__form button {
	padding: 0.75rem 1.35rem;
	border: 1px solid #ff7a00;
	background: #ff7a00;
	color: #111;
	font: inherit;
	font-weight: 800;
	cursor: pointer;
	transition: background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.ec-newsletter__form button:not(:disabled):hover {
	border-color: #e56d00;
	background: #e56d00;
	transform: translateY(-1px);
}

.ec-newsletter__form button:disabled {
	cursor: default;
	opacity: 0.72;
}

.ec-newsletter__privacy {
	display: flex;
	gap: 0.45rem;
	align-items: center;
	margin: 0.65rem 0 0;
	color: #d1d5db;
	font-size: 0.76rem;
	line-height: 1.45;
}

.ec-newsletter__privacy svg {
	flex: 0 0 16px;
	width: 16px;
	height: 16px;
}

.ec-newsletter__privacy a {
	color: #fff;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.ec-newsletter__preview-note {
	margin: 0.5rem 0 0;
	color: #fbbf24;
	font-size: 0.78rem;
	font-weight: 700;
	line-height: 1.5;
}

.ec-newsletter__message {
	margin: 0.65rem 0 0;
	padding: 0.65rem 0.75rem;
	border-radius: 9px;
	font-size: 0.8rem;
	font-weight: 700;
	line-height: 1.5;
}

.ec-newsletter__message[hidden] {
	display: none;
}

.ec-newsletter__message--error {
	border: 1px solid rgba(248, 113, 113, 0.55);
	background: rgba(239, 68, 68, 0.14);
	color: #fecaca;
}

.ec-newsletter__message--success {
	border: 1px solid rgba(74, 222, 128, 0.5);
	background: rgba(34, 197, 94, 0.14);
	color: #bbf7d0;
}

.ec-newsletter__value-list {
	display: grid;
	gap: 0.7rem;
	margin: 1.5rem 0 0;
	padding: 0;
	list-style: none;
}

.ec-newsletter__value-list li {
	display: flex;
	gap: 0.65rem;
	align-items: center;
	color: #e5e7eb;
	font-size: 0.88rem;
	font-weight: 600;
	line-height: 1.5;
}

.ec-newsletter__value-list svg {
	flex: 0 0 22px;
	width: 22px;
	height: 22px;
	padding: 4px;
	border-radius: 999px;
	background: rgba(255, 122, 0, 0.14);
	color: #ff9a3c;
}

.ec-newsletter-preview {
	padding: clamp(1.35rem, 3vw, 2rem);
	border: 1px solid rgba(255, 255, 255, 0.14);
	border-radius: 18px;
	background: rgba(255, 255, 255, 0.07);
	box-shadow: 0 18px 45px rgba(0, 0, 0, 0.2);
	backdrop-filter: blur(8px);
}

.ec-newsletter-preview__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.45rem;
	margin-bottom: 1.4rem;
}

.ec-newsletter-preview__meta span {
	padding: 0.35rem 0.55rem;
	border: 1px solid rgba(255, 255, 255, 0.14);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.06);
	color: #e5e7eb;
	font-size: 0.7rem;
	font-weight: 700;
}

.ec-newsletter-preview h3 {
	margin: 0.35rem 0 1rem;
	color: #fff;
	font-family: Poppins, Inter, sans-serif;
	font-size: clamp(1.45rem, 2vw, 1.85rem);
}

.ec-newsletter-preview ol {
	display: grid;
	gap: 0;
	margin: 0;
	padding: 0;
	list-style: none;
	counter-reset: ec-brief-items;
}

.ec-newsletter-preview li {
	position: relative;
	min-height: 52px;
	padding: 0.85rem 0 0.85rem 2.2rem;
	border-bottom: 1px solid rgba(255, 255, 255, 0.12);
	color: #e5e7eb;
	counter-increment: ec-brief-items;
	font-size: 0.88rem;
	line-height: 1.55;
}

.ec-newsletter-preview li::before {
	position: absolute;
	top: 0.82rem;
	left: 0;
	display: grid;
	width: 24px;
	height: 24px;
	place-items: center;
	border-radius: 8px;
	background: rgba(255, 122, 0, 0.14);
	color: #ff9a3c;
	content: counter(ec-brief-items);
	font-size: 0.72rem;
	font-weight: 900;
}

.ec-newsletter-preview__footer {
	display: flex;
	gap: 0.5rem;
	align-items: center;
	margin: 1rem 0 0;
	color: #9ca3af;
	font-size: 0.72rem;
}

.ec-newsletter-preview__footer span {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: #ff7a00;
}

.ec-newsletter svg,
.ec-trust svg,
.ec-site-footer svg {
	fill: none;
	stroke: currentcolor;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: 1.8;
}

.ec-trust {
	margin-top: var(--ec-section-space-medium);
	padding: clamp(1.5rem, 3vw, 2.4rem);
	border: 1px solid var(--ec-border);
	border-radius: var(--ec-panel-radius);
	background: var(--ec-white);
	box-shadow: var(--ec-card-shadow);
}

.ec-trust__header {
	display: flex;
	gap: 1rem 2rem;
	align-items: end;
	justify-content: space-between;
	margin-bottom: 1.6rem;
}

.ec-trust__header h2 {
	margin: 0.25rem 0 0;
	color: #1f2937;
	font-family: Poppins, Inter, sans-serif;
	font-size: clamp(1.7rem, 3vw, 2.4rem);
	line-height: 1.15;
}

.ec-trust__grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
}

.ec-trust__item {
	min-width: 0;
	padding: 0 1.35rem;
	border-left: 1px solid #e5e7eb;
}

.ec-trust__item:first-child {
	padding-left: 0;
	border-left: 0;
}

.ec-trust__item:last-child {
	padding-right: 0;
}

.ec-trust__icon {
	display: grid;
	width: 44px;
	height: 44px;
	place-items: center;
	border-radius: 13px;
	background: rgba(255, 122, 0, 0.11);
	color: #d76100;
}

.ec-trust__icon svg {
	width: 23px;
	height: 23px;
}

.ec-trust__item h3 {
	margin: 1rem 0 0.45rem;
	color: #1f2937;
	font-size: 1rem;
	line-height: 1.35;
}

.ec-trust__item > p {
	margin: 0;
	color: #6b7280;
	font-size: 0.82rem;
	line-height: 1.65;
}

.ec-trust__item > a {
	display: inline-flex;
	min-height: 44px;
	gap: 0.4rem;
	align-items: center;
	margin-top: 0.6rem;
	color: #9a4600;
	font-size: 0.78rem;
	font-weight: 800;
	text-decoration: none;
}

.ec-trust__item > a:hover {
	color: #111;
}

.ec-trust__item > a svg {
	width: 15px;
	height: 15px;
}

.ec-trust__note {
	display: flex;
	gap: 0.6rem;
	align-items: flex-start;
	margin: 1.75rem 0 0;
	padding-top: 1.25rem;
	border-top: 1px solid #e5e7eb;
	color: #6b7280;
	font-size: 0.78rem;
	line-height: 1.55;
}

.ec-trust__note svg {
	flex: 0 0 18px;
	width: 18px;
	height: 18px;
	color: #d76100;
}

.ec-site-footer {
	background: #111;
	color: #fff;
}

.ec-site-footer__inner {
	width: min(100% - var(--ec-content-gutter), var(--ec-content-width));
	margin-inline: auto;
	padding: clamp(3rem, 6vw, 5.5rem) 0 1.5rem;
}

.ec-site-footer__grid {
	display: grid;
	grid-template-columns: minmax(280px, 1.35fr) repeat(3, minmax(150px, 0.65fr));
	gap: clamp(2rem, 4vw, 4.5rem);
}

.ec-site-footer__brand img,
.ec-site-footer__brand .custom-logo {
	display: block;
	width: auto;
	max-width: 180px;
	height: 64px;
	object-fit: contain;
	object-position: left center;
}

.ec-site-footer__brand a {
	display: inline-block;
}

.ec-site-footer__tagline {
	max-width: 330px;
	margin: 1.2rem 0 0;
	color: #fff;
	font-family: Poppins, Inter, sans-serif;
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.5;
}

.ec-site-footer__mission {
	max-width: 390px;
	margin: 0.75rem 0 0;
	color: #9ca3af;
	font-size: 0.82rem;
	line-height: 1.7;
}

.ec-site-footer__social {
	display: flex;
	flex-wrap: wrap;
	gap: 0.55rem;
	margin-top: 1.25rem;
}

.ec-site-footer__social a {
	display: grid;
	width: 44px;
	height: 44px;
	place-items: center;
	border: 1px solid #374151;
	border-radius: 11px;
	background: #1a1a1a;
	color: #d1d5db;
	transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.ec-site-footer__social a:hover {
	border-color: #ff7a00;
	background: #ff7a00;
	color: #111;
	transform: translateY(-2px);
}

.ec-site-footer__social svg {
	width: 19px;
	height: 19px;
}

.ec-site-footer__column h2 {
	margin: 0 0 1.1rem;
	color: #fff;
	font-family: Poppins, Inter, sans-serif;
	font-size: 0.9rem;
	letter-spacing: 0.03em;
	line-height: 1.4;
}

.ec-site-footer__links {
	display: grid;
	gap: 0.68rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ec-site-footer__links a {
	display: inline-flex;
	min-height: 28px;
	align-items: center;
	color: #9ca3af;
	font-size: 0.82rem;
	line-height: 1.4;
	text-decoration: none;
	transition: color 160ms ease, transform 160ms ease;
}

.ec-site-footer__links a:hover {
	color: #ff9a3c;
	transform: translateX(2px);
}

.ec-site-footer__bottom {
	display: flex;
	gap: 1.5rem;
	align-items: center;
	justify-content: space-between;
	margin-top: clamp(2.5rem, 5vw, 4rem);
	padding-top: 1.4rem;
	border-top: 1px solid #2b2b2b;
}

.ec-site-footer__bottom p {
	margin: 0;
	color: #9ca3af;
	font-size: 0.74rem;
	line-height: 1.55;
}

.ec-site-footer__bottom .ec-site-footer__disclaimer {
	margin-top: 0.3rem;
	color: #6b7280;
}

.ec-back-to-top {
	display: inline-flex;
	min-height: 44px;
	flex: 0 0 auto;
	gap: 0.45rem;
	align-items: center;
	justify-content: center;
	padding: 0.65rem 0.8rem;
	border: 1px solid #374151;
	border-radius: 10px;
	color: #fff;
	font-size: 0.75rem;
	font-weight: 800;
	text-decoration: none;
	transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease;
}

.ec-back-to-top:hover {
	border-color: #ff7a00;
	background: #ff7a00;
	color: #111;
}

.ec-back-to-top svg {
	width: 16px;
	height: 16px;
}

.ec-newsletter__form input:focus-visible,
.ec-newsletter__form button:focus-visible,
.ec-trust__item > a:focus-visible,
.ec-site-footer a:focus-visible {
	outline: 3px solid rgba(255, 122, 0, 0.58);
	outline-offset: 3px;
}

@media (max-width: 1100px) {
	.ec-trust__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 1.5rem 0;
	}

	.ec-trust__item:nth-child(3) {
		padding-left: 0;
		border-left: 0;
	}

	.ec-site-footer__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 860px) {
	.ec-newsletter__card {
		grid-template-columns: 1fr;
	}

	.ec-newsletter-preview {
		max-width: none;
	}
}

@media (max-width: 640px) {
	.ec-newsletter {
		margin-top: 4rem;
		scroll-margin-top: 145px;
	}

	.ec-newsletter__card,
	.ec-trust {
		border-radius: 18px;
	}

	.ec-newsletter__form-row {
		grid-template-columns: 1fr;
	}

	.ec-newsletter__form button {
		width: 100%;
	}

	.ec-trust__header {
		display: block;
	}

	.ec-trust__grid {
		grid-template-columns: 1fr;
		gap: 0;
	}

	.ec-trust__item,
	.ec-trust__item:first-child,
	.ec-trust__item:nth-child(3),
	.ec-trust__item:last-child {
		padding: 1.25rem 0;
		border-top: 1px solid #e5e7eb;
		border-left: 0;
	}

	.ec-trust__item:first-child {
		border-top: 0;
	}

	.ec-site-footer__inner {
		width: min(100% - var(--ec-content-gutter-mobile), var(--ec-content-width));
	}

	.ec-site-footer__grid {
		grid-template-columns: 1fr;
		gap: 2.25rem;
	}

	.ec-site-footer__column {
		padding-top: 1.5rem;
		border-top: 1px solid #2b2b2b;
	}

	.ec-site-footer__links {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.ec-site-footer__links a {
		min-height: 44px;
	}

	.ec-site-footer__bottom {
		align-items: flex-start;
		flex-direction: column;
	}
}

@media (max-width: 420px) {
	.ec-site-footer__links {
		grid-template-columns: 1fr;
	}
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	.ec-newsletter__form input,
	.ec-newsletter__form button,
	.ec-site-footer__social a,
	.ec-site-footer__links a,
	.ec-back-to-top {
		transition: none;
	}
}
