/*
 * The whole site's styles. Values mirror the light theme in vuebase/src/style.css
 * (#260: plum ink and chrome on a white ground, the champagne gold action, Bricolage
 * Grotesque headings over DM Sans); the site has no build step, so it cannot import that
 * file, and a colour changed there is changed here in the same PR. The two faces are the
 * latin subsets of the app's own @fontsource-variable packages.
 */
@font-face {
	font-family: 'DM Sans';
	src: url('/fonts/dm-sans.woff2') format('woff2');
	font-weight: 100 1000;
	font-display: swap;
}
@font-face {
	font-family: 'Bricolage Grotesque';
	src: url('/fonts/bricolage-grotesque.woff2') format('woff2');
	font-weight: 200 800;
	font-display: swap;
}

:root {
	--ground: #ffffff;
	--surface: #f4f4f2;
	--line: #e3e3e0;
	--ink: #2b1245; /* plum */
	--muted: #5f5f5f;
	--action: #c8962e; /* champagne gold: a fill under plum (6.2:1), never text on the ground */
	--action-ink: #8a6417; /* dark gold: the action's edge, links and focus rings (5.4:1) */
	--purple: #5b2a86;
	--amber: #f2b441; /* the mark on dark: only on plum */
	/* The frames' gradient, interpolated in oklab as Tailwind does in the app: plain
	   sRGB muddies the middle. Text on it is solid white, 9.9:1 at the top. */
	--chrome: linear-gradient(in oklab to bottom, #5b2a86, #2b1245);
	--radius: 10px;
	--sans: 'DM Sans', system-ui, sans-serif;
	--display: 'Bricolage Grotesque', system-ui, sans-serif;
	--gutter: clamp(20px, 6vw, 96px);
	--measure: 34em;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}
body {
	margin: 0;
	background: var(--ground);
	color: var(--ink);
	font: 400 1.125rem/1.55 var(--sans);
	-webkit-font-smoothing: antialiased;
}
h1,
h2,
h3 {
	margin: 0;
	font-family: var(--display);
	text-wrap: balance;
}
h1,
h2 {
	letter-spacing: -0.02em;
}
h1 {
	font-size: clamp(3rem, 7vw, 6rem);
	line-height: 0.98;
	font-weight: 800;
}
h2 {
	font-size: clamp(2rem, 4vw, 3.25rem);
	line-height: 1.08;
	font-weight: 700;
}
h3 {
	font-size: 1.375rem;
	line-height: 1.3;
}
p {
	margin: 0;
	text-wrap: pretty;
}
a {
	color: var(--action-ink);
	text-underline-offset: 0.18em;
}
a:hover {
	color: var(--ink);
}
:focus-visible {
	outline: 3px solid var(--action-ink);
	outline-offset: 3px;
	border-radius: 2px;
}
img {
	max-width: 100%;
	height: auto;
}

.skip {
	position: absolute;
	left: var(--gutter);
	top: -100px;
	background: var(--ink);
	color: var(--ground);
	padding: 10px 16px;
	z-index: 10;
}
.skip:focus {
	top: 12px;
	color: var(--ground);
}

/* Header and footer */
.site-header {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 16px 36px;
	padding: 24px var(--gutter);
}
.wordmark {
	font: 800 1.875rem/1 var(--display);
	letter-spacing: -0.025em;
	color: var(--ink);
	text-decoration: none;
}
.wordmark:hover {
	color: var(--ink);
}
.site-nav {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 32px;
}
.site-nav a:not(.button) {
	color: var(--ink);
	text-decoration: none;
	font-size: 1.0625rem;
}
.site-nav a:not(.button):hover,
.site-nav a[aria-current='page'] {
	text-decoration: underline;
}
.site-footer {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
	gap: 20px 32px;
	padding: 40px var(--gutter);
	border-top: 1px solid var(--line);
	color: var(--muted);
	font-size: 1rem;
}
.site-footer .wordmark {
	font-size: 1.5rem;
}
.site-footer nav {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 28px;
}
.site-footer a {
	color: var(--muted);
}

/*
 * Buttons: one action colour per view, the gold under a plum label, edged in the dark
 * gold. The press is #227's: the action is lit from the top at rest (the light stops at
 * 30%, above the label, and the foot darkens 6%); on :active any button flattens, takes
 * an inset shadow and sinks 1px.
 */
.button {
	--button-bg: var(--action);
	display: inline-block;
	background-color: var(--button-bg);
	color: var(--ink);
	text-decoration: none;
	font-weight: 600;
	padding: 12px 22px;
	border-radius: var(--radius);
	line-height: 1.2;
	transition:
		background-color 120ms,
		box-shadow 120ms,
		translate 120ms;
}
.button:not(.button-ink) {
	background-image: linear-gradient(
		to bottom,
		color-mix(in oklch, var(--button-bg), white 18%),
		var(--button-bg) 30%,
		color-mix(in oklch, var(--button-bg), black 6%)
	);
	box-shadow:
		inset 0 1px 0 color-mix(in oklch, var(--button-bg), white 32%),
		inset 0 0 0 1px var(--action-ink);
}
.button:hover {
	--button-bg: color-mix(in oklch, var(--action), white 12%);
	color: var(--ink);
}
.button:active {
	background-image: none;
	box-shadow: inset 0 2px 5px rgb(0 0 0 / 0.22);
	translate: 0 1px;
}
@media (prefers-reduced-motion: reduce) {
	.button {
		transition: none;
	}
}
.button-large {
	padding: 18px 30px;
	font-size: 1.125rem;
}
.button-ink,
.button-ink:hover {
	color: var(--ground);
}
.button-ink {
	--button-bg: var(--ink);
}
.button-ink:hover {
	--button-bg: var(--purple);
}
.link-strong {
	color: var(--ink);
	font-weight: 600;
}

/* Sections */
.section {
	padding: clamp(64px, 9vw, 112px) var(--gutter);
}
.section + .section {
	border-top: 1px solid var(--line);
}
.stack {
	display: flex;
	flex-direction: column;
	gap: 24px;
}
.stack > a {
	align-self: flex-start;
}
.lede {
	font-size: clamp(1.1875rem, 1.6vw, 1.375rem);
	color: var(--ink);
	max-width: var(--measure);
}
.soft {
	color: var(--ink);
}
.note {
	font-size: 1rem;
	color: var(--muted);
}
.actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 16px 28px;
}

