/* The product pages' one stylesheet: a file so the CSP can say style-src 'self'. */
/* The light palette on bare :root, the dark one under [data-theme="dark"] — the same
   shape and the same values as apps/web/src/styles/app.css. */
:root {
	color-scheme: light;
	--surface: #f8fafc;
	--raised: #ffffff;
	--sunken: #f1f5f9;
	--border: #e2e8f0;
	--text: #0f172a;
	--muted: #64748b;
	--brand-green: #61af41;
	--brand-grey: #767676;
	--brand-blue: #0c55dc;
	--accent: #ffde00;
	--accent-contrast: #0b0b0b;
	/* The yellow is 1.3:1 as ink on white, so a line drawn with it takes this instead. */
	--accent-ink: #806600;
	--wordmark-ivi-field: 1;
	--wordmark-ivi-bg: var(--accent);
	--wordmark-ivi-fg: var(--accent-contrast);
}

[data-theme='dark'] {
	color-scheme: dark;
	--surface: #0f172a;
	--raised: #1e293b;
	--sunken: #172033;
	--border: #334155;
	--text: #f1f5f9;
	--muted: #94a3b8;
	--brand-green: #61af41;
	--brand-grey: #bababa;
	--brand-blue: #4b82ee;
	--accent-ink: #ffde00;
	--wordmark-ivi-field: 0;
	--wordmark-ivi-bg: transparent;
	--wordmark-ivi-fg: var(--accent);
}

* {
	box-sizing: border-box;
}

body {
	margin: 0;
	min-height: 100dvh;
	display: flex;
	flex-direction: column;
	background: var(--surface);
	color: var(--text);
	/* Generic families only: a named font is a named product, and nothing here names one. */
	font: 16px/1.6 system-ui, sans-serif;
}

a {
	color: var(--brand-blue);
}

a:focus-visible,
button:focus-visible {
	outline: 2px solid var(--brand-blue);
	outline-offset: 2px;
}

/* --- the top bar: the mark, the languages and the theme --- */

header {
	display: flex;
	align-items: center;
	gap: 0.25rem;
	flex-shrink: 0;
	width: 100%;
	max-width: 52rem;
	margin: 0 auto;
	padding: calc(0.75rem + env(safe-area-inset-top, 0px)) 1rem 0.75rem;
}

/* The lockup, built as .ivi-lockup in app.css: the drawn mark sets the height, and IVI
   is sized to match it. */
.home {
	--lockup-pad: 0.1em;
	--lockup-h: calc(1em + 2 * var(--lockup-pad));
	/* The interface face's cap height as a share of its em, as in app.css. */
	--cap-height: 0.727;
	display: flex;
	align-items: center;
	gap: 0.22em;
	margin-right: auto;
	border-radius: 0.375rem;
	color: inherit;
	text-decoration: none;
	font-size: 1.75rem;
	font-weight: 600;
	letter-spacing: -0.02em;
	line-height: 1;
}

.lockup-mark {
	height: var(--lockup-h);
	width: auto;
	flex-shrink: 0;
}

.ivi {
	--bare: calc(1 - var(--wordmark-ivi-field));
	--bare-size: calc(var(--lockup-h) / var(--cap-height));
	background: var(--wordmark-ivi-bg);
	color: var(--wordmark-ivi-fg);
	font-size: calc(1em * var(--wordmark-ivi-field) + var(--bare-size) * var(--bare));
	line-height: calc(var(--wordmark-ivi-field) + var(--cap-height) * var(--bare));
	padding: calc(var(--lockup-pad) * var(--wordmark-ivi-field))
		calc(0.25em * var(--wordmark-ivi-field));
	border-radius: 0.1em;
	white-space: nowrap;
}

.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

nav.languages {
	display: flex;
	gap: 0.125rem;
}

.control {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.75rem;
	min-height: 2.75rem;
	padding: 0.375rem 0.5rem;
	border: 0;
	border-radius: 0.5rem;
	background: transparent;
	color: var(--muted);
	font: inherit;
	font-size: 0.875rem;
	text-decoration: none;
	cursor: pointer;
}

.control:hover {
	background: var(--sunken);
	color: var(--text);
}

.control[aria-current='page'] {
	color: var(--text);
	font-weight: 600;
}

/* --- the page --- */

main {
	flex: 1;
	width: 100%;
	max-width: 52rem;
	margin: 0 auto;
	padding: 1.5rem 1rem 3rem;
}

main p {
	max-width: 42rem;
}

h1 {
	margin: 0;
	font-size: clamp(2rem, 6vw, 3.25rem);
	font-weight: 650;
	letter-spacing: -0.02em;
	line-height: 1.1;
	text-wrap: balance;
}

p.lead {
	margin: 1.5rem 0 0;
	font-size: 1.1875rem;
}

section {
	margin-top: 2.75rem;
}

h2 {
	margin: 0 0 0.75rem;
	font-size: 1.375rem;
	font-weight: 600;
	letter-spacing: -0.01em;
}

ul.features,
ul.facts {
	margin: 0;
	padding: 0;
	list-style: none;
	display: grid;
	gap: 0.75rem;
}

ul.features li {
	padding: 0.875rem 1rem 0.875rem 1.25rem;
	border-left: 3px solid var(--accent-ink);
	border-radius: 0 0.5rem 0.5rem 0;
	background: var(--raised);
}

ul.facts {
	gap: 0.375rem;
}

strong {
	font-weight: 600;
}

.notice {
	max-width: 42rem;
	margin: 0;
	padding: 1rem 1.25rem;
	border: 1px solid var(--border);
	border-radius: 0.75rem;
	background: var(--raised);
}

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

a.market {
	display: block;
	padding: 1.25rem 1.5rem;
	border: 1px solid var(--border);
	border-radius: 0.75rem;
	background: var(--raised);
	color: inherit;
	text-decoration: none;
	transition: border-color 0.15s ease;
}

a.market:hover,
a.market:focus-visible {
	border-color: var(--brand-blue);
}

a.market strong {
	display: block;
	font-size: 1.25rem;
}

a.market span {
	display: block;
	margin-top: 0.25rem;
	font-size: 0.875rem;
	color: var(--muted);
}

.small {
	font-size: 0.875rem;
	color: var(--muted);
}

footer {
	flex-shrink: 0;
	width: 100%;
	max-width: 52rem;
	margin: 0 auto;
	padding: 1.5rem 1rem calc(1.5rem + env(safe-area-inset-bottom, 0px));
	border-top: 1px solid var(--border);
	font-size: 0.875rem;
	color: var(--muted);
	text-align: center;
}

footer p {
	margin: 0 0 0.5rem;
}

footer a {
	color: inherit;
}

/* Build numbers in a face where 1, l and I differ — the generic monospace family. */
.stamp {
	font-family: ui-monospace, monospace;
	font-size: 0.75rem;
}
