/* Neo-modern feature showcase — features.html */

.features-hero {
	position: relative;
	padding: 4rem 0 3.5rem;
	text-align: center;
	overflow: hidden;
	background: var(--page-hero-colorful);
}
.features-hero::before {
	content: '';
	position: absolute;
	inset: 0;
	background:
		radial-gradient(ellipse 80% 60% at 20% 20%, rgba(59, 130, 246, 0.18), transparent 55%),
		radial-gradient(ellipse 70% 50% at 80% 30%, rgba(139, 92, 246, 0.14), transparent 50%),
		radial-gradient(ellipse 60% 40% at 50% 100%, rgba(16, 185, 129, 0.1), transparent 45%);
	pointer-events: none;
}
.features-hero .container { position: relative; z-index: 1; }
.features-hero h1 {
	margin: 0 0 0.75rem;
	font-size: clamp(2rem, 4.5vw, 3rem);
	font-weight: 800;
	letter-spacing: -0.03em;
	line-height: 1.1;
}
.features-hero__lead {
	max-width: 42rem;
	margin: 0 auto 1.75rem;
	color: var(--text-muted);
	font-size: 1.1rem;
}
.features-hero__stats {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 1rem;
	margin-top: 2rem;
}
.features-hero__stat {
	min-width: 120px;
	padding: 0.85rem 1.25rem;
	border-radius: 14px;
	background: color-mix(in srgb, var(--surface-card) 88%, transparent);
	border: 1px solid color-mix(in srgb, var(--border) 80%, var(--brand) 20%);
	box-shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
	backdrop-filter: blur(8px);
}
.features-hero__stat strong {
	display: block;
	font-size: 1.5rem;
	font-weight: 800;
	background: linear-gradient(135deg, var(--brand), #8b5cf6);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	line-height: 1.2;
}
.features-hero__stat span {
	font-size: 0.78rem;
	color: var(--text-muted);
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

/* Sticky category filter */
.feature-filter-bar {
	position: sticky;
	top: 62px;
	z-index: 50;
	padding: 0.85rem 0;
	background: color-mix(in srgb, var(--bg) 92%, transparent);
	backdrop-filter: blur(14px);
	border-bottom: 1px solid var(--border);
}
.feature-filter-bar__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
}
.feature-filter-bar .container {
	display: block;
}
.feature-filter-btn {
	padding: 0.5rem 1.1rem;
	border-radius: 999px;
	border: 1px solid var(--border);
	background: var(--surface-card);
	color: var(--text-muted);
	font-size: 0.85rem;
	font-weight: 700;
	cursor: pointer;
	transition:
		background 0.4s cubic-bezier(0.22, 1, 0.36, 1),
		color 0.4s cubic-bezier(0.22, 1, 0.36, 1),
		border-color 0.4s cubic-bezier(0.22, 1, 0.36, 1),
		box-shadow 0.4s cubic-bezier(0.22, 1, 0.36, 1),
		transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
	font-family: inherit;
}
.feature-filter-btn:hover {
	border-color: color-mix(in srgb, var(--brand) 40%, var(--border));
	color: var(--brand);
	transform: translateY(-1px);
}
.feature-filter-btn.is-active {
	background: linear-gradient(135deg, var(--brand), #6366f1);
	border-color: transparent;
	color: #fff;
	box-shadow: 0 4px 16px color-mix(in srgb, var(--brand) 35%, transparent);
}

/* Bento showcase grid */
.feature-showcase {
	padding: 2.5rem 0 4rem;
}
.feature-showcase__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1.25rem;
	transition:
		opacity 0.38s cubic-bezier(0.22, 1, 0.36, 1),
		transform 0.38s cubic-bezier(0.22, 1, 0.36, 1);
}
.feature-showcase__grid.is-filtering {
	opacity: 0;
	transform: translateY(12px);
	pointer-events: none;
}
.feature-module {
	--mod-accent: var(--brand);
	position: relative;
	display: flex;
	flex-direction: column;
	border-radius: 20px;
	overflow: hidden;
	background: var(--surface-card);
	border: 1px solid color-mix(in srgb, var(--border) 70%, var(--mod-accent) 30%);
	box-shadow:
		0 1px 2px rgba(15, 23, 42, 0.04),
		0 8px 24px rgba(15, 23, 42, 0.06);
	transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s ease, opacity 0.35s ease;
}
.feature-module::before {
	content: '';
	position: absolute;
	inset: 0;
	border-radius: inherit;
	padding: 1px;
	background: linear-gradient(145deg, color-mix(in srgb, var(--mod-accent) 50%, transparent), transparent 55%);
	-webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
	mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
	-webkit-mask-composite: xor;
	mask-composite: exclude;
	pointer-events: none;
	opacity: 0.7;
}
.feature-module:hover {
	transform: translateY(-6px);
	box-shadow:
		0 4px 8px rgba(15, 23, 42, 0.06),
		0 20px 40px color-mix(in srgb, var(--mod-accent) 18%, transparent);
}
.feature-module.is-hidden {
	display: none;
}
.feature-module.is-entering {
	animation: feature-module-enter 0.48s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes feature-module-enter {
	from {
		opacity: 0;
		transform: translateY(18px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@media (prefers-reduced-motion: reduce) {
	.feature-showcase__grid {
		transition: none;
	}
	.feature-module.is-entering {
		animation: none;
	}
}

.feature-module__visual {
	position: relative;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: linear-gradient(135deg, #0f172a, #1e293b);
}
.feature-module__visual img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: top left;
	transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.feature-module:hover .feature-module__visual:not(.img-protect) img {
	transform: scale(1.03);
}
.feature-module:hover .feature-module__visual.img-protect img {
	transform: scale(1.015);
}
.feature-module__visual:not(.img-protect)::after {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, transparent 40%, rgba(15, 23, 42, 0.55) 100%);
	pointer-events: none;
}
.feature-module__icon {
	position: absolute;
	top: 1rem;
	left: 1rem;
	z-index: 5;
	width: 44px;
	height: 44px;
	border-radius: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.35rem;
	background: rgba(255, 255, 255, 0.15);
	backdrop-filter: blur(10px);
	border: 1px solid rgba(255, 255, 255, 0.2);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.feature-module__body {
	padding: 1.35rem 1.5rem 1.5rem;
	flex: 1;
	display: flex;
	flex-direction: column;
}
.feature-module__meta {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin-bottom: 0.6rem;
	flex-wrap: wrap;
}
.feature-module__tag {
	font-size: 0.68rem;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.07em;
	color: var(--mod-accent);
	background: color-mix(in srgb, var(--mod-accent) 12%, var(--surface-card));
	padding: 0.2rem 0.55rem;
	border-radius: 6px;
}
.feature-module__cat {
	font-size: 0.72rem;
	font-weight: 600;
	color: var(--text-muted);
}
.feature-module h3 {
	margin: 0 0 0.5rem;
	font-size: 1.2rem;
	font-weight: 800;
	letter-spacing: -0.02em;
	line-height: 1.25;
}
.feature-module__desc {
	margin: 0 0 1rem;
	font-size: 0.9rem;
	color: var(--text-muted);
	line-height: 1.55;
	flex: 1;
}
.feature-module__chips {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	list-style: none;
	margin: 0;
	padding: 0;
}
.feature-module__chips li {
	font-size: 0.75rem;
	font-weight: 600;
	color: var(--text);
	padding: 0.3rem 0.65rem;
	border-radius: 999px;
	background: var(--bg-soft);
	border: 1px solid var(--border);
}

/* Capability matrix */
.feature-matrix {
	padding: 4rem 0;
	background: var(--bg-soft);
}
.feature-matrix__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1rem;
}
.feature-matrix__col {
	padding: 1.5rem;
	border-radius: 16px;
	background: var(--surface-card);
	border: 1px solid var(--border);
	box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
	transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.feature-matrix__col:hover {
	transform: translateY(-3px);
	box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}
.feature-matrix__col h3 {
	margin: 0 0 1rem;
	font-size: 1rem;
	font-weight: 800;
	display: flex;
	align-items: center;
	gap: 0.5rem;
}
.feature-matrix__col h3::before {
	content: '';
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--matrix-accent, var(--brand));
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--matrix-accent, var(--brand)) 25%, transparent);
}
.feature-matrix__col ul {
	margin: 0;
	padding: 0;
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 0.45rem;
}
.feature-matrix__col li {
	font-size: 0.88rem;
	color: var(--text-muted);
	padding-left: 1.1rem;
	position: relative;
	line-height: 1.4;
}
.feature-matrix__col li::before {
	content: '';
	position: absolute;
	left: 0;
	top: 0.55em;
	width: 5px;
	height: 5px;
	border-radius: 50%;
	background: var(--matrix-accent, var(--brand));
}

[data-theme="dark"] .feature-module {
	background: var(--surface);
}
[data-theme="dark"] .feature-filter-bar {
	background: color-mix(in srgb, var(--bg) 94%, transparent);
}
[data-theme="dark"] .features-hero__stat {
	background: color-mix(in srgb, var(--surface) 90%, transparent);
}

@media (max-width: 991px) {
	.feature-filter-bar {
		top: 0;
		padding: 0.65rem 0;
	}

	.feature-filter-bar__inner {
		justify-content: flex-start;
		overflow-x: auto;
		flex-wrap: nowrap;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
		padding-bottom: 0.15rem;
	}

	.feature-filter-bar__inner::-webkit-scrollbar {
		display: none;
	}

	.feature-filter-btn {
		flex-shrink: 0;
		font-size: 0.8rem;
		padding: 0.45rem 0.95rem;
	}

	.features-hero {
		padding: 2.5rem 0 2rem;
	}

	.feature-showcase {
		padding: 2rem 0 3rem;
	}
}

@media (min-width: 640px) {
	.feature-showcase__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
	.feature-matrix__grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (min-width: 992px) {
	.feature-showcase__grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 1.35rem;
	}
	.feature-matrix__grid {
		grid-template-columns: repeat(3, 1fr);
		gap: 1.25rem;
	}
}