/* Home hero: the request and its offers */
.hero {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 64px 80px;
	align-items: center;
	padding: clamp(40px, 7vw, 96px) var(--gutter) clamp(64px, 9vw, 128px);
}
.hero-copy {
	display: flex;
	flex-direction: column;
	gap: 28px;
}
.slips {
	margin: 0;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	max-width: 600px;
}
.slip {
	background: var(--ground);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	width: min(100%, 520px);
}
.slip-request {
	padding: 30px 34px;
	display: flex;
	flex-direction: column;
	gap: 16px;
	transform: rotate(-1.5deg);
	box-shadow: 0 18px 40px -24px rgb(43 18 69 / 0.35);
	position: relative;
	z-index: 1;
}
.slip-request blockquote {
	margin: 0;
	font: 500 clamp(1.375rem, 2.2vw, 1.875rem) / 1.3 var(--sans);
	letter-spacing: -0.01em;
}
.slip-meta {
	font-size: 0.9375rem;
	color: var(--muted);
}
.slip-count {
	font-weight: 600;
	color: var(--purple);
}
.slip-offer {
	display: flex;
	justify-content: space-between;
	gap: 20px;
	padding: 20px 26px;
	margin-top: -6px;
}
.slip-offer:nth-child(2) {
	margin-top: 20px;
	margin-left: 12%;
	transform: rotate(1deg);
}
.slip-offer:nth-child(3) {
	margin-left: 5%;
	transform: rotate(-0.5deg);
}
.slip-offer:nth-child(4) {
	margin-left: 10%;
	transform: rotate(1.5deg);
	border: 2px solid var(--action-ink);
}
.slip-offer p {
	font-size: 1rem;
	line-height: 1.45;
	color: var(--ink);
}
.slip-offer strong {
	display: block;
	font-size: 1.125rem;
	color: var(--ink);
	margin-bottom: 4px;
}
.slip-price {
	font: 800 1.375rem/1.2 var(--sans);
	white-space: nowrap;
}
.chosen {
	display: block;
	margin-top: 6px;
	font-size: 0.9375rem;
	font-weight: 600;
	color: var(--action-ink);
}

/* Numbered steps: only where the content really is a sequence */
.steps {
	margin: 0;
	padding: 0;
	list-style: none;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 48px 56px;
	counter-reset: step;
}
.steps li {
	display: flex;
	flex-direction: column;
	gap: 12px;
	counter-increment: step;
}
.steps li::before {
	content: counter(step);
	font: 800 4rem/1 var(--sans);
	letter-spacing: -0.02em;
	color: var(--action-ink);
}
.steps p {
	color: var(--ink);
}

