/* Switchboard Marketing Site — site.css */

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

:root {
	--bg: oklch(0.12 0.005 260);
	--bg-surface: oklch(0.16 0.005 260);
	--bg-elevated: oklch(0.20 0.005 260);
	--bg-hover: oklch(0.22 0.008 260);
	--text: oklch(0.82 0.01 260);
	--text-strong: oklch(0.95 0.005 260);
	--text-muted: oklch(0.55 0.01 260);
	--text-faint: oklch(0.40 0.01 260);
	--border: oklch(0.22 0.005 260);
	--border-strong: oklch(0.30 0.005 260);
	--accent: oklch(0.72 0.12 175);
	--accent-dim: oklch(0.25 0.04 175);
	--accent-text: oklch(0.14 0.02 175);
	--accent-glow: oklch(0.72 0.12 175 / 0.15);
	--mono: "SF Mono", "Cascadia Code", "JetBrains Mono", "Fira Code", Consolas, monospace;
	--sans: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
	--max-w: 1120px;
	--max-w-narrow: 720px;
}

html { scroll-behavior: smooth; }

body {
	font-family: var(--sans);
	background: var(--bg);
	color: var(--text);
	font-size: 15px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

code {
	font-family: var(--mono);
	font-size: 0.875em;
	background: var(--bg-surface);
	padding: 0.15em 0.35em;
	border-radius: 3px;
}

/* ========== Header ========== */

.site-header {
	position: fixed;
	top: 0; left: 0; right: 0;
	z-index: 100;
	background: oklch(0.12 0.005 260 / 0.85);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	border-bottom: 1px solid var(--border);
	transition: background 0.2s;
}

.header-inner {
	max-width: var(--max-w);
	margin: 0 auto;
	padding: 0 1.5rem;
	height: 56px;
	display: flex;
	align-items: center;
	gap: 2rem;
}

.header-brand {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	text-decoration: none;
	color: var(--text-strong);
	font-weight: 700;
	font-size: 0.95rem;
	letter-spacing: 0.02em;
	flex-shrink: 0;
}

.brand-icon { font-size: 1.1rem; }

.header-nav {
	display: flex;
	align-items: center;
	gap: 0.25rem;
}

.nav-link {
	padding: 0.35rem 0.65rem;
	border-radius: 5px;
	font-size: 0.85rem;
	font-weight: 450;
	color: var(--text-muted);
	text-decoration: none;
	transition: color 0.15s, background 0.15s;
}

.nav-link:hover {
	color: var(--text);
	background: var(--bg-hover);
	text-decoration: none;
}

.nav-link.active {
	color: var(--text-strong);
	background: var(--bg-surface);
}

.header-actions {
	margin-left: auto;
	display: flex;
	align-items: center;
	gap: 0.75rem;
}

.gh-link { font-size: 0.85rem; }

.mobile-toggle {
	display: none;
	flex-direction: column;
	gap: 4px;
	background: none;
	border: none;
	cursor: pointer;
	padding: 4px;
	margin-left: auto;
}

.mobile-toggle span {
	display: block;
	width: 18px;
	height: 2px;
	background: var(--text-muted);
	border-radius: 1px;
	transition: transform 0.2s, opacity 0.2s;
}

/* ========== Buttons ========== */

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.4rem;
	padding: 0.5rem 1rem;
	border: 1px solid var(--border-strong);
	border-radius: 6px;
	background: var(--bg-surface);
	color: var(--text);
	font-size: 0.85rem;
	font-weight: 500;
	cursor: pointer;
	text-decoration: none;
	transition: background 0.15s, border-color 0.15s, color 0.15s;
	white-space: nowrap;
}

.btn:hover {
	background: var(--bg-elevated);
	border-color: var(--text-faint);
	text-decoration: none;
}

.btn-primary {
	background: var(--accent);
	border-color: var(--accent);
	color: var(--accent-text);
	font-weight: 600;
}

.btn-primary:hover { background: oklch(0.76 0.12 175); color: var(--accent-text); }

.btn-ghost {
	background: transparent;
	border-color: var(--border-strong);
	color: var(--text);
}

.btn-ghost:hover { background: var(--bg-surface); }

.btn-sm { padding: 0.35rem 0.65rem; font-size: 0.8rem; }
.btn-lg { padding: 0.65rem 1.5rem; font-size: 0.95rem; }
.btn-block { width: 100%; }

