html {
	scroll-behavior: smooth;
}

:root {
	--mx: 0px;
	--my: 0px;
}

body {
	opacity: 0;
	transition: opacity 0.45s ease;
}

body.ready {
	opacity: 1;
}

.noise {
	position: relative;
}

.noise::before {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
	opacity: 0.08;
	mix-blend-mode: overlay;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='.35'/%3E%3C/svg%3E");
	background-size: 180px 180px;
}

.grid-anim {
	position: relative;
	overflow: hidden;
}

.grid-anim::after {
	content: "";
	position: absolute;
	inset: -40%;
	pointer-events: none;
	background:
		linear-gradient(rgba(16, 185, 129, 0.1) 1px, transparent 1px),
		linear-gradient(90deg, rgba(16, 185, 129, 0.1) 1px, transparent 1px);
	background-size: 48px 48px;
	transform: translate3d(-8%, -8%, 0) rotate(6deg);
	opacity: 0.35;
	mask-image: radial-gradient(
		closest-side,
		rgba(0, 0, 0, 0.9) 0%,
		rgba(0, 0, 0, 0.25) 55%,
		transparent 80%
	);
	animation: grid-drift 18s ease-in-out infinite alternate;
	will-change: transform;
}

@keyframes grid-drift {
	0% {
		transform: translate3d(-10%, -8%, 0) rotate(6deg);
	}

	50% {
		transform: translate3d(-4%, -2%, 0) rotate(5deg);
	}

	100% {
		transform: translate3d(2%, 4%, 0) rotate(4deg);
	}
}

.glass {
	background: rgba(15, 23, 42, 0.8);
	border: 1px solid rgba(51, 65, 85, 0.65);
	backdrop-filter: blur(10px);
}

.hover-card {
	transition:
		transform 0.2s ease,
		box-shadow 0.2s ease,
		border-color 0.2s ease,
		background-color 0.2s ease,
		filter 0.2s ease;
}

.hover-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 20px 45px rgba(15, 23, 42, 0.95);
	border-color: rgba(16, 185, 129, 0.7);
	background-color: rgba(15, 23, 42, 0.92);
}

.hover-btn {
	transition:
		transform 0.18s ease,
		box-shadow 0.18s ease,
		background-color 0.18s ease,
		border-color 0.18s ease,
		filter 0.18s ease;
}

.hover-btn:hover {
	transform: translateY(-2px);
	box-shadow: 0 18px 35px rgba(15, 23, 42, 0.9);
	filter: brightness(1.03);
}

.nav-link {
	position: relative;
}

.nav-link::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: -8px;
	width: 0%;
	height: 2px;
	background: linear-gradient(
		90deg,
		rgba(16, 185, 129, 0.85),
		rgba(45, 212, 191, 0.55),
		transparent
	);
	border-radius: 999px;
	transition: width 0.22s ease;
	opacity: 0.9;
}

.nav-link:hover::after {
	width: 100%;
}

details > summary {
	list-style: none;
}

details > summary::-webkit-details-marker {
	display: none;
}

.collapse-content {
	max-height: 0;
	opacity: 0;
	overflow: hidden;
	transition:
		max-height 0.28s ease,
		opacity 0.22s ease;
}

details[open] .collapse-content {
	max-height: 5000px;
	opacity: 1;
}

#gtranslate_bottom_left {
	position: fixed;
	left: 14px;
	bottom: 14px;
	z-index: 99999;
	background: rgba(15, 23, 42, 0.95);
	border: 1px solid rgba(30, 64, 75, 0.8);
	border-radius: 0.75rem;
	padding: 6px 8px;
	box-shadow: 0 10px 25px rgba(0, 0, 0, 0.45);
	max-width: calc(100vw - 28px);
}

#gtranslate_bottom_left .gt_selector {
	border-radius: 0.5rem !important;
}

@media (max-width: 640px) {
	#gtranslate_bottom_left {
		left: 10px;
		bottom: 10px;
	}
}

.hero-anim {
	position: relative;
	overflow: hidden;
	isolation: isolate;
}

