/*
 * The product page and the 404 page. Same tokens as the console (apps/console/src/styles.css),
 * light and dark by the visitor's system setting. Served as a file: the page CSP allows
 * 'self' styles only — no inline style, no style="" attributes.
 */
@font-face {
	font-family: "Inter Variable";
	font-style: normal;
	font-display: swap;
	font-weight: 100 900;
	src: url("inter.woff2") format("woff2-variations");
	unicode-range:
		U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
		U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
	color-scheme: light dark;
	--background: oklch(0.99 0.002 270);
	--foreground: oklch(0.21 0.02 270);
	--card: oklch(1 0 0);
	--muted-foreground: oklch(0.5 0.02 270);
	--primary: oklch(0.51 0.23 277);
	--primary-foreground: oklch(0.99 0 0);
	--primary-hover: oklch(0.47 0.22 277);
	--primary-ink: oklch(0.51 0.23 277);
	--accent: oklch(0.95 0.02 277);
	--accent-foreground: oklch(0.32 0.12 277);
	--border: oklch(0.91 0.006 270);
	--ring: oklch(0.51 0.23 277);
	--brand-green: #61af41;
	--brand-grey: #767676;
	--brand-blue: #0c55dc;
	--brand-yellow: #ffde00;
	--wordmark-fg: #0b0b0b;
	--wordmark-bg: var(--brand-yellow);
	--wordmark-pad: 0.22em;
}

@media (prefers-color-scheme: dark) {
	:root {
		--background: oklch(0.17 0.012 270);
		--foreground: oklch(0.95 0.005 270);
		--card: oklch(0.21 0.014 270);
		--muted-foreground: oklch(0.7 0.015 270);
		--primary: oklch(0.67 0.18 277);
		--primary-foreground: oklch(0.15 0.02 270);
		--primary-hover: oklch(0.72 0.16 277);
		--primary-ink: oklch(0.67 0.18 277);
		--accent: oklch(0.29 0.05 277);
		--accent-foreground: oklch(0.9 0.05 277);
		--border: oklch(0.3 0.012 270);
		--ring: oklch(0.67 0.18 277);
		--brand-grey: #bababa;
		--brand-blue: #4b82ee;
		--wordmark-fg: var(--brand-yellow);
		--wordmark-bg: transparent;
		--wordmark-pad: 0;
	}
}

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

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

body {
	margin: 0;
	background: var(--background);
	color: var(--foreground);
	font-family: "Inter Variable", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	font-size: 1rem;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}

a {
	color: var(--primary-ink);
	text-underline-offset: 0.2em;
}

a:focus-visible {
	outline: 2px solid var(--ring);
	outline-offset: 2px;
	border-radius: 4px;
}

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

.skip {
	position: absolute;
	left: 0.5rem;
	top: -3rem;
	z-index: 10;
	padding: 0.5rem 0.75rem;
	background: var(--card);
	border: 1px solid var(--border);
	border-radius: 0.5rem;
}
.skip:focus {
	top: 0.5rem;
}

.wrap {
	max-width: 56rem;
	margin: 0 auto;
	padding: 0 1rem;
}

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

/* header */
.top {
	border-bottom: 1px solid var(--border);
}
.top .bar {
	min-height: 3.5rem;
}

.brand {
	display: inline-flex;
	align-items: center;
	gap: 0.3em;
	font-size: 1.25rem;
	font-weight: 600;
	letter-spacing: -0.01em;
	line-height: 1;
	text-decoration: none;
	margin-right: auto;
}
.mark {
	height: 1.2em;
	width: auto;
	flex-shrink: 0;
}
.mark .g {
	fill: var(--brand-green);
}
.mark .b {
	fill: var(--brand-blue);
}
.mark .k {
	fill: var(--brand-grey);
}
.wordmark {
	background-color: var(--wordmark-bg);
	color: var(--wordmark-fg);
	padding: 0.1em var(--wordmark-pad) 0.12em;
	border-radius: 0.12em;
	white-space: nowrap;
}

.langs {
	display: flex;
	gap: 0.25rem;
	font-size: 0.875rem;
}
.langs a {
	padding: 0.25rem 0.4rem;
	border-radius: 0.375rem;
	color: var(--muted-foreground);
	text-decoration: none;
}
.langs a:hover {
	color: var(--foreground);
}
.langs a[aria-current="page"] {
	color: var(--foreground);
	font-weight: 600;
	background: var(--accent);
}

/* buttons */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 2.5rem;
	padding: 0.5rem 1.1rem;
	border-radius: 0.625rem;
	font-weight: 600;
	font-size: 0.95rem;
	line-height: 1.2;
	text-decoration: none;
	border: 1px solid transparent;
}
.btn-primary {
	background: var(--primary);
	color: var(--primary-foreground);
}
.btn-primary:hover {
	background: var(--primary-hover);
}
.btn-ghost {
	border-color: var(--border);
	color: var(--foreground);
	min-height: 2.25rem;
	padding: 0.375rem 0.9rem;
}
.btn-ghost:hover {
	background: var(--accent);
}

/* content */
.hero {
	padding: 4rem 0 2.5rem;
}
h1 {
	font-size: clamp(2rem, 5vw, 3rem);
	line-height: 1.12;
	letter-spacing: -0.025em;
	font-weight: 700;
	margin: 0 0 1.25rem;
	max-width: 22ch;
	text-wrap: balance;
}
.lead {
	font-size: 1.2rem;
	color: var(--muted-foreground);
	max-width: 44rem;
	margin: 0 0 2rem;
}
.cta {
	display: flex;
	align-items: center;
	gap: 1.25rem;
	flex-wrap: wrap;
	margin: 0;
}
.link {
	font-weight: 600;
	text-decoration: none;
}
.link:hover {
	text-decoration: underline;
}

h2 {
	font-size: 1.4rem;
	letter-spacing: -0.015em;
	margin: 0 0 1rem;
}
.features {
	padding: 2rem 0;
	border-top: 1px solid var(--border);
}
.features ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
	gap: 0.75rem;
}
.features li {
	background: var(--card);
	border: 1px solid var(--border);
	border-radius: 0.75rem;
	padding: 0.9rem 1rem;
}
.features strong {
	font-weight: 600;
}

.facts {
	padding: 1.5rem 0 3rem;
}
.facts p {
	margin: 0 0 1rem;
	max-width: 44rem;
}
.tags {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}
.tags span {
	font-size: 0.875rem;
	font-weight: 500;
	padding: 0.25rem 0.7rem;
	border-radius: 999px;
	background: var(--accent);
	color: var(--accent-foreground);
}

.foot {
	border-top: 1px solid var(--border);
	color: var(--muted-foreground);
	font-size: 0.875rem;
}
.foot .bar {
	min-height: 3.5rem;
	justify-content: space-between;
}
.legal {
	display: flex;
	gap: 1rem;
	margin: 0;
}
.legal a {
	color: var(--muted-foreground);
}
.legal a:hover {
	color: var(--foreground);
}

/* 404 */
.notfound {
	padding: 4rem 1rem;
	text-align: center;
}
.notfound .brand {
	margin: 0 auto 2rem;
}
.notfound .code {
	font-size: 3rem;
	font-weight: 700;
	color: var(--muted-foreground);
	margin: 0;
}
.notfound h1 {
	font-size: 1.5rem;
	max-width: none;
	margin: 0 0 0.5rem;
}
.notfound p {
	margin: 0 0 0.25rem;
	color: var(--muted-foreground);
}
.notfound .cta {
	justify-content: center;
	margin-top: 1.5rem;
}
