/* ==========================================================================
   STOPKA + NEWSLETTER — globalna stopka Humee (template-part, ADR-0008)
   Port prototypu docs/prototypes/sections/_shared/stopka/stopka.css na tokeny
   theme.json. Tło ciemne, wielkie logo „humee" jako MASKA w kolorze lawendy
   (--wp--preset--color--lavender-deep), kolumny linków (menu WP), newsletter,
   social i dane firmy (z Options page).
   ========================================================================== */

.site-footer {
	background: var(--wp--preset--color--dark);
	color: var(--ft-lavender);

	/* Lawenda stopki = token lavender-deep z theme.json. */
	--ft-lavender: var(--wp--preset--color--lavender-deep);
	--ft-field-bg: var(--wp--preset--color--bg-alt);

	padding-block: var(--wp--preset--spacing--lg) var(--wp--preset--spacing--xl);
}

.site-footer__inner {
	display: flex;
	flex-direction: column;
}

/* --- Wielkie logo „humee" ----------------------------------------------- */
.site-footer__brand {
	margin-bottom: var(--wp--preset--spacing--md);
}

/* Logo przez maskę → kolor = --ft-lavender (asset SVG jest ciemny). */
.site-footer__logo {
	display: block;
	width: 100%;
	max-width: 100%;
	height: auto;
	aspect-ratio: 225 / 42; /* proporcje oryginalnego SVG */

	background-color: var(--ft-lavender);
	-webkit-mask: url("../logo/logo-humee.svg") left center / contain no-repeat;
	mask: url("../logo/logo-humee.svg") left center / contain no-repeat;
}

/* --- Hasło marki -------------------------------------------------------- */
.site-footer__tagline {
	color: var(--ft-lavender);
	font-size: var(--wp--preset--font-size--body);
	margin-bottom: var(--wp--preset--spacing--lg);
}

/* ==========================================================================
   Siatka kolumn — mobile-first (pion) → md (2 kol.) → lg (rząd 5 kolumn)
   ========================================================================== */
.site-footer__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--wp--preset--spacing--lg) var(--wp--custom--gutter);
}

.site-footer__col {
	min-width: 0;
}

.site-footer__title {
	color: var(--wp--preset--color--bg);
	font-size: var(--wp--preset--font-size--heading);
	font-weight: var(--wp--custom--font-weight--regular);
	margin-bottom: var(--wp--preset--spacing--md);
}

/* --- Listy linków (menu WP: footer-mustknow / footer-legal) -------------- */
.site-footer__links {
	display: flex;
	flex-direction: column;
	gap: var(--wp--preset--spacing--sm);
	margin: 0;
	padding: 0;
	list-style: none;
}

.site-footer__link,
.site-footer__links a {
	color: var(--ft-lavender);
	font-size: var(--wp--preset--font-size--body);
	transition: opacity 0.2s ease;
}