/* A two-column band on the surface */
.band {
	margin: 0 var(--gutter);
	background: var(--surface);
	border-radius: var(--radius);
	padding: clamp(40px, 6vw, 88px);
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 40px 80px;
	align-items: start;
}
.band .soft {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

/* Questions */
.qa-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
	gap: 40px 56px;
}
.qa {
	margin: 0;
	display: flex;
	flex-direction: column;
}
.qa > div {
	padding: 28px 0;
	border-bottom: 1px solid var(--line);
}
.qa > div:first-child {
	padding-top: 0;
}
.qa dt {
	font-size: 1.375rem;
	font-weight: 600;
	line-height: 1.3;
}
.qa dd {
	margin: 8px 0 0;
	color: var(--ink);
	max-width: var(--measure);
}
.qa dd p + p {
	margin-top: 12px;
}
.qa-group + .qa-group {
	margin-top: 64px;
}
.qa-group h2 {
	margin-bottom: 24px;
}

/*
 * The splash: the one loud moment on a page, on the chrome. The text and focus rings are
 * white (the dark gold ring is 1.8:1 on the purple half, 1.4.11 wants 3); the button is
 * the gold action as everywhere, 3.7:1 against the purple.
 */
.splash {
	background: var(--chrome);
	color: var(--ground);
	padding: clamp(72px, 10vw, 128px) var(--gutter);
	display: flex;
	flex-direction: column;
	gap: 40px;
}
.splash h2 {
	font-size: clamp(3.25rem, 9vw, 8.5rem);
	line-height: 0.92;
	font-weight: 800;
	letter-spacing: -0.035em;
	max-width: 9em;
}
.splash p {
	font: 500 clamp(1.5rem, 2.8vw, 2.5rem) / 1.35 var(--sans);
	max-width: 24em;
}
.splash a:not(.button) {
	color: var(--ground);
}
.splash :focus-visible,
.dark :focus-visible {
	outline-color: var(--ground);
}

/* Plum band with the amber */
.dark {
	background: var(--ink);
	color: var(--surface);
	padding: clamp(72px, 10vw, 120px) var(--gutter);
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 40px 96px;
	align-items: end;
}
.dark h2 {
	font-size: clamp(2.5rem, 6vw, 5.5rem);
	line-height: 0.98;
	font-weight: 800;
}
.dark .stack {
	font-size: 1.25rem;
}
.dark strong {
	color: var(--amber);
}
.dark a:not(.button) {
	color: var(--ground);
}

/* Page head for inner pages */
.page-head {
	padding: clamp(40px, 7vw, 96px) var(--gutter) clamp(40px, 5vw, 72px);
	display: flex;
	flex-direction: column;
	gap: 24px;
	max-width: 1100px;
}
.page-head h1 {
	font-size: clamp(2.75rem, 6vw, 5rem);
}

/* Plans */
.plans {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: 24px;
}
.plan {
	background: var(--ground);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 32px;
	display: flex;
	flex-direction: column;
	gap: 16px;
}
.plan-price {
	font: 800 3rem/1 var(--sans);
	letter-spacing: -0.02em;
}
.plan-price span {
	font: 400 1rem/1 var(--sans);
	color: var(--muted);
}
.plan ul {
	margin: 0;
	padding-left: 20px;
	color: var(--ink);
}
.plan > a:last-child {
	align-self: flex-start;
	margin-top: auto;
}

/* Legal pages */
.prose {
	max-width: 42em;
}
.prose h2 {
	font-size: 1.75rem;
	margin: 48px 0 12px;
}
.prose p + p {
	margin-top: 16px;
}

@media (max-width: 860px) {
	.hero,
	.band,
	.dark,
	.qa-layout {
		grid-template-columns: minmax(0, 1fr);
	}
	.slip-offer:nth-child(n) {
		margin-left: 0;
		transform: none;
	}
	.slip-request {
		transform: none;
	}
}

@media (prefers-reduced-motion: no-preference) {
	/* The one orchestrated moment: offers arrive under the request. Movement
	   only, never opacity, so a crawler or preview renderer that never runs the
	   animation still sees every slip. */
	.slip-offer {
		animation: arrive 500ms cubic-bezier(0.2, 0.7, 0.2, 1) backwards;
	}
	.slip-offer:nth-child(2) {
		animation-delay: 250ms;
	}
	.slip-offer:nth-child(3) {
		animation-delay: 450ms;
	}
	.slip-offer:nth-child(4) {
		animation-delay: 650ms;
	}
	@keyframes arrive {
		from {
			translate: 0 24px;
		}
	}
}
