/* =========================================================
   Maestro VR — maestro.css (v3, full redesign)
   One stylesheet, no template, no icon font, no jQuery.
   Colours come from the three brand banners.
   ========================================================= */

:root {
	--stage: #151515;        /* Maestro VR banner */
	--black: #000;
	--navy: #2c3c55;         /* Level Editor banner */
	--navy-deep: #223047;
	--paper: #a3a3a1;        /* Education Edition banner */
	--wood: #b65a3c;         /* baton handle */
	--fg: #fff;
	--fg-soft: rgba(255, 255, 255, 0.74);
	--rule: rgba(255, 255, 255, 0.16);
	--ink: #000;
	--ink-soft: rgba(0, 0, 0, 0.72);
	--font: "Jost", "Segoe UI", system-ui, -apple-system, "Noto Sans", "PingFang SC", "Hiragino Sans",
		"Noto Sans JP", "Noto Sans KR", "Malgun Gothic", "Microsoft YaHei", "Noto Sans Arabic", Tahoma, sans-serif;
	--wrap: 72rem;
	--header-h: 4rem;
	--radius: 3px;
}

/* ---------- Base ---------- */

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

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
	scroll-padding-top: calc(var(--header-h) + 1rem);
}

body {
	margin: 0;
	background: var(--stage);
	color: var(--fg);
	font-family: var(--font);
	font-weight: 300;
	font-size: 1.0625rem;
	line-height: 1.65;
	overflow-x: hidden;
}

img, iframe { max-width: 100%; display: block; }
img { height: auto; }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { text-decoration-color: var(--wood); }

strong, b { font-weight: 500; }

h1, h2, h3 { margin: 0; font-weight: 300; line-height: 1.2; }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.6rem); margin-bottom: 1.25rem; max-width: 22ch; }
h3 { font-size: 1.15rem; font-weight: 500; line-height: 1.35; }
p { margin: 0 0 1.25rem; }

:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

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

.wrap {
	width: 100%;
	max-width: var(--wrap);
	margin-inline: auto;
	padding-inline: max(1.25rem, env(safe-area-inset-left)) max(1.25rem, env(safe-area-inset-right));
}
.wrap.narrow { max-width: 52rem; }

/* ---------- Buttons ---------- */

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

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 3rem;
	padding: 0.6rem 1.5rem;
	border-radius: var(--radius);
	border: 1px solid var(--fg);
	font-size: 1rem;
	font-weight: 500;
	line-height: 1.25;
	text-align: center;
	text-decoration: none;
	transition: background-color 0.2s, color 0.2s;
}
.btn-primary { background: var(--fg); color: var(--black); }
.btn-primary:hover { background: transparent; color: var(--fg); }
.btn-ghost { background: transparent; color: var(--fg); }
.btn-ghost:hover { background: var(--fg); color: var(--black); }
.btn-sm { min-height: 2.4rem; padding: 0.35rem 1rem; font-size: 0.95rem; }

/* ---------- Header ---------- */

.site-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: rgba(0, 0, 0, 0.88);
	border-bottom: 1px solid var(--rule);
}

.bar {
	max-width: var(--wrap);
	margin-inline: auto;
	min-height: var(--header-h);
	padding-inline: 1.25rem;
	display: flex;
	align-items: center;
	gap: 1.5rem;
}

.brand { display: block; flex: none; }
.brand img { height: 1.15rem; width: auto; }

.site-menu { display: flex; align-items: center; gap: 1.25rem; margin-inline-start: auto; }

.nav { display: flex; gap: 0.25rem; margin: 0; padding: 0; list-style: none; }
.nav a {
	display: block;
	padding: 0.5rem 0.75rem;
	border-radius: var(--radius);
	text-decoration: none;
	white-space: nowrap;
	color: var(--fg-soft);
}
.nav a:hover, .nav a[aria-current] { color: var(--fg); }
.nav a[aria-current] { box-shadow: inset 0 -1px 0 var(--wood); border-radius: 0; }

