/*
 * #SaveTheWeb coming-soon page (savetheweb#38).
 *
 * Standalone on purpose: no build step and no app runtime, so it can be served
 * as plain files weeks before the app exists. Colours come ONLY from the brand
 * primitives in tokens.css — a byte-identical copy of src/lib/styles/tokens.css,
 * held equal by a test — so the palette stays a one-file change.
 */

:root {
	--font-display: 'Helvetica Neue', Helvetica, Arial, 'Liberation Sans', system-ui, sans-serif;
	--font-mono:
		ui-monospace, 'SF Mono', 'JetBrains Mono', 'Cascadia Code', Menlo, Consolas, monospace;
	color-scheme: light dark;
}

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

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

body {
	margin: 0;
	min-height: 100dvh;
	display: flex;
	flex-direction: column;
	background: var(--stw-bg);
	color: var(--stw-fg);
	font-family: var(--font-display);
	line-height: 1.5;
}

a {
	color: inherit;
}

:focus-visible {
	outline: 2px solid var(--stw-accent-2);
	outline-offset: 3px;
}

/* --- top bar ------------------------------------------------------------- */

.bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	width: 100%;
	max-width: 64rem;
	margin: 0 auto;
	padding: 1.25rem 1.5rem;
}

.wordmark {
	display: inline-flex;
	align-items: baseline;
	gap: 0.06em;
	font-size: 1.25rem;
	font-weight: 800;
	letter-spacing: -0.035em;
	text-decoration: none;
	white-space: nowrap;
}

.wordmark .mark {
	width: 0.6em;
	height: 1.02em;
	/* the SVG box is optically taller than the cap height; without this it rides high */
	transform: translateY(0.1em);
}

/* --- stamps -------------------------------------------------------------- */

.stamp {
	display: inline-flex;
	align-items: center;
	padding: 0.25rem 0.625rem;
	font-family: var(--font-mono);
	font-size: 0.66rem;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	background: var(--stw-accent);
	color: var(--stw-on-accent);
	rotate: var(--stw-tilt);
}

.stamp--outline {
	background: transparent;
	color: inherit;
	border: 1.5px solid currentColor;
}

.stamp--flat {
	rotate: none;
}

/* --- hero ---------------------------------------------------------------- */

main {
	flex: 1;
	width: 100%;
	max-width: 64rem;
	margin: 0 auto;
	padding: 2.5rem 1.5rem 4rem;
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 3rem;
}

.hero {
	display: flex;
	flex-direction: column;
	gap: 2rem;
}

.hero__mark {
	flex-shrink: 0;
	width: 4.8rem;
	height: 8.25rem;
	rotate: var(--stw-mark-tilt);
}

.hero__copy {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
	min-width: 0;
}

h1 {
	margin: 0;
	font-size: clamp(3.5rem, 13vw, 6rem);
	line-height: 0.9;
	font-weight: 800;
	letter-spacing: -0.035em;
	text-transform: uppercase;
}

.accent {
	color: var(--stw-accent);
}

.lede {
	margin: 0;
	max-width: 42ch;
	font-size: 1.125rem;
	font-weight: 500;
	text-wrap: balance;
}

.stamps {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem 1rem;
}

.proofline {
	font-family: var(--font-mono);
	font-size: 0.7rem;
	letter-spacing: 0.05em;
	color: var(--stw-muted);
}

@media (min-width: 48rem) {
	.hero {
		flex-direction: row;
		align-items: flex-start;
		gap: 3.5rem;
	}

	.hero__mark {
		width: 5.1rem;
		height: 8.8rem;
	}
}

/* --- waitlist form ------------------------------------------------------- */

.waitlist {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	max-width: 32rem;
	margin-top: 0.5rem;
}

.waitlist label {
	font-family: var(--font-mono);
	font-size: 0.7rem;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.waitlist__row {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.waitlist input[type='email'] {
	flex: 1 1 14rem;
	min-width: 0;
	padding: 0.75rem 0.875rem;
	font: inherit;
	font-size: 1rem;
	color: var(--stw-fg);
	background: var(--stw-panel);
	border: 1.5px solid var(--stw-line);
	border-radius: 0.375rem;
}

.waitlist input[type='email']::placeholder {
	color: var(--stw-faint);
}

.waitlist input[type='email']:focus-visible {
	border-color: var(--stw-accent-2);
	outline-offset: 1px;
}

.waitlist button {
	flex: 0 0 auto;
	padding: 0.75rem 1.25rem;
	font: inherit;
	font-weight: 700;
	color: var(--stw-on-accent);
	background: var(--stw-accent);
	border: 0;
	border-radius: 0.375rem;
	cursor: pointer;
}

.waitlist button:hover {
	filter: brightness(1.05);
}

.waitlist button[disabled] {
	cursor: progress;
	opacity: 0.7;
}

.consent {
	margin: 0;
	font-size: 0.8rem;
	color: var(--stw-muted);
}

.status {
	margin: 0;
	min-height: 1.25rem;
	font-size: 0.9rem;
	font-weight: 600;
}

.status[data-state='ok'] {
	color: var(--stw-fg);
}

.status[data-state='err'] {
	color: var(--stw-destructive);
}

/* Honeypot: off-screen rather than display:none, which some bots detect. */
.hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* No-JS results: the endpoint redirects to /#joined or /#waitlist-error. */
.notice {
	display: none;
	max-width: 32rem;
	margin: 0;
	padding: 0.75rem 1rem;
	border-left: 3px solid var(--stw-accent-2);
	background: var(--stw-panel);
	font-size: 0.95rem;
}

.notice--err {
	border-left-color: var(--stw-destructive);
}

.notice:target {
	display: block;
}

/* --- pipeline ------------------------------------------------------------ */

hr {
	width: 100%;
	margin: 0;
	border: 0;
	border-top: 1px solid var(--stw-line);
}

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

.pipeline li {
	padding-top: 0.75rem;
	border-top: 2px solid var(--stw-accent);
}

.pipeline__k {
	font-family: var(--font-mono);
	font-size: 0.7rem;
	letter-spacing: 0.1em;
	color: var(--stw-accent);
}

.pipeline h2 {
	margin: 0.375rem 0 0;
	font-size: 1rem;
	font-weight: 700;
	letter-spacing: -0.01em;
}

.pipeline p {
	margin: 0.375rem 0 0;
	font-size: 0.875rem;
	color: var(--stw-muted);
}

@media (min-width: 40rem) {
	.pipeline {
		grid-template-columns: repeat(3, 1fr);
	}
}

/* --- footer -------------------------------------------------------------- */

.foot {
	width: 100%;
	max-width: 64rem;
	margin: 0 auto;
	padding: 1.5rem;
	font-family: var(--font-mono);
	font-size: 0.7rem;
	letter-spacing: 0.05em;
	color: var(--stw-muted);
}
