:root {
	--navy: #0b0b1e;
	--navy-ink: #0d0c23;
	--blue: #0158fc;
	--blue-soft: #4d8bff;
	--white: #ffffff;
	--gutter: clamp(16px, 5vw, 64px);
	--font-heading: "Montserrat", system-ui, sans-serif;
	--font-body: "Inter", system-ui, sans-serif;

	/* Dark theme (default) */
	color-scheme: dark;
	--bg: var(--navy);
	--bg-rgb: 11 11 30;
	--fg: var(--white);
	--muted: rgba(255, 255, 255, 0.72);
	--line: rgba(255, 255, 255, 0.14);
	--surface: rgba(255, 255, 255, 0.04);
	--accent: var(--blue-soft);
	--gear-glow-opacity: 0.9;
	--gear-solid-opacity: 0.55;
}

/* Light theme, only when chosen via the toggle */
:root[data-theme="light"] {
	color-scheme: light;
	--bg: #f5f7fc;
	--bg-rgb: 245 247 252;
	--fg: var(--navy-ink);
	--muted: rgba(13, 12, 35, 0.7);
	--line: rgba(13, 12, 35, 0.14);
	--surface: rgba(13, 12, 35, 0.04);
	--accent: var(--blue);
	--gear-glow-opacity: 0.35;
	--gear-solid-opacity: 0.25;
}

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

html,
body {
	margin: 0;
	height: 100%;
}

body {
	min-height: 100vh;
	min-height: 100dvh;
	display: grid;
	grid-template-rows: auto 1fr auto;
	background: var(--bg);
	color: var(--fg);
	font-family: var(--font-body);
	font-weight: 400;
	line-height: 1.6;
	overflow-x: hidden;
	-webkit-font-smoothing: antialiased;
}

/* Large gear motif from the brand deck, bleeding off the right edge */
.backdrop {
	position: fixed;
	inset: 0;
	pointer-events: none;
	overflow: hidden;
	z-index: 0;
}

.gear {
	position: absolute;
	top: 50%;
	right: -28vmax;
	width: 90vmax;
	height: 90vmax;
	margin-top: -45vmax;
	background: url("assets/icon.svg") center / contain no-repeat;
	animation: spin 120s linear infinite;
}

.gear-glow {
	filter: blur(60px);
	opacity: var(--gear-glow-opacity);
}

.gear-solid {
	opacity: var(--gear-solid-opacity);
	-webkit-mask-image: radial-gradient(circle at 70% 50%, #000 20%, transparent 75%);
	mask-image: radial-gradient(circle at 70% 50%, #000 20%, transparent 75%);
}

.backdrop::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(90deg, var(--bg) 0%, rgb(var(--bg-rgb) / 0.85) 35%, rgb(var(--bg-rgb) / 0) 70%);
}

@keyframes spin {
	to {
		transform: rotate(360deg);
	}
}

.site-header,
.hero,
.site-footer {
	position: relative;
	z-index: 1;
	padding-inline: var(--gutter);
}

.site-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding-top: clamp(20px, 4vw, 40px);
}

.logo {
	display: block;
	width: clamp(120px, 14vw, 160px);
	height: auto;
}

/* Show the logo variant that suits the active theme */
.logo-light {
	display: none;
}

:root[data-theme="light"] .logo-dark {
	display: none;
}

:root[data-theme="light"] .logo-light {
	display: block;
}

.theme-toggle {
	display: inline-grid;
	place-items: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 1px solid var(--line);
	border-radius: 50%;
	background: var(--surface);
	color: var(--fg);
	cursor: pointer;
	transition: border-color 0.2s ease;
}

.theme-toggle:hover {
	border-color: var(--accent);
}

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

.theme-toggle svg {
	width: 18px;
	height: 18px;
}

/* Icon shows the theme the button switches to */
.theme-toggle .icon-moon {
	display: none;
}

:root[data-theme="light"] .theme-toggle .icon-sun {
	display: none;
}

:root[data-theme="light"] .theme-toggle .icon-moon {
	display: block;
}

.hero {
	align-self: center;
	max-width: 760px;
	padding-block: 48px;
}

