/* Krumbly — the public site (S-067).
 *
 * The tokens below are LIFTED VERBATIM from src/app.css, which took them from
 * docs/design/Huishouden - app.dc.html. They are not a second palette and must
 * not drift into one: the site's whole job is to look like the app someone is
 * about to open. When a token changes there, change it here.
 *
 * Every value carries its measured contrast from the app's gate
 * (scripts/check-contrast.mjs, 45/45 pairs). Because the pairings used here are
 * the same pairings that gate checks — ink on paper, muted on paper, accent on
 * paper, paper on ink — the ratios are inherited rather than re-derived. Do not
 * invent a new pairing without measuring it.
 *
 * Fonts are self-hosted in ./fonts, copied from static/fonts. NOT Google's CDN:
 * the no-cloud-services rule in claude.md, and a privacy-forward product that
 * leaked every visitor's IP to a third party on page load would be arguing
 * against itself.
 */

@font-face {
	font-family: 'Public Sans';
	font-style: normal;
	font-weight: 200 700;
	font-display: swap;
	src: url('fonts/public-sans-variable.woff2') format('woff2');
}

@font-face {
	font-family: 'IBM Plex Mono';
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url('fonts/ibm-plex-mono-400.woff2') format('woff2');
}

@font-face {
	font-family: 'IBM Plex Mono';
	font-style: normal;
	font-weight: 500;
	font-display: swap;
	src: url('fonts/ibm-plex-mono-500.woff2') format('woff2');
}

:root {
	--color-bg: #f6f7f4;
	--color-bg-alt: #e7ecdf;
	--color-surface: #ffffff;
	--color-surface-sunken: #eef1e8;

	--color-text: #1e211c;
	--color-muted: #676b63; /* 4.50:1 on --color-bg */
	--color-border: rgb(30 33 28 / 10%);
	--color-border-strong: rgb(30 33 28 / 18%);

	--color-accent: #5f7040; /* 5.04:1 on paper — the only olive safe under type */
	--color-accent-bright: #7f9455; /* fills only, never carries type */
	--color-accent-surface: #e4ecd9;

	--color-cta: #1e211c; /* 15.1:1 against its own label */
	--color-cta-text: #f6f7f4;

	--color-tint-warm: #fbe3cc;
	--color-tint-warm-ink: #1e211c;

	--radius-xl: 30px;
	--radius-lg: 26px;
	--radius-md: 16px;
	--radius-sm: 12px;
	--radius-full: 999px;
	--tap-target: 48px;

	--font-body: 'Public Sans', system-ui, -apple-system, sans-serif;
	--font-mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', monospace;

	--measure: 34rem;
	--gutter: clamp(1.25rem, 5vw, 3rem);
}

/* Follows the OS, exactly as the app does. Same extrapolation, same values. */
@media (prefers-color-scheme: dark) {
	:root {
		--color-bg: #141713;
		--color-bg-alt: #1a1e18;
		--color-surface: #1e211c;
		--color-surface-sunken: #191c17;
		--color-text: #eef1e8;
		--color-muted: #9aa093;
		--color-border: rgb(238 241 232 / 12%);
		--color-border-strong: rgb(238 241 232 / 22%);
		--color-accent: #a8bd7c; /* 8.70:1 on the dark ground */
		--color-accent-surface: #2a3024;
		--color-cta: #eef1e8;
		--color-cta-text: #141713;
	}
}

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

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

body {
	margin: 0;
	background: var(--color-bg);
	color: var(--color-text);
	font-family: var(--font-body);
	font-size: 1.0625rem;
	line-height: 1.6;
	font-weight: 400;
	/* The design is flat: no gradients, no lift. Separation is a 1px hairline
	   and a fill, and that rule is what keeps it quiet rather than cheerful. */
}

.wrap {
	max-width: 62rem;
	margin: 0 auto;
	padding-inline: var(--gutter);
}

/* --- header ------------------------------------------------------------- */

