/**
 * Global footer — Phase 5.16 premium publishing platform.
 * Scoped to .nds-ft / .nds-site-footer.nds-ft and admin legal note.
 */

.nds-site-footer.nds-ft {
	--ft-ink: #e8f2f6;
	--ft-muted: rgba(190, 214, 224, 0.78);
	--ft-soft: rgba(160, 190, 205, 0.62);
	--ft-accent: #7ec8d0;
	--ft-accent-strong: #9ad8de;
	--ft-panel: #0a2430;
	--ft-panel-soft: #0d2e3b;
	--ft-line: rgba(126, 200, 208, 0.18);
	--ft-ease: cubic-bezier(0.22, 1, 0.36, 1);
	position: relative;
	isolation: isolate;
	overflow: hidden;
	margin-top: 0;
	padding: 2.75rem 0 0;
	background:
		radial-gradient(ellipse 50% 40% at 12% 8%, rgba(40, 130, 150, 0.18), transparent 58%),
		radial-gradient(ellipse 45% 35% at 90% 20%, rgba(30, 100, 120, 0.14), transparent 55%),
		linear-gradient(180deg, #071820 0%, #0a2430 42%, #06141c 100%);
	color: var(--ft-ink);
}

.nds-ft__atmosphere {
	position: absolute;
	inset: 0;
	pointer-events: none;
	z-index: 0;
}

.nds-ft__glow {
	position: absolute;
	border-radius: 50%;
	filter: blur(48px);
}

.nds-ft__glow--a {
	width: min(480px, 55%);
	height: 260px;
	top: -8%;
	left: -4%;
	background: rgba(70, 160, 180, 0.16);
}

.nds-ft__glow--b {
	width: min(380px, 45%);
	height: 220px;
	right: -6%;
	bottom: 18%;
	background: rgba(40, 110, 130, 0.14);
}

.nds-ft__dots {
	position: absolute;
	inset: 0;
	opacity: 0.045;
	background-image: radial-gradient(rgba(200, 230, 236, 0.95) 0.7px, transparent 0.7px);
	background-size: 18px 18px;
	mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.55), transparent 75%);
}

.nds-ft__inner {
	position: relative;
	z-index: 1;
	padding-bottom: 1.5rem;
}

/* —— Layer 1: Final CTA —— */
.nds-ft-cta {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
	gap: 1.5rem 2rem;
	align-items: center;
	overflow: hidden;
	margin-bottom: 2.5rem;
	padding: clamp(1.5rem, 3vw, 2.35rem) clamp(1.35rem, 2.8vw, 2.4rem);
	border-radius: 28px;
	border: 1px solid rgba(140, 210, 220, 0.28);
	background:
		radial-gradient(ellipse 55% 70% at 88% 40%, rgba(80, 180, 195, 0.22), transparent 60%),
		linear-gradient(135deg, #0e3d4a 0%, #0b5560 48%, #0a3a48 100%);
	box-shadow:
		0 22px 48px rgba(2, 12, 18, 0.35),
		inset 0 1px 0 rgba(180, 230, 236, 0.12);
}

.nds-ft-cta__glow {
	position: absolute;
	inset: auto -8% -30% auto;
	width: 55%;
	height: 80%;
	background: radial-gradient(circle, rgba(110, 200, 210, 0.22), transparent 68%);
	pointer-events: none;
}

.nds-ft-cta__copy,
.nds-ft-cta__aside {
	position: relative;
	z-index: 1;
	min-width: 0;
}

.nds-ft-cta__eyebrow {
	margin: 0 0 0.65rem;
	font-family: var(--nds-font-body, "Figtree", sans-serif);
	font-size: 0.7rem;
	font-weight: 700;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--ft-accent-strong);
}