/* ========== Sections ========== */

.section {
	padding: 5rem 1.5rem;
}

.section-dark {
	background: var(--bg-surface);
	border-top: 1px solid var(--border);
	border-bottom: 1px solid var(--border);
}

.section-inner {
	max-width: var(--max-w);
	margin: 0 auto;
}

.section-narrow {
	max-width: var(--max-w-narrow);
}

.section-header {
	text-align: center;
	margin-bottom: 3rem;
}

.section-title {
	font-size: 1.75rem;
	font-weight: 700;
	color: var(--text-strong);
	letter-spacing: -0.02em;
	margin-bottom: 0.5rem;
}

.section-subtitle {
	font-size: 1.05rem;
	color: var(--text-muted);
	max-width: 540px;
	margin: 0 auto;
}

/* ========== Page Hero ========== */

.page-hero {
	padding-top: 8rem;
	padding-bottom: 3rem;
	text-align: center;
}

.page-title {
	font-size: 2.25rem;
	font-weight: 750;
	color: var(--text-strong);
	letter-spacing: -0.03em;
	margin-bottom: 0.5rem;
}

.page-subtitle {
	font-size: 1.1rem;
	color: var(--text-muted);
	max-width: 560px;
	margin: 0 auto;
}

/* ========== Hero ========== */

.hero {
	padding: 8rem 1.5rem 4rem;
	text-align: center;
	position: relative;
	overflow: hidden;
}

.hero::before {
	content: "";
	position: absolute;
	top: 0; left: 0; right: 0; bottom: 0;
	background:
		radial-gradient(circle at 50% 0%, var(--accent-glow) 0%, transparent 50%);
	pointer-events: none;
}

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

.hero-badge {
	display: inline-block;
	padding: 0.3rem 0.75rem;
	background: var(--accent-dim);
	color: var(--accent);
	font-size: 0.75rem;
	font-weight: 600;
	border-radius: 999px;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	margin-bottom: 1.5rem;
}

.hero-title {
	font-size: 3rem;
	font-weight: 800;
	color: var(--text-strong);
	line-height: 1.15;
	letter-spacing: -0.04em;
	margin-bottom: 1.25rem;
}

.hero-accent {
	background: linear-gradient(135deg, var(--accent), oklch(0.72 0.12 220));
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
}

.hero-subtitle {
	font-size: 1.1rem;
	color: var(--text-muted);
	line-height: 1.65;
	margin-bottom: 2rem;
}

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

.hero-code {
	margin-top: 3rem;
	text-align: left;
	background: oklch(0.10 0.005 260);
	border: 1px solid var(--border);
	border-radius: 8px;
	overflow: hidden;
	max-width: 480px;
	margin-left: auto;
	margin-right: auto;
}

.code-header {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 0.6rem 0.85rem;
	background: oklch(0.14 0.005 260);
	border-bottom: 1px solid var(--border);
}

.code-dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: var(--border-strong);
}

.code-title {
	margin-left: auto;
	font-family: var(--mono);
	font-size: 0.7rem;
	color: var(--text-faint);
}

.code-body, .code-block pre {
	padding: 1rem;
	overflow-x: auto;
}

.code-body code, .code-block code {
	font-family: var(--mono);
	font-size: 0.8rem;
	color: var(--text);
	background: none;
	padding: 0;
}

/* ========== Integration Cloud ========== */

.integration-cloud {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.5rem;
}

.integration-chip {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.5rem 0.85rem;
	background: var(--bg-surface);
	border: 1px solid var(--border);
	border-radius: 8px;
	transition: border-color 0.15s, background 0.15s;
	text-decoration: none;
	color: var(--text);
}

.integration-chip:hover {
	border-color: var(--border-strong);
	background: var(--bg-elevated);
	text-decoration: none;
}

.chip-name {
	font-size: 0.85rem;
	font-weight: 550;
	color: var(--text-strong);
}

.chip-cat {
	font-size: 0.7rem;
	color: var(--text-faint);
}

.chip-more .chip-name { color: var(--accent); }

/* ========== Value Props ========== */

.value-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1.5rem;
}

.value-card {
	padding: 1.75rem;
	background: var(--bg);
	border: 1px solid var(--border);
	border-radius: 8px;
}

.value-icon {
	font-size: 1.5rem;
	margin-bottom: 0.75rem;
}

