:root {
	--bg-paper: #f2ece2;
	--bg-paper-soft: #ede4d8;
	--bg-glow-a: rgba(255, 255, 255, 0.55);
	--bg-glow-b: rgba(88, 78, 106, 0.12);
	--text-main: #151515;
	--text-muted: #5b5b5b;
	--line: #d6ccbe;
	--surface: rgba(255, 255, 255, 0.6);
	--surface-strong: rgba(255, 255, 255, 0.78);
	--header-bg: rgba(242, 236, 226, 0.82);
	--hero-bg-start: rgba(255, 255, 255, 0.7);
	--hero-bg-end: rgba(255, 255, 255, 0.45);
	--hero-glow: rgba(255, 255, 255, 0.45);
	--focus-ring: #0f0f0f;
	--contrast-bg: #0f0f0f;
	--contrast-text: #ffffff;
	--btn-solid-bg: #0f0f0f;
	--btn-solid-text: #ffffff;
	--btn-solid-border: #0f0f0f;
	--btn-solid-hover: #262626;
	--btn-outline-border: #262626;
	--btn-outline-hover: rgba(17, 17, 17, 0.06);
	--progress-bg: rgba(0, 0, 0, 0.14);
	--progress-fill: #0f0f0f;
	--input-border: #bbb1a2;
	--input-bg: rgba(255, 255, 255, 0.85);
	--error-color: #6a2525;
	--toast-bg: rgba(16, 16, 16, 0.95);
	--toast-text: #ffffff;
	--toast-border: #222222;
	--toast-error-bg: rgba(103, 30, 30, 0.95);
	--toast-error-border: #581f1f;
	--grain-opacity: 0.22;
	--grain-dot: rgba(0, 0, 0, 0.11);
	--grain-line: rgba(255, 255, 255, 0.16);
	--grain-blend-mode: multiply;
	--radius: 14px;
	--shadow-soft: 0 12px 32px rgba(20, 20, 20, 0.08);
}

:root[data-theme="dark"] {
	--bg-paper: #111111;
	--bg-paper-soft: #1b1b1b;
	--bg-glow-a: rgba(255, 255, 255, 0.06);
	--bg-glow-b: rgba(126, 112, 151, 0.08);
	--text-main: #efefef;
	--text-muted: #bbbbbb;
	--line: #3b3b3b;
	--surface: rgba(24, 24, 24, 0.72);
	--surface-strong: rgba(34, 34, 34, 0.84);
	--header-bg: rgba(15, 15, 15, 0.84);
	--hero-bg-start: rgba(35, 35, 35, 0.82);
	--hero-bg-end: rgba(24, 24, 24, 0.72);
	--hero-glow: rgba(255, 255, 255, 0.08);
	--focus-ring: #f0f0f0;
	--contrast-bg: #f0f0f0;
	--contrast-text: #111111;
	--btn-solid-bg: #f0f0f0;
	--btn-solid-text: #111111;
	--btn-solid-border: #f0f0f0;
	--btn-solid-hover: #d9d9d9;
	--btn-outline-border: #c9c9c9;
	--btn-outline-hover: rgba(255, 255, 255, 0.08);
	--progress-bg: rgba(255, 255, 255, 0.22);
	--progress-fill: #f0f0f0;
	--input-border: #666666;
	--input-bg: rgba(16, 16, 16, 0.82);
	--error-color: #ff9999;
	--toast-bg: rgba(245, 245, 245, 0.95);
	--toast-text: #111111;
	--toast-border: #bbbbbb;
	--toast-error-bg: rgba(164, 64, 64, 0.95);
	--toast-error-border: #b76f6f;
	--grain-opacity: 0.12;
	--grain-dot: rgba(255, 255, 255, 0.08);
	--grain-line: rgba(255, 255, 255, 0.04);
	--grain-blend-mode: normal;
	--shadow-soft: 0 12px 32px rgba(0, 0, 0, 0.35);
	color-scheme: dark;
}

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

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
	color: var(--text-main);
	background-color: var(--bg-paper);
	background-image:
		radial-gradient(circle at 20% 10%, var(--bg-glow-a), transparent 45%),
		radial-gradient(circle at 80% 18%, var(--bg-glow-b), transparent 33%),
		linear-gradient(180deg, var(--bg-paper), var(--bg-paper-soft));
	line-height: 1.5;
	position: relative;
	min-height: 100vh;
}