.nds-ft-cta__title {
	margin: 0 0 0.85rem;
	font-family: var(--nds-font-display, "Source Serif 4", Georgia, serif);
	font-size: clamp(1.85rem, 3.2vw, 3.1rem);
	font-weight: 650;
	line-height: 1.12;
	letter-spacing: -0.03em;
	color: #f4fbfc;
	text-wrap: balance;
}

.nds-ft-cta__lede {
	margin: 0 0 1.15rem;
	max-width: 36rem;
	font-family: var(--nds-font-body, "Figtree", sans-serif);
	font-size: 1.02rem;
	line-height: 1.6;
	color: rgba(220, 238, 244, 0.86);
}

.nds-ft-cta__trust {
	display: flex;
	flex-wrap: wrap;
	gap: 0.55rem 1rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.nds-ft-cta__trust li {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	font-family: var(--nds-font-body, "Figtree", sans-serif);
	font-size: 0.84rem;
	font-weight: 600;
	color: rgba(230, 244, 248, 0.92);
}

.nds-ft-cta__trust-ico {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.65rem;
	height: 1.65rem;
	border-radius: 8px;
	background: rgba(126, 200, 208, 0.14);
	border: 1px solid rgba(126, 200, 208, 0.22);
	color: var(--ft-accent-strong);
}

.nds-ft__ico {
	width: 0.95rem;
	height: 0.95rem;
}

.nds-ft-cta__aside {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 1.1rem;
}

.nds-ft-cta__covers {
	position: relative;
	width: min(100%, 15rem);
	height: 8.5rem;
}

.nds-ft-cta__cover {
	position: absolute;
	width: 4.6rem;
	height: 6.2rem;
	object-fit: cover;
	border-radius: 7px;
	box-shadow: 0 14px 28px rgba(2, 10, 16, 0.45);
	background: #0a2030;
}

.nds-ft-cta__cover--0 {
	left: 18%;
	top: 18%;
	transform: rotate(-10deg);
	z-index: 1;
}

.nds-ft-cta__cover--1 {
	left: 36%;
	top: 6%;
	transform: rotate(-2deg);
	z-index: 2;
	width: 5.1rem;
	height: 6.9rem;
}

.nds-ft-cta__cover--2 {
	left: 54%;
	top: 14%;
	transform: rotate(8deg);
	z-index: 3;
}

.nds-ft-cta__cover--3 {
	left: 70%;
	top: 22%;
	transform: rotate(14deg);
	z-index: 1;
	opacity: 0.92;
}

.nds-ft-cta__actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	gap: 0.65rem;
	width: 100%;
}

.nds-ft-cta__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.35rem;
	min-height: 2.85rem;
	padding: 0.7rem 1.2rem;
	border-radius: 999px;
	font-family: var(--nds-font-body, "Figtree", sans-serif);
	font-size: 0.92rem;
	font-weight: 650;
	line-height: 1.2;
	text-decoration: none !important;
	transition:
		transform 220ms var(--ft-ease),
		background 220ms var(--ft-ease),
		border-color 220ms var(--ft-ease),
		color 220ms var(--ft-ease),
		box-shadow 220ms var(--ft-ease);
}

.nds-ft-cta__btn:focus-visible,
.nds-ft a:focus-visible,
.nds-legal-review-note:focus-within {
	outline: 2px solid var(--ft-accent-strong);
	outline-offset: 3px;
}

