/*
 * The Boss Animated Dock — Footer
 * Dark, contained, technical/editorial panel. Same isolation approach
 * as the header: explicit scoped resets, no all:revert, no global tag
 * selectors. Classes prefixed bad-footer.
 */

.bad-footer-wrap,
.bad-footer-wrap * {
	box-sizing: border-box;
}

.bad-footer-wrap footer,
.bad-footer-wrap div,
.bad-footer-wrap nav,
.bad-footer-wrap ul,
.bad-footer-wrap li,
.bad-footer-wrap a,
.bad-footer-wrap h2,
.bad-footer-wrap p,
.bad-footer-wrap span,
.bad-footer-wrap button {
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	list-style: none;
	text-decoration: none !important;
	font-weight: 400;
	color: inherit;
}
.bad-footer-wrap a:hover,
.bad-footer-wrap a:focus,
.bad-footer-wrap a:visited {
	text-decoration: none !important;
}

.bad-footer-wrap {
	display: flex;
	justify-content: center;
	width: 100%;
	font-family: 'Boss Dock Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.bad-footer-wrap .bad-footer {
	width: 100%;
	max-width: var(--badf-max-width, 1280px);
	margin: 0 24px;
	background: var(--badf-bg, rgba(14,14,14,0.92));
	border: 1px solid var(--badf-border, #292929);
	border-radius: var(--badf-radius, 20px);
	overflow: hidden;
	box-shadow: 0 30px 80px -20px rgba(0,0,0,0.6);
	color: var(--badf-text, #ECECE8);
}

/* Width mode: "percentage" and "full" override the default
   width:100%/max-width:Npx pairing above with an explicit percentage
   of the wrapper, independently per breakpoint. Mode "max_width" (the
   default) intentionally changes nothing from the block above. */
.bad-footer-wrap[data-width-mode="percentage"] .bad-footer {
	width: var(--badf-width-desktop, 92%);
	max-width: none;
}
.bad-footer-wrap[data-width-mode="full"] .bad-footer {
	width: 100%;
	max-width: none;
	margin: 0;
	border-radius: 0;
}
@media (max-width: 1024px) {
	.bad-footer-wrap[data-width-mode="percentage"] .bad-footer { width: var(--badf-width-tablet, 94%); }
}
@media (max-width: 600px) {
	.bad-footer-wrap[data-width-mode="percentage"] .bad-footer { width: var(--badf-width-mobile, 100%); }
}

/* ---- Top: brand + link columns ---------------------------------- */
.bad-footer-wrap .bad-footer__top {
	display: grid;
	grid-template-columns: 1.4fr 1fr 1fr;
	gap: 40px;
	padding: 56px 48px 40px;
}

.bad-footer-wrap .bad-footer__brand { max-width: 340px; }

.bad-footer-wrap .bad-footer__logo {
	display: inline-flex;
	width: var(--badf-logo-width, 28px);
	aspect-ratio: 1 / 1; /* square by default so height follows width */
	max-height: var(--badf-logo-max-height, none);
	border: 1px solid var(--badf-border, #292929);
	border-radius: 5px;
	margin-bottom: 18px;
	overflow: hidden;
}
.bad-footer-wrap .bad-footer__logo img { width: 100%; height: 100%; object-fit: contain; border-radius: 4px; }
.bad-footer-wrap .bad-footer__logo--mark span { display: block; width: 100%; height: 100%; }

.bad-footer-wrap .bad-footer__contact {
	display: flex;
	flex-direction: column;
	gap: 4px;
	margin-bottom: 12px;
}
.bad-footer-wrap .bad-footer__contact-item {
	font-size: 13px;
	font-weight: 500;
	color: var(--badf-text, #ECECE8);
	letter-spacing: 0.01em;
	transition: color .18s ease;
}
.bad-footer-wrap .bad-footer__contact-item:hover,
.bad-footer-wrap .bad-footer__contact-item:focus-visible {
	color: var(--badf-accent, #12E19F);
}

.bad-footer-wrap .bad-footer__brand-title {
	font-size: 15px;
	font-weight: 600;
	letter-spacing: 0.01em;
	line-height: 1.3;
	margin-bottom: 10px;
}

.bad-footer-wrap .bad-footer__brand-desc {
	font-size: 13px;
	line-height: 1.6;
	color: var(--badf-muted, #B2B2AC);
	margin-bottom: 14px;
}

.bad-footer-wrap .bad-footer__build-line {
	font-size: 10.5px;
	letter-spacing: 0.06em;
	color: var(--badf-label, #7A7A73);
	margin-bottom: 18px;
}

.bad-footer-wrap .bad-footer__socials {
	display: flex;
	gap: 10px;
}
.bad-footer-wrap .bad-footer__social {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border: 1px solid var(--badf-muted, #B2B2AC);
	border-radius: 7px;
	color: var(--badf-muted, #B2B2AC);
	background: rgba(255,255,255,0.03);
	transition: color .18s ease, border-color .18s ease, background-color .18s ease;
}
.bad-footer-wrap .bad-footer__social svg { width: 15px; height: 15px; display: block; }
.bad-footer-wrap .bad-footer__social:hover,
.bad-footer-wrap .bad-footer__social:focus-visible {
	color: var(--badf-hover, #FFFFFF);
	border-color: var(--badf-hover, #FFFFFF);
	background: rgba(255,255,255,0.08);
}

.bad-footer-wrap .bad-footer__col-label {
	font-size: 10.5px;
	font-weight: 600;
	letter-spacing: 0.14em;
	color: var(--badf-label, #7A7A73);
	margin-bottom: 16px;
}
.bad-footer-wrap .bad-footer__col-list { display: flex; flex-direction: column; gap: 12px; }
.bad-footer-wrap .bad-footer__col-list a {
	font-size: 13.5px;
	font-weight: 500;
	color: var(--badf-muted, #B2B2AC);
	transition: color .18s ease;
}
.bad-footer-wrap .bad-footer__col-list a:hover,
.bad-footer-wrap .bad-footer__col-list a:focus-visible {
	color: var(--badf-hover, #FFFFFF);
}

/* ---- Module rail (animated visual element) ----------------------- */
.bad-footer-wrap .bad-footer__rail {
	position: relative;
	border-top: 1px solid var(--badf-divider, #292929);
	padding: 22px 48px 26px;
	overflow: hidden;
}
/* Desktop/tablet: plain block wrapper, zero behavior change from
   before — no scrolling, canvas and labels simply stack as they
   always did. Only the <=600px block below turns this into the
   swipeable card rail; everything above this point in the cascade is
   unchanged from the pre-swipe implementation. */
.bad-footer-wrap .bad-footer__rail-scroller {
	overflow: visible;
}
.bad-footer-wrap .bad-footer__rail-canvas {
	display: block;
	width: 100%;
	height: 120px;
}
/* Real, accessible card labels — a row of captions under the canvas
   rail, one per bay, evenly divided the same way the canvas divides
   its own width by bay count (kept in sync via --badf-bay-count so
   the columns line up with the drawn bays above them). */
.bad-footer-wrap .bad-footer__rail-labels {
	display: grid;
	grid-template-columns: repeat(var(--badf-bay-count, 7), 1fr);
	gap: 4px;
	margin-top: 8px;
}
.bad-footer-wrap .bad-footer__rail-label { text-align: center; }
.bad-footer-wrap .bad-footer__rail-label-inner {
	display: inline-flex;
	flex-direction: column;
	gap: 2px;
	color: var(--badf-muted, #B2B2AC);
	transition: color .18s ease;
}
a.bad-footer-wrap .bad-footer__rail-label-inner,
.bad-footer-wrap a.bad-footer__rail-label-inner {
	cursor: pointer;
}
.bad-footer-wrap a.bad-footer__rail-label-inner:hover,
.bad-footer-wrap a.bad-footer__rail-label-inner:focus-visible {
	color: var(--badf-hover, #ECECE8);
}
.bad-footer-wrap .bad-footer__rail-label-title {
	font-size: 11px;
	font-weight: 500;
	letter-spacing: 0.08em;
	line-height: 1.3;
}
.bad-footer-wrap .bad-footer__rail-label-sub {
	font-size: 9.5px;
	color: var(--badf-label, #7A7A73);
}
.bad-footer-wrap .bad-footer__rail-caption {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-top: 10px;
	font-size: 9.5px;
	letter-spacing: 0.1em;
	color: var(--badf-label, #7A7A73);
}
.bad-footer-wrap .bad-footer__rail-dash {
	display: inline-block;
	width: 14px;
	height: 1px;
	background: var(--badf-label, #7A7A73);
}
/* Static no-JS / no-canvas-support fallback: a plain thin line stands
   in for the rail so the footer never looks broken. */
.bad-footer-wrap .bad-footer__rail-canvas:not([data-ready]) {
	background: linear-gradient(180deg, transparent 49%, var(--badf-divider, #292929) 50%, transparent 51%);
}

/* ---- Bottom bar ---------------------------------------------------- */
.bad-footer-wrap .bad-footer__bottom {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 10px;
	border-top: 1px solid var(--badf-divider, #292929);
	padding: 18px 48px;
	font-size: 11px;
	letter-spacing: 0.05em;
	color: var(--badf-label, #7A7A73);
}
.bad-footer-wrap .bad-footer__bottom-links { display: flex; gap: 18px; }
.bad-footer-wrap .bad-footer__bottom-links a {
	color: var(--badf-label, #7A7A73);
	font-weight: 500;
	transition: color .18s ease;
}
.bad-footer-wrap .bad-footer__bottom-links a:hover,
.bad-footer-wrap .bad-footer__bottom-links a:focus-visible {
	color: var(--badf-hover, #ECECE8);
}

.bad-footer-wrap a:focus-visible,
.bad-footer-wrap .bad-footer__social:focus-visible {
	outline: 2px solid var(--badf-accent, #12E19F);
	outline-offset: 2px;
}

/* ---- Tablet --------------------------------------------------------- */
@media (min-width: 601px) and (max-width: 1024px) { .bad-footer-wrap .badf-hide-tablet { display: none !important; } }
@media (max-width: 1024px) {
	.bad-footer-wrap .bad-footer__top { grid-template-columns: 1fr 1fr; gap: 32px; padding: 44px 32px 32px; }
	.bad-footer-wrap .bad-footer__brand { grid-column: 1 / -1; max-width: 100%; }
	.bad-footer-wrap .bad-footer__rail { padding: 20px 32px 22px; }
	.bad-footer-wrap .bad-footer__rail-canvas { height: 100px; }
	.bad-footer-wrap .bad-footer__bottom { padding: 16px 32px; }
	.bad-footer-wrap .bad-footer__logo { width: var(--badf-logo-width-tablet, 26px); }
}

/* ---- Mobile ----------------------------------------------------------- */
@media (min-width: 1025px) { .bad-footer-wrap .badf-hide-desktop { display: none !important; } }
@media (max-width: 600px) { .bad-footer-wrap .badf-hide-mobile { display: none !important; } }
@media (max-width: 600px) {
	.bad-footer-wrap { padding: 0; }
	.bad-footer-wrap .bad-footer {
		margin: 0 10px;
		border-radius: 16px;
		background: var(--badf-mobile-panel, var(--badf-bg));
		border-color: var(--badf-mobile-border, var(--badf-border));
	}
	.bad-footer-wrap .bad-footer__top {
		grid-template-columns: 1fr;
		gap: var(--badf-mobile-section-gap, 24px);
		padding: var(--badf-mobile-pad-top, 32px) var(--badf-mobile-pad-h, 20px) var(--badf-mobile-section-gap, 24px);
	}
	.bad-footer-wrap .bad-footer__col-label { margin-bottom: 12px; font-size: var(--badf-mobile-nav-label-size, 10px); }
	.bad-footer-wrap .bad-footer__col-list a { font-size: var(--badf-mobile-nav-size, 13px); }
	.bad-footer-wrap .bad-footer__brand-desc { font-size: var(--badf-mobile-desc-size, 12px); }
	.bad-footer-wrap .bad-footer__rail {
		padding: 16px var(--badf-mobile-pad-h, 20px) 18px;
		border-color: var(--badf-mobile-divider, var(--badf-divider));
	}
	.bad-footer-wrap .bad-footer__rail-canvas { height: var(--badf-mobile-rail-height, 72px); }

	/* ---- Swipeable card rail ---------------------------------------
	   The canvas and the label row share ONE horizontally-scrolling
	   container (.bad-footer__rail-scroller) and are both widened to
	   exactly (bay count × card width), so they scroll together as a
	   single unit — a swipe moves the actual existing rail visual
	   (canvas animation included), not a separate re-implementation of
	   it. Because the canvas's own rendered width now equals bay-count
	   × card-width, the animation engine's existing "divide width by
	   bay count" drawing logic naturally produces bays exactly
	   card-width wide with zero JS changes — it already measures the
	   canvas element's own actual size via ResizeObserver.
	   Native scroll-snap handles settle/bounds/momentum: no custom
	   touch/drag JS needed, which also means normal vertical page
	   scrolling is never at risk of being intercepted. touch-action:
	   pan-x is the same technique already proven in the header. */
	.bad-footer-wrap .bad-footer__rail-scroller {
		width: 100%;
		max-width: 100%;
		box-sizing: border-box;
		overflow-x: auto !important;
		overflow-y: hidden;
		-webkit-overflow-scrolling: touch;
		scroll-snap-type: x mandatory;
		scroll-behavior: smooth;
		touch-action: pan-x !important;
		scrollbar-width: none;
	}
	.bad-footer-wrap .bad-footer__rail-scroller::-webkit-scrollbar { display: none; }
	.bad-footer-wrap .bad-footer__rail-scroller .bad-footer__rail-canvas {
		width: calc(var(--badf-bay-count, 4) * var(--badf-mobile-card-width, 210px));
		flex-shrink: 0;
	}
	.bad-footer-wrap .bad-footer__rail-scroller .bad-footer__rail-labels {
		display: flex;
		width: calc(var(--badf-bay-count, 4) * var(--badf-mobile-card-width, 210px));
		gap: 0;
		margin-top: 8px;
	}
	.bad-footer-wrap .bad-footer__rail-scroller .bad-footer__rail-label {
		flex: 0 0 var(--badf-mobile-card-width, 210px);
		min-width: 0;
		scroll-snap-align: start;
		scroll-snap-stop: always;
	}
	/* Card text must be legible WITHOUT a hover state — touch devices
	   have no persistent :hover, so the desktop-only "dim until you
	   interact" treatment would leave mobile card text permanently
	   muted. Mobile always shows the brighter, fully-legible color. */
	.bad-footer-wrap .bad-footer__rail-label-inner {
		color: var(--badf-text, #ECECE8) !important;
	}
	.bad-footer-wrap .bad-footer__rail-label-sub {
		color: var(--badf-muted, #B2B2AC) !important;
	}

	.bad-footer-wrap .bad-footer__logo { width: var(--badf-logo-width-mobile, 24px); }
	.bad-footer-wrap .bad-footer__social {
		width: var(--badf-mobile-social-size, 30px);
		height: var(--badf-mobile-social-size, 30px);
	}
	.bad-footer-wrap .bad-footer__rail-label-title { font-size: var(--badf-mobile-card-title-size, 9px); }
	.bad-footer-wrap .bad-footer__bottom {
		flex-direction: column;
		align-items: flex-start;
		padding: 16px var(--badf-mobile-pad-h, 20px) var(--badf-mobile-pad-bottom, 22px);
		border-color: var(--badf-mobile-divider, var(--badf-divider));
	}

	/* Mobile width mode — "inherit" (default) changes nothing here and
	   defers entirely to the existing width_mode/width_percent_mobile
	   rules above; the other three modes are mobile-only overrides that
	   can never affect desktop or tablet, since they're nested inside
	   this same <=600px block. */
	.bad-footer-wrap[data-mobile-width-mode="full"] .bad-footer { width: 100% !important; max-width: none !important; margin: 0 !important; border-radius: 0 !important; }
	.bad-footer-wrap[data-mobile-width-mode="percentage"] .bad-footer { width: var(--badf-mobile-width-pct, 100%) !important; max-width: none !important; }
	.bad-footer-wrap[data-mobile-width-mode="custom"] .bad-footer { width: var(--badf-mobile-width-custom, 360px) !important; max-width: calc(100vw - 20px) !important; }
}

@media (prefers-reduced-motion: reduce) {
	.bad-footer-wrap .bad-footer__social,
	.bad-footer-wrap .bad-footer__col-list a,
	.bad-footer-wrap .bad-footer__bottom-links a {
		transition: none !important;
	}
}
