/* Reachy Alive: Space landing page */

:root {
	--ink: #1e1b33;
	--muted: #5f5b73;
	--line: #ebe8f1;
	--paper: #ffffff;
	--accent: #e97b12;
	--accent-ink: #b85a00;
	--accent-soft: #fff4e6;

	--font-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
	--font-body: "Figtree", "Segoe UI", system-ui, sans-serif;

	/* The robot breathes at 0.25 Hz: one breath every 4 s. */
	--breath: 4s;

	--width: 68rem;
	--radius: 1.25rem;
}

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

body {
	margin: 0;
	/* A soft warm light behind the hero, fading into white. */
	background:
		radial-gradient(56rem 32rem at 85% -6rem, var(--accent-soft), transparent 70%),
		var(--paper);
	color: var(--ink);
	font-family: var(--font-body);
	font-size: 1.0625rem;
	line-height: 1.6;
}

main {
	max-width: var(--width);
	margin: 0 auto;
	padding: 0 1.5rem;
}

h1,
h2,
h3 {
	font-family: var(--font-display);
	font-weight: 700;
	line-height: 1.15;
	margin: 0 0 0.75rem;
}

h1 {
	font-size: clamp(2.75rem, 7vw, 4.5rem);
	letter-spacing: -0.02em;
}

h2 {
	font-size: clamp(1.75rem, 4vw, 2.25rem);
	letter-spacing: -0.01em;
}

h3 {
	font-size: 1.2rem;
	font-weight: 500;
}

p {
	margin: 0 0 1rem;
	max-width: 38rem;
}

a {
	color: var(--accent-ink);
	text-underline-offset: 0.2em;
}

a:focus-visible {
	outline: 3px solid var(--accent);
	outline-offset: 3px;
	border-radius: 0.25rem;
}

.lead {
	font-size: 1.3rem;
	color: var(--ink);
}

section {
	padding: 4.5rem 0;
}

section + section {
	border-top: 1px solid var(--line);
}

/* Hero */

.hero {
	display: grid;
	grid-template-columns: 1fr 1fr;
	align-items: center;
	gap: 3rem;
	padding-top: 5rem;
}

.hero-text p:not(.lead):not(.badge) {
	color: var(--muted);
}

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

.button {
	display: inline-block;
	padding: 0.8rem 1.4rem;
	border-radius: 999px;
	background: var(--accent);
	color: #fff;
	font-weight: 600;
	text-decoration: none;
}

.button:hover {
	background: var(--accent-ink);
}

.button-quiet {
	background: transparent;
	color: var(--accent-ink);
	box-shadow: inset 0 0 0 2px var(--accent);
}

.button-quiet:hover {
	background: var(--accent-soft);
}

.hero-clip {
	position: relative;
	margin: 0;
	padding: 2.5rem;
}

/* The one animated element: a halo breathing in time with the robot. */
.breath {
	position: absolute;
	inset: -4% -14%;
	border-radius: 50%;
	background: radial-gradient(closest-side, #ffd3a1, #ffe6c7 55%, transparent);
	animation: breathe var(--breath) ease-in-out infinite;
}

@keyframes breathe {
	0%,
	100% {
		transform: scale(0.92);
	}

	50% {
		transform: scale(1.04);
	}
}

@media (prefers-reduced-motion: reduce) {
	.breath {
		animation: none;
	}
}

/* Video frames. A pale background shows until the clip loads. */

.clip {
	position: relative;
	aspect-ratio: 4 / 5;
	border-radius: var(--radius);
	overflow: hidden;
	background: #fffaf3;
}

.clip video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Moves */

.clips {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1.5rem;
	margin-top: 1.5rem;
}

.clips figure {
	margin: 0;
	padding: 0.6rem;
	border-radius: calc(var(--radius) + 0.6rem);
	background: var(--accent-soft);
}

.clips figcaption {
	padding: 0.6rem 0.3rem 0.2rem;
	color: var(--accent-ink);
	font-weight: 600;
}

.note {
	margin-top: 1.5rem;
	color: var(--muted);
}

/* Try it: a real sequence, so the steps are numbered. */

.steps {
	list-style: none;
	counter-reset: step;
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 2rem;
	padding: 0;
	margin: 1.5rem 0 0;
}

.steps li {
	counter-increment: step;
}

.steps li::before {
	content: counter(step);
	display: grid;
	place-items: center;
	width: 2.25rem;
	height: 2.25rem;
	margin-bottom: 0.9rem;
	border-radius: 50%;
	background: var(--accent);
	color: #fff;
	font-family: var(--font-display);
	font-weight: 700;
}

.steps p {
	color: var(--muted);
}

/* Contribute: the page's main call to action. */

.contribute {
	margin: 0 -1.5rem;
	padding-left: 1.5rem;
	padding-right: 1.5rem;
	background: var(--accent-soft);
	border-radius: var(--radius);
}

section.contribute,
section.contribute + section {
	border-top: none;
}

.ways {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1rem;
	margin: 2rem 0;
}

.way {
	display: block;
	padding: 1.5rem;
	border-radius: var(--radius);
	background: var(--paper);
	color: var(--ink);
	text-decoration: none;
	border: 2px solid transparent;
}

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

.way h3 {
	color: var(--accent-ink);
}

.way p {
	margin: 0;
	color: var(--muted);
}

/* How it works */

.inside p {
	color: var(--muted);
}

/* Status badge, under the lead */

.badge {
	display: inline-block;
	padding: 0.3rem 0.8rem;
	border-radius: 999px;
	background: var(--accent-soft);
	color: var(--accent-ink);
	font-size: 0.95rem;
	font-weight: 600;
}

/* Where it's going: the current stage is the one in color. */

.stages {
	list-style: none;
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 1.5rem;
	padding: 0;
	margin: 1.5rem 0;
}

.stages li {
	padding-top: 1rem;
	border-top: 3px solid var(--line);
}

.stages li.current {
	border-top-color: var(--accent);
}

.stages li.current h3 {
	color: var(--accent-ink);
}

.stages p {
	margin: 0;
	color: var(--muted);
}

.stages strong {
	color: var(--ink);
}

/* Footer */

.footer {
	max-width: var(--width);
	margin: 0 auto;
	padding: 2rem 1.5rem 3rem;
	border-top: 1px solid var(--line);
}

.footer p {
	display: flex;
	flex-wrap: wrap;
	gap: 1.5rem;
	margin: 0;
	max-width: none;
}

/* Phones */

@media (max-width: 720px) {
	section {
		padding: 3rem 0;
	}

	.hero {
		grid-template-columns: 1fr;
		padding-top: 3rem;
	}

	.clips,
	.steps,
	.ways,
	.stages {
		grid-template-columns: 1fr;
	}

	.clips {
		gap: 2rem;
	}
}