.value-card h3 {
	font-size: 1rem;
	font-weight: 650;
	color: var(--text-strong);
	margin-bottom: 0.5rem;
}

.value-card p {
	font-size: 0.88rem;
	color: var(--text-muted);
	line-height: 1.55;
}

/* ========== Architecture ========== */

.arch-diagram {
	display: flex;
	align-items: stretch;
	justify-content: center;
	gap: 1.5rem;
	padding: 2rem 0;
}

.arch-col {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	min-width: 160px;
}

.arch-center {
	min-width: 220px;
}

.arch-label {
	font-size: 0.7rem;
	font-weight: 650;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--text-faint);
	margin-bottom: 0.25rem;
}

.arch-box {
	padding: 0.6rem 0.85rem;
	background: var(--bg-surface);
	border: 1px solid var(--border);
	border-radius: 6px;
	font-size: 0.85rem;
	color: var(--text);
}

.arch-highlight {
	border-color: var(--accent);
	background: var(--accent-dim);
}

.arch-feature {
	font-size: 0.8rem;
	color: var(--text);
	padding: 0.2rem 0;
}

.arch-arrow {
	display: flex;
	align-items: center;
	font-size: 1.5rem;
	color: var(--text-faint);
	padding-top: 1.5rem;
}

/* ========== Pricing ========== */

.pricing-preview, .pricing-grid {
	display: grid;
	gap: 1.25rem;
	justify-content: center;
}

.pricing-preview { grid-template-columns: repeat(3, 1fr); }
.pricing-grid { grid-template-columns: repeat(5, 1fr); }

.pricing-card {
	padding: 1.5rem;
	background: var(--bg);
	border: 1px solid var(--border);
	border-radius: 8px;
	display: flex;
	flex-direction: column;
	position: relative;
}

.pricing-highlight {
	border-color: var(--accent);
	box-shadow: 0 0 0 1px var(--accent-dim), 0 4px 24px var(--accent-glow);
}

.pricing-badge {
	position: absolute;
	top: -10px;
	left: 50%;
	transform: translateX(-50%);
	background: var(--accent);
	color: var(--accent-text);
	font-size: 0.7rem;
	font-weight: 650;
	padding: 0.2rem 0.6rem;
	border-radius: 999px;
	white-space: nowrap;
}

.pricing-card h3 {
	font-size: 1rem;
	font-weight: 650;
	color: var(--text-strong);
	margin-bottom: 0.5rem;
}

.pricing-amount {
	margin-bottom: 1rem;
}

.pricing-amount .price {
	font-size: 2rem;
	font-weight: 750;
	color: var(--text-strong);
	letter-spacing: -0.02em;
}

.pricing-amount .price-period {
	font-size: 0.85rem;
	color: var(--text-muted);
}

.pricing-features {
	list-style: none;
	margin-bottom: 1.25rem;
	flex: 1;
}

.pricing-features li {
	padding: 0.25rem 0;
	font-size: 0.83rem;
	color: var(--text-muted);
}

.pricing-features li strong { color: var(--text); }

.pricing-more {
	text-align: center;
	margin-top: 1.5rem;
}

.pricing-more a {
	font-size: 0.9rem;
	color: var(--accent);
}

/* ========== Feature Table ========== */

.table-wrap {
	overflow-x: auto;
}

.feature-table {
	width: 100%;
	border-collapse: collapse;
}

.feature-table th,
.feature-table td {
	padding: 0.6rem 1rem;
	font-size: 0.83rem;
	text-align: left;
	border-bottom: 1px solid var(--border);
}

