/* ── x402-tollbooth — landing page styles ──────────── */

/* Reset body from oat-stack defaults */
body {
	margin: 0;
	padding: 0;
}

main {
	padding: 0;
}

/* ── Navbar ───────────────────────────────────────────── */

.navbar {
	/* Reset Oat.ink header defaults */
	margin: 0;
	padding: 0;
	/* Sticky bar */
	position: sticky;
	top: 0;
	z-index: 100;
	background: rgba(255, 255, 255, 0.88);
	backdrop-filter: blur(14px);
	-webkit-backdrop-filter: blur(14px);
	border-bottom: 1px solid var(--border, #e8e8e8);
	/* Prevent layout shift from contain */
	contain: layout style;
}

.navbar-inner {
	max-width: 960px;
	margin: 0 auto;
	padding: 0 1.5rem;
	height: 56px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
}

.navbar-brand {
	display: flex;
	align-items: center;
	gap: 0.45rem;
	text-decoration: none;
	color: inherit;
}

.navbar-brand:hover {
	text-decoration: none;
	color: inherit;
}

.navbar-emoji {
	font-size: 1.2rem;
	line-height: 1;
}

.navbar-name {
	font-weight: 700;
	font-size: 1rem;
	letter-spacing: -0.02em;
}

.navbar-links {
	display: flex;
	align-items: center;
	gap: 1.25rem;
}

.navbar-links a {
	font-size: 0.875rem;
	text-decoration: none;
	color: inherit;
	opacity: 0.55;
	transition: opacity 150ms ease;
}

.navbar-links a:hover {
	opacity: 1;
	text-decoration: none;
}

/* Higher specificity (0,2,1) beats .navbar-links a (0,1,1) — no !important needed */
.navbar-links a.navbar-gh-btn {
	opacity: 1;
	padding: 0.35rem 0.85rem;
	border: 1px solid var(--border, #d4d4d4);
	border-radius: 6px;
	font-weight: 500;
	font-size: 0.85rem;
	background: var(--bg, #fff);
	transition:
		border-color 150ms ease,
		background 150ms ease;
}

.navbar-links a.navbar-gh-btn:hover {
	opacity: 1;
	border-color: var(--fg, #111);
	background: var(--bg-alt, #f5f5f5);
}

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

footer {
	max-width: 960px;
	margin: 0 auto;
	text-align: center;
	padding: 3rem 1.5rem;
	border-top: 1px solid var(--border, #e5e5e5);
}

footer p {
	margin: 0.3rem 0;
	opacity: 0.55;
	font-size: 0.875rem;
}

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

.hero {
	text-align: center;
	padding: 7rem 1.5rem 6rem;
}

.hero-inner {
	max-width: 680px;
	margin: 0 auto;
}

.hero-title {
	font-size: clamp(3rem, 9vw, 5.5rem);
	font-weight: 800;
	margin: 0 0 1.25rem;
	letter-spacing: -0.03em;
	line-height: 1.05;
}

.hero-tagline {
	font-size: clamp(1.1rem, 3vw, 1.35rem);
	opacity: 0.65;
	margin: 0 0 2.75rem;
	line-height: 1.65;
}

.hero-ctas {
	display: flex;
	gap: 1rem;
	justify-content: center;
	flex-wrap: wrap;
	align-items: center;
}

/* Primary CTA — styled link that looks like a filled button */
.primary-cta {
	display: inline-block;
	padding: 0.7rem 1.6rem;
	border-radius: 6px;
	font-weight: 600;
	font-size: 1rem;
	text-decoration: none;
	background: var(--fg, #111);
	color: var(--bg, #fff);
	transition: opacity 150ms ease;
}

.primary-cta:hover {
	opacity: 0.85;
	color: var(--bg, #fff);
	text-decoration: none;
}

.secondary-cta {
	display: inline-block;
	padding: 0.65rem 1.4rem;
	border-radius: 6px;
	font-weight: 500;
	font-size: 0.9rem;
	text-decoration: none;
	background: var(--bg-alt, #f5f5f5);
	color: var(--fg, #111);
	border: 1px solid var(--border, #ddd);
	transition:
		border-color 150ms ease,
		background 150ms ease;
}

.secondary-cta:hover {
	background: var(--bg-alt, #e5e5e5);
	border-color: var(--fg, #111);
	color: var(--fg, #111);
	text-decoration: none;
}

/* Install button — looks like a copy-able terminal command */
.install-btn {
	display: inline-flex;
	align-items: center;
	gap: 0.6rem;
	padding: 0.7rem 1.2rem;
	border-radius: 6px;
	background: transparent;
	border: 1px solid var(--border, #ddd);
	cursor: pointer;
	font-size: 0.9rem;
	transition:
		border-color 150ms ease,
		background 150ms ease;
}

.install-btn:hover {
	border-color: var(--fg, #111);
	background: var(--bg-alt, #f5f5f5);
}

.install-btn code {
	background: none;
	border: none;
	padding: 0;
	font-family: var(--font-mono, monospace);
	font-size: inherit;
}

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

.section {
	max-width: 960px;
	margin: 0 auto;
	padding: 5rem 1.5rem;
	border-top: 1px solid var(--border, #e5e5e5);
}

.section > h2 {
	font-size: clamp(1.4rem, 4vw, 1.9rem);
	font-weight: 700;
	margin: 0 0 1rem;
	letter-spacing: -0.02em;
}

.section-desc {
	opacity: 0.6;
	margin: 0 0 2.5rem;
	max-width: 580px;
	line-height: 1.75;
}

/* ── Steps (How it works) ────────────────────────────── */

.steps {
	display: flex;
	gap: 0.5rem;
	align-items: flex-start;
	margin-top: 2.5rem;
}

.step {
	flex: 1;
	min-width: 0;
}

.step-num {
	width: 2.25rem;
	height: 2.25rem;
	border-radius: 50%;
	background: var(--fg, #111);
	color: var(--bg, #fff);
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	font-size: 0.9rem;
	margin-bottom: 0.85rem;
	flex-shrink: 0;
}

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

.step > p {
	margin: 0;
	opacity: 0.6;
	font-size: 0.875rem;
	line-height: 1.65;
}

.step pre {
	margin: 0.5rem 0 0;
	font-size: 0.82rem;
}

.step-arrow {
	font-size: 1.4rem;
	opacity: 0.3;
	align-self: center;
	flex: 0 0 auto;
	padding: 0 0.75rem;
	margin-top: -0.5rem;
}

@media (max-width: 640px) {
	.steps {
		flex-direction: column;
	}
	.step-arrow {
		display: none;
	}
}

/* ── Config YAML block ───────────────────────────────── */

.yaml-block {
	border-radius: 8px;
	overflow: auto;
	font-size: 0.875rem;
	line-height: 1.6;
	margin: 0;
}

/* ── Features grid ───────────────────────────────────── */

.features-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: 1px;
	margin-top: 2rem;
	border: 1px solid var(--border, #e5e5e5);
	border-radius: 8px;
	overflow: hidden;
}

.features-grid article {
	padding: 1.5rem 1.5rem 1.6rem;
	border-radius: 0;
	border: none;
	border-right: 1px solid var(--border, #e5e5e5);
	border-bottom: 1px solid var(--border, #e5e5e5);
}

.features-grid article > h3 {
	margin: 0 0 0.5rem;
	font-size: 0.95rem;
	font-weight: 600;
}

.features-grid article > p {
	margin: 0;
	opacity: 0.6;
	font-size: 0.875rem;
	line-height: 1.65;
}

/* ── Flow diagram ────────────────────────────────────── */

.flow-diagram {
	display: flex;
	flex-direction: column;
	gap: 0;
	margin-top: 2rem;
	border: 1px solid var(--border, #e5e5e5);
	border-radius: 8px;
	overflow: hidden;
	font-family: var(--font-mono, monospace);
	font-size: 0.82rem;
}

.flow-step {
	padding: 0.9rem 1.5rem 0.4rem;
	border-bottom: 1px solid var(--border, #e5e5e5);
}

.flow-step:last-child {
	border-bottom: none;
}

.flow-step.reverse {
	background: var(--bg-alt, #f9f9f9);
}

.flow-row {
	display: flex;
	align-items: center;
	gap: 0;
	min-width: 480px;
}

.flow-label-row {
	display: flex;
	align-items: center;
	gap: 0;
	min-width: 480px;
	padding-bottom: 0.5rem;
}

.flow-node {
	padding: 0.3rem 0.75rem;
	border-radius: 4px;
	font-weight: 600;
	font-size: 0.8rem;
	white-space: nowrap;
	min-width: 88px;
	text-align: center;
}

.flow-node.client {
	background: #e8f4fd;
	color: #0366d6;
	border: 1px solid #0366d6;
}

.flow-node.gate {
	background: #f0fdf4;
	color: #166534;
	border: 1px solid #16a34a;
}

.flow-node.upstream {
	background: #fdf4ff;
	color: #6b21a8;
	border: 1px solid #9333ea;
}

.flow-line {
	flex: 1;
	text-align: center;
	letter-spacing: -1.5px;
	opacity: 0.5;
	white-space: nowrap;
	overflow: hidden;
}

.flow-line.muted {
	opacity: 0.2;
}

.flow-label {
	flex: 1;
	text-align: center;
	font-size: 0.72rem;
	opacity: 0.55;
	white-space: nowrap;
}

.flow-spacer {
	min-width: 88px;
}

@media (max-width: 560px) {
	.flow-diagram {
		overflow-x: auto;
	}
}

/* ── Use cases ───────────────────────────────────────── */

.use-cases-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: 1rem;
	margin-top: 2rem;
}

.use-case {
	padding: 1.75rem;
}

.use-case-icon {
	font-size: 1.75rem;
	margin-bottom: 0.75rem;
}

.use-case > h3 {
	margin: 0 0 0.6rem;
	font-size: 1.05rem;
	font-weight: 600;
}

.use-case > p {
	margin: 0;
	opacity: 0.6;
	font-size: 0.875rem;
	line-height: 1.7;
}

footer p {
	margin: 0.3rem 0;
	opacity: 0.55;
	font-size: 0.875rem;
}