/* Language picker: a native <details>, works without JavaScript */
.lang { position: relative; }
.lang summary {
	list-style: none;
	display: flex;
	align-items: center;
	gap: 0.4rem;
	padding: 0.45rem 0.6rem;
	border-radius: var(--radius);
	cursor: pointer;
	color: var(--fg-soft);
	white-space: nowrap;
}
.lang summary::-webkit-details-marker { display: none; }
.lang summary:hover, .lang[open] summary { color: var(--fg); }
.ico { width: 1.15rem; height: 1.15rem; flex: none; }
.lang ul {
	position: absolute;
	inset-inline-end: 0;
	top: calc(100% + 0.5rem);
	margin: 0;
	padding: 0.5rem;
	list-style: none;
	background: var(--black);
	border: 1px solid var(--rule);
	border-radius: var(--radius);
	display: grid;
	grid-template-columns: repeat(2, minmax(9rem, 1fr));
	gap: 0.1rem;
	z-index: 60;
}
.lang ul a {
	display: block;
	padding: 0.45rem 0.7rem;
	border-radius: var(--radius);
	text-decoration: none;
	color: var(--fg-soft);
}
.lang ul a:hover { background: rgba(255, 255, 255, 0.08); color: var(--fg); }
.lang ul a[aria-current] { color: var(--fg); font-weight: 500; }

.menu-toggle { display: none; }

/* ---------- Hero ---------- */

.hero {
	position: relative;
	display: flex;
	align-items: center;
	min-height: calc(92vh - var(--header-h));
	min-height: calc(92svh - var(--header-h));
	padding-block: 4rem;
	text-align: center;
	isolation: isolate;
}
.hero .wrap { display: flex; flex-direction: column; align-items: center; }

.hero-vr {
	background:
		linear-gradient(to bottom, rgba(0, 0, 0, 0.25), rgba(21, 21, 21, 0.2) 60%, var(--stage)),
		url("/images/bg.jpg") center / cover no-repeat,
		var(--stage);
}
.hero-le {
	background:
		radial-gradient(ellipse at 50% 30%, rgba(255, 255, 255, 0.08), transparent 60%),
		linear-gradient(to bottom, var(--navy), var(--navy-deep));
}

.hero h1 { display: flex; flex-direction: column; align-items: center; gap: 2.25rem; }

/* The brand lockup: wordmark, baton, VR — built live, like the banner */
.lockup {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	width: min(40rem, 86vw);
}
.wordmark { width: 100%; }
.lockup::after {
	content: attr(data-sub);
	font-weight: 700;
	font-size: clamp(1.6rem, 4.6vw, 2.9rem);
	line-height: 1;
	letter-spacing: 0.02em;
	margin-top: 0.15em;
}
.lockup-le::after { margin-top: 0.55em; font-size: clamp(1.3rem, 3.8vw, 2.4rem); }

.baton { width: 104%; height: clamp(14px, 2.4vw, 22px); margin-top: clamp(0.4rem, 1.4vw, 1rem); overflow: visible; }
.baton .shaft {
	stroke: var(--fg);
	stroke-width: 2.2;
	stroke-linecap: round;
	vector-effect: non-scaling-stroke;
	stroke-dasharray: 1;
	stroke-dashoffset: 0;
	animation: draw 1.4s cubic-bezier(0.6, 0, 0.2, 1) 0.2s both;
}
[dir="rtl"] .baton { transform: scaleX(-1); }
@keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }

.hero-line {
	display: block;
	max-width: 24ch;
	font-size: clamp(1.7rem, 4vw, 3rem);
	font-weight: 300;
	line-height: 1.15;
}
.hero-sub { margin: 1.25rem 0 0; max-width: 48ch; font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--fg-soft); }
.hero .actions { justify-content: center; }
.hero-note { margin: 1.5rem 0 0; max-width: 46ch; font-size: 0.95rem; color: var(--fg-soft); }

/* Official Maestro VR logo (wordmark + baton + VR) */
.logo-vr { width: min(40rem, 86vw); height: auto; }

/* ---------- Bands (sections) ---------- */

.band { padding-block: clamp(4rem, 9vw, 7rem); }
.band-stage { background: var(--stage); }
.band-navy { background: var(--navy); }
.band-navy-deep { background: var(--navy-deep); }
.band-paper { background: var(--paper); color: var(--ink); }
.band-paper .btn { border-color: var(--ink); }
.band-paper .btn-primary { background: var(--ink); color: var(--fg); }
.band-paper .btn-primary:hover { background: transparent; color: var(--ink); }
.band-paper .features span, .band-paper .lede, .band-paper .note { color: var(--ink-soft); }
.band-paper .features li { border-color: rgba(0, 0, 0, 0.2); }