body.is-transitioning {
	overflow: hidden;
}

/* Light paper grain overlay using gradients only. */
body::after {
	content: "";
	position: fixed;
	inset: 0;
	pointer-events: none;
	opacity: var(--grain-opacity);
	background-image:
		repeating-radial-gradient(circle at 0 0, var(--grain-dot) 0 0.9px, transparent 0.9px 3px),
		repeating-linear-gradient(90deg, var(--grain-line) 0 1px, transparent 1px 4px);
	mix-blend-mode: var(--grain-blend-mode);
	z-index: 0;
}

a {
	color: inherit;
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
	outline: 2px solid var(--focus-ring);
	outline-offset: 3px;
}

.skip-link {
	position: absolute;
	left: 1rem;
	top: -120px;
	z-index: 1000;
	padding: 0.55rem 0.8rem;
	background: var(--contrast-bg);
	color: var(--contrast-text);
	text-decoration: none;
	border-radius: 8px;
}

.skip-link:focus {
	top: 1rem;
}

.container {
	width: min(1120px, calc(100% - 2rem));
	margin-inline: auto;
	position: relative;
	z-index: 1;
}

.section {
	padding-block: clamp(3rem, 6vw, 5.5rem);
}

.site-header {
	position: sticky;
	top: 0;
	z-index: 20;
	background: var(--header-bg);
	border-bottom: 1px solid var(--line);
	backdrop-filter: blur(10px);
	transition: box-shadow 220ms ease, background-color 220ms ease;
}

.site-header.is-compact {
	box-shadow: 0 12px 24px rgba(0, 0, 0, 0.16);
}

.site-header .container {
	width: calc(100% - 1.5rem);
	max-width: none;
}

.header-inner {
	min-height: 4.5rem;
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 0.85rem;
	position: relative;
	transition: min-height 220ms ease;
}

.logo {
	display: inline-flex;
	align-items: center;
	text-decoration: none;
	order: 1;
	flex-shrink: 0;
}

.logo-image {
	display: block;
	width: clamp(3.3rem, 8vw, 5.6rem);
	height: auto;
}

.nav-toggle {
	order: 2;
	margin-left: auto;
	border: 1px solid var(--line);
	background: var(--surface-strong);
	color: var(--text-main);
	padding: 0.45rem 0.75rem;
	border-radius: 8px;
	cursor: pointer;
}

.header-center {
	order: 4;
	width: 100%;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.85rem;
}

.theme-toggle {
	border: 1px solid var(--line);
	background: var(--surface-strong);
	color: var(--text-main);
	padding: 0.45rem 0.75rem;
	border-radius: 8px;
	cursor: pointer;
	font: inherit;
	font-weight: 600;
}

.main-nav {
	width: 100%;
}

#primary-nav {
	display: none;
	flex-direction: column;
	gap: 0.65rem;
	list-style: none;
	margin: 0.35rem 0 0;
	padding: 0 0 0.2rem;
}

#primary-nav.is-open {
	display: flex;
}

#primary-nav a,
.header-links a {
	text-decoration: none;
	font-weight: 600;
	color: var(--text-main);
}

.header-links {
	display: none;
	list-style: none;
	margin: 0;
	padding: 0;
	gap: 0.85rem;
}

.hero-inner {
	background: linear-gradient(145deg, var(--hero-bg-start), var(--hero-bg-end));
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: clamp(2rem, 5vw, 4.5rem);
	box-shadow: var(--shadow-soft);
	text-align: center;
	position: relative;
	overflow: hidden;
	transform: translate3d(0, var(--hero-shift, 0px), 0);
	will-change: transform;
}

.hero-inner::before {
	content: "";
	position: absolute;
	inset: -20% auto auto 50%;
	width: 50%;
	height: 120%;
	background: radial-gradient(circle, var(--hero-glow), transparent 65%);
	transform: translateX(-50%);
}

