/* Landing pages (SSR by src/server/routes/landing-page.ts) — standalone
 * stylesheet, deliberately outside the SPA's Tailwind bundle so the
 * Worker-rendered documents need no JS framework. Design tokens mirror
 * src/frontend/styles/globals.css (oklch neutrals, same radii) so both
 * surfaces share one visual language. Dark mode follows the OS via
 * prefers-color-scheme — no theme script, CSP-safe.
 *
 * Class prefix `mk-` keeps the namespace obvious if styles are ever merged. */

@font-face {
	font-family: "Geist Variable";
	src: url("/fonts/geist-latin-wght-normal.woff2") format("woff2-variations");
	font-weight: 100 900;
	font-style: normal;
	font-display: swap;
	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 {
	--radius: 0.625rem;
	--background: oklch(1 0 0);
	--foreground: oklch(0.145 0 0);
	--card: oklch(1 0 0);
	--muted: oklch(0.97 0 0);
	--muted-foreground: oklch(0.556 0 0);
	--primary: oklch(0.205 0 0);
	--primary-foreground: oklch(0.985 0 0);
	--border: oklch(0.922 0 0);
	--input: oklch(0.922 0 0);
	--ring: oklch(0.708 0 0);
	--accent: oklch(0.65 0.15 260);
	--success: oklch(0.62 0.17 155);
	--danger: oklch(0.62 0.18 25);
}

@media (prefers-color-scheme: dark) {
	:root {
		--background: oklch(0.145 0 0);
		--foreground: oklch(0.985 0 0);
		--card: oklch(0.205 0 0);
		--muted: oklch(0.269 0 0);
		--muted-foreground: oklch(0.708 0 0);
		--primary: oklch(0.922 0 0);
		--primary-foreground: oklch(0.205 0 0);
		--border: oklch(1 0 0 / 10%);
		--input: oklch(1 0 0 / 15%);
		--ring: oklch(0.556 0 0);
		--accent: oklch(0.72 0.15 260);
		--success: oklch(0.7 0.17 155);
		--danger: oklch(0.7 0.18 25);
	}
}

*,
*::before,
*::after {
	box-sizing: border-box;
	border-color: var(--border);
}

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	min-height: 100dvh;
	display: flex;
	flex-direction: column;
	background: var(--background);
	color: var(--foreground);
	font-family: "Geist Variable", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

main {
	flex: 1;
}

.mk-container {
	max-width: 72rem;
	margin-inline: auto;
	padding-inline: 1.5rem;
	width: 100%;
}

/* ── Header ─────────────────────────────────────────────────────────────── */

.mk-header {
	position: sticky;
	top: 0;
	z-index: 40;
	border-bottom: 1px solid var(--border);
	background: color-mix(in oklab, var(--background) 85%, transparent);
	backdrop-filter: blur(8px);
}

.mk-header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 4rem;
}

.mk-brand {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	color: inherit;
	text-decoration: none;
	font-size: 0.95rem;
	font-weight: 600;
	letter-spacing: -0.01em;
}

.mk-brand img {
	height: 1.75rem;
	width: auto;
	display: block;
}

.mk-nav-actions {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

/* ── Links & buttons ────────────────────────────────────────────────────── */

.mk-link {
	color: var(--muted-foreground);
	text-decoration: none;
	font-size: 0.9rem;
	padding: 0.5rem 0.75rem;
	border-radius: calc(var(--radius) - 2px);
	transition: color 150ms ease;
}

.mk-link:hover {
	color: var(--foreground);
}

.mk-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	white-space: nowrap;
	border-radius: calc(var(--radius) - 2px);
	font-size: 0.875rem;
	font-weight: 500;
	padding: 0.5rem 1rem;
	text-decoration: none;
	border: 1px solid transparent;
	transition:
		background-color 150ms ease,
		color 150ms ease,
		opacity 150ms ease;
}

.mk-button-primary {
	background: var(--primary);
	color: var(--primary-foreground);
}

.mk-button-primary:hover {
	opacity: 0.88;
}

.mk-button-outline {
	border-color: var(--input);
	color: var(--foreground);
}

.mk-button-outline:hover {
	background: var(--muted);
}

