/* DeskPicko Footer & Navigation — base styles.
   Premium white editorial surface, matching the Header's design
   language. Reads the Header's own CSS custom properties (already
   loaded site-wide by dp-hf-header.css) with safe fallbacks, so the
   footer still looks correct even on the rare page where the Header
   stylesheet isn't loaded. */

:root {
	--dp-hf-footer-ink: var(--dp-hf-ink, #111827);
	--dp-hf-footer-bg: var(--dp-hf-bg, #FFFFFF);
	--dp-hf-footer-soft: var(--dp-hf-soft, #F8FAFC);
	--dp-hf-footer-border: var(--dp-hf-border, #E2E8F0);
	--dp-hf-footer-muted: var(--dp-hf-muted, #64748B);
	--dp-hf-footer-accent: #2563EB;
	--dp-hf-footer-btn-hover: #1F2937;
	--dp-hf-footer-radius: var(--dp-hf-control-radius, 12px);
}

.dp-hf-footer, .dp-hf-footer * {
	box-sizing: border-box;
}

.dp-hf-footer {
	background: var(--dp-hf-footer-bg);
	color: var(--dp-hf-footer-ink);
	border-top: 1px solid var(--dp-hf-footer-border);
	font-size: 0.9375rem;
	line-height: 1.55;
}

.dp-hf-footer a {
	color: inherit;
	text-decoration: none;
}

.dp-hf-footer :focus-visible {
	outline: 2px solid var(--dp-hf-footer-accent);
	outline-offset: 2px;
	border-radius: 4px;
}

/* ---------------------------------------------------------------
   Row 1 — columns
--------------------------------------------------------------- */

.dp-hf-footer-row1 {
	max-width: 1440px;
	margin: 0 auto;
	padding: 3.5rem 2rem 2.5rem;
	display: grid;
	grid-template-columns: 1.4fr 1fr 1fr 1.15fr 1.3fr;
	gap: 2.5rem;
}

.dp-hf-footer-col {
	min-width: 0;
}

.dp-hf-footer-heading {
	margin: 0 0 1rem;
	font-size: 0.9375rem;
}

.dp-hf-footer-accordion-trigger {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	background: none;
	border: none;
	padding: 0;
	margin: 0;
	font: inherit;
	font-weight: 700;
	color: var(--dp-hf-footer-ink);
	cursor: default;
}

.dp-hf-footer-chevron {
	display: none;
	width: 16px;
	height: 16px;
	flex: 0 0 auto;
	transition: transform 0.2s ease;
	color: var(--dp-hf-footer-muted);
}

.dp-hf-footer-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.6rem;
}

.dp-hf-footer-list a {
	color: var(--dp-hf-footer-muted);
	display: inline-flex;
	align-items: center;
	gap: 0.55rem;
}

.dp-hf-footer-list a:hover,
.dp-hf-footer-list a:focus-visible {
	color: var(--dp-hf-footer-ink);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.dp-hf-footer-list--cats .dp-hf-icon {
	width: 17px;
	height: 17px;
	flex: 0 0 auto;
	color: var(--dp-hf-footer-muted);
}

.dp-hf-footer-more-cats {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	margin-top: 0.85rem;
	font-weight: 600;
	color: var(--dp-hf-footer-ink);
}

.dp-hf-footer-more-cats:hover,
.dp-hf-footer-more-cats:focus-visible {
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* Panels render fully expanded, in-flow, with no JS required. */
.dp-hf-footer-panel {
	overflow: visible;
}

/* ---------------------------------------------------------------
   Brand column
--------------------------------------------------------------- */

.dp-hf-footer-logo {
	display: inline-flex;
	align-items: center;
	margin-bottom: 0.9rem;
}

.dp-hf-footer-logo img {
	display: block;
	height: auto;
	max-height: 36px;
	width: auto;
}

.dp-hf-footer-logo--text {
	font-weight: 700;
	font-size: 1.25rem;
	color: var(--dp-hf-footer-ink);
	letter-spacing: -0.01em;
}

.dp-hf-footer-tagline {
	margin: 0 0 0.5rem;
	font-weight: 600;
	color: var(--dp-hf-footer-ink);
}

.dp-hf-footer-description {
	margin: 0 0 1.25rem;
	color: var(--dp-hf-footer-muted);
	max-width: 32ch;
}

.dp-hf-footer-social {
	display: flex;
	gap: 0.6rem;
}

.dp-hf-footer-social-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	border: 1px solid var(--dp-hf-footer-border);
	color: var(--dp-hf-footer-muted);
}

.dp-hf-footer-social-link .dp-hf-icon {
	width: 17px;
	height: 17px;
}

.dp-hf-footer-social-link:hover,
.dp-hf-footer-social-link:focus-visible {
	color: var(--dp-hf-footer-ink);
	border-color: var(--dp-hf-footer-ink);
	background: var(--dp-hf-footer-soft);
}

/* ---------------------------------------------------------------
   Newsletter column
--------------------------------------------------------------- */

.dp-hf-footer-newsletter-copy {
	margin: 0 0 1rem;
	color: var(--dp-hf-footer-muted);
}

.dp-hf-footer-newsletter-form {
	display: flex;
	flex-direction: column;
	gap: 0.6rem;
}

.dp-hf-footer-newsletter-input {
	width: 100%;
	padding: 0.7rem 0.85rem;
	border: 1px solid var(--dp-hf-footer-border);
	border-radius: var(--dp-hf-footer-radius);
	font: inherit;
	color: var(--dp-hf-footer-ink);
	background: var(--dp-hf-footer-bg);
}

.dp-hf-footer-newsletter-input:disabled {
	background: var(--dp-hf-footer-soft);
	color: var(--dp-hf-footer-muted);
	cursor: not-allowed;
}

.dp-hf-footer-newsletter-submit {
	width: 100%;
	padding: 0.75rem 1rem;
	border: none;
	border-radius: var(--dp-hf-footer-radius);
	background: var(--dp-hf-footer-ink);
	color: #fff;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
	transition: background-color 0.15s ease;
}

.dp-hf-footer-newsletter-submit:hover:not(:disabled),
.dp-hf-footer-newsletter-submit:focus-visible:not(:disabled) {
	background: var(--dp-hf-footer-btn-hover);
}

.dp-hf-footer-newsletter-submit:disabled {
	background: var(--dp-hf-footer-border);
	color: var(--dp-hf-footer-muted);
	cursor: not-allowed;
}

.dp-hf-footer-newsletter-note {
	margin: 0;
	font-size: 0.8125rem;
	color: var(--dp-hf-footer-muted);
}

.dp-hf-footer-newsletter-error {
	margin: 0;
	font-size: 0.8125rem;
	color: #B91C1C;
}

.dp-hf-footer-newsletter-perks {
	list-style: none;
	margin: 0.9rem 0 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
	font-size: 0.8125rem;
	color: var(--dp-hf-footer-muted);
}

.dp-hf-footer-newsletter-perks li {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.dp-hf-footer-newsletter-perks li::before {
	content: "";
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--dp-hf-footer-muted);
	flex: 0 0 auto;
}

/* ---------------------------------------------------------------
   Row 2 — utility / copyright / back to top
--------------------------------------------------------------- */

.dp-hf-footer-row2 {
	border-top: 1px solid var(--dp-hf-footer-border);
}

.dp-hf-footer-row2 {
	max-width: 1440px;
	margin: 0 auto;
	padding: 1.5rem 2rem;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
}

.dp-hf-footer-copyright {
	margin: 0;
	color: var(--dp-hf-footer-muted);
	font-size: 0.8125rem;
	flex: 1 1 auto;
}

.dp-hf-footer-utility-nav ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem 1.1rem;
}

.dp-hf-footer-utility-nav a {
	color: var(--dp-hf-footer-muted);
	font-size: 0.8125rem;
}

.dp-hf-footer-utility-nav a:hover,
.dp-hf-footer-utility-nav a:focus-visible {
	color: var(--dp-hf-footer-ink);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.dp-hf-footer-backtotop {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	background: none;
	border: 1px solid var(--dp-hf-footer-border);
	border-radius: 999px;
	padding: 0.5rem 0.9rem;
	font: inherit;
	font-size: 0.8125rem;
	font-weight: 600;
	color: var(--dp-hf-footer-ink);
	cursor: pointer;
	flex: 0 0 auto;
}

.dp-hf-footer-backtotop:hover,
.dp-hf-footer-backtotop:focus-visible {
	background: var(--dp-hf-footer-soft);
	border-color: var(--dp-hf-footer-ink);
}

.dp-hf-footer-backtotop .dp-hf-icon {
	width: 15px;
	height: 15px;
}

/* ---------------------------------------------------------------
   Tablet (768px – 1023px): two-column brand+newsletter row, three
   link columns wrap beneath it — no horizontal overflow, no cramped
   single-column stack yet.
--------------------------------------------------------------- */

@media (max-width: 1023px) and (min-width: 768px) {
	.dp-hf-footer-row1 {
		grid-template-columns: 1fr 1fr;
		grid-template-areas:
			"brand newsletter"
			"browse help"
			"cats cats";
		padding: 3rem 2rem 2rem;
	}
	.dp-hf-footer-col--brand { grid-area: brand; }
	.dp-hf-footer-col--newsletter { grid-area: newsletter; }
	.dp-hf-footer-col--browse { grid-area: browse; }
	.dp-hf-footer-col--help { grid-area: help; }
	.dp-hf-footer-col--categories { grid-area: cats; }
	.dp-hf-footer-col--categories .dp-hf-footer-list--cats {
		flex-direction: row;
		flex-wrap: wrap;
		column-gap: 1.75rem;
	}
}

/* ---------------------------------------------------------------
   Mobile (< 768px): accordion. Brand and Newsletter stay visible
   (Newsletter still collapses, matching the blueprint's "Stay in the
   Loop" accordion row); Browse / Categories / Help & Info collapse.
--------------------------------------------------------------- */

@media (max-width: 767px) {
	.dp-hf-footer-row1 {
		display: flex;
		flex-direction: column;
		padding: 2.25rem 1.25rem 1.5rem;
		gap: 0;
	}

	.dp-hf-footer-col--brand {
		padding-bottom: 1.5rem;
		margin-bottom: 0.5rem;
		border-bottom: 1px solid var(--dp-hf-footer-border);
	}

	.dp-hf-footer-col[data-dp-hf-footer-accordion] {
		border-bottom: 1px solid var(--dp-hf-footer-border);
	}

	.dp-hf-footer-col[data-dp-hf-footer-accordion] .dp-hf-footer-heading {
		margin: 0;
	}

	.dp-hf-footer-col[data-dp-hf-footer-accordion] .dp-hf-footer-accordion-trigger {
		cursor: pointer;
		padding: 1.1rem 0;
		min-height: 44px;
	}

	.dp-hf-footer-col[data-dp-hf-footer-accordion] .dp-hf-footer-chevron {
		display: block;
	}

	.dp-hf-footer-accordion-trigger[aria-expanded="true"] .dp-hf-footer-chevron {
		transform: rotate(180deg);
	}

	.dp-hf-footer-col[data-dp-hf-footer-accordion] .dp-hf-footer-panel {
		overflow: hidden;
		max-height: 0;
		transition: max-height 0.22s ease;
	}

	.dp-hf-footer-col[data-dp-hf-footer-accordion].is-open .dp-hf-footer-panel {
		max-height: none;
		overflow: visible;
	}

	/* No-JS fallback: without dp-hf-footer.js, .js-ready never gets
	   added, so panels stay fully expanded and every link stays
	   reachable and visible — see dp-hf-footer.js initAccordion(). */
	.dp-hf-footer-row1:not(.js-ready) .dp-hf-footer-panel {
		max-height: none !important;
		overflow: visible !important;
	}

	.dp-hf-footer-col[data-dp-hf-footer-accordion] .dp-hf-footer-panel > * {
		padding-bottom: 1.25rem;
	}

	.dp-hf-footer-row2 {
		flex-direction: column;
		align-items: flex-start;
		padding: 1.5rem 1.25rem;
	}

	.dp-hf-footer-backtotop {
		align-self: stretch;
		justify-content: center;
	}
}

@media (prefers-reduced-motion: reduce) {
	.dp-hf-footer-panel,
	.dp-hf-footer-chevron {
		transition: none !important;
	}
}