.hero-kicker {
	margin: 0 0 0.5rem;
	color: var(--text-muted);
	text-transform: uppercase;
	letter-spacing: 0.08em;
	font-size: 0.8rem;
}

h1,
h2,
h3 {
	line-height: 1.1;
	margin: 0;
}

#hero-title {
	font-size: clamp(2.35rem, 10vw, 6rem);
	letter-spacing: 0.05em;
}

.hero-subtitle {
	margin: 1rem auto 0;
	max-width: 42ch;
	font-size: clamp(1rem, 2.2vw, 1.35rem);
	color: var(--text-muted);
}

.hero-actions {
	margin-top: 1.75rem;
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	justify-content: center;
}

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.35rem;
	padding: 0.7rem 1rem;
	border-radius: 10px;
	font-weight: 700;
	text-decoration: none;
	border: 1px solid transparent;
	cursor: pointer;
	transition: transform 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

.btn:hover {
	transform: translateY(-2px);
}

.btn-solid {
	background: var(--btn-solid-bg);
	color: var(--btn-solid-text);
	border-color: var(--btn-solid-border);
}

.btn-solid:hover {
	background: var(--btn-solid-hover);
}

.btn-outline {
	background: transparent;
	color: var(--text-main);
	border-color: var(--btn-outline-border);
}

.btn-outline:hover {
	background: var(--btn-outline-hover);
}

.section-head {
	display: grid;
	gap: 0.65rem;
	margin-bottom: 1.5rem;
}

.section-head p {
	margin: 0;
	color: var(--text-muted);
	max-width: 62ch;
}

.reveal {
	opacity: 0;
	filter: blur(2px);
	transition:
		opacity 600ms ease,
		transform 600ms cubic-bezier(0.2, 0.7, 0.2, 1),
		filter 600ms ease;
	transition-delay: var(--reveal-delay, 0ms);
	will-change: transform, opacity;
}

.reveal.reveal-down {
	transform: translate3d(0, 34px, 0) scale(0.985);
}

.reveal.reveal-up {
	transform: translate3d(0, -34px, 0) scale(0.985);
}

.reveal.in-view {
	opacity: 1;
	filter: blur(0);
	transform: translate3d(0, 0, 0) scale(1);
}

.music h2,
.lab h2,
.team h2,
.faq h2,
.contact h2 {
	font-size: clamp(1.6rem, 3.4vw, 2.4rem);
}

.platform-links {
	list-style: none;
	padding: 0;
	margin: 0;
	display: grid;
	grid-template-columns: 1fr;
	gap: 1rem;
}

.platform-link {
	display: block;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 1rem 1.1rem;
	box-shadow: var(--shadow-soft);
	text-decoration: none;
	font-weight: 700;
	transition: transform 160ms ease, background-color 160ms ease;
	display: flex;
	align-items: center;
	gap: 0.7rem;
}

.platform-link:hover {
	transform: translateY(-2px);
	background: var(--surface-strong);
}