.site-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding-block: 1.25rem;
	flex-wrap: wrap;
}

.wordmark {
	font-weight: 600;
	font-size: 1.25rem;
	letter-spacing: -0.01em;
	color: var(--color-text);
	text-decoration: none;
}

.site-nav {
	display: flex;
	align-items: center;
	gap: 0.5rem 1.5rem;
	flex-wrap: wrap;
}

.site-nav a {
	color: var(--color-muted);
	text-decoration: none;
	font-size: 0.9375rem;
}

.site-nav a:hover,
.site-nav a:focus-visible {
	color: var(--color-text);
	text-decoration: underline;
	text-underline-offset: 0.25em;
}

/* --- buttons ------------------------------------------------------------ */

/* The primary CTA is ink on paper, never the accent — claude.md's UX rules and
   the design's own near-black pill. */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: var(--tap-target);
	padding: 0 1.5rem;
	border-radius: var(--radius-full);
	border: 1px solid transparent;
	background: var(--color-cta);
	color: var(--color-cta-text);
	font: inherit;
	font-weight: 500;
	text-decoration: none;
	cursor: pointer;
}

.btn:hover,
.btn:focus-visible {
	background: var(--color-accent);
	color: var(--color-cta-text);
}

.btn-quiet {
	background: transparent;
	color: var(--color-text);
	border-color: var(--color-border-strong);
}

.btn-quiet:hover,
.btn-quiet:focus-visible {
	background: var(--color-surface);
	color: var(--color-text);
	border-color: var(--color-text);
}

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

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

/* bg-alt is the sage the design reserves for full-bleed welcome and marketing
   surfaces — this is the surface it was reserved for. */
.hero {
	background: var(--color-bg-alt);
	border-block: 1px solid var(--color-border);
	padding-block: clamp(3rem, 9vw, 6rem);
}

.hero h1 {
	margin: 0 0 1rem;
	font-size: clamp(2rem, 5.5vw, 3.25rem);
	line-height: 1.1;
	letter-spacing: -0.02em;
	font-weight: 600;
	max-width: 18ch;
}

.hero p {
	margin: 0 0 2rem;
	max-width: var(--measure);
	font-size: clamp(1.0625rem, 2vw, 1.25rem);
	color: var(--color-muted);
}

.hero-actions {
	display: flex;
	gap: 0.75rem;
	flex-wrap: wrap;
}

.beta-band {
	display: inline-block;
	margin-bottom: 1.5rem;
	padding: 0.35rem 0.85rem;
	border-radius: var(--radius-full);
	border: 1px solid var(--color-border-strong);
	background: var(--color-surface);
	color: var(--color-text);
	font-size: 0.8125rem;
	font-weight: 500;
}

/* --- sections ----------------------------------------------------------- */

section {
	padding-block: clamp(3rem, 8vw, 5rem);
}

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

h2 {
	margin: 0 0 0.5rem;
	font-size: clamp(1.5rem, 3.5vw, 2rem);
	line-height: 1.2;
	letter-spacing: -0.015em;
	font-weight: 600;
}

.section-lede {
	margin: 0 0 2.5rem;
	max-width: var(--measure);
	color: var(--color-muted);
}

.steps {
	display: grid;
	gap: 1rem;
	grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
	margin: 0;
	padding: 0;
	list-style: none;
}

.step {
	background: var(--color-surface);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-lg);
	padding: 1.5rem;
}

.step-n {
	font-family: var(--font-mono);
	font-size: 0.8125rem;
	font-weight: 500;
	color: var(--color-accent);
	font-variant-numeric: tabular-nums;
}

.step h3 {
	margin: 0.5rem 0 0.5rem;
	font-size: 1.0625rem;
	font-weight: 600;
}

.step p {
	margin: 0;
	color: var(--color-muted);
	font-size: 0.9375rem;
}

/* --- screenshot placeholders -------------------------------------------- */