/* Brand banner melts into the section colour */
.band-banner {
	width: min(30rem, 100%);
	margin: 0 0 2.5rem;
	-webkit-mask-image: radial-gradient(ellipse 70% 75% at 50% 50%, #000 55%, transparent 100%);
	mask-image: radial-gradient(ellipse 70% 75% at 50% 50%, #000 55%, transparent 100%);
	margin-inline-start: -1.5rem;
}

.split {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
	gap: clamp(2rem, 5vw, 4.5rem);
	align-items: center;
	margin-bottom: 3rem;
}
.lede { font-size: clamp(1.05rem, 1.5vw, 1.2rem); color: var(--fg-soft); max-width: 60ch; margin: 0; }

.shot { margin: 0; }
.shot img { border-radius: var(--radius); box-shadow: 0 1.5rem 3rem rgba(0, 0, 0, 0.5); }

.list-title { margin: 3.5rem 0 1.5rem; }

.features {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr));
	gap: 1.75rem 3rem;
}
.features li { border-top: 1px solid var(--rule); padding-top: 1rem; }
.features strong { display: block; margin-bottom: 0.3rem; }
.features span { color: var(--fg-soft); }
.features-one { grid-template-columns: 1fr; gap: 1.25rem; }

.note { max-width: 64ch; margin: 3rem 0 0; color: var(--fg-soft); }

/* ---------- YouTube on demand ---------- */

.yt {
	position: relative;
	display: block;
	aspect-ratio: 16 / 9;
	width: 100%;
	max-width: 56rem;
	margin: 0 auto;
	border-radius: var(--radius);
	overflow: hidden;
	background: var(--black);
	color: var(--fg);
	text-decoration: none;
}
.yt img { width: 100%; height: 100%; object-fit: cover; opacity: 0.82; transition: opacity 0.2s; }
.yt:hover img { opacity: 1; }
.yt-play {
	position: absolute;
	inset: 0;
	margin: auto;
	width: 4.5rem;
	height: 4.5rem;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.6);
	border: 1px solid var(--fg);
}
.yt-play::after {
	content: "";
	position: absolute;
	inset: 0;
	margin: auto;
	width: 0;
	height: 0;
	transform: translateX(0.18rem);
	border-style: solid;
	border-width: 0.75rem 0 0.75rem 1.2rem;
	border-color: transparent transparent transparent var(--fg);
}
.yt-title {
	position: absolute;
	inset-inline: 0;
	bottom: 0;
	padding: 2rem 1.25rem 1rem;
	background: linear-gradient(transparent, rgba(0, 0, 0, 0.75));
	font-size: 0.95rem;
	text-align: start;
}
.yt-on iframe { width: 100%; height: 100%; border: 0; }
.yt-side { max-width: none; }

/* ---------- Steps (Level Editor page) ---------- */

.steps {
	list-style: none;
	counter-reset: step;
	margin: 2rem 0 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
	gap: 2rem;
}
.steps li { counter-increment: step; }
.steps li::before {
	content: counter(step);
	display: block;
	font-size: 3rem;
	font-weight: 300;
	line-height: 1;
	margin-bottom: 0.75rem;
	padding-bottom: 0.75rem;
	border-bottom: 2px solid var(--wood);
	width: 2.5ch;
}
.steps strong { display: block; margin-bottom: 0.3rem; }
.steps span { color: var(--fg-soft); }

/* ---------- FAQ ---------- */