.feature-table th {
	font-weight: 650;
	color: var(--text-muted);
	font-size: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.feature-table td {
	color: var(--text);
}

.col-highlight {
	color: var(--accent) !important;
}

.feature-table tr:last-child td { border-bottom: none; }

/* ========== FAQ ========== */

.faq-list {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.faq-item {
	border: 1px solid var(--border);
	border-radius: 6px;
	background: var(--bg-surface);
	overflow: hidden;
}

.faq-question {
	padding: 0.85rem 1rem;
	cursor: pointer;
	font-size: 0.9rem;
	font-weight: 550;
	color: var(--text-strong);
	list-style: none;
}

.faq-question::-webkit-details-marker { display: none; }

.faq-question::before {
	content: "+";
	display: inline-block;
	width: 1.25rem;
	font-weight: 400;
	color: var(--text-faint);
}

.faq-item[open] .faq-question::before { content: "−"; }

.faq-answer {
	padding: 0 1rem 0.85rem 2.25rem;
	font-size: 0.88rem;
	color: var(--text-muted);
	line-height: 1.6;
}

/* ========== Integrations Grid ========== */

.filter-bar {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem;
	margin-bottom: 1.5rem;
}

.filter-btn {
	padding: 0.35rem 0.7rem;
	background: transparent;
	border: 1px solid var(--border);
	border-radius: 5px;
	color: var(--text-muted);
	font-size: 0.78rem;
	font-weight: 500;
	cursor: pointer;
	transition: background 0.15s, color 0.15s, border-color 0.15s;
	font-family: var(--sans);
}

.filter-btn:hover {
	background: var(--bg-surface);
	color: var(--text);
}

.filter-btn.active {
	background: var(--accent-dim);
	border-color: var(--accent);
	color: var(--accent);
}

.integration-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1rem;
}

.ig-card {
	padding: 1.25rem;
	background: var(--bg-surface);
	border: 1px solid var(--border);
	border-radius: 8px;
	display: flex;
	flex-direction: column;
	transition: border-color 0.15s;
}

.ig-card:hover { border-color: var(--border-strong); }

.ig-card.hidden { display: none; }

.ig-card-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 0.5rem;
}

.ig-name {
	font-size: 0.95rem;
	font-weight: 650;
	color: var(--text-strong);
}

.ig-badge {
	font-size: 0.65rem;
	font-weight: 600;
	padding: 0.15rem 0.4rem;
	background: var(--bg-elevated);
	color: var(--text-faint);
	border-radius: 3px;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

.ig-desc {
	font-size: 0.83rem;
	color: var(--text-muted);
	line-height: 1.5;
	flex: 1;
}

.ig-footer {
	margin-top: 0.75rem;
	padding-top: 0.5rem;
	border-top: 1px solid var(--border);
}

.ig-auth {
	font-size: 0.75rem;
	color: var(--text-faint);
	font-family: var(--mono);
}

/* ========== Docs ========== */

.docs-content {
	display: flex;
	gap: 3rem;
}

.docs-nav {
	position: sticky;
	top: 80px;
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	min-width: 140px;
	flex-shrink: 0;
	align-self: flex-start;
}

.docs-nav-link {
	font-size: 0.8rem;
	color: var(--text-muted);
	padding: 0.3rem 0;
	text-decoration: none;
}

.docs-nav-link:hover { color: var(--text); text-decoration: none; }

.docs-body {
	flex: 1;
	min-width: 0;
}

.docs-body h2 {
	font-size: 1.35rem;
	font-weight: 700;
	color: var(--text-strong);
	margin-top: 2.5rem;
	margin-bottom: 0.75rem;
	letter-spacing: -0.01em;
}

.docs-body h2:first-child { margin-top: 0; }

.docs-body h3 {
	font-size: 1rem;
	font-weight: 600;
	color: var(--text-strong);
	margin-top: 1.5rem;
	margin-bottom: 0.5rem;
}

.docs-body p {
	margin-bottom: 0.75rem;
	color: var(--text);
	line-height: 1.65;
}

.docs-body ul, .docs-body ol {
	margin-bottom: 1rem;
	padding-left: 1.5rem;
}

.docs-body li {
	margin-bottom: 0.35rem;
	color: var(--text);
	line-height: 1.55;
}

.code-block {
	background: oklch(0.10 0.005 260);
	border: 1px solid var(--border);
	border-radius: 8px;
	overflow: hidden;
	margin-bottom: 1rem;
}

.code-block pre {
	padding: 1rem;
	overflow-x: auto;
	margin: 0;
}

.docs-callout {
	margin-top: 2rem;
	padding: 1rem 1.25rem;
	background: var(--accent-dim);
	border: 1px solid oklch(0.35 0.06 175);
	border-radius: 6px;
	font-size: 0.88rem;
	color: var(--text);
}

.docs-callout a { color: var(--accent); }

/* ========== Open Source ========== */

.arch-text {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 1.5rem;
	margin: 1.5rem 0;
}

.arch-text-block {
	padding: 1.25rem;
	background: var(--bg-surface);
	border: 1px solid var(--border);
	border-radius: 8px;
}

.arch-text-block h3 {
	font-size: 0.95rem;
	font-weight: 650;
	color: var(--text-strong);
	margin-bottom: 0.5rem;
}

.arch-text-block p {
	font-size: 0.85rem;
	color: var(--text-muted);
	line-height: 1.55;
}

/* ========== CTA Section ========== */

.cta-section { text-align: center; }

.cta-title {
	font-size: 2rem;
	font-weight: 750;
	color: var(--text-strong);
	letter-spacing: -0.03em;
	margin-bottom: 0.5rem;
}

.cta-subtitle {
	font-size: 1.05rem;
	color: var(--text-muted);
	margin-bottom: 1.5rem;
}

/* ========== Footer ========== */

.site-footer {
	border-top: 1px solid var(--border);
	padding: 3rem 1.5rem 2rem;
}

.footer-inner {
	max-width: var(--max-w);
	margin: 0 auto;
}

.footer-grid {
	display: grid;
	grid-template-columns: 2fr 1fr 1fr 1fr;
	gap: 2rem;
	margin-bottom: 2rem;
}

.footer-brand {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-weight: 700;
	font-size: 0.9rem;
	color: var(--text-strong);
	margin-bottom: 0.5rem;
}

.footer-tagline {
	font-size: 0.83rem;
	color: var(--text-muted);
}

.footer-col h4 {
	font-size: 0.72rem;
	font-weight: 650;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--text-muted);
	margin-bottom: 0.75rem;
}

