/**
 * _partials/featured-work.css — home-page Featured Work section.
 *
 * Loaded by src/index.njk via its `styles:` frontmatter array.
 *
 * Single section: FEATURED WORK SECTION — the 3×3 grid of case-study
 * cards rendered via the `fwCard` async filter (defined in .eleventy.js).
 * Includes the section frame, the cross-fading two-line headline, the
 * card hover treatments, the per-card tint gradients, and the reduced-
 * motion fallbacks.
 *
 * Extracted from src/assets/css/app.css as part of #147 PR 3 — CSS
 * file split: complex pages. Content byte-for-byte preserved.
 */

/* ─────────────────────────────────────────────────────────────────────
	FEATURED WORK SECTION
	─────────────────────────────────────────────────────────────────────
	Home-page below-the-fold credibility band. Markup lives in
	`src/_includes/partials/featured-work.njk` and the single-card macro
	in `featured-work-card.njk`. Data source: `collections.featuredCaseStudies`
	(filters `is_featured: true`, sorts by `weight` ascending).

	Card model: `<article>` root with an absolutely-positioned thumbnail
	that holds a gradient-blob "image" layer, always-visible badge +
	arrow indicators, and a translucent hover overlay containing the
	eyebrow + title + tech chips. The whole card is clickable via the
	stretched-link pattern on the overlay-title anchor (a `::after`
	pseudo-element covers the card area).

	On hover:
		• `.innov8-fw-thumb-image` scales 1.06× (revealing more of the
			eventual screenshot — currently the gradient placeholder).
		• `.innov8-fw-thumb-overlay` fades in from opacity 0 → 1,
			darkening the image and surfacing the title content.
		• Badge fades out; arrow tints cyan + scales slightly.

	Layout: full-bleed 3×3 grid, gap: 0, edge-to-edge (no container
	constraint, no inter-card gutter) — matches Mike's prior-site UX
	where the card mosaic spans the viewport edge to edge.

	All class names use the `innov8-fw-` prefix (mirrors the
	`innov8-hero-` / `innov8-nav-` convention from prior partials so
	the section-scoped rules can't accidentally collide).
	───────────────────────────────────────────────────────────────────── */