.faq { border-top: 1px solid var(--rule); margin-top: 1rem; }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary {
	list-style: none;
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1.5rem;
	padding: 1.25rem 0;
	cursor: pointer;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary h3 { font-weight: 400; font-size: 1.15rem; }
.faq summary::after {
	content: "";
	flex: none;
	width: 0.7rem;
	height: 0.7rem;
	border-inline-end: 1.5px solid currentColor;
	border-bottom: 1.5px solid currentColor;
	transform: rotate(45deg) translateY(-0.2rem);
	transition: transform 0.2s;
}
.faq details[open] summary::after { transform: rotate(-135deg) translateY(-0.1rem); }
.faq details p { color: var(--fg-soft); max-width: 62ch; padding-bottom: 0.5rem; }

/* ---------- Footer ---------- */

.site-footer { background: var(--black); padding-block: 3.5rem; font-size: 0.95rem; }
.footer-logo { width: 9rem; margin-bottom: 1.75rem; opacity: 0.9; }
.footer-links { list-style: none; margin: 0 0 1.5rem; padding: 0; display: flex; flex-wrap: wrap; gap: 0.6rem 1.75rem; }
.footer-links a { color: var(--fg-soft); text-decoration: none; }
.footer-links a:hover { color: var(--fg); text-decoration: underline; }
.social { list-style: none; margin: 0 0 1.75rem; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.social a {
	display: inline-flex; align-items: center; justify-content: center;
	width: 2.75rem; height: 2.75rem; border-radius: 50%;
	border: 1px solid var(--rule); color: var(--fg-soft); transition: color 0.2s, border-color 0.2s;
}
.social a:hover { color: var(--fg); border-color: var(--fg); }
.social svg { width: 1.25rem; height: 1.25rem; }
.copy { color: rgba(255, 255, 255, 0.5); font-size: 0.85rem; margin: 0; }
.copy a { text-decoration: none; }

/* ---------- Language suggestion banner (site.js) ---------- */

.lang-suggest {
	position: fixed;
	inset-inline: 1rem;
	bottom: max(1rem, env(safe-area-inset-bottom));
	z-index: 70;
	margin-inline: auto;
	max-width: 32rem;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 0.75rem;
	padding: 0.9rem 1rem;
	background: var(--black);
	border: 1px solid var(--rule);
	border-radius: var(--radius);
	box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.5);
}
.lang-suggest .button {
	display: inline-flex; align-items: center; min-height: 2.4rem; padding: 0.35rem 1rem;
	border-radius: var(--radius); border: 1px solid var(--fg); background: transparent; color: var(--fg);
	font: inherit; font-weight: 500; text-decoration: none; cursor: pointer;
}
.lang-suggest .button.primary { background: var(--fg); color: var(--black); }

/* ---------- Tablet & phone ---------- */

@media (max-width: 960px) {
	.menu-toggle {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		width: 2.75rem;
		height: 2.75rem;
		margin-inline-start: auto;
		padding: 0;
		border: 1px solid var(--rule);
		border-radius: var(--radius);
		background: transparent;
		color: var(--fg);
		cursor: pointer;
	}
	.burger, .burger::before, .burger::after {
		display: block; width: 1.15rem; height: 1.5px; background: currentColor; position: relative; transition: transform 0.2s, background 0.2s;
	}
	.burger::before, .burger::after { content: ""; position: absolute; left: 0; }
	.burger::before { top: -0.38rem; }
	.burger::after { top: 0.38rem; }
	.open .burger { background: transparent; }
	.open .burger::before { transform: translateY(0.38rem) rotate(45deg); }
	.open .burger::after { transform: translateY(-0.38rem) rotate(-45deg); }

	/* Menu panel (only hidden when JavaScript can open it) */
	.js .site-menu { display: none; }
	.site-header.open .site-menu, html:not(.js) .site-menu {
		display: flex;
		position: absolute;
		top: 100%;
		inset-inline: 0;
		flex-direction: column;
		align-items: stretch;
		gap: 1rem;
		padding: 1rem 1.25rem 1.5rem;
		background: var(--black);
		border-bottom: 1px solid var(--rule);
		max-height: calc(100vh - var(--header-h));
		overflow-y: auto;
	}
	html:not(.js) .site-menu { position: static; }
	.nav { flex-direction: column; }
	.nav a { padding: 0.85rem 0.25rem; font-size: 1.15rem; border-bottom: 1px solid var(--rule); border-radius: 0; color: var(--fg); }
	.nav a[aria-current] { box-shadow: none; }
	.lang summary { padding: 0.6rem 0.25rem; }
	.lang ul { position: static; margin-top: 0.5rem; background: transparent; border: 0; padding: 0; }
	.site-menu .btn-sm { min-height: 3rem; font-size: 1rem; }

	.split { grid-template-columns: 1fr; }
	.band-banner { margin-inline-start: -1rem; }
}

@media (max-width: 480px) {
	body { font-size: 1rem; }
	.hero { padding-block: 3rem; }
	.hero h1 { gap: 1.75rem; }
	.actions .btn { width: 100%; }
	.yt-play { width: 3.75rem; height: 3.75rem; }
}

/* ---------- Scripts that need special care ---------- */

html[lang="ar"] .lockup::after { letter-spacing: 0; }
html[lang|="ko"] body { word-break: keep-all; }
html[lang|="ja"] h2, html[lang|="zh"] h2, html[lang|="ko"] h2 { max-width: 18em; }

/* ---------- Motion ---------- */

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { animation: none !important; transition: none !important; }
}
