@charset "UTF-8";

:root {
	--bg: #0b1220;
	--panel: #0f182c;
	--card: #121c33;
	--border: rgba(255, 255, 255, 0.08);
	--text: #e8edf7;
	--muted: #9fb1ce;
	--accent: #5eead4;
	--accent-2: #7c9cf5;
	--radius: 14px;
	--shadow: 0 18px 42px rgba(0, 0, 0, 0.38);
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}
}

body {
	margin: 0;
	background: linear-gradient(180deg, #0c1527 0%, #0b1220 45%, #0a101d 100%);
	color: var(--text);
	font-family: "Manrope", "Inter", system-ui, -apple-system, sans-serif;
	line-height: 1.75;
	letter-spacing: 0.01em;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
	line-height: 1.3;
	letter-spacing: -0.02em;
	font-weight: 700;
	margin: 0;
}

h1 {
	font-size: clamp(2.2rem, 5vw, 3.5rem);
	margin-bottom: 1.5rem;
}

h2 {
	font-size: clamp(1.9rem, 4vw, 2.8rem);
	margin-bottom: 1.2rem;
}

h3 {
	font-size: clamp(1.2rem, 3vw, 1.5rem);
	margin-bottom: 0.8rem;
}

p {
	line-height: 1.8;
	letter-spacing: 0.012em;
}

a {
	color: inherit;
	text-decoration: none;
	transition: color 150ms ease, opacity 150ms ease;
}

a:hover {
	color: var(--accent);
}

/* Improved focus indicators for keyboard navigation */
a:focus-visible,
button:focus-visible,
.btn:focus-visible,
.nav-links a:focus-visible {
	outline: 3px solid var(--accent);
	outline-offset: 3px;
	border-radius: 4px;
}

a:focus:not(:focus-visible),
button:focus:not(:focus-visible) {
	outline: none;
}

img {
	display: block;
	width: 100%;
	border-radius: calc(var(--radius) - 6px);
}

/* Image loading states */
img.loaded {
	animation: fadeIn 0.3s ease;
}

img.error {
	opacity: 0.5;
	filter: grayscale(100%);
}

/* Skeleton loader */
.skeleton {
	background: linear-gradient(
		90deg,
		rgba(255, 255, 255, 0.03) 0%,
		rgba(255, 255, 255, 0.08) 50%,
		rgba(255, 255, 255, 0.03) 100%
	);
	background-size: 200% 100%;
	animation: shimmer 1.5s ease-in-out infinite;
	border-radius: var(--radius);
}

.skeleton-card {
	min-height: 400px;
	background: var(--card);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	overflow: hidden;
}

.skeleton-card__image {
	height: 200px;
	background: linear-gradient(
		90deg,
		rgba(255, 255, 255, 0.04) 0%,
		rgba(255, 255, 255, 0.1) 50%,
		rgba(255, 255, 255, 0.04) 100%
	);
	background-size: 200% 100%;
	animation: shimmer 1.5s ease-in-out infinite;
}

.skeleton-card__body {
	padding: 1rem;
	display: flex;
	flex-direction: column;
	gap: 0.8rem;
}

.skeleton-text {
	height: 1em;
	background: rgba(255, 255, 255, 0.05);
	border-radius: 4px;
	background: linear-gradient(
		90deg,
		rgba(255, 255, 255, 0.04) 0%,
		rgba(255, 255, 255, 0.08) 50%,
		rgba(255, 255, 255, 0.04) 100%
	);
	background-size: 200% 100%;
	animation: shimmer 1.5s ease-in-out infinite;
}

.skeleton-text.short {
	width: 60%;
}

.skeleton-text.medium {
	width: 80%;
}

@keyframes shimmer {
	0% {
		background-position: -200% 0;
	}
	100% {
		background-position: 200% 0;
	}
}

.container {
	width: min(1200px, 100% - 2.4rem);
	margin: 0 auto;
}

/* Skip to main content link for accessibility */
.skip-link {
	position: absolute;
	top: -100px;
	left: 0;
	background: var(--accent);
	color: #051022;
	padding: 0.75rem 1.5rem;
	font-weight: 700;
	border-radius: 0 0 8px 0;
	z-index: 1000;
	transition: top 0.3s ease;
}

.skip-link:focus {
	top: 0;
}

/* Screen reader only content */
.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border-width: 0;
}

