/* ------------------------------------------------------------- background */
/* Fixed behind the page, matching the application's marketing shell: the same
   shade gradient, the same 0.72 opacity, and a CSS grid when WebGL is absent. */
.fabric {
	position: fixed;
	inset: 0;
	z-index: 1;
	overflow: hidden;
	pointer-events: none;
	/* The page colour lives here, not on body: body would paint over this layer. */
	background: var(--bg);
}

.fabric::before {
	content: '';
	position: absolute;
	inset: 0;
	z-index: 1;
	background: linear-gradient(90deg, #07080bd6, #07080b61 53%, #07080bb8);
}

.fabric-canvas {
	position: absolute;
	inset: 0;
	z-index: 0;
	width: 100%;
	height: 100%;
	opacity: 0.72;
}

/* The scene keeps its geometry in light mode; the canvas paints dark lines on the
   pale page (see the uLight uniform in fabric.js). A soft veil sits over the art so
   the copy keeps its contrast, strongest under the text and thin over the cubes. */
html[data-theme='light'] .fabric-canvas {
	z-index: 0;
	opacity: 0.9;
}

html[data-theme='light'] .fabric::before {
	z-index: 1;
	background:
		radial-gradient(62% 110% at 18% 44%, rgba(250, 250, 250, 0.78) 0%, rgba(250, 250, 250, 0.5) 48%, rgba(250, 250, 250, 0) 76%);
}

html[data-theme='light'] .fabric-canvas {
	z-index: 2;
}

.static-fabric {
	position: absolute;
	inset: -10%;
	z-index: 0;
	display: block;
	background-image:
		linear-gradient(#8294b41a 1px, transparent 1px),
		linear-gradient(90deg, #8294b41a 1px, transparent 1px);
	background-size: 90px 90px;
	transform: perspective(600px) rotateY(-15deg);
	opacity: 0.4;
}

html[data-theme='light'] .static-fabric {
	opacity: 0.25;
	background-image:
		linear-gradient(#5b64721f 1px, transparent 1px),
		linear-gradient(90deg, #5b64721f 1px, transparent 1px);
}

/* Sections sit above the fixed background. */
main,
.header,
.footer {
	position: relative;
	z-index: 2;
}

/* Homepage styles: loaded after the inlined critical block, so the rest of the
 * page can paint late without a flash. Colours follow the app's theme tokens. */

:root {
	--bg: #07080b;
	--text: #f2f4f7;
	--muted: #a1a7b2;
	--faint: #7c8697;
	--border: #23252a;
	--card: #0b0d10;
	--hover: #14171c;
	--accent: #8ea2c9;
	--button: #f7f9fc;
	--button-text: #15171b;
}

html[data-theme='light'] {
	--bg: #fafafa;
	--text: #0b0c0e;
	--muted: #565e6b;
	--faint: #7b8290;
	--border: #e4e4e7;
	--card: #ffffff;
	--hover: #f1f2f4;
	--accent: #3a5d8f;
	--button: #16181d;
	--button-text: #f7f9fc;
}

/* The scene is fixed at z-index -2; if the body painted a background it would
   cover it, so the page colour moves onto the fabric layer itself. */
html {
	background: var(--bg);
}

body {
	background: transparent;
	color: var(--text);
	min-height: 100vh;
}

a {
	color: inherit;
}

img {
	border: 0;
}

/* --------------------------------------------------------------- sections */
.section {
	padding: 8rem clamp(1.25rem, 7vw, 7.5rem);
	border-top: 1px solid var(--border);
}

/* The hero fills the first screen; the following sections size to content so
   there is no dead space between them. */
.hero {
	min-height: min(100svh, 880px);
	box-sizing: border-box;
}

/* The "New" tag sits in its own chip so the two words never read as one. */
.nav-docs {
	display: inline-flex;
	align-items: center;
}

.new-tag {
	display: inline-block;
	margin-left: 6px;
	padding: 0 6px;
	border: 1px solid var(--border);
	border-radius: 99px;
	font-size: 9px;
	line-height: 1.6;
	color: #7fa4c9;
}

html[data-theme='light'] .new-tag {
	color: #3f6f96;
	border-color: #cbd8e6;
}

/* The wordmark is white-on-dark by design; on the light theme it needs the dark
   variant so the brand does not vanish. */
html[data-theme='light'] .brand .wordmark {
	filter: invert(1);
}

.section-head {
	display: grid;
	grid-template-columns: 1fr 1.15fr;
	gap: 100px;
	align-items: end;
}

.section h2 {
	margin: 0;
	font-size: clamp(2.4rem, 4.2vw, 4rem);
	line-height: 1.05;
	letter-spacing: -0.045em;
	font-weight: 600;
}

.section-head > p,
.split > div > p {
	margin: 0 0 7px;
	font-size: 16px;
	line-height: 1.8;
	color: var(--muted);
}

/* ------------------------------------------------------------------- cards */
.cards {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 65px;
	margin-top: 75px;
	padding-top: 35px;
	border-top: 1px solid var(--border);
}

.card {
	position: relative;
	display: block;
	padding: 2px 0 6px;
	border-radius: 10px;
	text-decoration: none;
	transition: background 0.18s ease;
}

.card:hover {
	background: var(--hover);
}

.card small {
	font-family: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
	font-size: 10px;
	color: var(--faint);
	letter-spacing: 0.08em;
}

.card h3 {
	margin: 68px 0 16px;
	font-size: 18px;
	letter-spacing: -0.02em;
}

.card p {
	max-width: 340px;
	margin: 0;
	font-size: 14px;
	line-height: 1.8;
	color: var(--muted);
}

.card > svg {
	position: absolute;
	top: 4px;
	right: 0;
	color: var(--faint);
	opacity: 0;
	transition: opacity 0.2s ease;
}

.card:hover > svg {
	opacity: 1;
}

/* ------------------------------------------------------------------- split */
.split {
	display: grid;
	grid-template-columns: 1.5fr 1fr;
	align-items: center;
	gap: 95px;
}

.split .button {
	margin-top: 25px;
	padding: 13px 20px;
	font-size: 12px;
}

/* --------------------------------------------------------------- call to action */
.cta {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
}

.cta h2 {
	font-size: clamp(2.2rem, 3.8vw, 3.6rem);
}

.cta > p {
	margin: 26px 0;
	font-size: 15px;
	line-height: 1.8;
	color: var(--muted);
}

.cta-actions {
	justify-content: center;
	gap: 12px;
}

.cta-actions .button {
	padding: 12px 20px;
	font-size: 12px;
}

.install {
	display: flex;
	align-items: center;
	gap: 23px;
	padding: 12px 16px;
	border: 1px solid var(--border);
	border-radius: 99px;
	background: var(--card);
	color: var(--text);
	font: inherit;
	font-size: 11px;
	white-space: nowrap;
	cursor: pointer;
	transition: border-color 0.15s ease;
}

.install:hover {
	border-color: var(--accent);
}

.install > span {
	font-family: 'Geist Mono', ui-monospace, monospace;
	font-size: 9px;
	letter-spacing: 0.08em;
	color: var(--faint);
}

.install code {
	font-family: 'Geist Mono', ui-monospace, monospace;
	font-size: 11px;
	color: #91bdc9;
}

html[data-theme='light'] .install code {
	color: #1e5f70;
}

.install > b {
	font-size: 10px;
	font-weight: 400;
	color: var(--muted);
}

.install[data-state='done'] > b {
	color: #6ee7a0;
}

.install-fallback {
	display: block;
	margin: 14px auto;
	font-size: 11px;
	color: var(--muted);
	user-select: all;
}

.setup-guide {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	margin-top: 26px;
	font-size: 10px;
	color: var(--muted);
	text-decoration: none;
}

.setup-guide:hover {
	color: var(--text);
}

/* --------------------------------------------------------------- logos */
.logos {
	padding-top: 4.5rem;
	padding-bottom: 4.5rem;
}

.logos-note {
	margin: 0 0 26px;
	font-size: 12px;
	color: var(--faint);
}

.logo-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 22px 48px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.logo-row img {
	height: 26px;
	width: auto;
	opacity: 0.55;
	filter: grayscale(1);
	transition: opacity 0.15s ease, filter 0.15s ease;
}

html[data-theme='light'] .logo-row img {
	opacity: 0.6;
}

.logo-row img:hover {
	opacity: 1;
	filter: none;
}

/* ------------------------------------------------------------- terminal */
.section.terminal .section-head + .terminal-window {
	margin-top: 46px;
}

.terminal-window {
	margin: 60px 0 0;
	border: 1px solid var(--border);
	border-radius: 12px;
	background: var(--card);
	overflow: hidden;
	max-width: 760px;
}

.terminal-bar {
	display: flex;
	gap: 7px;
	padding: 12px 16px;
	border-bottom: 1px solid var(--border);
}

.terminal-bar i {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: var(--border);
}

.terminal-window pre {
	margin: 0;
	padding: 18px 20px;
	font-family: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
	font-size: 12.5px;
	line-height: 1.9;
	overflow-x: auto;
	scrollbar-width: thin;
}

.terminal-window .line {
	display: block;
	white-space: pre;
}

.terminal-window .prompt {
	color: var(--text);
}

.terminal-window .output {
	color: var(--muted);
}

.terminal-window .comment {
	color: var(--faint);
}

.terminal-window figcaption {
	padding: 0 20px 16px;
	font-size: 10px;
	color: var(--faint);
	letter-spacing: 0.04em;
}

/* -------------------------------------------------------------- pricing */
.plan-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 14px;
	margin-top: 60px;
}

.plan {
	padding: 22px 20px;
	border: 1px solid var(--border);
	border-radius: 10px;
	background: var(--card);
}

.plan.is-highlight {
	border-color: var(--accent);
	box-shadow: 0 0 0 1px var(--accent) inset;
}

.plan h3 {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 12px;
	font-size: 13px;
	font-weight: 600;
}

.plan-tag {
	padding: 1px 7px;
	border-radius: 99px;
	background: var(--accent);
	color: var(--bg);
	font-size: 9px;
	font-weight: 650;
}

.plan-price {
	margin: 0 0 4px;
	font-size: 26px;
	font-weight: 620;
	letter-spacing: -0.03em;
}

.plan-price small {
	font-size: 11px;
	font-weight: 400;
	color: var(--faint);
	margin-left: 4px;
}

.plan-use {
	margin: 0 0 14px;
	font-size: 11px;
	color: var(--muted);
}

.plan-desc {
	margin: 0;
	padding-top: 14px;
	border-top: 1px solid var(--border);
	font-size: 12px;
	line-height: 1.7;
	color: var(--muted);
}

.pricing-more {
	margin-top: 36px;
	font-size: 12px;
	padding: 11px 18px;
}

@media (max-width: 1100px) {
	.plan-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 640px) {
	.plan-grid {
		grid-template-columns: 1fr;
	}

	.logo-row {
		gap: 18px 32px;
	}
}

/* ------------------------------------------------------------------ footer */
.footer {
	max-width: 1280px;
	margin: 0 auto;
	padding: 75px clamp(20px, 4vw, 64px) 30px;
	border-top: 1px solid var(--border);
}

.footer-statement {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 40px;
	padding-bottom: 55px;
	border-bottom: 1px solid var(--border);
}

.footer-statement h2 {
	margin: 0;
	font-size: 32px;
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: -0.035em;
}

.footer-statement p {
	margin: 0;
	font-size: 12px;
	line-height: 1.8;
	color: var(--faint);
	text-align: right;
}

.footer-grid {
	display: grid;
	grid-template-columns: repeat(6, 1fr);
	gap: 30px;
	padding: 45px 0;
}

.footer-grid h3 {
	margin: 0 0 14px;
	font-size: 10px;
	font-weight: 650;
	letter-spacing: 0.09em;
	text-transform: uppercase;
	color: var(--faint);
}

.footer-grid a {
	display: block;
	padding: 4px 0;
	font-size: 12px;
	color: var(--muted);
	text-decoration: none;
}

.footer-grid a:hover {
	color: var(--text);
}

.footer-base {
	display: flex;
	align-items: center;
	gap: 18px;
	padding-top: 25px;
	border-top: 1px solid var(--border);
	font-size: 10px;
	color: var(--faint);
}

.footer-base a {
	color: var(--faint);
	text-decoration: none;
}

.footer-base a:hover {
	color: var(--text);
}

.footer-base > a:last-child {
	margin-left: auto;
}

.status {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 0;
	border: 0;
	background: none;
	color: var(--faint);
	font: inherit;
	font-size: 10px;
	cursor: pointer;
}

.status i {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--faint);
}

.status[data-state='ready'] i {
	background: #6ee7a0;
}

.status[data-state='error'] i {
	background: #f2b8b5;
}

/* ------------------------------------------------------------------ responsive */
@media (max-width: 1100px) {
	.section-head {
		grid-template-columns: 1fr;
		gap: 32px;
	}

	.cards {
		gap: 40px;
	}

	.footer-grid {
		grid-template-columns: repeat(3, 1fr);
		row-gap: 40px;
	}
}

@media (max-width: 820px) {
	.hero {
		padding-top: 6.75rem;
	}

	.hero-copy {
		width: 100%;
	}

	.split {
		grid-template-columns: 1fr;
		gap: 32px;
		min-height: auto;
	}

	.cards {
		grid-template-columns: 1fr;
		gap: 0;
		margin-top: 45px;
	}

	.card {
		padding: 22px 0;
		border-bottom: 1px solid var(--border);
	}

	.card h3 {
		margin: 12px 0 8px;
	}

	.footer-statement {
		flex-direction: column;
		align-items: flex-start;
	}

	.footer-statement p {
		text-align: left;
	}
}

@media (max-width: 640px) {
	.header nav .sign-in,
	.header nav .lang {
		display: none;
	}

	.footer-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.cta-actions {
		flex-direction: column;
		align-items: stretch;
	}

	.install {
		justify-content: space-between;
		white-space: normal;
	}
}

@media (prefers-reduced-motion: reduce) {
	.card,
	.card > svg,
	.install {
		transition: none;
	}
}
