/*
Theme Name: RESET
Theme URI: https://resetmanvers.com
Author: Balliante
Description: Landing page and waiting-list sign-up for RESET, Manvers. Built to the RESET brand guidelines v1.0.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: reset
*/

/* ---------------------------------------------------------------- tokens */

:root {
	--sand: #efe9df;
	--deep-sand: #e4dcce;
	--warm-stone: #ddd5c6;
	--ink: #4a4438;
	--sage: #8a9280;
	--clay: #a8846b;

	--body: #6b6455;
	--meta: #7c7360;
	--faint: #a79e8a;
	--rule: rgba(74, 68, 56, 0.14);
	--rule-strong: rgba(74, 68, 56, 0.35);

	--sans: "Jost", "Helvetica Neue", Helvetica, Arial, sans-serif;
	--serif: "Cormorant Garamond", Garamond, "Times New Roman", serif;

	--radius: 5px;
	--ease: 0.28s ease;
}

/* ------------------------------------------------------------------ base */

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

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

body {
	margin: 0;
	background: var(--sand);
	color: var(--ink);
	font-family: var(--sans);
	font-weight: 300;
	font-size: 14px;
	line-height: 1.75;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

a {
	color: var(--ink);
	text-decoration: none;
	transition: color var(--ease);
}

a:hover {
	color: var(--sage);
}

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

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

.eyebrow {
	font-family: var(--sans);
	font-weight: 400;
	font-size: 10px;
	letter-spacing: 0.24em;
	text-transform: uppercase;
	color: var(--sage);
	margin: 0;
}

/* --------------------------------------------------------------- shell */

.shell {
	max-width: 1240px;
	margin: 0 auto;
	padding: 0 40px;
}

.page {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	min-height: 100svh;
}

/* -------------------------------------------------------------- masthead */

.masthead {
	padding: 40px 0 0;
}

.masthead__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
}

.wordmark {
	display: block;
	color: var(--ink);
	line-height: 0;
}

.wordmark svg {
	display: block;
	width: 128px;
	height: auto;
}

.masthead__meta {
	font-family: var(--sans);
	font-weight: 400;
	font-size: 10px;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: var(--meta);
	text-align: right;
}

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

.hero {
	flex: 1 0 auto;
	padding: 88px 0 96px;
}

.hero__grid {
	display: grid;
	grid-template-columns: 1.05fr 0.95fr;
	/* The third row absorbs the slack when the form is taller than the copy,
	   so the list stays tucked under the lead instead of drifting down. */
	grid-template-rows: auto auto 1fr;
	grid-template-areas:
		"intro form"
		"list  form"
		".     form";
	column-gap: 80px;
	row-gap: 56px;
	align-items: start;
}

.hero__intro {
	grid-area: intro;
	max-width: 520px;
}

.hero__title {
	font-family: var(--serif);
	font-weight: 300;
	font-size: clamp(40px, 5vw, 54px);
	line-height: 1.05;
	letter-spacing: -0.01em;
	margin: 18px 0 0;
	text-wrap: balance;
}

.hero__lead {
	font-size: 16px;
	line-height: 1.8;
	color: var(--body);
	margin: 22px 0 0;
	max-width: 470px;
	text-wrap: pretty;
}

/* ------------------------------------------------------------ promise list */

.promises {
	grid-area: list;
	list-style: none;
	margin: 0;
	padding: 0;
	max-width: 520px;
	border-top: 1px solid var(--rule);
}

.promises li {
	display: grid;
	grid-template-columns: 44px 1fr;
	gap: 20px;
	padding: 18px 0;
	border-bottom: 1px solid var(--rule);
}

.promises__num {
	font-family: var(--sans);
	font-weight: 400;
	font-size: 10px;
	letter-spacing: 0.18em;
	color: var(--faint);
	padding-top: 4px;
}

.promises__label {
	display: block;
	font-family: var(--sans);
	font-weight: 400;
	font-size: 10px;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--sage);
}

.promises__text {
	display: block;
	font-size: 13.5px;
	line-height: 1.75;
	color: var(--body);
	margin-top: 6px;
	text-wrap: pretty;
}

