:root {
	--max: 1040px;
	--max-app: min(1280px, 92vw);
	--accent: #6366f1;
	--accent-hover: #4f46e5;
	--accent-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
	--accent-gradient-hover: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
	--surface-elevated: #ffffff;
	--surface-subtle: #f8fafc;
	--border-subtle: rgba(15, 23, 42, 0.08);
	--border-strong: rgba(15, 23, 42, 0.12);
	--shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
	--shadow-md: 0 4px 12px rgba(15, 23, 42, 0.06);
	--shadow-lg: 0 16px 40px rgba(15, 23, 42, 0.08);
}

* {
	box-sizing: border-box;
}

[hidden] {
	display: none !important;
}

body {
	margin: 0;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	font-family:
		ui-sans-serif,
		system-ui,
		-apple-system,
		Segoe UI,
		Roboto,
		Helvetica,
		Arial,
		"Apple Color Emoji",
		"Segoe UI Emoji";
	color: #0f172a;
	background: #ffffff;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}

#root {
	display: flex;
	flex-direction: column;
	flex: 1;
	min-height: 0;
}

a {
	color: inherit;
	text-decoration: none;
}

pre {
	margin: 0;
	overflow: auto;
}

code {
	font-family:
		ui-monospace,
		SFMono-Regular,
		Menlo,
		Monaco,
		Consolas,
		"Liberation Mono",
		"Courier New",
		monospace;
	font-size: 13px;
}

.container {
	max-width: var(--max);
	margin: 0 auto;
	padding: 0 18px;
}

.container.app {
	max-width: var(--max-app);
}

.container.site-page {
	max-width: 100%;
	padding-left: 24px;
	padding-right: 24px;
}

.nav {
	position: sticky;
	top: 0;
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	background: rgba(255, 255, 255, 0.8);
	border-bottom: 1px solid var(--border-subtle);
	z-index: 10;
}

.nav .container {
	max-width: var(--max-app);
}

.nav-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 64px;
}

.brand {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	font-weight: 750;
	letter-spacing: -0.02em;
}

.brand-mark {
	width: 26px;
	height: 26px;
	display: block;
}

.links {
	display: flex;
	align-items: center;
	gap: 14px;
}

.links a {
	opacity: 0.9;
}

.links a.is-active {
	font-weight: 650;
	opacity: 1;
}

.button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 10px 18px;
	border-radius: 10px;
	border: 1px solid var(--border-strong);
	background: var(--surface-elevated);
	gap: 10px;
	transition: border-color 0.15s, box-shadow 0.15s, transform 0.1s;
}

.button:hover {
	border-color: rgba(15, 23, 42, 0.2);
}

.button.primary,
.links a.primary {
	border: none;
	background: var(--accent-gradient);
	color: #fff;
	padding: 10px 18px;
	border-radius: 10px;
	font-weight: 600;
	box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
	transition: box-shadow 0.2s, transform 0.1s;
}

.button.primary:hover,
.links a.primary:hover {
	background: var(--accent-gradient-hover);
	box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
	transform: translateY(-1px);
}

.hero {
	padding: 52px 0 28px;
}

.hero.small {
	padding: 40px 0 12px;
}

.hero h1 {
	font-size: clamp(34px, 4.3vw, 56px);
	margin: 0 0 10px;
	letter-spacing: -0.03em;
}

.lead {
	font-size: 18px;
	max-width: 70ch;
	opacity: 0.84;
	line-height: 1.55;
	margin: 0 0 18px;
}

.cta {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
	margin: 10px 0 22px;
}

.grid {
	display: grid;
	grid-template-columns: repeat(12, 1fr);
	gap: 14px;
	padding: 18px 0 44px;
}

/* grid-column only for the 12-column marketing layout; app pages use .card inside .stack grids */
.grid > .card {
	grid-column: span 4;
}

.card {
	border-radius: 16px;
	border: 1px solid var(--border-subtle);
	background: var(--surface-elevated);
	padding: 20px;
	box-shadow: var(--shadow-sm), var(--shadow-md);
	transition: box-shadow 0.2s, border-color 0.2s;
}

.card:hover {
	box-shadow: var(--shadow-sm), 0 20px 50px rgba(15, 23, 42, 0.08);
}

.card h2 {
	margin: 0 0 8px;
	font-size: 18px;
}

.card p {
	margin: 0;
	opacity: 0.85;
	line-height: 1.55;
}

.card.code {
	padding: 16px;
}

.grid > .card.code {
	grid-column: span 12;
}

.code-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin-bottom: 10px;
}

.code-title {
	font-size: 12px;
	opacity: 0.75;
	text-transform: uppercase;
	letter-spacing: 0.08em;
}

.copy-btn {
	border: 1px solid color-mix(in srgb, var(--bf-fg, #000) 12%, transparent);
	background: transparent;
	border-radius: 10px;
	padding: 6px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	opacity: 0.85;
}

.copy-btn:hover {
	opacity: 1;
}

.copy-icon {
	width: 18px;
	height: 18px;
}

.pricing {
	position: relative;
}

.pricing.featured {
	border: 2px solid transparent;
	background: linear-gradient(var(--surface-elevated), var(--surface-elevated)) padding-box,
		var(--accent-gradient) border-box;
	box-shadow: var(--shadow-md), 0 0 0 1px rgba(99, 102, 241, 0.1);
	padding-top: 28px;
}

.pricing.featured::before {
	content: "Popular";
	position: absolute;
	top: -10px;
	left: 50%;
	transform: translateX(-50%);
	background: var(--accent-gradient);
	color: #fff;
	font-size: 11px;
	font-weight: 600;
	padding: 4px 12px;
	border-radius: 999px;
	letter-spacing: 0.04em;
}

.price {
	font-size: 32px;
	font-weight: 750;
	letter-spacing: -0.03em;
	margin: 10px 0;
}

.pricing ul {
	margin: 10px 0 16px;
	padding-left: 18px;
	opacity: 0.85;
	line-height: 1.7;
}

.footer {
	border-top: 1px solid var(--border-subtle);
	padding: 24px 0;
	background: var(--surface-subtle);
}

.footer-inner {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
	opacity: 0.85;
}

.muted {
	opacity: 0.72;
}

@media (max-width: 860px) {
	.grid > .card {
		grid-column: span 12;
	}
}
