/* Nomade Labs landing page. The studio's frame is calm (cream and ink, like the privacy pages);
   Professor Glub's card wears the game's own lab look (deep purple tiles, lime, Lilita One). */

@font-face {
	font-family: "Nunito";
	src: url("fonts/nunito.woff2") format("woff2");
	font-weight: 200 1000;
	font-display: swap;
}

@font-face {
	font-family: "Lilita One";
	src: url("fonts/lilita-one.woff2") format("woff2");
	font-weight: 400;
	font-display: swap;
}

:root {
	--bg: #f4f1e6;
	--surface: #fffdf7;
	--text: #1b1132;
	--muted: #4a3d63;
	--line: #d8d0e8;
	--accent: #4d2fb8;
	--accent-lip: #2f1a80;
	--accent-ink: #ffffff;
	--focus: #4d2fb8;

	/* Professor Glub's lab: the same in light and dark */
	--lab-top: #2d1b4e;
	--lab-bottom: #1b1132;
	--lab-text: #f3ecff;
	--lab-muted: #b9a8d6;
	--lab-line: rgba(255, 255, 255, 0.1);
	--lime: #b6ff3b;
	--lime-lip: #3d6b06;
	--phone: #0d0819;

	--radius-lg: 32px;
	--radius-md: 18px;
	--gutter: 16px;

	color-scheme: light;
}

@media (prefers-color-scheme: dark) {
	:root {
		--bg: #120b22;
		--surface: #1b1132;
		--text: #f3ecff;
		--muted: #b9a8d6;
		--line: #3a2d5c;
		--accent: #b6ff3b;
		--accent-lip: #4f8a0c;
		--accent-ink: #1b1132;
		--focus: #b6ff3b;
		color-scheme: dark;
	}
}

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

html {
	scroll-behavior: smooth;
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font: 500 1.0625rem/1.6 "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}

img,
svg {
	display: block;
	max-width: 100%;
}

a {
	color: inherit;
}

:focus-visible {
	outline: 3px solid var(--focus);
	outline-offset: 3px;
	border-radius: 8px;
}

.wrap {
	width: 100%;
	max-width: 1160px;
	margin-inline: auto;
	padding-inline: var(--gutter);
}

@media (min-width: 640px) {
	:root {
		--gutter: 28px;
	}
}

.skip-link {
	position: absolute;
	left: 12px;
	top: -60px;
	z-index: 10;
	padding: 10px 16px;
	border-radius: 12px;
	background: var(--text);
	color: var(--bg);
	font-weight: 800;
	text-decoration: none;
}

.skip-link:focus {
	top: 12px;
}

/* Header */

.header-row {
	display: flex;
	align-items: center;
	gap: 16px;
	padding-block: 18px;
}

.brand {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	text-decoration: none;
	margin-right: auto;
}

.brand-mark {
	flex: none;
}

.brand-name {
	font-weight: 900;
	font-size: 1.2rem;
	letter-spacing: -0.01em;
}

.header-nav {
	display: none;
	gap: 24px;
	margin-right: 8px;
}

.header-nav a {
	color: var(--muted);
	font-weight: 800;
	font-size: 0.95rem;
	text-decoration: none;
}

.header-nav a:hover {
	color: var(--text);
}

@media (min-width: 640px) {
	.header-nav {
		display: flex;
	}
}

.lang-switch {
	display: inline-flex;
	padding: 3px;
	border: 1px solid var(--line);
	border-radius: 999px;
	background: var(--surface);
}

.lang-switch button {
	min-width: 40px;
	height: 32px;
	padding: 0 10px;
	border: 0;
	border-radius: 999px;
	background: transparent;
	color: var(--muted);
	font: 800 0.8rem/1 "Nunito", system-ui, sans-serif;
	letter-spacing: 0.04em;
	cursor: pointer;
}

.lang-switch button:hover {
	color: var(--text);
}

.lang-switch button[aria-pressed="true"] {
	background: var(--text);
	color: var(--bg);
}

/* Hero */

.hero {
	padding-top: clamp(40px, 8vw, 96px);
	padding-bottom: clamp(48px, 7vw, 88px);
}

.hero-pill {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	max-width: 100%;
	padding: 5px 16px 5px 5px;
	border: 1px solid var(--line);
	border-radius: 999px;
	background: var(--surface);
	font-weight: 800;
	font-size: 0.9rem;
	line-height: 1.25;
	text-decoration: none;
	transition: border-color 0.15s ease, transform 0.15s ease;
}

.hero-pill img {
	flex: none;
	border-radius: 8px;
}

.hero-pill:hover {
	border-color: var(--accent);
	transform: translateY(-1px);
}

.hero-pill-arrow {
	color: var(--accent);
}

.hero h1 {
	max-width: 13ch;
	margin: 28px 0 0;
	font-weight: 900;
	font-size: clamp(2.6rem, 8.2vw, 5.4rem);
	line-height: 1;
	letter-spacing: -0.035em;
	text-wrap: balance;
}

.lead {
	max-width: 36rem;
	margin: 22px 0 0;
	color: var(--muted);
	font-size: clamp(1.08rem, 2.2vw, 1.3rem);
	line-height: 1.55;
	text-wrap: pretty;
}

.actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 34px;
}

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 52px;
	padding: 0 24px;
	border-radius: 999px;
	font-weight: 900;
	font-size: 1rem;
	text-decoration: none;
	transition: transform 0.12s ease, box-shadow 0.12s ease, background-color 0.15s ease;
}