/* ------------------------------------------------------------------ panel */

.panel {
	grid-area: form;
	background: var(--deep-sand);
	border-radius: var(--radius);
	padding: 40px;
	position: sticky;
	top: 40px;
}

.panel__title {
	font-family: var(--serif);
	font-weight: 400;
	font-size: 27px;
	line-height: 1.15;
	margin: 12px 0 0;
}

.panel__note {
	font-size: 13.5px;
	line-height: 1.75;
	color: var(--body);
	margin: 10px 0 0;
	text-wrap: pretty;
}

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

.form {
	margin-top: 28px;
}

.field + .field {
	margin-top: 20px;
}

.field__label {
	display: block;
	font-family: var(--sans);
	font-weight: 400;
	font-size: 10px;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--sage);
	margin-bottom: 8px;
}

.field__input {
	display: block;
	width: 100%;
	min-height: 46px;
	padding: 12px 16px;
	background: var(--sand);
	border: 1px solid var(--rule);
	border-radius: var(--radius);
	color: var(--ink);
	font-family: var(--sans);
	font-weight: 300;
	font-size: 14px;
	line-height: 1.5;
	transition: border-color var(--ease), background-color var(--ease);
	appearance: none;
}

.field__input::placeholder {
	color: var(--faint);
}

.field__input:hover {
	border-color: var(--rule-strong);
}

.field__input:focus {
	border-color: var(--sage);
	outline: 2px solid rgba(138, 146, 128, 0.4);
	outline-offset: 2px;
}

.field--invalid .field__input {
	border-color: var(--clay);
}

.field__error {
	display: block;
	font-family: var(--sans);
	font-weight: 400;
	font-size: 10px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--clay);
	margin-top: 8px;
}

.form__notice {
	border: 1px solid var(--clay);
	border-radius: var(--radius);
	padding: 12px 16px;
	font-size: 13px;
	color: var(--clay);
	margin-bottom: 22px;
}

.form__trap {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.form__small {
	font-size: 11.5px;
	line-height: 1.7;
	color: var(--meta);
	margin: 16px 0 0;
	text-wrap: pretty;
}

/* --------------------------------------------------------------- dropdown */

.picker {
	position: relative;
}

.picker__summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	min-height: 46px;
	padding: 12px 16px;
	background: var(--sand);
	border: 1px solid var(--rule);
	border-radius: var(--radius);
	color: var(--body);
	font-size: 14px;
	cursor: pointer;
	list-style: none;
	transition: border-color var(--ease);
	user-select: none;
}

.picker__summary::-webkit-details-marker {
	display: none;
}

.picker__summary:hover {
	border-color: var(--rule-strong);
}

.picker[open] .picker__summary {
	border-color: var(--sage);
}