.platform-icon {
	width: 1.15rem;
	height: 1.15rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.platform-icon svg {
	width: 100%;
	height: 100%;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.platform-link .platform-icon svg rect,
.platform-link .platform-icon svg polygon {
	fill: currentColor;
	stroke: none;
}

.lab-split {
	display: grid;
	gap: 1rem;
	grid-template-columns: 1fr;
}

.lab-card {
	padding: 1rem;
	border-radius: var(--radius);
	border: 1px solid var(--line);
	background: var(--surface-strong);
}

.lab-card p {
	margin: 0.7rem 0 0;
	color: var(--text-muted);
}

.lab-points {
	margin: 1.2rem 0 0;
	padding-left: 1.2rem;
	display: grid;
	gap: 0.45rem;
}

.lab-links {
	margin-top: 1.2rem;
	display: flex;
	flex-wrap: wrap;
	gap: 0.7rem;
}

.team-copy {
	max-width: 74ch;
}

.team-copy p {
	margin: 0;
	color: var(--text-main);
	font-size: clamp(1.02rem, 1.35vw, 1.16rem);
	line-height: 1.75;
}

.team-copy p + p {
	margin-top: 0.95rem;
}

.faq-item {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 1rem 1.1rem;
	box-shadow: var(--shadow-soft);
}

.faq-item h3 {
	margin: 0 0 0.55rem;
	font-size: 1.2rem;
}

.faq-item p {
	margin: 0.45rem 0 0;
	color: var(--text-muted);
}

.is-disabled {
	opacity: 0.50 !important;
	cursor: not-allowed;
	pointer-events: none;
	filter: grayscale(1) saturate(0.15);
	background: transparent !important;
	border-color: rgba(120, 120, 120, 0.45) !important;
	color: rgba(120, 120, 120, 0.72) !important;
	box-shadow: none !important;
	animation: disabledFade 2.4s ease-in-out infinite alternate;
}

@keyframes disabledFade {
	0% {
		opacity: 0.12;
	}
	100% {
		opacity: 0.24;
	}
}

.contact-links {
	display: flex;
	flex-wrap: wrap;
	gap: 0.7rem;
	margin-top: 1rem;
}

.contact p {
	margin: 0;
}

.booking-link {
	margin-top: 0.4rem;
}

.page-transition {
	position: fixed;
	inset: 0;
	z-index: 9999;
	display: grid;
	place-items: center;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	background:
		radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.34), transparent 35%),
		linear-gradient(180deg, var(--bg-paper), var(--bg-paper-soft));
	transition: opacity 260ms ease, visibility 260ms ease;
}

.page-transition::before {
	content: "";
	position: absolute;
	inset: 0;
	background-image:
		repeating-radial-gradient(circle at 0 0, var(--grain-dot) 0 1px, transparent 1px 3px),
		repeating-linear-gradient(90deg, var(--grain-line) 0 1px, transparent 1px 4px);
	opacity: 0.18;
}

.page-transition-logo {
	position: relative;
	width: clamp(5.4rem, 22vw, 15rem);
	height: auto;
	opacity: 0;
	transform: scale(0.45);
	filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.28));
}

.page-transition.active {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

.page-transition.active .page-transition-logo {
	animation: logoLaunch 900ms cubic-bezier(0.2, 0.8, 0, 1) forwards;
}

@keyframes logoLaunch {
	0% {
		opacity: 0;
		transform: scale(0.45) rotate(-5deg);
	}
	16% {
		opacity: 1;
		transform: scale(1.05) rotate(0deg);
	}
	62% {
		opacity: 1;
		transform: scale(2.8);
	}
	100% {
		opacity: 1;
		transform: scale(15);
		filter: blur(0.4px);
	}
}

.site-footer {
	border-top: 1px solid var(--line);
	padding-block: 1.3rem 2.2rem;
}

.footer-inner {
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
	font-size: 0.96rem;
	color: var(--text-muted);
}

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

@media (min-width: 720px) {
	.platform-links {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.lab-split {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 940px) {
	.header-inner {
		flex-wrap: nowrap;
	}

	.site-header.is-compact .header-inner {
		min-height: 4rem;
	}

	.nav-toggle {
		display: none;
	}

	.header-center {
		position: absolute;
		left: 50%;
		transform: translateX(-50%);
		width: max-content;
		max-width: calc(100% - 10rem);
		flex-wrap: nowrap;
		justify-content: center;
	}

	.main-nav {
		width: auto;
	}

	#primary-nav {
		display: flex;
		flex-direction: row;
		margin: 0;
		padding: 0;
		gap: 1.2rem;
	}

	.header-links {
		display: flex;
		margin-left: 0;
	}

	.platform-links {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

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

	*,
	*::before,
	*::after {
		animation-duration: 0.001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.001ms !important;
	}

	.reveal,
	.reveal.reveal-down,
	.reveal.reveal-up,
	.reveal.in-view {
		opacity: 1;
		filter: none;
		transform: none;
	}

	.is-disabled {
		animation: none;
		opacity: 0.16 !important;
	}
}
