/* ── Shared site footer: "The Horizon" ──────────────────────────────────── */
/* Used on home, index/features, create, profile, agent-home. */

.h-footer-horizon {
	position: relative;
	flex-shrink: 0;
	overflow: hidden;
	min-height: 360px;
	padding: 4rem 2rem 2rem;
	border-top: none;
	background: linear-gradient(180deg, var(--bg-0) 0%, #050505 60%, #000 100%);
	isolation: isolate;
	color: #fff;
}

.h-footer-glow-line {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 1px;
	background: linear-gradient(
		90deg,
		transparent 0%,
		rgba(255, 255, 255, 0.0) 10%,
		rgba(255, 255, 255, 0.75) 50%,
		rgba(255, 255, 255, 0.0) 90%,
		transparent 100%
	);
	box-shadow:
		0 0 10px rgba(255, 255, 255, 0.35),
		0 0 24px rgba(255, 255, 255, 0.18);
	z-index: 2;
}

.h-footer-floor {
	position: absolute;
	left: -10%;
	right: -10%;
	bottom: -40%;
	height: 90%;
	background-image:
		linear-gradient(to right, rgba(255, 255, 255, 0.09) 1px, transparent 1px),
		linear-gradient(to bottom, rgba(255, 255, 255, 0.09) 1px, transparent 1px);
	background-size: 64px 64px;
	transform: perspective(600px) rotateX(62deg);
	transform-origin: 50% 0%;
	mask-image: linear-gradient(to bottom, #000 0%, #000 40%, transparent 95%);
	-webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 40%, transparent 95%);
	z-index: 1;
	animation: hFloorScroll 12s linear infinite;
}

@keyframes hFloorScroll {
	0% { background-position: 0 0; }
	100% { background-position: 0 64px; }
}

.h-footer-haze {
	position: absolute;
	inset: 0;
	background:
		radial-gradient(60% 70% at 30% 110%, rgba(255, 255, 255, 0.10) 0%, transparent 60%),
		radial-gradient(55% 70% at 75% 110%, rgba(255, 255, 255, 0.07) 0%, transparent 60%);
	filter: blur(40px);
	z-index: 1;
	pointer-events: none;
}

.h-footer-watermark {
	position: absolute;
	left: 50%;
	bottom: -0.15em;
	transform: translateX(-50%);
	font-family: var(--font-display);
	font-weight: 700;
	font-size: clamp(7rem, 22vw, 22rem);
	line-height: 0.85;
	letter-spacing: -0.04em;
	white-space: nowrap;
	background: linear-gradient(
		180deg,
		rgba(255, 255, 255, 0.12) 0%,
		rgba(255, 255, 255, 0.04) 60%,
		rgba(255, 255, 255, 0) 100%
	);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	pointer-events: none;
	z-index: 2;
	user-select: none;
}

.h-footer-avatar {
	position: absolute;
	right: 4%;
	bottom: 12%;
	width: 140px;
	height: 140px;
	z-index: 3;
	pointer-events: none;
	filter: grayscale(1) drop-shadow(0 0 18px rgba(255, 255, 255, 0.30));
}

.h-footer-avatar model-viewer,
.h-footer-avatar canvas {
	width: 100%;
	height: 100%;
	background: transparent;
	--poster-color: transparent;
	display: block;
}

.h-footer-cta {
	position: relative;
	z-index: 4;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 3rem;
	max-width: 1080px;
	margin: 0 auto 3rem;
	padding-bottom: 2.5rem;
	border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.h-footer-cta h2 {
	font-family: var(--font-display);
	font-size: 1.4rem;
	font-weight: 600;
	margin: 0 0 0.5rem;
	color: #fff;
	letter-spacing: -0.01em;
}

.h-footer-cta p {
	margin: 0 0 1.25rem;
	font-family: var(--font-body);
	font-size: 0.9rem;
	color: rgba(255, 255, 255, 0.5);
	line-height: 1.5;
	max-width: 32ch;
}

.h-footer-newsletter-form {
	display: flex;
	align-items: center;
	gap: 0;
	max-width: 380px;
	background: rgba(255, 255, 255, 0.04);
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 999px;
	padding: 0.25rem 0.25rem 0.25rem 1.1rem;
	transition: border-color 0.2s ease, background 0.2s ease;
}

.h-footer-newsletter-form:focus-within {
	border-color: rgba(255, 255, 255, 0.25);
	background: rgba(255, 255, 255, 0.06);
}

.h-footer-newsletter-input {
	flex: 1;
	min-width: 0;
	background: transparent;
	border: none;
	outline: none;
	color: #fff;
	font-family: var(--font-body);
	font-size: 0.9rem;
	padding: 0.6rem 0;
}

.h-footer-newsletter-input::placeholder {
	color: rgba(255, 255, 255, 0.35);
}

.h-footer-newsletter-btn {
	flex-shrink: 0;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	border: none;
	background: rgba(255, 255, 255, 0.1);
	color: #fff;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: background 0.2s ease, transform 0.2s ease;
}

.h-footer-newsletter-btn:hover {
	background: rgba(255, 255, 255, 0.2);
	transform: translateX(2px);
}

.h-footer-newsletter-btn:disabled {
	opacity: 0.5;
	cursor: not-allowed;
	transform: none;
}

.h-footer-newsletter-btn svg {
	width: 14px;
	height: 14px;
}

.h-footer-newsletter-msg {
	margin: 0.6rem 0 0;
	font-family: var(--font-body);
	font-size: 0.78rem;
	color: rgba(255, 255, 255, 0.5);
	min-height: 1em;
}

.h-footer-newsletter-msg.is-error {
	color: #ff8e8e;
}

.h-footer-newsletter-msg.is-success {
	color: var(--success);
}

.h-footer-community-btn {
	display: inline-flex;
	align-items: center;
	gap: 0.6rem;
	padding: 0.7rem 1.25rem;
	border-radius: 999px;
	border: 1px solid rgba(255, 255, 255, 0.1);
	background: rgba(255, 255, 255, 0.04);
	color: #fff;
	font-family: var(--font-body);
	font-size: 0.9rem;
	font-weight: 500;
	text-decoration: none;
	transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.h-footer-community-btn:hover {
	background: rgba(255, 255, 255, 0.08);
	border-color: rgba(255, 255, 255, 0.22);
	transform: translateY(-1px);
}

.h-footer-community-btn svg {
	width: 14px;
	height: 14px;
}

.h-footer-inner {
	position: relative;
	z-index: 4;
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 2rem;
	max-width: 1080px;
	margin: 0 auto 4rem;
}

.h-footer-brand-col {
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
}

.h-footer-brand {
	display: flex;
	align-items: center;
	gap: 0.4rem;
	font-family: var(--font-display);
	font-size: 1.1rem;
	font-weight: 600;
	color: #fff;
}

.h-footer-brand .wordmark-logo {
	width: 22px;
	height: 22px;
	display: inline-block;
	vertical-align: middle;
	flex-shrink: 0;
}

.h-footer-brand .wordmark-dot {
	display: inline-block;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 0 10px rgba(255, 255, 255, 0.6);
}

.h-footer-tagline {
	font-family: var(--font-body);
	font-size: 0.85rem;
	color: rgba(255, 255, 255, 0.45);
	margin: 0;
	letter-spacing: 0.01em;
}

.h-footer-links {
	display: flex;
	flex-wrap: wrap;
	gap: 1.5rem 3rem;
}

.h-footer-link-col {
	display: flex;
	flex-direction: column;
	gap: 0.6rem;
}

.h-footer-link-heading {
	font-family: var(--font-body);
	font-size: 0.7rem;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.35);
	margin: 0 0 0.2rem;
}

.h-footer-links a {
	position: relative;
	color: rgba(255, 255, 255, 0.55);
	text-decoration: none;
	font-size: 0.9rem;
	transition: color 0.2s ease, text-shadow 0.2s ease;
}

.h-footer-links a:hover {
	color: #fff;
	text-shadow: 0 0 12px rgba(255, 255, 255, 0.55);
}

.h-footer-socials {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.h-footer-social {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	color: rgba(255, 255, 255, 0.55);
	background: rgba(255, 255, 255, 0.03);
	border: 1px solid rgba(255, 255, 255, 0.06);
	transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.h-footer-social:hover {
	color: #fff;
	background: rgba(255, 255, 255, 0.08);
	border-color: rgba(255, 255, 255, 0.18);
	transform: translateY(-1px);
}

.h-footer-social svg {
	width: 14px;
	height: 14px;
}

.h-footer-nvidia {
	display: inline-flex;
	align-self: flex-start;
	margin-top: 1.1rem;
	padding: 7px 11px;
	background: #fff;
	border-radius: 9px;
	border: 1px solid rgba(255, 255, 255, 0.06);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.h-footer-nvidia:hover {
	transform: translateY(-1px);
	box-shadow: 0 6px 18px rgba(118, 185, 0, 0.28);
}

.h-footer-nvidia img {
	height: 28px;
	display: block;
}

.h-footer-nvidia-legal {
	margin: 0.9rem auto 0;
	max-width: 720px;
	text-align: center;
	font-size: 0.66rem;
	line-height: 1.5;
	color: rgba(255, 255, 255, 0.32);
}

.h-footer-legal-links {
	display: flex;
	align-items: center;
	gap: 1.25rem;
}

.h-footer-legal-links a {
	color: rgba(255, 255, 255, 0.55);
	text-decoration: none;
	font-family: var(--font-body);
	font-size: 0.78rem;
	transition: color 0.2s ease;
}

.h-footer-legal-links a:hover {
	color: #fff;
}

.h-footer-bottom {
	position: relative;
	z-index: 4;
	max-width: 1080px;
	margin: 0 auto;
	padding-top: 1.5rem;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	flex-wrap: wrap;
	border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.h-footer-legal {
	margin: 0;
	font-family: var(--font-body);
	font-size: 0.78rem;
	font-weight: 400;
	color: rgba(255, 255, 255, 0.42);
	letter-spacing: 0.005em;
}

.h-footer-badges {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	flex-wrap: wrap;
}

.h-footer-badge {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	padding: 0.32rem 0.7rem;
	border-radius: 999px;
	border: 1px solid rgba(255, 255, 255, 0.09);
	background: rgba(255, 255, 255, 0.025);
	color: rgba(255, 255, 255, 0.62);
	font-family: var(--font-body);
	font-size: 0.72rem;
	font-weight: 500;
	letter-spacing: 0.01em;
	text-decoration: none;
	transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.h-footer-badge:hover {
	color: #fff;
	border-color: rgba(255, 255, 255, 0.18);
	background: rgba(255, 255, 255, 0.05);
	transform: translateY(-1px);
}

.h-footer-badge svg {
	width: 12px;
	height: 12px;
	flex-shrink: 0;
}

.h-footer-status-dot {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--success);
	box-shadow: 0 0 8px rgba(74, 222, 128, 0.6);
	flex-shrink: 0;
	animation: hStatusPulse 2.4s ease-in-out infinite;
}

@keyframes hStatusPulse {
	0%, 100% { opacity: 1; box-shadow: 0 0 8px rgba(74, 222, 128, 0.6); }
	50% { opacity: 0.55; box-shadow: 0 0 4px rgba(74, 222, 128, 0.35); }
}

.h-footer-ca-wrap {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.h-footer-ca-label {
	font-family: var(--font-body);
	font-size: 0.72rem;
	font-weight: 600;
	color: rgba(255, 255, 255, 0.55);
	letter-spacing: 0.04em;
	text-transform: uppercase;
	flex-shrink: 0;
}

.h-footer-ca-btn {
	background: rgba(255, 255, 255, 0.04);
	border: 1px solid rgba(255, 255, 255, 0.09);
	border-radius: 6px;
	padding: 0.22rem 0.6rem;
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
	font-size: 0.68rem;
	color: rgba(255, 255, 255, 0.45);
	cursor: pointer;
	letter-spacing: 0.01em;
	transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 26ch;
}

.h-footer-ca-btn:hover {
	color: rgba(255, 255, 255, 0.85);
	border-color: rgba(255, 255, 255, 0.2);
	background: rgba(255, 255, 255, 0.07);
}

.h-footer-horizon a:focus-visible,
.h-footer-horizon button:focus-visible,
.h-footer-newsletter-input:focus-visible {
	outline: 2px solid rgba(255, 255, 255, 0.5);
	outline-offset: 3px;
	border-radius: 4px;
}

/* ── Microinteractions (B11) — press states + reduced motion ──────────── */
.h-footer-newsletter-btn:active:not(:disabled) { background: rgba(255, 255, 255, 0.28); transform: translateX(2px) scale(0.95); }
.h-footer-community-btn:active { background: rgba(255, 255, 255, 0.12); transform: translateY(0); }
.h-footer-social:active { background: rgba(255, 255, 255, 0.14); transform: translateY(0); }
.h-footer-badge:active { background: rgba(255, 255, 255, 0.09); transform: translateY(0); }
.h-footer-ca-btn:active { background: rgba(255, 255, 255, 0.12); color: #fff; }
.h-footer-links a:active,
.h-footer-legal-links a:active { color: rgba(255, 255, 255, 0.85); }

@media (prefers-reduced-motion: reduce) {
	.h-footer-floor,
	.h-footer-status-dot {
		animation: none;
	}
	.h-footer-horizon a,
	.h-footer-horizon button,
	.h-footer-newsletter-form,
	.h-footer-social,
	.h-footer-badge {
		transition: none !important;
	}
	.h-footer-newsletter-btn:hover,
	.h-footer-community-btn:hover,
	.h-footer-social:hover,
	.h-footer-badge:hover { transform: none; }
}

/* Touch devices: floor the footer's icon controls to a 44px hit area
 * (WCAG 2.5.8). Width-based queries miss tablets at 768px+ that are still
 * touch-only, so gate on the pointer type, not the viewport. Desktop mouse
 * visuals are untouched. */
@media (hover: none) and (pointer: coarse) {
	.h-footer-newsletter-btn,
	.h-footer-social {
		width: 44px;
		height: 44px;
	}
	.h-footer-newsletter-input {
		min-height: 44px;
	}
	.h-footer-newsletter-btn svg,
	.h-footer-social svg {
		width: 16px;
		height: 16px;
	}
	.h-footer-ca-btn,
	.h-footer-badge {
		min-height: 44px;
		display: inline-flex;
		align-items: center;
	}
	/* Privacy / Terms links measured 80x19: a 44px row keeps them thumb-sized
	   without moving the text (negative margin gives the padding back). */
	.h-footer-legal-links a {
		display: inline-flex;
		align-items: center;
		min-height: 44px;
		margin: -12px 0;
	}
}

/* The footer bot lives inside a page the user still has to scroll, so the
   vertical swipe belongs to the page and only horizontal drag to the canvas. */
#footer-bot-canvas {
	touch-action: pan-y;
}

@media (max-width: 720px) {
	.h-footer-horizon {
		min-height: 320px;
		padding: 3rem 1.25rem 1.5rem;
	}
	.h-footer-cta {
		grid-template-columns: 1fr;
		gap: 2rem;
		padding-bottom: 2rem;
		margin-bottom: 2rem;
	}
	.h-footer-inner {
		flex-direction: column;
		gap: 1.5rem;
		margin-bottom: 3rem;
	}
	.h-footer-links {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 1.25rem 1rem;
		width: 100%;
	}
	/* 44px minimum touch targets (WCAG 2.5.8) without changing desktop rhythm */
	.h-footer-link-col {
		gap: 0.25rem;
	}
	.h-footer-links a {
		display: inline-flex;
		align-items: center;
		min-height: 44px;
	}
	.h-footer-bottom {
		flex-direction: column;
		align-items: flex-start;
		gap: 0.75rem;
	}
	.h-footer-ca-wrap {
		width: 100%;
	}
	.h-footer-ca-btn {
		max-width: none;
		width: 100%;
		text-align: left;
	}
	.h-footer-avatar {
		width: 90px;
		height: 90px;
		right: 5%;
		bottom: 18%;
	}
}

@media (max-width: 768px) {
	.h-footer-newsletter-input {
		font-size: max(16px, 1em);
	}
}