/* Sized to the real thing so the layout does not move when the images land.
   S-067 wants screenshots from the real app rather than mockups; those come
   from a booted simulator (visual-qa), and store-quality ones are S-031's job.
   To swap: replace the .shot block with <img src="…" alt="…"> — the aspect
   ratios below are already correct. */
.shots {
	display: grid;
	gap: 1.5rem;
	grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
	align-items: end;
}

.shot {
	border: 1px dashed var(--color-border-strong);
	border-radius: var(--radius-lg);
	background: var(--color-surface-sunken);
	display: grid;
	place-items: center;
	padding: 1rem;
	text-align: center;
	color: var(--color-muted);
	font-size: 0.8125rem;
}

.shot-phone {
	aspect-ratio: 9 / 19.5;
}

.shot-tablet {
	aspect-ratio: 4 / 3;
	grid-column: span 2;
}

@media (max-width: 34rem) {
	.shot-tablet {
		grid-column: span 1;
	}
}

/* --- pricing ------------------------------------------------------------ */

.plans {
	display: grid;
	gap: 1rem;
	grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
	align-items: start;
}

.plan {
	background: var(--color-surface);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-lg);
	padding: 1.75rem;
}

.plan-together {
	background: var(--color-accent-surface);
	border-color: var(--color-accent);
}

/* --color-accent-surface is specified in app.css as "a tint to sit dark text
   on", and that word is load-bearing: muted ink on this tint measures 4.48:1,
   which is under AA. Inside the highlighted plan the secondary text therefore
   steps up to full ink (13.42:1 light, 11.89:1 dark) instead of muted. Caught
   by measuring rather than by assuming the pairing was inherited — the app
   never puts muted on this tint, so its own gate had never checked it. */
.plan-together .price-sub,
.plan-together ul {
	color: var(--color-text);
}

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

.price {
	font-family: var(--font-mono);
	font-variant-numeric: tabular-nums;
	font-size: 1.75rem;
	font-weight: 500;
	letter-spacing: -0.02em;
	display: block;
	margin-block: 0.75rem 0.25rem;
}

.price-sub {
	margin: 0 0 1.25rem;
	color: var(--color-muted);
	font-size: 0.875rem;
}

.plan ul {
	margin: 0;
	padding-left: 1.1rem;
	color: var(--color-muted);
	font-size: 0.9375rem;
}

.plan li + li {
	margin-top: 0.35rem;
}

.pay-note {
	margin-top: 2rem;
	padding: 1rem 1.25rem;
	border-radius: var(--radius-md);
	background: var(--color-tint-warm);
	color: var(--color-tint-warm-ink); /* pinned: the wash does not follow dark mode */
	font-size: 0.9375rem;
	border: 1px solid var(--color-border);
}

/* --- honesty block ------------------------------------------------------ */

.plain {
	max-width: var(--measure);
}

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

.plain strong {
	color: var(--color-text);
	font-weight: 600;
}

.not-list {
	margin: 0 0 1.5rem;
	padding: 0;
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.not-list li {
	border: 1px solid var(--color-border-strong);
	border-radius: var(--radius-full);
	padding: 0.35rem 0.85rem;
	font-size: 0.875rem;
}

/* --- prose pages -------------------------------------------------------- */

.prose {
	max-width: var(--measure);
}

.prose h2 {
	margin-top: 2.5rem;
}

.prose p,
.prose li {
	color: var(--color-muted);
}

.prose strong {
	color: var(--color-text);
}

.prose a {
	color: var(--color-accent);
}

.prose ol,
.prose ul {
	padding-left: 1.2rem;
}

.prose li + li {
	margin-top: 0.5rem;
}

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

.site-foot {
	border-top: 1px solid var(--color-border);
	background: var(--color-surface-sunken);
	padding-block: 2.5rem;
	font-size: 0.9375rem;
}

.foot-links {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1.5rem;
	margin: 0 0 1rem;
	padding: 0;
	list-style: none;
}

.site-foot a {
	color: var(--color-text);
}

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

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