.status {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 28px;
	padding: 6px 14px;
	border: 1px solid var(--line);
	border-radius: 999px;
	background: var(--surface);
	font-size: 0.8125rem;
	font-weight: 500;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.status-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--blue-soft);
	box-shadow: 0 0 0 0 rgba(77, 139, 255, 0.7);
	animation: pulse 2.4s ease-out infinite;
}

@keyframes pulse {
	70% {
		box-shadow: 0 0 0 10px rgba(77, 139, 255, 0);
	}
	100% {
		box-shadow: 0 0 0 0 rgba(77, 139, 255, 0);
	}
}

h1 {
	margin: 0 0 24px;
	font-family: var(--font-heading);
	font-weight: 600;
	font-size: clamp(2.25rem, 6vw, 4.25rem);
	line-height: 1.08;
	letter-spacing: -0.02em;
	text-wrap: balance;
}

.accent {
	color: var(--accent);
}

.lede {
	margin: 0 0 16px;
	max-width: 58ch;
	color: var(--muted);
	font-weight: 300;
	font-size: clamp(1rem, 1.4vw, 1.125rem);
}

.lede-sub {
	color: var(--fg);
	font-weight: 400;
}

.pillars {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 36px 0 0;
	padding: 0;
	list-style: none;
}

.pillars li {
	padding: 8px 16px;
	border-radius: 10px;
	background: var(--blue);
	color: var(--white);
	font-family: var(--font-heading);
	font-weight: 500;
	font-size: 0.875rem;
}

.site-footer {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 8px 24px;
	padding-block: 24px clamp(20px, 3vw, 32px);
	color: var(--muted);
	font-size: 0.8125rem;
}

.site-footer-end {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 24px;
}

.cookie-settings {
	padding: 0;
	border: 0;
	background: none;
	color: inherit;
	font: inherit;
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
}

.cookie-settings:hover {
	color: var(--fg);
}

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

.cookie-toast {
	position: fixed;
	right: var(--gutter);
	bottom: clamp(16px, 3vw, 32px);
	z-index: 10;
	display: flex;
	flex-direction: column;
	gap: 16px;
	width: min(400px, calc(100vw - 2 * var(--gutter)));
	padding: 20px;
	border: 1px solid var(--line);
	border-radius: 16px;
	background: rgb(var(--bg-rgb) / 0.92);
	-webkit-backdrop-filter: blur(12px);
	backdrop-filter: blur(12px);
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
	animation: toast-in 0.3s ease-out;
}

.cookie-toast[hidden] {
	display: none;
}

.cookie-toast-text {
	margin: 0;
	color: var(--muted);
	font-size: 0.875rem;
}

.cookie-toast-actions {
	display: flex;
	justify-content: flex-end;
	gap: 8px;
}

.cookie-button {
	padding: 8px 18px;
	border: 1px solid var(--line);
	border-radius: 10px;
	font-family: var(--font-heading);
	font-weight: 500;
	font-size: 0.875rem;
	cursor: pointer;
	transition:
		border-color 0.2s ease,
		background-color 0.2s ease;
}

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

.cookie-button-secondary {
	background: var(--surface);
	color: var(--fg);
}

.cookie-button-secondary:hover {
	border-color: var(--accent);
}

.cookie-button-primary {
	border-color: var(--blue);
	background: var(--blue);
	color: var(--white);
}

.cookie-button-primary:hover {
	background: var(--blue-soft);
	border-color: var(--blue-soft);
}

@keyframes toast-in {
	from {
		opacity: 0;
		transform: translateY(12px);
	}
}

@media (max-width: 720px) {
	.cookie-toast {
		left: var(--gutter);
		width: auto;
	}

	.cookie-button {
		flex: 1;
	}

	.gear {
		top: -20vmax;
		right: -55vmax;
		width: 100vmax;
		height: 100vmax;
		margin-top: 0;
	}

	.gear-solid {
		opacity: calc(var(--gear-solid-opacity) * 0.75);
	}

	.backdrop::after {
		background: linear-gradient(180deg, rgb(var(--bg-rgb) / 0.35) 0%, rgb(var(--bg-rgb) / 0.85) 45%, var(--bg) 80%);
	}
}

@media (prefers-reduced-motion: reduce) {
	.gear,
	.status-dot,
	.cookie-toast {
		animation: none;
	}
}