.picker__summary-text {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.picker__summary--filled .picker__summary-text {
	color: var(--ink);
}

.picker__chevron {
	flex: none;
	width: 9px;
	height: 9px;
	border-right: 1px solid var(--meta);
	border-bottom: 1px solid var(--meta);
	transform: rotate(45deg) translate(-2px, -2px);
	transition: transform var(--ease);
}

.picker[open] .picker__chevron {
	transform: rotate(225deg) translate(-1px, -1px);
}

.picker__panel {
	position: absolute;
	z-index: 20;
	top: calc(100% + 6px);
	left: 0;
	right: 0;
	max-height: 292px;
	overflow-y: auto;
	padding: 8px;
	background: var(--sand);
	/* Slightly stronger than a divider: it has to read as a floating layer
	   without a shadow. */
	border: 1px solid rgba(74, 68, 56, 0.24);
	border-radius: var(--radius);
	animation: reset-fade var(--ease) both;
}

@keyframes reset-fade {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

.option {
	display: flex;
	align-items: center;
	gap: 12px;
	min-height: 44px;
	padding: 6px 10px;
	border-radius: var(--radius);
	cursor: pointer;
	font-size: 13.5px;
	color: var(--body);
	transition: background-color var(--ease), color var(--ease);
}

.option:hover {
	background: var(--deep-sand);
	color: var(--ink);
}

.option input {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
}

.option__box {
	position: relative;
	flex: none;
	width: 18px;
	height: 18px;
	background: var(--sand);
	border: 1px solid var(--rule-strong);
	border-radius: var(--radius);
	transition: background-color var(--ease), border-color var(--ease);
}

.option__box::after {
	content: "";
	position: absolute;
	inset: 0;
	margin: auto;
	width: 4px;
	height: 8px;
	border-right: 1.5px solid var(--sand);
	border-bottom: 1.5px solid var(--sand);
	transform: rotate(45deg) translate(-1px, -1px);
	opacity: 0;
	transition: opacity var(--ease);
}

.option input:checked + .option__box {
	background: var(--ink);
	border-color: var(--ink);
}

.option input:checked + .option__box::after {
	opacity: 1;
}

.option input:focus-visible + .option__box {
	outline: 2px solid var(--sage);
	outline-offset: 2px;
}

.chips {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-top: 10px;
}

.chips:empty {
	display: none;
}

.chip {
	font-family: var(--sans);
	font-weight: 400;
	font-size: 9.5px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--meta);
	border: 1px solid var(--rule);
	border-radius: 999px;
	padding: 5px 12px;
}

/* -------------------------------------------------------------- turnstile */

/* Cloudflare sizes its own iframe; clip it so a narrow panel never scrolls
   sideways on a phone. */
.turnstile {
	margin-top: 24px;
	max-width: 100%;
	overflow: hidden;
}

.turnstile iframe {
	max-width: 100%;
}

/* ----------------------------------------------------------------- button */

.button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 48px;
	margin-top: 28px;
	padding: 14px 26px;
	background: var(--ink);
	color: var(--sand);
	border: 1px solid var(--ink);
	border-radius: 999px;
	font-family: var(--sans);
	font-weight: 300;
	font-size: 11px;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	cursor: pointer;
	transition: background-color var(--ease), border-color var(--ease), color var(--ease);
}

.button:hover,
.button:focus-visible {
	background: var(--sage);
	border-color: var(--sage);
	color: var(--sand);
}

/* ---------------------------------------------------------------- success */

.done__title {
	font-family: var(--serif);
	font-weight: 300;
	font-size: 34px;
	line-height: 1.15;
	margin: 14px 0 0;
}

.done__text {
	font-size: 14px;
	line-height: 1.8;
	color: var(--body);
	margin: 16px 0 0;
	text-wrap: pretty;
}

.done__rule {
	width: 1px;
	height: 40px;
	background: var(--faint);
	margin: 28px 0;
}

.done__mark {
	font-family: var(--sans);
	font-weight: 400;
	font-size: 10px;
	letter-spacing: 0.28em;
	text-transform: uppercase;
	color: var(--meta);
	margin: 0;
}

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

.footer {
	padding: 0 0 40px;
}

.footer__inner {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 24px;
	border-top: 1px solid var(--rule);
	padding-top: 22px;
	font-family: var(--sans);
	font-weight: 400;
	font-size: 10px;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--faint);
	line-height: 2;
}

.footer a {
	color: var(--meta);
}

.footer__right {
	text-align: right;
}

/* ------------------------------------------------------------ responsive */

@media (max-width: 980px) {
	.hero {
		padding: 64px 0 72px;
	}

	.hero__grid {
		grid-template-columns: 1fr;
		grid-template-areas:
			"intro"
			"form"
			"list";
		row-gap: 48px;
	}

	.panel {
		position: static;
		max-width: 520px;
	}
}

@media (max-width: 640px) {
	.shell {
		padding: 0 24px;
	}

	.masthead {
		padding-top: 32px;
	}

	.masthead__inner {
		align-items: flex-start;
	}

	.wordmark svg {
		width: 108px;
	}

	.hero {
		padding: 48px 0 56px;
	}

	.hero__lead {
		font-size: 15px;
	}

	.panel {
		padding: 28px 24px;
	}

	.footer__inner {
		flex-direction: column;
		align-items: flex-start;
		gap: 18px;
	}

	.footer__right {
		text-align: left;
	}
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		transition-duration: 0.01ms !important;
	}
}