.mk-button-lg {
	height: 2.75rem;
	padding-inline: 1.5rem;
	font-size: 1rem;
	border-radius: var(--radius);
}

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

/* ── Hero ───────────────────────────────────────────────────────────────── */

.mk-hero {
	padding-block: clamp(4rem, 10vw, 7rem) clamp(3rem, 7vw, 5rem);
	text-align: center;
	background: radial-gradient(
		60% 50% at 50% 0%,
		color-mix(in oklab, var(--foreground) 6%, transparent),
		transparent 70%
	);
}

.mk-kicker {
	display: inline-block;
	font-size: 0.78rem;
	font-weight: 500;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--muted-foreground);
	border: 1px solid var(--border);
	border-radius: 999px;
	padding: 0.35rem 0.9rem;
	margin: 0 0 1.5rem;
}

.mk-hero-title {
	font-size: clamp(2.25rem, 6vw, 3.75rem);
	line-height: 1.08;
	letter-spacing: -0.03em;
	font-weight: 700;
	margin: 0 auto 1.25rem;
	max-width: 24ch;
	text-wrap: balance;
}

.mk-hero-subtitle {
	font-size: clamp(1rem, 2vw, 1.2rem);
	color: var(--muted-foreground);
	max-width: 42rem;
	margin: 0 auto 2.25rem;
	line-height: 1.6;
}

.mk-actions {
	display: flex;
	gap: 0.75rem;
	justify-content: center;
	flex-wrap: wrap;
}

/* ── Hero visual (floating cards) ───────────────────────────────────────── */

.mk-hero-visual {
	display: none;
}

@media (min-width: 48rem) {
	.mk-hero-visual {
		display: flex;
		justify-content: center;
		gap: 1rem;
		margin-top: clamp(2rem, 5vw, 3.5rem);
		perspective: 800px;
	}
}

.mk-hero-card {
	background: var(--card);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 1rem 1.25rem;
	box-shadow:
		0 1px 3px oklch(0 0 0 / 6%),
		0 4px 12px oklch(0 0 0 / 4%);
	width: 11rem;
	text-align: left;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.mk-hero-card-line {
	height: 0.5rem;
	border-radius: 4px;
	background: var(--muted);
	width: 100%;
}

.mk-hero-card-line-short {
	width: 60%;
}

.mk-hero-card-dot {
	width: 2rem;
	height: 2rem;
	border-radius: 50%;
	background: var(--accent);
	opacity: 0.15;
}

.mk-hero-card-badge {
	display: inline-block;
	font-size: 0.7rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--muted-foreground);
	border: 1px solid var(--border);
	border-radius: 999px;
	padding: 0.2rem 0.6rem;
	width: fit-content;
}

.mk-hero-card-actions {
	display: flex;
	gap: 0.5rem;
	margin-top: 0.25rem;
}

.mk-hero-card-btn {
	height: 1.5rem;
	flex: 1;
	border-radius: calc(var(--radius) - 2px);
}

.mk-hero-card-btn-deny {
	background: var(--muted);
	border: 1px solid var(--border);
}

.mk-hero-card-btn-approve {
	background: var(--success);
	opacity: 0.7;
}

.mk-hero-card-check {
	width: 1.75rem;
	height: 1.75rem;
	border-radius: 50%;
	background: var(--success);
	color: white;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 0.75rem;
	font-weight: 700;
	opacity: 0.8;
}

.mk-hero-card-meta {
	height: 0.35rem;
	width: 50%;
	border-radius: 3px;
	background: var(--muted);
	opacity: 0.6;
}

.mk-hero-card-chat {
	animation: mk-float 4s ease-in-out infinite;
}

.mk-hero-card-approval {
	animation: mk-float 4s ease-in-out infinite 0.8s;
}

.mk-hero-card-audit {
	animation: mk-float 4s ease-in-out infinite 1.6s;
}

@keyframes mk-float {
	0%,
	100% {
		transform: translateY(0);
	}
	50% {
		transform: translateY(-6px);
	}
}

/* ── Social proof bar ───────────────────────────────────────────────────── */