.footer-col a {
	display: block;
	font-size: 0.83rem;
	color: var(--text-faint);
	padding: 0.2rem 0;
	text-decoration: none;
}

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

.footer-bottom {
	border-top: 1px solid var(--border);
	padding-top: 1.25rem;
}

.footer-bottom p {
	font-size: 0.75rem;
	color: var(--text-faint);
}

/* ========== Prose (generic content styling) ========== */

.section-narrow h2 {
	font-size: 1.35rem;
	font-weight: 700;
	color: var(--text-strong);
	margin-top: 2rem;
	margin-bottom: 0.75rem;
}

.section-narrow h2:first-child { margin-top: 0; }

.section-narrow p {
	margin-bottom: 0.75rem;
	line-height: 1.65;
}

.section-narrow ul {
	margin-bottom: 1rem;
	padding-left: 1.5rem;
}

.section-narrow li {
	margin-bottom: 0.35rem;
	line-height: 1.55;
}

/* ========== Responsive ========== */

@media (max-width: 960px) {
	.pricing-grid { grid-template-columns: repeat(3, 1fr); }
	.integration-grid { grid-template-columns: repeat(2, 1fr); }
	.footer-grid { grid-template-columns: repeat(2, 1fr); }
	.arch-text { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
	.hero-title { font-size: 2.25rem; }
	.section { padding: 3rem 1rem; }
	.page-hero { padding-top: 6rem; }
	.hero { padding: 6rem 1rem 3rem; }

	.header-nav, .header-actions { display: none; }
	.header-nav.open { display: flex; }

	.mobile-toggle { display: flex; }

	.header-inner { position: relative; }

	.header-nav.open {
		position: absolute;
		top: 56px;
		left: 0; right: 0;
		flex-direction: column;
		background: var(--bg-surface);
		border-bottom: 1px solid var(--border);
		padding: 0.75rem;
		gap: 0.25rem;
	}

	.header-actions.open {
		display: flex;
		position: absolute;
		top: calc(56px + var(--nav-open-h, 180px));
		left: 0; right: 0;
		background: var(--bg-surface);
		border-bottom: 1px solid var(--border);
		padding: 0.75rem;
		justify-content: center;
	}

	.value-grid { grid-template-columns: 1fr; }
	.pricing-preview { grid-template-columns: 1fr; }
	.pricing-grid { grid-template-columns: 1fr; }
	.integration-grid { grid-template-columns: 1fr; }
	.footer-grid { grid-template-columns: 1fr; gap: 1.5rem; }

	.arch-diagram { flex-direction: column; align-items: center; }
	.arch-arrow { transform: rotate(90deg); padding-top: 0; }
	.arch-col { min-width: auto; width: 100%; max-width: 280px; }

	.docs-content { flex-direction: column; gap: 1.5rem; }
	.docs-nav {
		position: static;
		flex-direction: row;
		flex-wrap: wrap;
		min-width: auto;
	}
}
