/* The header, shared by every page.
   One file per section; each screen size has its block below. */

/* Laptop and desktop */
@media screen and (min-width: 1025px) {
	.header {
		position: fixed;
		top: 0;
		z-index: 20;
		display: flex;
		align-items: center;
		justify-content: space-between;
		width: 100%;
		border-bottom: 1px solid rgba(255, 255, 255, 0.16);
		box-shadow: 0 1rem 2.5rem rgba(0, 0, 0, 0.16), inset 0 1px rgba(255, 255, 255, 0.12);
		transition: all 0.2s ease-in;

		.site-logo {
			color: #fff;
			font-family: "Poppins", sans-serif;
			font-size: 1.5rem;
			font-weight: 600;
			letter-spacing: 0.16em;
			text-decoration: none;
			transition: all 0.2s ease-in;

			span { color: #a9ffbf; }
		}

		.desktop-nav {
			display: flex;
			align-items: center;
			gap: clamp(1rem, 3vw, 2.8rem);

			a {
				padding: 0.2rem;
				color: rgba(255, 255, 255, 0.7);
				font-family: "Poppins", sans-serif;
				font-size: 1rem;
				text-decoration: none;
				transition: all 0.2s ease;

				&:hover,
				&:focus-visible { color: #fff; }
			}
		}

		.menu-toggle,
		.mobile-nav { display: none; }

		&::before {
			content: "";
			position: absolute;
			inset: 0;
			background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 300 300' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.65' numOctaves='4'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23noise)'/%3E%3C/svg%3E");
			opacity: 0.5;
			mix-blend-mode: soft-light;
			pointer-events: none;
		}
		&::after {
			content: "";
			position: absolute;
			inset: 0;
			background: linear-gradient(
				120deg,
				rgba(255, 255, 255, 0.18),
				transparent 25%,
				transparent 70%,
				rgba(255, 255, 255, 0.04)
			);
			opacity: 0.5;
			pointer-events: none;
		}
	}

	.section-anchor {
		display: block;
		position: relative;
		top: -6rem;
		width: 0;
		height: 0;
	}

	.header-active {
		background: rgba(8, 8, 8, 0.75);
		backdrop-filter: blur(10px);
		-webkit-backdrop-filter: blur(18px);
		padding: 0.3rem 3.75rem;
		.site-logo {
			font-size: 1.2rem;
		}
		a {
			padding: 0rem;
			font-size: 0.9rem;
		}
	}
	.header-deactive {
		background: #1a1a1a;
		padding: 0.5rem 5rem;

		.site-logo {
			font-size: 1.5rem;
		}
		a {
			font-size: 1rem;
		}
	}
}

/* Tablet */
@media screen and (min-width: 768px) and (max-width: 1024px) {
	.header {
		position: fixed;
		top: 0;
		z-index: 20;
		display: flex;
		align-items: center;
		justify-content: space-between;
		width: 100%;
		border-bottom: 1px solid rgba(255, 255, 255, 0.16);
		box-shadow: 0 1rem 2.5rem rgba(0, 0, 0, 0.16), inset 0 1px rgba(255, 255, 255, 0.12);
		transition: all 0.2s ease-in;

		.site-logo {
			color: #fff;
			font-family: "Poppins", sans-serif;
			font-size: 1.5rem;
			font-weight: 600;
			letter-spacing: 0.16em;
			text-decoration: none;
			transition: all 0.2s ease-in;

			span { color: #a9ffbf; }
		}

		.desktop-nav {
			display: flex;
			align-items: center;
			gap: clamp(1rem, 3vw, 2.8rem);

			a {
				padding: 0.2rem;
				color: rgba(255, 255, 255, 0.7);
				font-family: "Poppins", sans-serif;
				font-size: 1rem;
				text-decoration: none;
				transition: all 0.2s ease;

				&:hover,
				&:focus-visible { color: #fff; }
			}
		}

		.menu-toggle,
		.mobile-nav { display: none; }

		&::before {
			content: "";
			position: absolute;
			inset: 0;
			background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 300 300' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.65' numOctaves='4'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23noise)'/%3E%3C/svg%3E");
			opacity: 0.5;
			mix-blend-mode: soft-light;
			pointer-events: none;
		}
		&::after {
			content: "";
			position: absolute;
			inset: 0;
			background: linear-gradient(
				120deg,
				rgba(255, 255, 255, 0.18),
				transparent 25%,
				transparent 70%,
				rgba(255, 255, 255, 0.04)
			);
			opacity: 0.5;
			pointer-events: none;
		}
	}

	.section-anchor {
		display: block;
		position: relative;
		top: -6rem;
		width: 0;
		height: 0;
	}

	.header-active {
		background: rgba(8, 8, 8, 0.75);
		backdrop-filter: blur(10px);
		-webkit-backdrop-filter: blur(10px);
		padding: 0.3rem 3.75rem;
		.site-logo {
			font-size: 1.2rem;
		}
		a {
			padding: 0rem;
			font-size: 0.9rem;
		}
	}
	.header-deactive {
		background: #1a1a1a;
		padding: 0.5rem 5rem;

		.site-logo {
			font-size: 1.5rem;
		}
		a {
			font-size: 1rem;
		}
	}
}

/* Mobile */
@media screen and (min-width: 320px) and (max-width: 767px) {
	.header {
		position: fixed;
		top: 0;
		z-index: 20;
		display: flex;
		align-items: center;
		justify-content: space-between;
		width: 100%;
		border-bottom: 1px solid rgba(255, 255, 255, 0.16);
		box-shadow: 0 1rem 2.5rem rgba(0, 0, 0, 0.16), inset 0 1px rgba(255, 255, 255, 0.12);
		transition: all 0.2s ease-in;
		padding: 0.5rem 1.5rem;

		.site-logo {
			color: #fff;
			font-family: "Poppins", sans-serif;
			font-size: 0.8rem;
			font-weight: 600;
			letter-spacing: 0.16em;
			text-decoration: none;
			line-height: 1;

			span {
				color: #a9ffbf;
			}
		}

		.desktop-nav {
			display: none;
		}

		.mobile-nav {
			position: absolute;
			top: calc(100% + 0.55rem);
			left: 0;
			display: flex;
			flex-direction: column;
			gap: 1.4rem;
			width: 100%;
			padding: 1.5rem;
			border: 1px solid rgba(255, 255, 255, 0.14);
			border-radius: 1.25rem;
			background: rgba(8, 8, 8, 0.86);
			box-shadow:
				0 1rem 2.5rem rgba(0, 0, 0, 0.2),
				inset 0 1px rgba(255, 255, 255, 0.1);
			backdrop-filter: blur(18px);
			-webkit-backdrop-filter: blur(18px);
			opacity: 0;
			pointer-events: none;
			transform: translateY(-0.75rem) scale(0.98);
			transform-origin: top right;
			transition:
				opacity 0.3s ease,
				transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
			backdrop-filter: blur(18px);
			-webkit-backdrop-filter: blur(18px);

			a {
				color: rgba(255, 255, 255, 0.7);
				font-family: "Poppins", sans-serif;
				font-size: 0.8rem;
				text-decoration: none;
				transform: translateX(-0.5rem);
				opacity: 0;
				transition:
					color 0.25s ease,
					opacity 0.3s ease,
					transform 0.3s ease;

				&:hover,
				&:focus-visible {
					color: #fff;
				}
			}

			&.is-open {
				width: 95%;
				left: 50%;
				opacity: 1;
				pointer-events: auto;
				transform: translateY(0) scale(1) translateX(-50%);
				backdrop-filter: blur(18px);
				-webkit-backdrop-filter: blur(18px);

				a {
					opacity: 1;
					transform: translateX(0);

					&:nth-child(2) { transition-delay: 0.04s; }
					&:nth-child(3) { transition-delay: 0.08s; }
					&:nth-child(4) { transition-delay: 0.12s; }
				}
			}

			&::before {
				content: "";
				position: absolute;
				inset: 0;
				background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 300 300' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.65' numOctaves='4'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23noise)'/%3E%3C/svg%3E");
				opacity: 0.9;
				mix-blend-mode: soft-light;
				pointer-events: none;
			}
			&::after {
				content: "";
				position: absolute;
				inset: 0;
				background: linear-gradient(
					120deg,
					rgba(255, 255, 255, 0.18),
					transparent 25%,
					transparent 70%,
					rgba(255, 255, 255, 0.04)
				);
				opacity: 0.9;
				pointer-events: none;
			}
		}

		.menu-toggle {
			display: block;
			position: relative;
			z-index: 2;
			width: 2rem;
			height: 2rem;
			padding: 0.5rem;
			border: 1px solid transparent;
			border-radius: 50%;
			background: transparent;
			cursor: pointer;
			transition: all 0.2s ease-in;

			span {
				display: block;
				width: 100%;
				height: 1px;
				margin: 0.28rem 0;
				background: #fff;
				transition:
					transform 0.35s ease,
					opacity 0.25s ease;
			}

			&[aria-expanded="true"] {
				background: rgba(255, 255, 255, 0.08);
				border: 1px solid rgba(255, 255, 255, 0.16);

				span {
					&:nth-child(1) { transform: translateY(0.2rem) rotate(45deg); }
					&:nth-child(2) { opacity: 0; }
					&:nth-child(3) { transform: translateY(-0.5rem) rotate(-45deg); }
				}
			}
		}

		&::before {
			content: "";
			position: absolute;
			inset: 0;
			background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 300 300' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.65' numOctaves='4'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23noise)'/%3E%3C/svg%3E");
			opacity: 0.5;
			mix-blend-mode: soft-light;
			pointer-events: none;
		}
		&::after {
			content: "";
			position: absolute;
			inset: 0;
			background: linear-gradient(
				120deg,
				rgba(255, 255, 255, 0.18),
				transparent 25%,
				transparent 70%,
				rgba(255, 255, 255, 0.04)
			);
			opacity: 0.5;
			pointer-events: none;
		}
	}

	.section-anchor {
		display: block;
		position: relative;
		top: -6rem;
		width: 0;
		height: 0;
	}

	.header-active {
		background: rgba(8, 8, 8, 0.75);
		backdrop-filter: blur(10px);
		-webkit-backdrop-filter: blur(10px);
	}
	.header-deactive {
		background: #1a1a1a;
	}
}