.site-footer__link:hover,
.site-footer__link:focus-visible,
.site-footer__links a:hover,
.site-footer__links a:focus-visible {
	opacity: 0.7;
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* ==========================================================================
   Newsletter
   ========================================================================== */
.site-footer__newsletter-text {
	color: var(--ft-lavender);
	font-size: var(--wp--preset--font-size--body);
	max-width: 28ch;
	margin-bottom: var(--wp--preset--spacing--md);
}

/* Kolumna = kontener zapytań. Rząd „pole + przycisk" ma zależeć od szerokości TEJ
   KOLUMNY, nie viewportu: w siatce stopki kolumna bywa wąska (≈288px) także na dużym
   ekranie, więc media query odpowiadałoby na złe pytanie. */
.site-footer__col--newsletter {
	container-type: inline-size;
}

.site-footer__form {
	display: flex;
	flex-wrap: wrap;
	gap: var(--wp--custom--pill--gap);
	align-items: center;
}

/* Wąsko (domyślnie): pole i przycisk pełną szerokością, jedno pod drugim — świadomy,
   przewidywalny układ i duży cel dotykowy zamiast przypadkowego zawinięcia CTA do lewej. */
.site-footer__input,
.site-footer__submit {
	flex: 1 1 100%;
}

/* Gdy kolumna ma miejsce (≈384px+): klasyczny rząd pigułka + CTA. */
@container (min-width: 24rem) {
	.site-footer__input {
		flex: 1 1 10rem;
	}

	.site-footer__submit {
		flex: 0 0 auto;
	}
}

.site-footer__input {
	min-width: 0;
	border: 0;
	border-radius: var(--wp--custom--radius--pill);
	background: var(--ft-field-bg);
	color: var(--wp--preset--color--dark);
	padding: 0.85rem 1.5rem;
	font-size: var(--wp--preset--font-size--body);
}

.site-footer__input::placeholder {
	color: var(--wp--preset--color--dark);
	opacity: 0.7;
}

.site-footer__input:focus-visible {
	outline: 2px solid var(--ft-lavender);
	outline-offset: 2px;
}

.site-footer__submit {
	display: inline-flex;
	align-items: center;
	justify-content: center; /* wyśrodkowanie treści, gdy CTA jest pełnej szerokości */
	gap: 0.4em;
	border: 0;
	cursor: pointer;
	border-radius: var(--wp--custom--radius--pill);
	background: var(--ft-lavender);
	color: var(--wp--preset--color--dark);
	padding: 0.85rem 1.5rem;
	font-size: var(--wp--preset--font-size--body);
	transition: opacity 0.2s ease;
}

.site-footer__submit:hover,
.site-footer__submit:focus-visible {
	opacity: 0.85;
}

.site-footer__submit:focus-visible {
	outline: 2px solid var(--ft-field-bg);
	outline-offset: 2px;
}

.site-footer__submit-arrow {
	display: inline-block;
}

/* Zgoda RODO — drobny druk wg wzorca projektu (ADR-0031/`account.css`): NIE mniejszą
   czcionką, tylko rozmiar `body` + wyciszenie. Grupujemy ODSTĘPEM, nie hairline'em —
   stopka nie zna hairline'ów (wygasza `opacity`), więc nie wnosimy tu obcego idiomu.
   Odstęp `sm` odkleja druk prawny od pary pole+przycisk: bez tego wszystko dzieli
   ten sam 10px `gap` formularza i zgoda „klei się" do CTA. */
.site-footer__consent {
	flex: 1 1 100%;
	margin-block-start: var(--wp--preset--spacing--sm);
	display: flex;
	align-items: flex-start;
	gap: 0.6em;
	cursor: pointer;
	color: var(--ft-lavender);
	font-size: var(--wp--preset--font-size--body);
	line-height: var(--wp--custom--line-height--body);
}

.site-footer__consent input {
	flex: 0 0 auto;
	margin-block-start: 0.25em; /* wyrównanie do pierwszego wiersza etykiety */
	accent-color: var(--ft-lavender);
}

.site-footer__consent a {
	color: inherit;
	text-decoration: underline;
}

/* Status zapisu (`role=status`). `min-height` rezerwuje wiersz, żeby komunikat nie
   przepychał stopki w momencie pojawienia się. */
.site-footer__newsletter-status {
	flex: 1 1 100%;
	margin: 0;
	min-height: 1lh;
	color: var(--ft-lavender);
	font-size: var(--wp--preset--font-size--body);
	line-height: var(--wp--custom--line-height--body);
}

.site-footer__newsletter-status.is-error {
	color: var(--wp--custom--state--error);
}

/* Pułapka anty-bot — wzorzec z `account.css` (`.account-honeypot`): poza ekranem,
   ale bez `display:none`/`visibility:hidden` (część botów takie pola pomija). */
.site-footer__hp {
	position: absolute;
	inline-size: 1px;
	block-size: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

/* ==========================================================================
   Social
   ========================================================================== */
.site-footer__social {
	display: flex;
	gap: var(--wp--custom--pill--gap);
	margin: 0;
	padding: 0;
	list-style: none;
}

.site-footer__social-link {
	display: block;
	width: 3rem;
	height: 3rem;
	transition: opacity 0.2s ease, transform 0.2s ease;
}

.site-footer__social-link img {
	width: 100%;
	height: 100%;
}

.site-footer__social-link:hover,
.site-footer__social-link:focus-visible {
	opacity: 0.85;
	transform: translateY(-2px);
}

.site-footer__social-link:focus-visible {
	outline: 2px solid var(--ft-lavender);
	outline-offset: 3px;
	border-radius: var(--wp--custom--radius--circle);
}

/* ==========================================================================
   Dane firmy
   ========================================================================== */
.site-footer__company {
	color: var(--ft-lavender);
	font-style: normal;
	font-size: var(--wp--preset--font-size--body);
	line-height: 1.4;
}

.site-footer__company a {
	color: inherit;
	transition: opacity 0.2s ease;
}

.site-footer__company a:hover,
.site-footer__company a:focus-visible {
	opacity: 0.7;
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* Odstęp między adresem a blokiem kontakt/identyfikatory (jak na screenie). */
.site-footer__company-gap {
	margin-top: 1em;
}

/* ==========================================================================
   Responsywność
   ========================================================================== */
@media (min-width: 768px) {
	.site-footer__grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.site-footer__col--newsletter {
		grid-column: 1 / -1;
	}
}

@media (min-width: 1024px) {
	.site-footer__grid {
		grid-template-columns:
			minmax(8rem, 0.9fr)   /* must-know */
			minmax(10rem, 1fr)    /* regulaminy */
			minmax(18rem, 1.6fr)  /* dołącz do nas (newsletter) */
			minmax(6rem, 0.8fr)   /* śledź nas */
			minmax(10rem, 1fr);   /* humee / dane firmy */
		gap: var(--wp--preset--spacing--md) var(--wp--custom--gutter);
		align-items: start;
	}

	.site-footer__col--newsletter {
		grid-column: auto;
	}

	.site-footer__logo {
		max-width: min(100%, 90rem);
	}
}