/* Back to top button */
.back-to-top {
	position: fixed;
	bottom: 2rem;
	right: 2rem;
	width: 50px;
	height: 50px;
	border-radius: 50%;
	background: linear-gradient(135deg, var(--accent), var(--accent-2));
	border: none;
	color: #051022;
	cursor: pointer;
	opacity: 0;
	visibility: hidden;
	transform: translateY(10px);
	transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
	box-shadow: 0 12px 32px rgba(94, 234, 212, 0.26);
	z-index: 100;
	display: flex;
	align-items: center;
	justify-content: center;
}

.back-to-top.visible {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.back-to-top:hover {
	transform: translateY(-3px);
	box-shadow: 0 16px 40px rgba(94, 234, 212, 0.32);
}

.back-to-top:active {
	transform: translateY(-1px);
}

.back-to-top svg {
	display: block;
}

/* HERO */
.hero {
	position: relative;
	padding: 2.6rem 0 3.2rem;
	overflow: hidden;
}

/* Video Background Container (z-index: 0) */
.hero__video-bg {
	position: absolute;
	inset: 0;
	z-index: 0;
	overflow: hidden;
}

.hero__video {
	position: absolute;
	top: 50%;
	left: 50%;
	min-width: 100%;
	min-height: 100%;
	width: auto;
	height: auto;
	transform: translate(-50%, -50%);
	object-fit: cover;
	filter: saturate(1.1) brightness(0.9);
}

/* Fallback image if video fails */
.hero__background-fallback {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	filter: saturate(1.1) brightness(1.05);
	border-radius: 0;
}

/* Lighter overlay for video visibility (z-index: 1) */
.hero__video-overlay {
	position: absolute;
	inset: 0;
	z-index: 1;
	background: linear-gradient(
		120deg,
		rgba(11, 18, 32, 0.55) 0%,
		rgba(11, 18, 32, 0.35) 30%,
		rgba(11, 18, 32, 0.25) 60%,
		rgba(11, 18, 32, 0.50) 100%
	);
	pointer-events: none;
}

/* Animated gradient layer on video overlay */
.hero__video-overlay::before {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(
		135deg,
		rgba(94, 234, 212, 0.08) 0%,
		transparent 40%,
		transparent 60%,
		rgba(124, 156, 245, 0.08) 100%
	);
	z-index: 2;
	animation: gradientShift 8s ease-in-out infinite alternate;
}

/* Star Particles Canvas (z-index: 2) */
.hero__particles {
	position: absolute;
	inset: 0;
	z-index: 2;
	pointer-events: none;
	opacity: 0.85;
	mix-blend-mode: screen;
}

@keyframes gradientShift {
	0% {
		opacity: 0.7;
		transform: translateX(0%);
	}
	100% {
		opacity: 0.9;
		transform: translateX(5%);
	}
}

.hero > *:not(.hero__video-bg):not(.hero__particles):not(.hero__pattern) {
	position: relative;
	z-index: 5;
}

/* Animated Geometric Pattern Overlay */
.hero__pattern {
	position: absolute;
	inset: 0;
	z-index: 3;
	overflow: hidden;
	pointer-events: none;
	opacity: 0.45;
}

.pattern-shape {
	position: absolute;
	border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
	background: linear-gradient(135deg,
		rgba(94, 234, 212, 0.6),    /* Bright teal */
		rgba(59, 130, 246, 0.5),    /* Vibrant blue */
		rgba(168, 85, 247, 0.4));   /* Purple accent */
	filter: blur(25px);
	animation: morphShape 20s ease-in-out infinite;
}

.pattern-shape--1 {
	width: 350px;
	height: 350px;
	top: 10%;
	left: 5%;
	animation-delay: 0s;
	animation-duration: 25s;
}

.pattern-shape--2 {
	width: 400px;
	height: 400px;
	top: 40%;
	right: 10%;
	animation-delay: -5s;
	animation-duration: 30s;
}

.pattern-shape--3 {
	width: 280px;
	height: 280px;
	bottom: 15%;
	left: 25%;
	animation-delay: -10s;
	animation-duration: 28s;
}

.pattern-shape--4 {
	width: 320px;
	height: 320px;
	top: 25%;
	left: 45%;
	animation-delay: -15s;
	animation-duration: 35s;
}

.pattern-shape--5 {
	width: 250px;
	height: 250px;
	top: 60%;
	right: 30%;
	animation-delay: -20s;
	animation-duration: 22s;
}

@keyframes morphShape {
	0%, 100% {
		border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
		transform: translate(0, 0) rotate(0deg) scale(1);
	}
	25% {
		border-radius: 58% 42% 75% 25% / 76% 46% 54% 24%;
		transform: translate(30px, -30px) rotate(90deg) scale(1.1);
	}
	50% {
		border-radius: 50% 50% 33% 67% / 55% 27% 73% 45%;
		transform: translate(-20px, 40px) rotate(180deg) scale(0.9);
	}
	75% {
		border-radius: 33% 67% 58% 42% / 63% 68% 32% 37%;
		transform: translate(40px, 20px) rotate(270deg) scale(1.05);
	}
}

/* Scroll Down Indicator */
.scroll-indicator {
	position: absolute;
	bottom: 2rem;
	left: 50%;
	transform: translateX(-50%);
	z-index: 10;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.5rem;
	padding: 0.8rem 1.2rem;
	background: rgba(11, 18, 32, 0.6);
	backdrop-filter: blur(12px);
	border: 1px solid rgba(255, 255, 255, 0.15);
	border-radius: 999px;
	color: var(--accent);
	cursor: pointer;
	transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
	animation: float 2.5s ease-in-out infinite;
}

.scroll-indicator:hover {
	background: rgba(11, 18, 32, 0.8);
	border-color: var(--accent);
	transform: translateX(-50%) translateY(-4px);
	box-shadow: 0 8px 24px rgba(94, 234, 212, 0.3);
}

.scroll-indicator__text {
	font-size: 0.85rem;
	font-weight: 600;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}

.scroll-indicator__arrow {
	width: 20px;
	height: 20px;
	animation: bounce 2s ease-in-out infinite;
}

@keyframes float {
	0%, 100% {
		transform: translateX(-50%) translateY(0);
	}
	50% {
		transform: translateX(-50%) translateY(-8px);
	}
}

@keyframes bounce {
	0%, 100% {
		transform: translateY(0);
	}
	50% {
		transform: translateY(4px);
	}
}

/* Hide scroll indicator when scrolled */
.scroll-indicator.hidden {
	opacity: 0;
	pointer-events: none;
	transform: translateX(-50%) translateY(20px);
}

.top-nav {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0.5rem 0 1.2rem;
}

.logo {
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	font-size: 1.05rem;
	color: #fff;
	text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8),
	             0 1px 4px rgba(0, 0, 0, 0.9);
	padding: 0.5rem 0.8rem;
	background: rgba(11, 18, 32, 0.4);
	backdrop-filter: blur(8px);
	border-radius: 8px;
	border: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-links {
	display: flex;
	gap: 0.7rem;
	flex-wrap: wrap;
	background: rgba(11, 18, 32, 0.3);
	backdrop-filter: blur(8px);
	padding: 0.4rem;
	border-radius: 999px;
	border: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-links a {
	padding: 0.42rem 0.85rem;
	border-radius: 999px;
	border: 1px solid transparent;
	font-weight: 600;
	color: #e8edf7;
	text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
	transition: all 200ms ease;
}

.nav-links a:hover {
	border-color: rgba(255, 255, 255, 0.22);
	background: rgba(255, 255, 255, 0.12);
	text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

/* Mobile Menu Button */
.mobile-menu-btn {
	display: none;
	flex-direction: column;
	gap: 4px;
	width: 40px;
	height: 40px;
	padding: 8px;
	border: 1px solid rgba(255, 255, 255, 0.1);
	background: rgba(11, 18, 32, 0.4);
	backdrop-filter: blur(8px);
	border-radius: 8px;
	cursor: pointer;
	z-index: 1001;
}

.mobile-menu-btn span {
	display: block;
	width: 100%;
	height: 2px;
	background: var(--text);
	transition: transform 0.3s ease, opacity 0.3s ease;
	border-radius: 2px;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

.mobile-menu-btn[aria-expanded="true"] span:nth-child(1) {
	transform: translateY(6px) rotate(45deg);
}

.mobile-menu-btn[aria-expanded="true"] span:nth-child(2) {
	opacity: 0;
}

.mobile-menu-btn[aria-expanded="true"] span:nth-child(3) {
	transform: translateY(-6px) rotate(-45deg);
}

/* Mobile Menu */
.mobile-menu {
	position: fixed;
	inset: 0;
	z-index: 1000;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-menu[hidden] {
	display: none;
}

.mobile-menu.active {
	opacity: 1;
	visibility: visible;
}

.mobile-menu__overlay {
	position: absolute;
	inset: 0;
	background: rgba(11, 18, 32, 0.9);
	backdrop-filter: blur(4px);
}

.mobile-menu__panel {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	width: 280px;
	max-width: 85%;
	background: var(--panel);
	border-left: 1px solid var(--border);
	padding: 2rem 1.5rem;
	transform: translateX(100%);
	transition: transform 0.3s ease;
	overflow-y: auto;
}

.mobile-menu.active .mobile-menu__panel {
	transform: translateX(0);
}

.mobile-menu__close {
	position: absolute;
	top: 1rem;
	right: 1rem;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	border: none;
	background: rgba(255, 255, 255, 0.1);
	color: var(--text);
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
	transition: background 0.2s ease;
}

.mobile-menu__close:hover {
	background: rgba(255, 255, 255, 0.2);
}

.mobile-menu__links {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	margin-top: 3rem;
}

.mobile-menu__link {
	display: block;
	padding: 1rem;
	border-radius: var(--radius);
	color: var(--text);
	font-weight: 600;
	font-size: 1.1rem;
	text-decoration: none;
	transition: background 0.2s ease, color 0.2s ease;
}

.mobile-menu__link:hover {
	background: rgba(255, 255, 255, 0.08);
	color: var(--accent);
}

.hero__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 1.8rem;
	align-items: center;
}

.hero__copy {
	padding: 1.5rem;
	background: rgba(11, 18, 32, 0.6);
	backdrop-filter: blur(12px);
	border-radius: var(--radius);
	border: 1px solid rgba(255, 255, 255, 0.1);
}

.hero__copy h1 {
	font-size: clamp(2.2rem, 4vw, 3.2rem);
	line-height: 1.12;
	margin: 0.35rem 0 0.85rem;
	color: #fff;
	text-shadow: 0 2px 12px rgba(0, 0, 0, 0.8),
	             0 4px 24px rgba(0, 0, 0, 0.6);
}

.eyebrow {
	color: var(--accent);
	text-transform: uppercase;
	letter-spacing: 0.12em;
	font-size: 0.8rem;
	font-weight: 700;
	margin: 0 0 0.45rem;
	text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

.lede {
	max-width: 34rem;
	color: #e8edf7;
	margin: 0 0 1.2rem;
	text-shadow: 0 1px 8px rgba(0, 0, 0, 0.8);
}

.hero__actions {
	display: flex;
	gap: 0.75rem;
	flex-wrap: wrap;
	margin-bottom: 0.8rem;
}

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.35rem;
	padding: 0.65rem 1.05rem;
	border-radius: 12px;
	font-weight: 700;
	border: 1px solid var(--border);
	background: rgba(255, 255, 255, 0.05);
	color: #fff;
	box-shadow: 0 12px 28px rgba(0, 0, 0, 0.32);
	transition: transform 200ms cubic-bezier(0.4, 0, 0.2, 1),
	            box-shadow 200ms ease,
	            background 200ms ease;
	position: relative;
	overflow: hidden;
	cursor: pointer;
}

.btn::before {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	width: 0;
	height: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.15);
	transform: translate(-50%, -50%);
	transition: width 0.5s ease, height 0.5s ease;
}

.btn:active::before {
	width: 250px;
	height: 250px;
}

.btn.primary {
	background: linear-gradient(135deg, var(--accent), var(--accent-2));
	color: #051022;
	border: none;
	box-shadow: 0 12px 32px rgba(94, 234, 212, 0.26);
}

.btn.primary:hover {
	transform: translateY(-2px) scale(1.02);
	box-shadow: 0 16px 40px rgba(94, 234, 212, 0.4),
	            0 0 20px rgba(94, 234, 212, 0.2);
	filter: brightness(1.1);
}

.btn.primary:active {
	transform: translateY(0) scale(0.98);
}

.btn.ghost {
	background: rgba(255, 255, 255, 0.08);
	color: #e6ebf5;
	backdrop-filter: blur(10px);
}

.btn.ghost:hover {
	background: rgba(255, 255, 255, 0.15);
	border-color: rgba(94, 234, 212, 0.3);
	transform: translateY(-2px);
	box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.btn.ghost:active {
	transform: translateY(0) scale(0.98);
}

.btn.small {
	padding: 0.48rem 0.8rem;
	font-size: 0.95rem;
}

.pill-row {
	display: flex;
	gap: 0.55rem;
	flex-wrap: wrap;
	margin-top: 0.4rem;
}

.pill {
	border-radius: 999px;
	border: 1px solid rgba(94, 234, 212, 0.2);
	padding: 0.4rem 0.8rem;
	background: rgba(11, 18, 32, 0.6);
	backdrop-filter: blur(8px);
	font-size: 0.9rem;
	color: #e8edf7;
	text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

.feature-card {
	background: rgba(11, 18, 32, 0.7);
	border: 1px solid rgba(255, 255, 255, 0.15);
	border-radius: var(--radius);
	padding: 1.1rem;
	box-shadow: var(--shadow);
	backdrop-filter: blur(12px);
}

.feature-card h3,
.feature-card p {
	text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

.feature-card h3 {
	margin: 0.25rem 0 0.4rem;
}

.feature-card p {
	margin: 0.25rem 0 0.6rem;
	color: var(--muted);
}

.feature-actions {
	display: flex;
	gap: 0.5rem;
	flex-wrap: wrap;
	margin: 0.8rem 0 0.9rem;
}

.feature-thumb {
	border-radius: var(--radius);
	overflow: hidden;
	border: 1px solid var(--border);
}

.feature-thumb img {
	border-radius: 0;
}

/* MAIN */
main {
	background: transparent;
}

/* Library Controls */
.library-controls {
	margin-bottom: 2rem;
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.search-wrapper {
	width: 100%;
}

.search-input {
	width: 100%;
	max-width: 500px;
	padding: 0.75rem 1rem;
	border-radius: var(--radius);
	border: 1px solid var(--border);
	background: var(--card);
	color: var(--text);
	font-family: inherit;
	font-size: 1rem;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-input:focus {
	outline: none;
	border-color: var(--accent);
	box-shadow: 0 0 0 3px rgba(94, 234, 212, 0.1);
}

.search-input::placeholder {
	color: var(--muted);
}

.filter-tags {
	display: flex;
	gap: 0.5rem;
	flex-wrap: wrap;
}

.filter-btn {
	padding: 0.5rem 1rem;
	border-radius: 999px;
	border: 1px solid var(--border);
	background: rgba(255, 255, 255, 0.05);
	color: var(--text);
	font-family: inherit;
	font-size: 0.9rem;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.2s ease;
}

.filter-btn:hover {
	background: rgba(255, 255, 255, 0.08);
	border-color: rgba(94, 234, 212, 0.3);
}

.filter-btn.active {
	background: linear-gradient(135deg, var(--accent), var(--accent-2));
	color: #051022;
	border-color: transparent;
}

.filter-btn:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 2px;
}

/* No results message */
.no-results {
	text-align: center;
	padding: 3rem 1rem;
	color: var(--muted);
}

.no-results p {
	font-size: 1.2rem;
	margin-bottom: 1rem;
}

/* Card filtering animations with stagger */
.card.hidden {
	display: none;
}

.card.filtering {
	animation: fadeOut 0.25s cubic-bezier(0.4, 0, 1, 1) forwards;
}

.card.showing {
	animation: fadeInStagger 0.4s cubic-bezier(0, 0, 0.2, 1) forwards;
}

/* Stagger delay for cards (applied via JS or CSS) */
.grid .card:nth-child(1) { animation-delay: 0ms; }
.grid .card:nth-child(2) { animation-delay: 50ms; }
.grid .card:nth-child(3) { animation-delay: 100ms; }
.grid .card:nth-child(4) { animation-delay: 150ms; }
.grid .card:nth-child(5) { animation-delay: 200ms; }
.grid .card:nth-child(6) { animation-delay: 250ms; }
.grid .card:nth-child(7) { animation-delay: 300ms; }
.grid .card:nth-child(8) { animation-delay: 350ms; }
.grid .card:nth-child(9) { animation-delay: 400ms; }
.grid .card:nth-child(10) { animation-delay: 450ms; }

@keyframes fadeOut {
	from {
		opacity: 1;
		transform: scale(1);
	}
	to {
		opacity: 0;
		transform: scale(0.92) translateY(-10px);
	}
}

@keyframes fadeInStagger {
	from {
		opacity: 0;
		transform: scale(0.9) translateY(30px);
	}
	to {
		opacity: 1;
		transform: scale(1) translateY(0);
	}
}

.section-header {
	padding: 2.6rem 0 1.2rem;
	text-align: left;
}

.section-header h2 {
	font-size: clamp(1.9rem, 3vw, 2.4rem);
	margin: 0.35rem 0 0.45rem;
	color: #fff;
}

.section-header .muted {
	color: var(--muted);
	max-width: 36rem;
}

.grid {
	display: grid;
	gap: 1.35rem;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	padding-bottom: 3rem;
}

.card {
	background: var(--card);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	box-shadow: 0 12px 26px rgba(0, 0, 0, 0.35);
	transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1),
	            border-color 250ms ease,
	            box-shadow 300ms cubic-bezier(0.4, 0, 0.2, 1);
	position: relative;
}

.card::before {
	content: '';
	position: absolute;
	inset: 0;
	border-radius: var(--radius);
	padding: 1px;
	background: linear-gradient(135deg, transparent, rgba(94, 234, 212, 0.1));
	-webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
	-webkit-mask-composite: xor;
	mask-composite: exclude;
	opacity: 0;
	transition: opacity 300ms ease;
	pointer-events: none;
}

.card:hover {
	transform: translateY(-8px) scale(1.02);
	border-color: rgba(94, 234, 212, 0.6);
	box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5),
	            0 0 0 1px rgba(94, 234, 212, 0.1),
	            0 0 30px rgba(94, 234, 212, 0.15);
}

.card:hover::before {
	opacity: 1;
}

.card__image {
	overflow: hidden;
	position: relative;
}

.card__image::after {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, transparent 0%, rgba(11, 18, 32, 0.3) 100%);
	opacity: 0;
	transition: opacity 300ms ease;
}

.card:hover .card__image::after {
	opacity: 1;
}

.card__image img {
	height: 200px;
	object-fit: cover;
	border-radius: 0;
	transition: transform 400ms cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover .card__image img {
	transform: scale(1.08);
}

/* Dynamic color theming from thumbnails */
.card.has-dynamic-color {
	border-color: rgba(var(--card-accent), 0.3);
}

.card.has-dynamic-color::before {
	background: linear-gradient(135deg, transparent, rgba(var(--card-accent), 0.15));
}

.card.has-dynamic-color:hover {
	border-color: rgba(var(--card-accent), 0.7);
	box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5),
	            0 0 0 1px rgba(var(--card-accent), 0.2),
	            0 0 40px rgba(var(--card-accent), 0.3);
}

.card__body {
	padding: 1rem;
	display: flex;
	flex-direction: column;
	gap: 0.45rem;
	flex: 1;
}

.card__meta {
	font-size: 0.85rem;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--muted);
}

.card h3 {
	margin: 0;
	font-size: 1.15rem;
	color: #fff;
}

.card p {
	margin: 0;
	color: #d7e0ef;
}

.card__actions {
	display: flex;
	gap: 0.45rem;
	flex-wrap: wrap;
	margin-top: auto;
	justify-content: center;
}

/* FOOTER */
.footer {
	border-top: 1px solid var(--border);
	background: #0c1222;
	padding: 2.5rem 0 2rem;
}

.footer__layout {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	flex-wrap: wrap;
	align-items: flex-start;
}

.footer h3 {
	margin: 0.2rem 0 0.5rem;
}

.social {
	display: flex;
	gap: 0.65rem;
	flex-wrap: wrap;
}

.social a {
	width: 46px;
	height: 46px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	border: 1px solid var(--border);
	color: #e6ebf5;
	transition: background 250ms cubic-bezier(0.4, 0, 0.2, 1),
	            transform 250ms cubic-bezier(0.4, 0, 0.2, 1),
	            color 250ms ease,
	            box-shadow 250ms ease;
	position: relative;
}

.social a::before {
	content: '';
	position: absolute;
	inset: -4px;
	border-radius: 50%;
	background: radial-gradient(circle, rgba(94, 234, 212, 0.3), transparent 70%);
	opacity: 0;
	transition: opacity 300ms ease;
}

.social a:hover {
	background: rgba(255, 255, 255, 0.1);
	transform: translateY(-4px) scale(1.1);
	color: var(--accent);
	box-shadow: 0 8px 20px rgba(94, 234, 212, 0.3);
}

.social a:hover::before {
	opacity: 1;
	animation: pulse 1.5s ease-in-out infinite;
}

.social a:active {
	transform: translateY(-2px) scale(1.05);
}

@keyframes pulse {
	0%, 100% {
		transform: scale(1);
		opacity: 0.6;
	}
	50% {
		transform: scale(1.2);
		opacity: 0;
	}
}

.footer__note {
	margin-top: 1.2rem;
	color: var(--muted);
	font-size: 0.95rem;
}

/* SVG social icon styling */
.social-icon svg {
	display: block;
}

/* Video Modal */
.video-modal {
	position: fixed;
	inset: 0;
	z-index: 1000;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;
}

.video-modal[hidden] {
	display: none;
}

.video-modal.active {
	opacity: 1;
	visibility: visible;
}

.video-modal__overlay {
	position: absolute;
	inset: 0;
	background: rgba(11, 18, 32, 0.95);
	backdrop-filter: blur(8px);
	cursor: pointer;
}

.video-modal__content {
	position: relative;
	z-index: 1;
	width: 90%;
	max-width: 1200px;
	background: var(--card);
	border-radius: var(--radius);
	padding: 2rem;
	border: 1px solid var(--border);
	box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6);
	transform: scale(0.95);
	transition: transform 0.3s ease;
}

.video-modal.active .video-modal__content {
	transform: scale(1);
}

.video-modal__close {
	position: absolute;
	top: 1rem;
	right: 1rem;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	border: none;
	background: rgba(255, 255, 255, 0.1);
	color: var(--text);
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
	transition: background 0.2s ease, transform 0.2s ease;
	z-index: 2;
}

.video-modal__close:hover {
	background: rgba(255, 255, 255, 0.2);
	transform: rotate(90deg);
}

.video-modal__close:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 2px;
}

.video-wrapper {
	position: relative;
	padding-bottom: 56.25%; /* 16:9 aspect ratio */
	height: 0;
	overflow: hidden;
	border-radius: calc(var(--radius) - 4px);
}

.video-wrapper iframe {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	border-radius: calc(var(--radius) - 4px);
}

@media (max-width: 720px) {
	/* Disable video on mobile to save bandwidth/battery */
	.hero__video {
		display: none;
	}

	/* Show fallback image on mobile */
	.hero__background-fallback {
		display: block;
	}

	/* Reduce particle opacity on mobile */
	.hero__particles {
		opacity: 0.6;
	}

	.top-nav {
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
	}

	.nav-links {
		display: none;
	}

	.mobile-menu-btn {
		display: flex;
		/* Larger touch target for mobile */
		min-width: 44px;
		min-height: 44px;
	}

	.hero {
		padding-bottom: 2.2rem;
	}

	.hero h1 {
		font-size: clamp(1.8rem, 8vw, 2.5rem);
	}

	.hero p {
		font-size: 1rem;
		line-height: 1.7;
	}

	/* Better touch targets for buttons */
	.btn {
		min-height: 44px;
		padding: 0.75rem 1.2rem;
		font-size: 1rem;
	}

	.btn.small {
		min-height: 40px;
		padding: 0.6rem 1rem;
	}

	/* Enhanced card spacing on mobile */
	.grid {
		gap: 1.5rem;
		padding-bottom: 2rem;
	}

	.card {
		/* Reduce hover effect on mobile for better performance */
		transition: transform 200ms ease, border-color 200ms ease;
	}

	.card:active {
		transform: scale(0.98);
	}

	.card__image img {
		height: 180px;
	}

	.card__body {
		padding: 1.2rem;
	}

	/* Larger touch targets for filter buttons */
	.filter-btn {
		min-height: 40px;
		padding: 0.6rem 1rem;
		font-size: 0.95rem;
	}

	.filter-tags {
		justify-content: center;
		gap: 0.6rem;
	}

	/* Better search input on mobile */
	.search-input {
		padding: 0.85rem 1rem;
		font-size: 16px; /* Prevents zoom on iOS */
	}

	/* Social icons - larger touch targets */
	.social a {
		width: 50px;
		height: 50px;
	}

	.social a svg {
		width: 22px;
		height: 22px;
	}

	/* Video modal adjustments */
	.video-modal__content {
		width: 95%;
		padding: 1.5rem 1rem;
	}

	.video-modal__close {
		top: 0.5rem;
		right: 0.5rem;
		min-width: 44px;
		min-height: 44px;
	}

	/* Section spacing improvements */
	.section-header {
		padding: 2rem 0 1rem;
	}

	.container {
		width: min(1200px, 100% - 1.5rem);
	}

	/* Back to top button */
	#back-to-top {
		width: 50px;
		height: 50px;
		bottom: 1.5rem;
		right: 1.5rem;
	}

	/* Feature card mobile layout */
	.feature-card {
		padding: 1rem;
	}

	.feature-content {
		gap: 1rem;
	}

	/* Scroll indicator mobile */
	.scroll-indicator {
		bottom: 1rem;
		padding: 0.7rem 1rem;
	}

	.scroll-indicator__text {
		font-size: 0.75rem;
	}

	.scroll-indicator__arrow {
		width: 18px;
		height: 18px;
	}
}

/* Accessibility: Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
	/* Disable video for reduced motion */
	.hero__video {
		display: none;
	}

	/* Show fallback image */
	.hero__background-fallback {
		display: block;
	}

	/* Disable particles for reduced motion */
	.hero__particles {
		display: none;
	}

	/* Disable all animations */
	.hero__video-overlay::before {
		animation: none;
	}

	.pattern-shape {
		animation: none;
	}
}