.hero-anim > * {
	position: relative;
	z-index: 2;
}

.hero-anim::before {
	content: "";
	position: absolute;
	inset: -45%;
	z-index: 1;
	background:
		radial-gradient(
			650px 320px at 20% 18%,
			rgba(16, 185, 129, 0.38),
			transparent 60%
		),
		radial-gradient(
			520px 280px at 78% 26%,
			rgba(45, 212, 191, 0.3),
			transparent 60%
		),
		radial-gradient(
			560px 300px at 50% 88%,
			rgba(56, 189, 248, 0.18),
			transparent 60%
		),
		linear-gradient(
			120deg,
			rgba(16, 185, 129, 0.16),
			rgba(45, 212, 191, 0.1),
			rgba(56, 189, 248, 0.08)
		);
	filter: blur(36px);
	opacity: 0.9;
	transform: translate3d(calc(var(--mx) * 0.06), calc(var(--my) * 0.06), 0)
		scale(1.08);
	animation: aurora-drift 14s ease-in-out infinite alternate;
	will-change: transform;
}

.hero-anim::after {
	content: "";
	position: absolute;
	width: 560px;
	height: 560px;
	left: -140px;
	top: -180px;
	z-index: 1;
	background: radial-gradient(
		circle at 30% 30%,
		rgba(16, 185, 129, 0.24),
		transparent 62%
	);
	filter: blur(22px);
	opacity: 0.85;
	transform: translate3d(calc(var(--mx) * 0.08), calc(var(--my) * 0.08), 0);
	animation: blob-float 10.5s ease-in-out infinite;
	will-change: transform;
}

@keyframes aurora-drift {
	0% {
		transform: translate3d(
				calc(var(--mx) * 0.05 - 2%),
				calc(var(--my) * 0.05 - 1%),
				0
			)
			scale(1.06) rotate(-2deg);
	}

	50% {
		transform: translate3d(
				calc(var(--mx) * 0.05 + 1%),
				calc(var(--my) * 0.05 + 2%),
				0
			)
			scale(1.1) rotate(1deg);
	}

	100% {
		transform: translate3d(
				calc(var(--mx) * 0.05 + 3%),
				calc(var(--my) * 0.05 - 2%),
				0
			)
			scale(1.08) rotate(2deg);
	}
}

@keyframes blob-float {
	0% {
		transform: translate3d(
			calc(var(--mx) * 0.08 + 0px),
			calc(var(--my) * 0.08 + 0px),
			0
		);
	}

	50% {
		transform: translate3d(
			calc(var(--mx) * 0.08 + 240px),
			calc(var(--my) * 0.08 + 120px),
			0
		);
	}

	100% {
		transform: translate3d(
			calc(var(--mx) * 0.08 + 460px),
			calc(var(--my) * 0.08 + 20px),
			0
		);
	}
}

.hero-ring {
	position: relative;
}