.nds-ft-cta__btn--primary {
	background: linear-gradient(145deg, #e8f6f8, #d0ecef);
	color: #0a2a34 !important;
	box-shadow: 0 10px 24px rgba(4, 24, 32, 0.28);
}

.nds-ft-cta__btn--primary:hover,
.nds-ft-cta__btn--primary:focus-visible {
	background: #fff;
	color: #071c24 !important;
	transform: translateY(-2px);
}

.nds-ft-cta__btn--secondary {
	background: rgba(255, 255, 255, 0.06);
	border: 1px solid rgba(180, 220, 230, 0.32);
	color: #eef8fa !important;
}

.nds-ft-cta__btn--secondary:hover,
.nds-ft-cta__btn--secondary:focus-visible {
	background: rgba(255, 255, 255, 0.12);
	border-color: rgba(180, 220, 230, 0.5);
	transform: translateY(-2px);
}

.nds-ft-cta__arrow {
	display: inline-block;
	transition: transform 220ms var(--ft-ease);
}

.nds-ft-cta__btn:hover .nds-ft-cta__arrow,
.nds-ft-cta__btn:focus-visible .nds-ft-cta__arrow,
.nds-ft-links__more a:hover span,
.nds-ft-help__links a:hover span {
	transform: translateX(3px);
}

/* —— Layer 2: Main nav —— */
.nds-ft-main {
	display: grid;
	grid-template-columns: minmax(0, 1.25fr) repeat(3, minmax(0, 1fr)) minmax(0, 1.15fr);
	gap: 1.75rem 1.5rem;
	align-items: start;
	padding-bottom: 2rem;
	border-bottom: 1px solid rgba(140, 180, 195, 0.14);
}

.nds-ft-col {
	min-width: 0;
}

.nds-ft-col--brand .nds-brand {
	margin-bottom: 0.85rem;
}

.nds-ft-col--brand .nds-brand__name {
	color: #f4fbfc;
}

.nds-ft-brand__statement {
	margin: 0 0 0.75rem;
	font-family: var(--nds-font-body, "Figtree", sans-serif);
	font-size: 0.92rem;
	line-height: 1.55;
	color: var(--ft-muted);
	max-width: 22rem;
}

.nds-ft-brand__trust {
	margin: 0 0 0.85rem;
	font-family: var(--nds-font-body, "Figtree", sans-serif);
	font-size: 0.8rem;
	font-weight: 600;
	color: var(--ft-accent);
}

.nds-ft-brand__web {
	margin: 0;
	font-family: var(--nds-font-body, "Figtree", sans-serif);
	font-size: 0.9rem;
	font-weight: 650;
}

.nds-ft-brand__web a {
	color: #fff !important;
	text-decoration: none !important;
	background-image: linear-gradient(currentColor, currentColor);
	background-position: 0 100%;
	background-repeat: no-repeat;
	background-size: 0 1px;
	transition: background-size 220ms var(--ft-ease), color 220ms var(--ft-ease);
}

.nds-ft-brand__web a:hover,
.nds-ft-brand__web a:focus-visible {
	color: var(--ft-accent-strong) !important;
	background-size: 100% 1px;
}

.nds-ft-nav {
	margin: 0;
	border: 0;
	background: transparent;
}

.nds-ft-col__title,
.nds-ft-nav > summary.nds-ft-col__title {
	display: block;
	margin: 0 0 0.85rem;
	padding: 0;
	list-style: none;
	font-family: var(--nds-font-body, "Figtree", sans-serif);
	font-size: 0.78rem;
	font-weight: 750;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: rgba(230, 244, 248, 0.92);
	cursor: default;
}

.nds-ft-nav > summary::-webkit-details-marker,
.nds-ft-nav > summary::marker {
	display: none;
	content: "";
}

.nds-ft-links {
	display: grid;
	gap: 0.45rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.nds-ft-links a {
	display: inline-flex;
	align-items: center;
	gap: 0.3rem;
	min-height: 1.75rem;
	font-family: var(--nds-font-body, "Figtree", sans-serif);
	font-size: 0.9rem;
	font-weight: 500;
	color: var(--ft-muted) !important;
	text-decoration: none !important;
	background-image: linear-gradient(var(--ft-accent), var(--ft-accent));
	background-position: 0 100%;
	background-repeat: no-repeat;
	background-size: 0 1px;
	transition:
		color 220ms var(--ft-ease),
		background-size 220ms var(--ft-ease);
}

.nds-ft-links a:hover,
.nds-ft-links a:focus-visible {
	color: #fff !important;
	background-size: 100% 1px;
}

.nds-ft-links__more a {
	font-weight: 650;
	color: var(--ft-accent) !important;
	margin-top: 0.25rem;
}

.nds-ft-links__more a span {
	display: inline-block;
	transition: transform 220ms var(--ft-ease);
}

/* Contact card */
.nds-ft-help {
	margin-top: 1.15rem;
	padding: 1rem 1rem 0.95rem;
	border-radius: 18px;
	border: 1px solid rgba(140, 200, 210, 0.2);
	background: rgba(255, 255, 255, 0.04);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
	transition: border-color 220ms var(--ft-ease), background 220ms var(--ft-ease);
}

.nds-ft-help:hover,
.nds-ft-help:focus-within {
	border-color: rgba(140, 200, 210, 0.38);
	background: rgba(255, 255, 255, 0.06);
}

.nds-ft-help__label {
	margin: 0 0 0.4rem;
	font-family: var(--nds-font-body, "Figtree", sans-serif);
	font-size: 0.68rem;
	font-weight: 750;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--ft-accent);
}

.nds-ft-help__text {
	margin: 0 0 0.75rem;
	font-family: var(--nds-font-body, "Figtree", sans-serif);
	font-size: 0.86rem;
	line-height: 1.5;
	color: var(--ft-muted);
}

.nds-ft-help__links {
	display: grid;
	gap: 0.35rem;
	margin: 0 0 0.85rem;
	padding: 0;
	list-style: none;
}

.nds-ft-help__links a {
	display: inline-flex;
	align-items: center;
	gap: 0.3rem;
	min-height: 1.75rem;
	font-family: var(--nds-font-body, "Figtree", sans-serif);
	font-size: 0.88rem;
	font-weight: 650;
	color: #fff !important;
	text-decoration: none !important;
}

.nds-ft-help__links a span {
	display: inline-block;
	color: var(--ft-accent);
	transition: transform 220ms var(--ft-ease);
}

.nds-ft-help__links a:hover,
.nds-ft-help__links a:focus-visible {
	color: var(--ft-accent-strong) !important;
}

.nds-ft-help__details {
	display: grid;
	gap: 0.3rem;
	padding-top: 0.75rem;
	border-top: 1px solid rgba(140, 180, 195, 0.14);
	font-family: var(--nds-font-body, "Figtree", sans-serif);
	font-size: 0.8rem;
	line-height: 1.45;
	color: var(--ft-soft);
}

.nds-ft-help__details a {
	color: var(--ft-accent) !important;
	text-decoration: none !important;
	font-weight: 600;
	word-break: break-word;
}

.nds-ft-help__details a:hover,
.nds-ft-help__details a:focus-visible {
	color: var(--ft-accent-strong) !important;
	text-decoration: underline !important;
}

.nds-ft-help__details .nds-address {
	font-style: normal;
	color: var(--ft-soft);
}

.nds-ft-help__details .nds-address span + span::before {
	content: none;
}

/* —— Layer 3: Legal bar —— */
.nds-ft-legal {
	display: grid;
	grid-template-columns: 1.4fr 1fr auto;
	gap: 0.65rem 1.25rem;
	align-items: center;
	padding: 1.25rem 0 0.35rem;
	font-family: var(--nds-font-body, "Figtree", sans-serif);
}

.nds-ft-legal__copy,
.nds-ft-legal__tagline,
.nds-ft-legal__domain,
.nds-ft-legal__mini {
	margin: 0;
	font-size: 0.78rem;
	line-height: 1.45;
	color: var(--ft-soft);
}

.nds-ft-legal__tagline {
	text-align: center;
	opacity: 0.9;
}

.nds-ft-legal__domain {
	text-align: right;
	font-weight: 650;
}

.nds-ft-legal__domain a,
.nds-ft-legal__mini a {
	color: rgba(220, 238, 244, 0.88) !important;
	text-decoration: none !important;
}

.nds-ft-legal__domain a:hover,
.nds-ft-legal__domain a:focus-visible,
.nds-ft-legal__mini a:hover,
.nds-ft-legal__mini a:focus-visible {
	color: var(--ft-accent-strong) !important;
}

.nds-ft-legal__mini {
	grid-column: 1 / -1;
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem 0.55rem;
	justify-content: flex-start;
}

.nds-ft-legal__mini span[aria-hidden] {
	opacity: 0.45;
}

/* Admin-only note outside public footer */
.nds-legal-review-note {
	position: relative;
	z-index: 2;
	margin: 0;
	padding: 0.45rem 1rem;
	background: #1a2a18;
	border-top: 1px solid rgba(180, 200, 120, 0.25);
	color: #d8e8b8;
	font-family: var(--nds-font-body, "Figtree", sans-serif);
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	text-align: center;
}

/* Desktop: details act as static columns */
@media (min-width: 901px) {
	.nds-ft-nav > summary.nds-ft-col__title {
		pointer-events: none;
	}

	.nds-ft-nav:not([open]) .nds-ft-links {
		display: grid;
	}
}

/* —— Responsive —— */
@media (max-width: 1200px) {
	.nds-ft-main {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.nds-ft-col--brand {
		grid-column: 1 / -1;
	}

	.nds-ft-col--contact {
		grid-column: span 1;
	}
}

@media (max-width: 900px) {
	.nds-ft-cta {
		grid-template-columns: 1fr;
		gap: 1.25rem;
	}

	.nds-ft-cta__aside {
		align-items: stretch;
	}

	.nds-ft-cta__covers {
		display: none;
	}

	.nds-ft-cta__actions {
		justify-content: stretch;
		flex-direction: column;
	}

	.nds-ft-cta__btn {
		width: 100%;
	}

	.nds-ft-main {
		grid-template-columns: 1fr 1fr;
		gap: 1.25rem;
	}

	.nds-ft-col--brand,
	.nds-ft-col--contact {
		grid-column: 1 / -1;
	}

	.nds-ft-nav > summary.nds-ft-col__title {
		cursor: pointer;
		display: flex;
		align-items: center;
		justify-content: space-between;
		min-height: 2.75rem;
		padding: 0.35rem 0;
		pointer-events: auto;
	}

	.nds-ft-nav > summary.nds-ft-col__title::after {
		content: "+";
		font-size: 1.1rem;
		font-weight: 500;
		color: var(--ft-accent);
		line-height: 1;
	}

	.nds-ft-nav[open] > summary.nds-ft-col__title::after {
		content: "−";
	}

	.nds-ft-legal {
		grid-template-columns: 1fr;
		text-align: left;
	}

	.nds-ft-legal__tagline,
	.nds-ft-legal__domain {
		text-align: left;
	}
}

@media (max-width: 640px) {
	.nds-site-footer.nds-ft {
		padding-top: 2rem;
		padding-bottom: calc(0.5rem + env(safe-area-inset-bottom, 0px));
	}

	.nds-ft-main {
		grid-template-columns: 1fr;
	}

	.nds-ft-cta__trust {
		flex-direction: column;
		align-items: flex-start;
		gap: 0.45rem;
	}

	.nds-ft-links a,
	.nds-ft-help__links a {
		min-height: 2.75rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.nds-ft-cta__btn,
	.nds-ft-cta__arrow,
	.nds-ft-links a,
	.nds-ft-brand__web a,
	.nds-ft-help,
	.nds-ft-help__links a span,
	.nds-ft-links__more a span {
		transition: none;
	}

	.nds-ft-cta__btn:hover,
	.nds-ft-cta__btn:focus-visible {
		transform: none;
	}
}

/* Neutralize legacy footer grid rules inside new footer */
.nds-site-footer.nds-ft .nds-footer-grid,
.nds-site-footer.nds-ft .nds-footer-meta {
	display: none !important;
}