.btn-primary {
	background: var(--accent);
	color: var(--accent-ink);
	box-shadow: 0 4px 0 var(--accent-lip);
}

.btn-primary:hover {
	transform: translateY(-1px);
	box-shadow: 0 5px 0 var(--accent-lip);
}

.btn-primary:active {
	transform: translateY(3px);
	box-shadow: 0 1px 0 var(--accent-lip);
}

.btn-ghost {
	border: 2px solid var(--line);
	color: var(--text);
}

.btn-ghost:hover {
	border-color: var(--text);
}

/* Professor Glub */

.glub {
	scroll-margin-top: 16px;
}

.lab {
	position: relative;
	overflow: hidden;
	padding: 32px 20px 24px;
	border-radius: var(--radius-lg);
	color: var(--lab-text);
	background:
		linear-gradient(rgba(255, 255, 255, 0.04) 2px, transparent 2px) 0 0 / 64px 64px,
		linear-gradient(90deg, rgba(255, 255, 255, 0.04) 2px, transparent 2px) 0 0 / 64px 64px,
		radial-gradient(120% 80% at 80% 10%, rgba(182, 255, 59, 0.1), transparent 60%),
		linear-gradient(180deg, var(--lab-top), var(--lab-bottom));
	box-shadow: 0 30px 60px -30px rgba(27, 17, 50, 0.55);
}

@media (prefers-color-scheme: dark) {
	.lab {
		box-shadow: 0 0 0 1px var(--lab-line);
	}
}

@media (min-width: 640px) {
	.lab {
		padding: 48px 44px 32px;
	}
}

.lab-intro {
	display: grid;
	gap: 36px;
}

@media (min-width: 980px) {
	.lab-intro {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
		align-items: center;
		gap: 40px;
	}
}

.kicker {
	margin: 0;
	color: var(--lime);
	font-weight: 900;
	font-size: 0.85rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.glub-head {
	display: flex;
	align-items: center;
	gap: 18px;
	margin-top: 16px;
}

.glub-icon {
	flex: none;
	width: clamp(64px, 12vw, 84px);
	height: auto;
	border-radius: 22%;
	box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.12), 0 12px 24px -8px rgba(0, 0, 0, 0.6);
}

.glub-title {
	margin: 0;
	color: var(--lime);
	font: 400 clamp(2.4rem, 7vw, 4rem)/0.95 "Lilita One", "Nunito", system-ui, sans-serif;
	letter-spacing: 0.005em;
	text-shadow: 0 4px 0 var(--lime-lip);
}

.glub-tagline {
	margin: 22px 0 0;
	font-weight: 900;
	font-size: clamp(1.15rem, 2.4vw, 1.4rem);
	line-height: 1.35;
	text-wrap: balance;
}

.glub-desc {
	max-width: 34rem;
	margin: 12px 0 0;
	color: var(--lab-muted);
	text-wrap: pretty;
}

.play-badge {
	display: inline-block;
	margin-top: 26px;
	border-radius: 10px;
	transition: transform 0.12s ease;
}

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

.play-badge img {
	width: auto;
	height: 60px;
}

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

.facts li {
	padding: 4px 12px;
	border: 1px solid var(--lab-line);
	border-radius: 999px;
	color: var(--lab-muted);
	font-weight: 800;
	font-size: 0.85rem;
}

/* The three phones: a fan on wide screens, a row you swipe on phones */

.phones {
	display: flex;
	gap: 14px;
	margin: 0 -20px;
	padding: 6px 20px 18px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
}

