/* General Reset */
* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

body {

	background-color: #121212;
	background-size: cover;
	font-family: Arial, sans-serif;
	color: white;
	overflow-x: hidden;
	position: relative;
}

#background-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: #001;
	transition: opacity 0.3s ease;
	overflow: hidden;
}

.container {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	text-align: center;
}

.logo {
	width: 200px;
	height: 100px;
	position: relative;
}

.logo svg {
	width: 100%;
	height: 100%;
	stroke: white;
	fill: none;
	stroke-width: 3;
	stroke-dasharray: 380;
	/* Total path length */
	stroke-dashoffset: 0;
	transition: stroke-dashoffset 0.2s ease-in-out;
	z-index: 100;
}

#glow1 {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 250px;
	height: 250px;
	background: rgba(20, 156, 234, 0.5);
	border-radius: 50%;
	transform: translate(-50%, -50%);
	pointer-events: none;
	/* mix-blend-mode: screen; */
	filter: blur(25px);
	z-index: -100;
}

#glow2 {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 350px;
	height: 350px;
	background: rgba(20, 234, 156, 0.2);
	border-radius: 50%;
	transform: translate(-50%, -50%) scale(2);
	pointer-events: none;
	/* mix-blend-mode: screen; */
	filter: blur(20px);
	z-index: -101;
}

.title {
	margin-top: 20px;
	font-size: 24px;
	opacity: 1;
	transition: opacity 0.2s ease-in-out, transform 0.2s ease-in-out;
}

.content {
	position: absolute;
	margin-top: 0px;
	/* This will be updated in the script (based on logo speed) */
	padding-top: 50px;
	top: 100%;
	width: 100%;
	height: 100%;
	text-align: center;
	font-size: 18px;
	opacity: 0;
	transform: translateY(50px);
	transition: opacity 0.5s ease, transform 0.5s ease;
	background-color: #000;
}

.content.active {
	opacity: 1;
	transform: translateY(0);
	padding-top: 100px;
	box-shadow: 0 0 150px 150px rgba(0, 0, 0, 0.5);
}

.slide {
	display: block;
	position: relative;
	overflow-x: visible;
}

.slide::after {
	content: '';
	position: absolute;
	bottom: -10px;
	left: 0;
	width: 100%;
	height: 0.1em;
	background-color: rgb(255, 255, 255);
	opacity: 0;
	transition: opacity 4000ms, transform 4000ms;

	opacity: 1;
	transform: translate3d(-100%, 0, 0);
}


.content.active:has(.slide) .slide::after {
	opacity: 1;
	transform: translate3d(0, 0, 0);
}



::-webkit-scrollbar {
	width: 10px;
}

::-webkit-scrollbar-track {
	background: #2a2a2a;
	/* Dark track */
	border-radius: 10px;
}

::-webkit-scrollbar-thumb {
	background: #505050;
	/* Dark gray thumb */
	border-radius: 10px;
	border: 2px solid #2a2a2a;
	/* Creates space around the thumb */
}

::-webkit-scrollbar-thumb:hover {
	background: #707070;
	/* Lighter gray on hover */
}

/* Firefox Scrollbar */
* {
	scrollbar-color: #505050 #2a2a2a;
	/* thumb and track */
}


/* Graph paper */
.graph-paper {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 700px;
	background-color: transparent;
	background-image:
		repeating-linear-gradient(0deg, transparent, transparent 39px, rgb(105, 105, 105) 1px, rgb(162, 162, 162) 40px),
		repeating-linear-gradient(90deg, transparent, transparent 39px, rgb(105, 105, 105) 1px, rgb(162, 162, 162) 40px);
	opacity: 0;
	transform: translateY(-20px);
	transition: opacity 0.6s ease-out, transform 0.6s ease-out;

	-webkit-mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, rgba(0, 0, 0, 1) 40%, rgba(0, 0, 0, 0) 100%);
	mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, rgba(0, 0, 0, 1) 40%, rgba(0, 0, 0, 0) 100%);
}

.active>.graph-paper {
	opacity: 1;
	transform: translateY(0);
	animation: materialize 1s ease-out;
}

@keyframes materialize {
	0% {
		clip-path: inset(0 0 0 100%);
		/* Starts hidden at the top */
		filter: brightness(5) drop-shadow(0 0 50px rgba(0, 255, 255, 1));
	}

	50% {
		clip-path: inset(0 0 0 50%);
		/* Halfway revealed */
		filter: brightness(4) drop-shadow(0 0 25px rgba(0, 255, 255, 1));
	}

	100% {
		clip-path: inset(0 0 0 0);
		/* Fully visible */
		filter: brightness(1) drop-shadow(0 0 0 rgba(0, 255, 255, 0));
	}
}

/* ===== Mobile Responsiveness (Updated) ===== */
@media (max-width: 768px) {
	.container {
		padding: 20px;
		min-height: 100vh;
		display: flex;
		flex-direction: column;
		justify-content: center; /* <-- This fixes vertical centering */
		align-items: center;
		text-align: center;
	}

	.logo {
		width: 150px;
		height: auto;
		margin-bottom: 20px;
	}

	.title {
		font-size: 20px;
		margin-top: 10px;
		padding: 0 10px;
	}

	.content {
		font-size: 16px;
		padding: 100px 15px 15px 15px;
		height: auto;
		min-height: 100vh; /* Prevents content from being too short */
		overflow-y: auto;
		top: unset;
		position: relative;
		transform: none !important;
		scroll-margin-top: 0px; /* Helps if JS uses scrollIntoView */
	}

	.content.active {
		box-shadow: none;
		padding-top: 100px;
	}

	.graph-paper {
		height: 400px;
		background-size: 40px 40px;
	}

	#glow1,
	#glow2 {
		width: 180px;
		height: 180px;
		transform: translate(-50%, -50%) scale(1.2);
	}

	#glow2 {
		width: 250px;
		height: 250px;
	}

	.slide::after {
		height: 0.08em;
	}

	body {
		overflow-x: hidden;
	}

	p,
	h1,
	h2,
	h3,
	h4 {
		word-break: break-word;
	}

	html,
	body {
		-webkit-overflow-scrolling: touch;
	}
}
