/* The papoi.ai waitlist page. Builds on /legal/legal.css (fonts, colours, header, footer). */

:root {
	--sky: #5ab0ff;
	--lilac: #b8a1ff;
	--coral: #ff6a3d;
	--leaf: #86c95a;
}

body {
	display: flex;
	flex-direction: column;
	min-height: 100dvh;
}

main.waitlist {
	flex: 1;
	max-width: 44rem;
	width: 100%;
	padding-top: clamp(2.5rem, 6vw, 4.5rem);
}

.hero {
	text-align: center;
}

/* Holds the creature's <symbol>; takes no space. */
.sprite {
	position: absolute;
	width: 0;
	height: 0;
	overflow: hidden;
}

/* The creature and two siblings. */
.creatures {
	display: flex;
	align-items: flex-end;
	justify-content: center;
	gap: 0.5rem;
	margin-bottom: 1.75rem;
}

.creature {
	display: block;
	aspect-ratio: 304 / 352;
	transform-origin: 50% 100%;
}

.creature.main {
	height: 112px;
	color: var(--primary);
	animation: breathe 4.2s ease-in-out infinite;
}

.creature.sibling {
	height: 68px;
	animation: breathe 4.2s ease-in-out infinite;
}

.creature.left {
	color: var(--lilac);
	animation-delay: -1.4s;
}

.creature.right {
	color: var(--coral);
	animation-delay: -2.8s;
}

@keyframes breathe {
	0%,
	100% {
		transform: scale(1, 1);
	}
	50% {
		transform: scale(1.015, 0.97);
	}
}

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

.eyebrow {
	display: inline-block;
	margin: 0 0 1rem;
	padding: 0.25rem 0.75rem;
	border-radius: 999px;
	background: var(--primary);
	color: #1d1a26;
	font-family: "Outfit Variable", ui-sans-serif, system-ui, sans-serif;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.01em;
}

.hero h1 {
	margin: 0 auto 1rem;
	max-width: 14em;
	font-size: clamp(2.25rem, 1.4rem + 4vw, 3.75rem);
	font-weight: 700;
	letter-spacing: -0.03em;
	line-height: 1.05;
}

.lede {
	margin: 0 auto 2rem;
	max-width: 34em;
	color: var(--muted-foreground);
	font-size: clamp(1rem, 0.95rem + 0.3vw, 1.125rem);
	text-wrap: pretty;
}

/* Form */

.join {
	max-width: 30rem;
	margin: 0 auto;
}

.join-row {
	display: flex;
	gap: 0.5rem;
	padding: 6px;
	border: 1px solid var(--border-strong);
	border-radius: 18px;
	background: var(--card);
	box-shadow: 0 1px 2px rgb(29 26 38 / 4%), 0 8px 24px rgb(29 26 38 / 6%);
	transition: border-color 120ms var(--ease), box-shadow 120ms var(--ease);
}

.join-row:focus-within {
	border-color: var(--ring);
}

.join input[type="email"] {
	flex: 1;
	min-width: 0;
	height: 48px;
	padding: 0 0.75rem;
	border: 0;
	border-radius: 12px;
	background: transparent;
	color: var(--foreground);
	font: inherit;
	font-size: 16px; /* keeps iOS from zooming in */
}

.join input[type="email"]:focus {
	outline: none;
}

.join input[type="email"]::placeholder {
	color: var(--muted-foreground);
	opacity: 0.8;
}

.join button,
.share {
	flex: none;
	height: 48px;
	padding: 0 1.25rem;
	border: 0;
	border-radius: 12px;
	background: var(--primary);
	color: #1d1a26;
	font-family: "Outfit Variable", ui-sans-serif, system-ui, sans-serif;
	font-size: 16px;
	font-weight: 600;
	letter-spacing: -0.005em;
	cursor: pointer;
	transition: transform 120ms var(--ease), filter 120ms var(--ease);
}

.join button:hover,
.share:hover {
	filter: brightness(0.96);
}

.join button:active,
.share:active {
	transform: scale(0.97);
}

.join button:disabled {
	cursor: progress;
	opacity: 0.6;
}

.join-error {
	min-height: 1.5em;
	margin: 0.5rem 0 0;
	color: #c2410c;
	font-size: 14px;
	font-weight: 510;
}

.join-error:empty {
	min-height: 0;
}

.join-note {
	margin: 0.75rem 0 0;
	color: var(--muted-foreground);
	font-size: 13px;
}

.turnstile {
	display: flex;
	justify-content: center;
	margin-top: 0.75rem;
}

.turnstile:empty {
	display: none;
}

/* Off-screen field that only bots fill. */
.honeypot {
	position: absolute;
	left: -10000px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* After joining */

.joined {
	max-width: 30rem;
	margin: 0 auto;
	padding: 1.5rem;
	border-radius: 18px;
	background: var(--card);
	border: 1px solid var(--border);
	animation: arrive 260ms var(--ease);
}

.joined:focus {
	outline: none;
}

.joined p {
	margin: 0;
}

.joined-title {
	margin-bottom: 0.25rem !important;
	font-family: "Outfit Variable", ui-sans-serif, system-ui, sans-serif;
	font-size: 1.375rem;
	font-weight: 700;
	letter-spacing: -0.02em;
}

.joined .joined-email {
	font-weight: 600;
	overflow-wrap: anywhere;
}

.share {
	margin-top: 1.25rem;
}

.share-status {
	min-height: 1.5em;
	margin-top: 0.5rem !important;
	color: var(--muted-foreground);
	font-size: 14px;
}

@keyframes arrive {
	from {
		opacity: 0;
		transform: translateY(6px);
	}
}

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

/* How it works */

.steps {
	margin-top: clamp(3.5rem, 9vw, 5.5rem);
}

.steps h2 {
	margin: 0 0 1.25rem;
	font-size: 1.25rem;
	text-align: center;
}

.steps ol {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 0.75rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.steps li {
	padding: 1.25rem;
	border: 1px solid var(--border);
	border-radius: 16px;
	background: var(--card);
}

.steps h3 {
	margin: 0.75rem 0 0.25rem;
	font-size: 1.0625rem;
	font-weight: 600;
}

.steps p {
	margin: 0;
	color: var(--muted-foreground);
	font-size: 14px;
	line-height: 1.5;
}

.step-number {
	display: inline-grid;
	place-items: center;
	width: 2rem;
	height: 2rem;
	border-radius: 999px;
	color: #1d1a26;
	font-family: "Outfit Variable", ui-sans-serif, system-ui, sans-serif;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
}

.steps li:nth-child(1) .step-number {
	background: var(--sky);
}

.steps li:nth-child(2) .step-number {
	background: var(--primary);
}

.steps li:nth-child(3) .step-number {
	background: var(--leaf);
}

@media (max-width: 40rem) {
	.join-row {
		flex-direction: column;
	}

	.join input[type="email"] {
		text-align: center;
	}

	.join button {
		width: 100%;
	}

	.steps ol {
		grid-template-columns: 1fr;
	}
}

@media (prefers-color-scheme: dark) {
	.join-error {
		color: #ff8a65;
	}

	.join-row {
		box-shadow: none;
	}
}