.phones::-webkit-scrollbar {
	display: none;
}

.phone {
	flex: 0 0 min(64%, 250px);
	margin: 0;
	padding: 6px;
	border-radius: 30px;
	background: var(--phone);
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1), 0 24px 44px -16px rgba(0, 0, 0, 0.7);
	scroll-snap-align: center;
}

.phone img {
	width: 100%;
	height: auto;
	border-radius: 24px;
}

@media (min-width: 640px) {
	.phones {
		position: relative;
		justify-content: center;
		height: 470px;
		margin: 0;
		padding: 0;
		overflow: visible;
	}

	.phone {
		position: absolute;
		top: 30px;
		left: 50%;
		width: 210px;
		transition: transform 0.25s ease;
	}

	.phone-center {
		top: 0;
		z-index: 2;
		width: 236px;
		transform: translateX(-50%);
	}

	.phone-left {
		transform: translateX(calc(-50% - 150px)) rotate(-8deg);
	}

	.phone-right {
		transform: translateX(calc(-50% + 150px)) rotate(8deg);
	}

	.phones:hover .phone-left {
		transform: translateX(calc(-50% - 166px)) rotate(-10deg);
	}

	.phones:hover .phone-right {
		transform: translateX(calc(-50% + 166px)) rotate(10deg);
	}
}

@media (prefers-reduced-motion: reduce) {
	.phone,
	.btn,
	.hero-pill,
	.play-badge {
		transition: none;
	}

	html {
		scroll-behavior: auto;
	}
}

.features {
	display: grid;
	gap: 26px 32px;
	margin: 40px 0 0;
	padding: 36px 0 0;
	border-top: 1px solid var(--lab-line);
	list-style: none;
}

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

@media (min-width: 900px) {
	.features {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 30px 40px;
	}
}

.feature h3 {
	margin: 14px 0 0;
	font-weight: 900;
	font-size: 1.08rem;
	line-height: 1.3;
}

.feature p {
	margin: 6px 0 0;
	color: var(--lab-muted);
	font-size: 0.97rem;
	line-height: 1.55;
}

.feature-icon {
	display: grid;
	place-items: center;
	width: 46px;
	height: 46px;
	border-radius: 15px;
	color: var(--potion);
	background: color-mix(in srgb, var(--potion) 16%, transparent);
	box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--potion) 35%, transparent);
}

.feature-icon svg {
	width: 24px;
	height: 24px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

/* the potion colors of the game's tubes */
.potion-lime { --potion: #b6ff3b; }
.potion-amber { --potion: #ffc83a; }
.potion-pink { --potion: #ff5fae; }
.potion-blue { --potion: #4cc3ff; }
.potion-orange { --potion: #ff9a3c; }
.potion-violet { --potion: #b79bff; }

.lab-links {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 22px;
	margin: 36px 0 0;
	padding-top: 20px;
	border-top: 1px solid var(--lab-line);
	font-size: 0.92rem;
	font-weight: 800;
}

.lab-links a {
	color: var(--lab-muted);
	text-decoration: underline;
	text-decoration-color: rgba(185, 168, 214, 0.4);
	text-underline-offset: 3px;
}

.lab-links a:hover {
	color: var(--lab-text);
	text-decoration-color: currentColor;
}

.lab :focus-visible {
	outline-color: var(--lime);
}

/* Contact */

.contact {
	display: grid;
	gap: 28px;
	align-items: end;
	padding-top: clamp(64px, 9vw, 112px);
	padding-bottom: clamp(64px, 9vw, 112px);
	scroll-margin-top: 16px;
}

@media (min-width: 860px) {
	.contact {
		grid-template-columns: minmax(0, 1fr) auto;
	}
}

.contact h2 {
	margin: 0;
	font-weight: 900;
	font-size: clamp(2.1rem, 5.5vw, 3.4rem);
	line-height: 1.05;
	letter-spacing: -0.03em;
}

.contact .lead {
	margin-top: 14px;
}

.btn-mail {
	justify-self: start;
	max-width: 100%;
	min-height: 58px;
	padding: 0 26px;
	font-size: 1.05rem;
	overflow-wrap: anywhere;
}

.btn-mail svg {
	flex: none;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

/* Footer */

.site-footer {
	border-top: 1px solid var(--line);
}

.footer-row {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 6px 24px;
	padding-block: 26px 32px;
	color: var(--muted);
	font-size: 0.88rem;
}

.footer-row p {
	margin: 0;
}

.trademark {
	opacity: 0.8;
}