.hero-ring::before {
	content: "";
	position: absolute;
	inset: -1px;
	border-radius: 1rem;
	padding: 1px;
	background: conic-gradient(
		from 180deg,
		rgba(16, 185, 129, 0),
		rgba(16, 185, 129, 0.65),
		rgba(45, 212, 191, 0.45),
		rgba(56, 189, 248, 0.25),
		rgba(16, 185, 129, 0)
	);
	mask:
		linear-gradient(#000 0 0) content-box,
		linear-gradient(#000 0 0);
	-webkit-mask-composite: xor;
	mask-composite: exclude;
	opacity: 0.65;
	animation: ring-spin 10s linear infinite;
	pointer-events: none;
}

@keyframes ring-spin {
	0% {
		transform: rotate(0deg);
	}

	100% {
		transform: rotate(360deg);
	}
}

.btn-shimmer {
	position: relative;
	overflow: hidden;
}

.btn-shimmer::after {
	content: "";
	position: absolute;
	inset: -30%;
	background: linear-gradient(
		115deg,
		transparent 0%,
		rgba(255, 255, 255, 0.18) 45%,
		transparent 60%
	);
	transform: translateX(-65%);
	animation: shimmer 2.8s ease-in-out infinite;
	pointer-events: none;
}

@keyframes shimmer {
	0% {
		transform: translateX(-75%);
		opacity: 0;
	}

	15% {
		opacity: 0.25;
	}

	55% {
		opacity: 0.18;
	}

	100% {
		transform: translateX(85%);
		opacity: 0;
	}
}

.reveal {
	opacity: 0;
	transform: translateY(14px);
	transition:
		opacity 0.55s ease,
		transform 0.55s ease;
}

.reveal.reveal-in {
	opacity: 1;
	transform: translateY(0);
}

.section-divider {
	height: 1px;
	background: linear-gradient(
		90deg,
		transparent,
		rgba(16, 185, 129, 0.35),
		rgba(56, 189, 248, 0.18),
		transparent
	);
}

.flag-emoji {
	display: inline-flex;
}

.flag-emoji img {
	width: 1em;
	height: 1em;
	display: inline-block;
	vertical-align: -0.15em;
}

#scrollTopBtn {
	position: fixed;
	right: 14px;
	bottom: 14px;
	z-index: 99998;
	opacity: 0;
	transform: translateY(8px);
	pointer-events: none;
	transition:
		opacity 0.25s ease,
		transform 0.25s ease;
}

#scrollTopBtn.show {
	opacity: 1;
	transform: translateY(0);
	pointer-events: auto;
}

@media (max-width: 640px) {
	#scrollTopBtn {
		right: 10px;
		bottom: 72px;
	}
}

.owner-link {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	cursor: pointer;
	padding: 0.15rem 0.25rem;
	border-radius: 0.5rem;
	transition:
		color 0.15s ease,
		background-color 0.15s ease,
		transform 0.15s ease;
}

.owner-link:hover {
	color: rgba(110, 231, 183, 1);
	background: rgba(16, 185, 129, 0.1);
	transform: translateY(-1px);
}

.modal-backdrop {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 18px;
	background: rgba(2, 6, 23, 0.62);
	backdrop-filter: blur(10px);
}

.modal-backdrop.open {
	display: flex;
	animation: fadeIn 0.18s ease-out;
}

.modal-card {
	width: 100%;
	max-width: 880px;
	border-radius: 1rem;
	border: 1px solid rgba(51, 65, 85, 0.75);
	background: rgba(15, 23, 42, 0.92);
	box-shadow: 0 30px 90px rgba(0, 0, 0, 0.55);
	overflow: hidden;
	transform-origin: center;
	animation: zoomIn 0.22s ease-out;
}

.modal-header {
	position: relative;
	padding: 18px 18px 14px;
	border-bottom: 1px solid rgba(51, 65, 85, 0.55);
	background: linear-gradient(
		120deg,
		rgba(16, 185, 129, 0.12),
		rgba(56, 189, 248, 0.06),
		transparent
	);
}

.modal-body {
	padding: 18px;
}

.modal-close {
	position: absolute;
	right: 12px;
	top: 12px;
}

.gif-wrap {
	position: relative;
	overflow: hidden;
	border-radius: 1rem;
	border: 1px solid rgba(51, 65, 85, 0.65);
	background: rgba(2, 6, 23, 0.6);
}

.gif-wrap img {
	width: 100%;
	display: block;
	max-height: 160px;
	object-fit: cover;
	opacity: 0.9;
	filter: saturate(1.05) contrast(1.06);
}

.gif-overlay {
	position: absolute;
	inset: 0;
	pointer-events: none;
	background:
		radial-gradient(
			600px 180px at 20% 20%,
			rgba(16, 185, 129, 0.25),
			transparent 65%
		),
		radial-gradient(
			480px 160px at 85% 30%,
			rgba(56, 189, 248, 0.18),
			transparent 60%
		),
		linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.55));
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	.hero-anim::before,
	.hero-anim::after,
	.grid-anim::after,
	.hero-ring::before,
	.btn-shimmer::after {
		animation: none !important;
	}

	.reveal {
		opacity: 1;
		transform: none;
	}

	.hover-card:hover,
	.hover-btn:hover {
		transform: none;
	}
}