@layer components {
	/* ─── Section frame ─────────────────────────────────────────────── */
	.innov8-fw {
		position: relative;
		padding: clamp(48px, 6vw, 88px) 0 clamp(40px, 5vw, 64px);
		background:
			linear-gradient(180deg, transparent 0, rgba(95, 236, 253, 0.02) 50%, transparent 100%), var(--color-ink-1000);
	}

	.innov8-fw-header {
		margin-bottom: clamp(32px, 4vw, 48px);
	}

	.innov8-fw-eyebrow-row {
		margin-bottom: 14px;
	}

	/* ─── Headline with cross-fade ──────────────────────────────────── */
	.innov8-fw-headline {
		position: relative;
		margin: 0;
		max-width: 860px;
		font-family: var(--font-display);
		font-weight: 700;
		font-size: clamp(30px, 3.6vw, 48px);
		line-height: 1.1;
		letter-spacing: 0.01em;
		color: var(--fg-primary);
		text-transform: uppercase;
		text-wrap: balance;
		min-height: 2.4em;
	}

	.innov8-fw-line {
		position: absolute;
		inset: 0;
		display: block;
		transition: opacity 600ms cubic-bezier(0.4, 0, 0.2, 1);
	}

	.innov8-fw-line-a {
		animation: innov8-fw-fade-a 14s ease-in-out infinite;
	}

	.innov8-fw-line-b {
		animation: innov8-fw-fade-b 14s ease-in-out infinite;
	}

	@keyframes innov8-fw-fade-a {
		0%,
		46% {
			opacity: 1;
		}
		50%,
		96% {
			opacity: 0;
		}
		100% {
			opacity: 1;
		}
	}

	@keyframes innov8-fw-fade-b {
		0%,
		46% {
			opacity: 0;
		}
		50%,
		96% {
			opacity: 1;
		}
		100% {
			opacity: 0;
		}
	}

	.innov8-fw-headline:hover .innov8-fw-line,
	.innov8-fw-headline:focus-within .innov8-fw-line {
		animation-play-state: paused;
	}

	@media (prefers-reduced-motion: reduce) {
		.innov8-fw-line {
			animation: none;
		}
		.innov8-fw-line-a {
			opacity: 1;
		}
		.innov8-fw-line-b {
			opacity: 0;
		}
	}

	/* ─── Full-bleed 3×3 grid ────────────────────────────────────────
		`gap: 0` and zero outer padding gives the edge-to-edge mosaic
		feel Mike's prior site had — cards butt up against each other
		with no visible gutter. Responsive: 1 col mobile → 2 col tablet
		→ 3 col desktop. */
	.innov8-fw-grid {
		display: grid;
		grid-template-columns: 1fr;
		gap: 0;
		padding: 0;
	}

	@media (min-width: 640px) {
		.innov8-fw-grid {
			grid-template-columns: repeat(2, 1fr);
		}
	}

	@media (min-width: 1024px) {
		.innov8-fw-grid {
			grid-template-columns: repeat(3, 1fr);
		}
	}

	/* ─── Card — <article> root + stretched-link pattern ─────────────
		`<article>` is CommonMark Type 6 block, so it survives the
		include + markdown pipeline cleanly. (The earlier `<a>` root
		with block children inside caused markdown-it to split the
		card into multiple grid items.) The visible click target is
		the title link, but a `::after` pseudo-element on that link
		absolutely-positions over the whole card area to make all of
		it clickable. No transforms on the card itself, so no
		hover-flicker feedback loops. */
	.innov8-fw-card {
		position: relative;
		display: block;
		background: var(--color-ink-1000);
		isolation: isolate;
	}

	/* ─── Thumbnail container ───────────────────────────────────────── */
	.innov8-fw-thumb {
		position: relative;
		aspect-ratio: 16 / 10;
		overflow: hidden;
		background: #070b18;
	}

	/* The "image" layer.
		Default state: gradient placeholder driven by the per-card tint
		vocabulary (used as a fallback when a case study has no images).
		When the partial renders a real `<img class="innov8-fw-thumb-img">`
		child, the gradient sits behind as an image-fallback safety net
		(visible only if the image fails to load). The parent's
		`transform: scale(1.06)` on hover zooms the image with the layer
		— no separate img-level transform needed. */
	.innov8-fw-thumb-image {
		position: absolute;
		inset: 0;
		background:
			radial-gradient(
				80% 60% at 20% 20%,
				color-mix(in srgb, var(--innov8-fw-tint-a) 67%, transparent) 0%,
				transparent 60%
			),
			radial-gradient(
				80% 60% at 80% 80%,
				color-mix(in srgb, var(--innov8-fw-tint-b) 47%, transparent) 0%,
				transparent 60%
			),
			#070b18;
		transform: scale(1);
		transform-origin: center;
		transition: transform 450ms cubic-bezier(0.2, 0.7, 0.2, 1);
		will-change: transform;
	}

	/* Real-screenshot thumbnail — fills the 16:10 thumb container via
		`object-fit: cover`. The image is the primary visual when present;
		the gradient backdrop on the parent only shows through transparent
		pixels (rare — case-study screenshots are opaque) or if the image
		fails to load. */
	.innov8-fw-thumb-img {
		display: block;
		position: absolute;
		inset: 0;
		width: 100%;
		height: 100%;
		object-fit: cover;
		object-position: center top;
	}

	.innov8-fw-thumb-grid {
		position: absolute;
		inset: 0;
		background-image:
			linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
			linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
		background-size: 40px 40px;
		opacity: 0.5;
		mask-image: radial-gradient(closest-side at 50% 50%, #000 30%, transparent 80%);
		-webkit-mask-image: radial-gradient(closest-side at 50% 50%, #000 30%, transparent 80%);
	}

	/* ─── Always-visible badge + arrow (sit above image, below overlay) */
	.innov8-fw-thumb-badge {
		position: absolute;
		left: 24px;
		top: 24px;
		z-index: 1;
		display: inline-flex;
		align-items: center;
		gap: 8px;
		padding: 5px 10px;
		background: rgba(0, 0, 0, 0.55);
		backdrop-filter: blur(12px);
		-webkit-backdrop-filter: blur(12px);
		border-radius: 999px;
		border: 1px solid rgba(255, 255, 255, 0.1);
		font-family: var(--font-mono);
		font-size: 11px;
		letter-spacing: 0.14em;
		text-transform: uppercase;
		color: var(--fg-secondary);
		transition: opacity 280ms cubic-bezier(0.2, 0.7, 0.2, 1);
	}

	.innov8-fw-thumb-arrow {
		position: absolute;
		right: 20px;
		bottom: 20px;
		z-index: 1;
		width: 56px;
		height: 56px;
		border-radius: 999px;
		background-color: rgba(255, 255, 255, 0.08);
		backdrop-filter: blur(16px);
		-webkit-backdrop-filter: blur(16px);
		border: 1px solid rgba(255, 255, 255, 0.15);
		display: flex;
		align-items: center;
		justify-content: center;
		color: #fff;
		transition:
			transform 280ms cubic-bezier(0.2, 0.7, 0.2, 1),
			background 280ms,
			border-color 280ms,
			opacity 280ms;
	}

	/* Badge fades out on hover so the overlay-title owns the visual.
		 Arrow stays visible but tints cyan + scales up a touch. */
	.innov8-fw-card:hover .innov8-fw-thumb-badge,
	.innov8-fw-card:focus-within .innov8-fw-thumb-badge {
		opacity: 0;
	}

	/* Live badge variant — active-engagement signal for in-development cards.
		 Cyan border + text (accent-spark = "you can do something here" / active).
		 Pulsing dot reinforces the "live right now" reading. Does NOT fade on
		 hover — unlike the standard badge, it stays visible so the signal is
		 never hidden. */
	.innov8-fw-thumb-badge--live {
		color: var(--accent-spark);
		background: rgba(95, 236, 253, 0.14);
		border-color: rgba(95, 236, 253, 0.6);
		gap: 8px;
		/* Layered glow: tight inner halo + soft outer bloom */
		box-shadow:
			0 0 8px rgba(95, 236, 253, 0.5),
			0 0 20px rgba(95, 236, 253, 0.25),
			inset 0 0 8px rgba(95, 236, 253, 0.08);
		text-shadow: 0 0 8px rgba(95, 236, 253, 0.6);
	}

	.innov8-fw-live-dot {
		display: inline-block;
		width: 6px;
		height: 6px;
		border-radius: 50%;
		background: var(--accent-spark);
		box-shadow:
			0 0 6px var(--accent-spark),
			0 0 14px rgba(95, 236, 253, 0.7);
		animation: innov8-fw-live-pulse 1.8s ease-in-out infinite;
		flex-shrink: 0;
	}

	@keyframes innov8-fw-live-pulse {
		0%,
		100% {
			opacity: 1;
			transform: scale(1);
		}
		50% {
			opacity: 0.35;
			transform: scale(0.7);
		}
	}

	/* Override the standard badge fade — live pill stays visible on hover */
	.innov8-fw-card:hover .innov8-fw-thumb-badge--live,
	.innov8-fw-card:focus-within .innov8-fw-thumb-badge--live {
		opacity: 1;
	}

	@media (prefers-reduced-motion: reduce) {
		.innov8-fw-live-dot {
			animation: none;
		}
	}

	.innov8-fw-card:hover .innov8-fw-thumb-arrow,
	.innov8-fw-card:focus-within .innov8-fw-thumb-arrow {
		transform: scale(1.08);
		background: rgba(95, 236, 253, 0.22);
		border-color: rgba(95, 236, 253, 0.5);
	}

	/* ─── Hover overlay — translucent panel with title content ─────── */
	.innov8-fw-thumb-overlay {
		position: absolute;
		inset: 0;
		z-index: 2;
		display: flex;
		align-items: flex-end;
		padding: clamp(24px, 3vw, 36px);
		background: linear-gradient(180deg, rgba(4, 6, 14, 0.18) 0%, rgba(4, 6, 14, 0.7) 55%, rgba(4, 6, 14, 0.92) 100%);
		opacity: 0;
		transition: opacity 320ms cubic-bezier(0.2, 0.7, 0.2, 1);
	}

	.innov8-fw-card:hover .innov8-fw-thumb-overlay,
	.innov8-fw-card:focus-within .innov8-fw-thumb-overlay {
		opacity: 1;
	}

	.innov8-fw-card:hover .innov8-fw-thumb-image,
	.innov8-fw-card:focus-within .innov8-fw-thumb-image {
		transform: scale(1.06);
	}

	.innov8-fw-overlay-content {
		display: flex;
		flex-direction: column;
		gap: 12px;
		max-width: 100%;
	}

	.innov8-fw-overlay-eyebrow {
		display: flex;
		align-items: center;
		flex-wrap: wrap;
		gap: 8px;
		font-family: var(--font-mono);
		font-size: 11px;
		letter-spacing: 0.14em;
		text-transform: uppercase;
		color: var(--fg-tertiary);
	}

	.innov8-fw-overlay-client {
		color: var(--color-cyan-300);
	}

	.innov8-fw-sep {
		color: var(--fg-tertiary);
	}

	.innov8-fw-overlay-title {
		margin: 0;
		font-family: var(--font-display);
		font-weight: 700;
		font-size: clamp(18px, 2vw, 24px);
		line-height: 1.15;
		letter-spacing: 0.015em;
		color: var(--fg-primary);
		text-transform: uppercase;
		text-wrap: balance;
	}

	/* Stretched-link: the visible content is the title text; the
		 ::after pseudo-element covers the entire card. */
	.innov8-fw-overlay-link {
		color: inherit;
		text-decoration: none;
		display: inline-block;
	}

	.innov8-fw-overlay-link::after {
		content: '';
		position: absolute;
		inset: 0;
		z-index: 3;
		pointer-events: auto;
	}

	.innov8-fw-overlay-link:focus-visible {
		outline: none;
	}

	.innov8-fw-overlay-link:focus-visible::after {
		outline: 2px solid var(--color-cyan-300);
		outline-offset: -4px;
	}

	.innov8-fw-overlay-chips {
		display: flex;
		flex-wrap: wrap;
		gap: 6px;
		margin: 4px 0 0;
		padding: 0;
		list-style: none;
	}

	/* Tech chip — amber per the #164 two-accent semantic duality. Tech
		labels are categorical metadata, not interactive elements. The
		background + border tints match the amber color family. Sibling
		surface to .innov8-cs-side-chip (also amber, also tech chips). */
	.innov8-fw-overlay-chip {
		display: inline-flex;
		align-items: center;
		padding: 4px 10px;
		border-radius: 999px;
		background: rgba(245, 166, 35, 0.1);
		border: 1px solid rgba(245, 166, 35, 0.25);
		font-family: var(--font-mono);
		font-size: 10px;
		letter-spacing: 0.08em;
		text-transform: uppercase;
		color: var(--accent-data);
	}

	/* Industry tag in the FW card overlay eyebrow — amber per the #164
		two-accent semantic duality. The client name in the same eyebrow
		stays neutral; only the industry is the categorical-metadata
		signal that warrants the amber treatment. */
	.innov8-fw-overlay-industry {
		color: var(--accent-data);
	}

	/* ─── Reduced motion: skip overlay fade + image zoom; show overlay
			 statically at higher opacity so the title is always visible. */
	@media (prefers-reduced-motion: reduce) {
		.innov8-fw-thumb-image,
		.innov8-fw-card:hover .innov8-fw-thumb-image,
		.innov8-fw-card:focus-within .innov8-fw-thumb-image,
		.innov8-fw-thumb-overlay,
		.innov8-fw-card:hover .innov8-fw-thumb-overlay,
		.innov8-fw-card:focus-within .innov8-fw-thumb-overlay,
		.innov8-fw-thumb-badge,
		.innov8-fw-card:hover .innov8-fw-thumb-badge,
		.innov8-fw-card:focus-within .innov8-fw-thumb-badge,
		.innov8-fw-thumb-arrow,
		.innov8-fw-card:hover .innov8-fw-thumb-arrow,
		.innov8-fw-card:focus-within .innov8-fw-thumb-arrow {
			transition: none;
			transform: none;
		}
		.innov8-fw-thumb-overlay {
			opacity: 1;
			background: linear-gradient(180deg, rgba(4, 6, 14, 0.4) 0%, rgba(4, 6, 14, 0.85) 60%, rgba(4, 6, 14, 0.95) 100%);
		}
		.innov8-fw-thumb-badge {
			opacity: 0;
		}
	}

	/* ─── Footer "View all" link ────────────────────────────────────── */
	.innov8-fw-footer {
		margin-top: clamp(28px, 4vw, 48px);
	}

	.innov8-fw-view-all {
		display: inline-flex;
		align-items: center;
		gap: 10px;
		font-family: var(--font-mono);
		font-size: 15px;
		letter-spacing: 0.04em;
		color: var(--color-cyan-300);
		text-decoration: none;
		transition: gap 220ms cubic-bezier(0.2, 0.7, 0.2, 1);
	}

	.innov8-fw-view-all:hover,
	.innov8-fw-view-all:focus-visible {
		gap: 14px;
		outline: none;
	}

	.innov8-fw-arrow {
		display: inline-block;
		transition: transform 220ms cubic-bezier(0.2, 0.7, 0.2, 1);
	}

	.innov8-fw-view-all:hover .innov8-fw-arrow,
	.innov8-fw-view-all:focus-visible .innov8-fw-arrow {
		transform: translateX(4px);
	}

	@media (prefers-reduced-motion: reduce) {
		.innov8-fw-view-all,
		.innov8-fw-view-all:hover,
		.innov8-fw-view-all:focus-visible,
		.innov8-fw-arrow {
			transition: none;
			transform: none;
		}
	}
}