.mk-social-proof {
	padding-block: clamp(2rem, 4vw, 3rem);
	border-bottom: 1px solid var(--border);
}

.mk-social-proof-heading {
	text-align: center;
	font-size: 0.85rem;
	font-weight: 500;
	color: var(--muted-foreground);
	margin: 0 0 1.25rem;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.mk-social-proof-logos {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: clamp(1.5rem, 4vw, 3rem);
	flex-wrap: wrap;
}

.mk-social-proof-logo {
	font-size: 0.9rem;
	font-weight: 600;
	color: var(--muted-foreground);
	opacity: 0.6;
	transition: opacity 150ms ease;
}

.mk-social-proof-logo:hover {
	opacity: 1;
}

/* ── Sections ───────────────────────────────────────────────────────────── */

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

.mk-section-alt {
	background: var(--muted);
}

.mk-section-title {
	text-align: center;
	font-size: clamp(1.5rem, 3vw, 2rem);
	letter-spacing: -0.02em;
	font-weight: 650;
	margin: 0 0 2.5rem;
	text-wrap: balance;
	white-space: pre-line;
}

/* ── Problem section ────────────────────────────────────────────────────── */

.mk-problem-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
	gap: 1.5rem;
}

.mk-problem-card {
	padding: 1.5rem;
	border-radius: var(--radius);
	background: var(--card);
	border: 1px solid var(--border);
	border-left: 3px solid var(--danger);
}

.mk-problem-card h3 {
	margin: 0 0 0.5rem;
	font-size: 1rem;
	font-weight: 600;
	color: var(--danger);
}

.mk-problem-card p {
	margin: 0;
	color: var(--muted-foreground);
	font-size: 0.9rem;
	line-height: 1.55;
}

/* ── Solution / Feature grid ────────────────────────────────────────────── */

.mk-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
	gap: 1rem;
}

.mk-card {
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 1.5rem;
	background: var(--card);
}

.mk-card-icon {
	width: 2.5rem;
	height: 2.5rem;
	border-radius: calc(var(--radius) - 2px);
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 0.75rem;
	font-size: 1.25rem;
}

.mk-card-icon-agents {
	background: color-mix(in oklab, var(--accent) 12%, transparent);
	color: var(--accent);
}

.mk-card-icon-agents::before {
	content: "🤖";
}

.mk-card-icon-approvals {
	background: color-mix(in oklab, var(--success) 12%, transparent);
	color: var(--success);
}

.mk-card-icon-approvals::before {
	content: "✋";
}

.mk-card-icon-audit {
	background: color-mix(in oklab, var(--foreground) 8%, transparent);
	color: var(--foreground);
}

.mk-card-icon-audit::before {
	content: "📋";
}

.mk-card h3 {
	margin: 0 0 0.5rem;
	font-size: 1rem;
	font-weight: 600;
}

.mk-card p {
	margin: 0;
	color: var(--muted-foreground);
	font-size: 0.9rem;
	line-height: 1.55;
}

/* ── How it works ───────────────────────────────────────────────────────── */

.mk-steps {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
	gap: 2rem;
	counter-reset: mk-step;
}

.mk-step {
	text-align: center;
}

.mk-step-number {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.5rem;
	height: 2.5rem;
	border-radius: 50%;
	background: var(--primary);
	color: var(--primary-foreground);
	font-size: 1rem;
	font-weight: 700;
	margin-bottom: 1rem;
}

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

.mk-step p {
	margin: 0;
	color: var(--muted-foreground);
	font-size: 0.9rem;
	line-height: 1.55;
}

/* ── Technical grid ─────────────────────────────────────────────────────── */

.mk-technical-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
	gap: 1rem;
}

.mk-technical-card {
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 1.5rem;
	background: var(--card);
}

.mk-technical-card h3 {
	margin: 0 0 0.5rem;
	font-size: 1rem;
	font-weight: 600;
}

.mk-technical-card p {
	margin: 0;
	color: var(--muted-foreground);
	font-size: 0.9rem;
	line-height: 1.55;
}

/* ── Pricing section ─────────────────────────────────────────────────────── */

.mk-section-pricing {
	background: var(--muted);
}

.mk-section-subtitle {
	text-align: center;
	color: var(--muted-foreground);
	font-size: 1rem;
	margin: -1.5rem 0 2.5rem;
}

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

.mk-pricing-card {
	background: var(--card);
	border: 1px solid var(--border);
	border-radius: calc(var(--radius) * 1.5);
	padding: 2rem;
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
	position: relative;
	transition:
		box-shadow 200ms ease,
		transform 200ms ease;
}

.mk-pricing-card:hover {
	box-shadow: 0 4px 20px oklch(0 0 0 / 8%);
	transform: translateY(-2px);
}

.mk-pricing-card-featured {
	border-color: var(--accent);
	box-shadow: 0 0 0 1px var(--accent);
}

.mk-pricing-card-featured:hover {
	box-shadow:
		0 0 0 1px var(--accent),
		0 4px 20px oklch(0 0 0 / 12%);
}

.mk-pricing-badge {
	position: absolute;
	top: -0.75rem;
	left: 50%;
	transform: translateX(-50%);
	background: var(--accent);
	color: white;
	font-size: 0.7rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	padding: 0.3rem 0.8rem;
	border-radius: 999px;
	white-space: nowrap;
}

.mk-pricing-header {
	text-align: center;
}

.mk-pricing-name {
	margin: 0 0 0.5rem;
	font-size: 1.25rem;
	font-weight: 600;
}

.mk-pricing-description {
	margin: 0 0 1rem;
	color: var(--muted-foreground);
	font-size: 0.9rem;
}

.mk-pricing-price {
	display: flex;
	align-items: baseline;
	justify-content: center;
	gap: 0.25rem;
}

.mk-pricing-amount {
	font-size: 2.5rem;
	font-weight: 700;
	letter-spacing: -0.03em;
	line-height: 1;
}

.mk-pricing-interval {
	color: var(--muted-foreground);
	font-size: 0.9rem;
}

.mk-pricing-yearly {
	margin: 0.5rem 0 0;
	font-size: 0.85rem;
	color: var(--muted-foreground);
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
}

.mk-pricing-save {
	background: color-mix(in oklab, var(--success) 12%, transparent);
	color: var(--success);
	font-size: 0.7rem;
	font-weight: 600;
	padding: 0.15rem 0.4rem;
	border-radius: 4px;
}

.mk-pricing-features {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	padding-top: 1rem;
	border-top: 1px solid var(--border);
	flex: 1;
}

.mk-pricing-feature {
	display: flex;
	align-items: flex-start;
	gap: 0.5rem;
	font-size: 0.9rem;
	color: var(--foreground);
}

.mk-pricing-check {
	color: var(--success);
	font-weight: 600;
	flex-shrink: 0;
}

.mk-pricing-action {
	margin-top: auto;
	padding-top: 0.5rem;
}

.mk-pricing-action .mk-button {
	width: 100%;
	justify-content: center;
}

/* ── Final CTA ──────────────────────────────────────────────────────────── */

.mk-final-inner {
	border: 1px solid var(--border);
	border-radius: calc(var(--radius) * 1.8);
	background: var(--card);
	text-align: center;
	padding: clamp(2rem, 5vw, 3.5rem);
	display: grid;
	gap: 1rem;
	justify-items: center;
}

.mk-final-inner h2 {
	margin: 0;
	font-size: clamp(1.5rem, 3vw, 2rem);
	letter-spacing: -0.02em;
}

.mk-final-inner p {
	margin: 0;
	color: var(--muted-foreground);
	max-width: 36rem;
}

.mk-final-inner .mk-button {
	margin-top: 0.5rem;
}

/* ── Footer ─────────────────────────────────────────────────────────────── */

.mk-footer {
	border-top: 1px solid var(--border);
	padding-block: 1.5rem;
}

.mk-footer-inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	color: var(--muted-foreground);
	font-size: 0.85rem;
}

.mk-footer p {
	margin: 0;
}

.mk-footer-links {
	display: flex;
	gap: 1.25rem;
}

.mk-footer-links a {
	color: inherit;
	text-decoration: none;
	transition: color 150ms ease;
}

.mk-footer-links a:hover {
	color: var(--foreground);
}
