/* -------------------------------------------------------- */
/* Reset & base                                              */
/* -------------------------------------------------------- */
*,
*::before,
*::after {
	box-sizing: border-box;
}

:root {
	--bg: #f7f9fc;
	--bg-alt: #eef3f9;
	--surface: #ffffff;
	--surface-2: #f2f6fc;
	--border: #d5deea;
	--border-soft: #e4ebf4;
	--text: #162236;
	--text-muted: #3d4f69;
	--text-dim: #62718a;
	--accent: #2f66f0;
	--accent-strong: #1d4bc7;
	--accent-soft: rgba(47, 102, 240, 0.16);
	--free: #b56a00;
	--free-soft: rgba(185, 109, 8, 0.14);
	--ok: #0b8d73;
	--ok-soft: rgba(11, 141, 115, 0.15);
	--danger: #c84646;
	--danger-soft: rgba(200, 70, 70, 0.14);
	--violet: #6a4be7;
	--violet-soft: rgba(106, 75, 231, 0.14);
	--sky-soft: rgba(0, 125, 222, 0.12);
	--radius-sm: 8px;
	--radius: 14px;
	--radius-lg: 20px;
	--shadow: 0 22px 48px -28px rgba(30, 58, 102, 0.28);
	--mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
	--sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

html {
	scroll-behavior: smooth;
	scroll-padding-top: 16px;
}

body {
	margin: 0;
	background:
		linear-gradient(180deg, #f8fbff 0%, #f5f9ff 55%, #f7fafd 100%);
	color: var(--text);
	font-family: var(--sans);
	font-size: 16px;
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
	line-height: 1.2;
	font-weight: 650;
	margin: 0 0 0.5em;
	letter-spacing: -0.01em;
}

p {
	margin: 0 0 1em;
	color: var(--text-muted);
}

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

a:hover {
	text-decoration: underline;
}

code {
	font-family: var(--mono);
	font-size: 0.9em;
	background: var(--surface-2);
	border: 1px solid var(--border-soft);
	border-radius: 5px;
	padding: 0.1em 0.4em;
	color: var(--text);
}

ul {
	padding-left: 1.1em;
	margin: 0;
	color: var(--text-muted);
}

ul li + li {
	margin-top: 0.5em;
}

img,
svg {
	display: block;
	max-width: 100%;
}

button {
	font: inherit;
	color: inherit;
}

.container {
	width: 100%;
	max-width: 1120px;
	margin-inline: auto;
	padding-inline: 1.25rem;
}

@media (min-width: 900px) {
	.container {
		padding-inline: 2rem;
	}
}

section {
	padding-block: 4rem;
}

@media (min-width: 900px) {
	section {
		padding-block: 6rem;
	}
}

.section-head {
	max-width: 640px;
	margin-bottom: 2.5rem;
}

.section-head h2 {
	font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.1rem);
}

.section-head p {
	font-size: 1.05rem;
}

.skip-link {
	position: absolute;
	left: 1rem;
	top: -3rem;
	background: var(--accent);
	color: #ffffff;
	padding: 0.6em 1em;
	border-radius: var(--radius-sm);
	font-weight: 600;
	z-index: 100;
	transition: top 0.15s ease;
}

.skip-link:focus {
	top: 1rem;
}

.bg-decor {
	position: fixed;
	inset: 0;
	z-index: -1;
	pointer-events: none;
	background:
		radial-gradient(560px 360px at 12% -8%, rgba(47, 102, 240, 0.18), transparent 60%),
		radial-gradient(620px 420px at 100% 10%, rgba(181, 106, 0, 0.12), transparent 55%),
		radial-gradient(480px 320px at 50% 100%, rgba(11, 141, 115, 0.1), transparent 60%),
		radial-gradient(440px 280px at 82% 66%, rgba(106, 75, 231, 0.08), transparent 62%);
}

.playground,
.docs,
.faq {
	background: linear-gradient(180deg, rgba(47, 102, 240, 0.03), rgba(47, 102, 240, 0));
}

.features,
.notes {
	background: linear-gradient(180deg, rgba(181, 106, 0, 0.04), rgba(181, 106, 0, 0));
}

.how-it-works,
.examples {
	background: linear-gradient(180deg, rgba(11, 141, 115, 0.04), rgba(11, 141, 115, 0));
}

/* -------------------------------------------------------- */
/* Buttons & badges                                          */
/* -------------------------------------------------------- */
.btn {
	display: inline-flex;
	align-items: center;
	gap: 0.5em;
	border-radius: var(--radius-sm);
	padding: 0.7em 1.3em;
	font-weight: 600;
	font-size: 0.95rem;
	border: 1px solid transparent;
	cursor: pointer;
	transition:
		transform 0.15s ease,
		background 0.15s ease,
		border-color 0.15s ease;
	text-decoration: none !important;
}

.btn:active {
	transform: translateY(1px);
}

.btn-primary {
	background: linear-gradient(180deg, var(--accent-strong), var(--accent));
	color: #ffffff;
}

.btn-primary:hover {
	background: var(--accent-strong);
}

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

.btn-ghost:hover {
	background: var(--surface);
	border-color: var(--accent-soft);
}

.btn-sm {
	padding: 0.5em 1em;
	font-size: 0.85rem;
}

.badge {
	display: inline-flex;
	align-items: center;
	gap: 0.5em;
	background: var(--free-soft);
	border: 1px solid rgba(245, 166, 35, 0.35);
	color: var(--free);
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 0.02em;
	padding: 0.4em 0.85em;
	border-radius: 999px;
	margin-bottom: 1.25rem;
}

.badge-dot {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--free);
	animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
	0%,
	100% {
		opacity: 1;
	}
	50% {
		opacity: 0.35;
	}
}

/* -------------------------------------------------------- */
/* Hero                                                       */
/* -------------------------------------------------------- */
.hero {
	padding-top: 5rem;
}

.hero-inner {
	display: grid;
	gap: 2.5rem;
	align-items: center;
}

.hero-copy,
.hero-visual {
	min-width: 0;
}

.hero h1 {
	font-size: clamp(1.85rem, 1.3rem + 3.4vw, 3.4rem);
	max-width: 16ch;
	letter-spacing: -0.02em;
}

.nowrap {
	white-space: nowrap;
}

.accent-text {
	background: linear-gradient(100deg, var(--accent-strong), var(--free));
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

.hero-lede {
	font-size: 1.1rem;
	max-width: 46ch;
}

.hero-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.85rem;
	margin-bottom: 1.5rem;
}

@media (min-width: 960px) {
	.hero-inner {
		grid-template-columns: 1.1fr 1fr;
	}
}

/* -------------------------------------------------------- */
/* Code block component                                       */
/* -------------------------------------------------------- */
.code-block {
	background: var(--bg-alt);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	overflow: hidden;
	box-shadow: var(--shadow);
}

.code-block-bar {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.65rem 1rem;
	background: var(--surface);
	border-bottom: 1px solid var(--border);
}

.code-dots {
	display: inline-flex;
	gap: 6px;
}

.code-dots i {
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: var(--border);
}

.code-filename {
	font-family: var(--mono);
	font-size: 0.78rem;
	color: var(--text-dim);
}

.copy-btn {
	margin-left: auto;
	background: transparent;
	border: 1px solid var(--border);
	color: var(--text-muted);
	font-size: 0.75rem;
	font-weight: 600;
	padding: 0.3em 0.7em;
	border-radius: 6px;
	cursor: pointer;
}

.copy-btn:hover {
	color: var(--text);
	border-color: var(--accent-soft);
}

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

.code-block code {
	background: none;
	border: none;
	padding: 0;
	font-size: 0.86rem;
	color: var(--text);
	white-space: pre;
}

.tok-muted {
	color: var(--text-dim);
}

/* -------------------------------------------------------- */
/* Playground                                                  */
/* -------------------------------------------------------- */
.playground-card {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	padding: 1.75rem;
	box-shadow: var(--shadow);
}

.playground-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 1.5rem;
	margin-bottom: 1.25rem;
	padding-bottom: 1.25rem;
	border-bottom: 1px solid var(--border-soft);
}

.playground-meta-item {
	display: flex;
	align-items: center;
	gap: 0.6em;
}

.playground-meta-label {
	font-size: 0.78rem;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--text-dim);
}

.playground-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.65rem;
	margin-bottom: 1.25rem;
}

.playground-status {
	display: flex;
	align-items: center;
	gap: 0.6em;
	margin-bottom: 0.9rem;
	font-size: 0.9rem;
	font-weight: 600;
}

.status-dot {
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: var(--text-dim);
}

.status-dot.is-locked {
	background: var(--danger);
	box-shadow: 0 0 0 4px var(--danger-soft);
}

.status-dot.is-unlocked {
	background: var(--ok);
	box-shadow: 0 0 0 4px var(--ok-soft);
}

.playground-output {
	background: var(--bg);
	border: 1px solid var(--border-soft);
	border-radius: var(--radius-sm);
	padding: 1rem 1.1rem;
	font-family: var(--mono);
	font-size: 0.85rem;
	color: var(--text-muted);
	overflow-x: auto;
	margin: 0 0 1rem;
	min-height: 3.5em;
}

.playground-output.is-error {
	color: var(--danger);
	border-color: rgba(255, 107, 107, 0.35);
}

.playground-hint {
	font-size: 0.88rem;
	margin: 0;
}

/* -------------------------------------------------------- */
/* Features                                                    */
/* -------------------------------------------------------- */
.feature-grid {
	display: grid;
	gap: 1.25rem;
	grid-template-columns: 1fr;
}

@media (min-width: 640px) {
	.feature-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (min-width: 960px) {
	.feature-grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

.feature-card {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 1.5rem;
	box-shadow: 0 12px 28px -24px rgba(27, 60, 110, 0.5);
}

.feature-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 10px;
	background: var(--accent-soft);
	color: var(--accent-strong);
	margin-bottom: 1rem;
}

.feature-card:nth-child(2) .feature-icon,
.feature-card:nth-child(5) .feature-icon {
	background: var(--ok-soft);
	color: var(--ok);
}

.feature-card:nth-child(3) .feature-icon {
	background: var(--free-soft);
	color: var(--free);
}

.feature-card:nth-child(4) .feature-icon {
	background: var(--violet-soft);
	color: var(--violet);
}

.feature-icon svg {
	width: 20px;
	height: 20px;
}

.feature-card h3 {
	font-size: 1.05rem;
	margin-bottom: 0.4em;
}

.feature-card p {
	font-size: 0.94rem;
	margin: 0;
}

/* -------------------------------------------------------- */
/* How it works                                                */
/* -------------------------------------------------------- */
.steps {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 1.5rem;
}

@media (min-width: 900px) {
	.steps {
		grid-template-columns: repeat(3, 1fr);
	}
}

.step {
	display: flex;
	gap: 1rem;
}

.step-num {
	flex-shrink: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: var(--accent-soft);
	color: var(--accent-strong);
	font-weight: 700;
	font-size: 0.9rem;
	box-shadow: 0 8px 16px -12px rgba(47, 102, 240, 0.6);
}

.step h3 {
	font-size: 1rem;
	margin-bottom: 0.3em;
}

.step p {
	font-size: 0.92rem;
	margin: 0;
}

/* -------------------------------------------------------- */
/* Docs                                                        */
/* -------------------------------------------------------- */
.callout {
	background: linear-gradient(140deg, rgba(47, 102, 240, 0.08), rgba(11, 141, 115, 0.08));
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 1.25rem 1.5rem;
	margin-bottom: 2rem;
	display: flex;
	flex-wrap: wrap;
	gap: 1rem 3rem;
}

.callout-row {
	display: flex;
	align-items: center;
	gap: 0.75rem;
}

.callout-label {
	font-size: 0.78rem;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--text-dim);
}

.table-wrap {
	overflow-x: auto;
	margin-bottom: 1.5rem;
	border: 1px solid var(--border);
	border-radius: var(--radius);
}

.param-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.9rem;
}

.param-table caption {
	text-align: left;
	font-weight: 600;
	padding: 0.9rem 1.1rem;
	background: var(--surface);
	color: var(--text);
	border-bottom: 1px solid var(--border);
}

.param-table th,
.param-table td {
	text-align: left;
	padding: 0.8rem 1.1rem;
	border-bottom: 1px solid var(--border-soft);
	vertical-align: top;
}

.param-table th {
	background: var(--surface);
	color: var(--text-dim);
	font-size: 0.78rem;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	font-weight: 600;
}

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

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

.endpoint-list {
	display: grid;
	gap: 1.5rem;
	margin-bottom: 3rem;
}

.endpoint {
	background: var(--surface);
	border: 1px solid var(--border);
	border-left: 4px solid var(--accent);
	border-radius: var(--radius);
	padding: 1.5rem;
}

.endpoint:nth-child(2) {
	border-left-color: var(--ok);
}

.endpoint:nth-child(3) {
	border-left-color: var(--violet);
}

.endpoint:nth-child(4) {
	border-left-color: var(--free);
}

.endpoint-head {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	margin-bottom: 0.85rem;
	flex-wrap: wrap;
}

.endpoint-head code {
	font-size: 0.95rem;
	background: none;
	border: none;
	padding: 0;
	color: var(--text);
}

.method-pill {
	background: var(--ok-soft);
	color: var(--ok);
	font-family: var(--mono);
	font-weight: 700;
	font-size: 0.75rem;
	padding: 0.3em 0.65em;
	border-radius: 6px;
	border: 1px solid rgba(11, 141, 115, 0.24);
}

.endpoint-example {
	display: grid;
	gap: 1rem;
	margin: 1rem 0;
}

@media (min-width: 640px) {
	.endpoint-example {
		grid-template-columns: repeat(2, 1fr);
	}
}

.example-label {
	display: block;
	font-size: 0.78rem;
	color: var(--text-dim);
	margin-bottom: 0.4em;
}

.endpoint-example pre {
	margin: 0;
	background: var(--bg);
	border: 1px solid var(--border-soft);
	border-radius: var(--radius-sm);
	padding: 0.75rem 0.9rem;
	overflow-x: auto;
}

.endpoint-example code {
	background: none;
	border: none;
	padding: 0;
	font-size: 0.85rem;
}

.endpoint-note {
	font-size: 0.9rem;
	background: var(--bg-alt);
	border: 1px solid var(--border-soft);
	border-radius: var(--radius-sm);
	padding: 0.85rem 1rem;
	margin: 0.75rem 0 0;
}

.endpoint-note strong {
	color: var(--text);
}

.docs-columns {
	display: grid;
	gap: 2rem;
}

@media (min-width: 800px) {
	.docs-columns {
		grid-template-columns: 1.2fr 1fr;
	}
}

.docs-columns h3 {
	font-size: 1.05rem;
}

.limits-list {
	font-size: 0.92rem;
}

/* -------------------------------------------------------- */
/* Code tabs (examples)                                        */
/* -------------------------------------------------------- */
.code-tabs-bar {
	display: inline-flex;
	gap: 0.4rem;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 999px;
	padding: 0.3rem;
	margin-bottom: 1.25rem;
}

.code-tab {
	background: transparent;
	border: none;
	color: var(--text-muted);
	font-weight: 600;
	font-size: 0.88rem;
	padding: 0.5em 1.1em;
	border-radius: 999px;
	cursor: pointer;
}

.code-tab.is-active {
	background: var(--accent-soft);
	color: var(--accent-strong);
}

.code-panel {
	display: none;
}

.code-panel.is-active {
	display: block;
}

.code-panel .code-block code {
	font-size: 0.84rem;
}

/* -------------------------------------------------------- */
/* Notes (do / avoid)                                          */
/* -------------------------------------------------------- */
.notes-columns {
	display: grid;
	gap: 1.5rem;
}

@media (min-width: 800px) {
	.notes-columns {
		grid-template-columns: repeat(2, 1fr);
	}
}

.notes-col {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 1.75rem;
	box-shadow: 0 12px 28px -24px rgba(27, 60, 110, 0.5);
}

.notes-col h3 {
	display: flex;
	align-items: center;
	gap: 0.6em;
	font-size: 1.1rem;
}

.notes-col li {
	font-size: 0.94rem;
}

.notes-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	border-radius: 50%;
}

.notes-icon svg {
	width: 14px;
	height: 14px;
}

.notes-icon-do {
	background: var(--ok-soft);
	color: var(--ok);
}

.notes-icon-avoid {
	background: var(--danger-soft);
	color: var(--danger);
}

/* -------------------------------------------------------- */
/* FAQ                                                          */
/* -------------------------------------------------------- */
.faq-list {
	display: grid;
	gap: 0.85rem;
}

.faq-item {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 0.3rem 1.5rem;
}

.faq-item summary {
	cursor: pointer;
	list-style: none;
	padding: 1.1rem 0;
	font-weight: 600;
	font-size: 1rem;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
}

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

.faq-item summary::after {
	content: "›";
	font-size: 1.3rem;
	color: var(--text-dim);
	transform: rotate(90deg);
	transition: transform 0.2s ease;
	flex-shrink: 0;
}

.faq-item[open] summary::after {
	transform: rotate(-90deg);
}

.faq-item p,
.faq-item ul {
	font-size: 0.94rem;
}

.faq-item ul {
	padding-bottom: 1.25rem;
}

.faq-item > p:last-child,
.faq-item > ul:last-child {
	padding-bottom: 1.25rem;
	margin-bottom: 0;
}

/* -------------------------------------------------------- */
/* Final CTA & footer                                          */
/* -------------------------------------------------------- */

.site-footer {
	border-top: 1px solid var(--border-soft);
	padding-block: 2.5rem;
	text-align: center;
}

.footer-bottom {
	font-size: 0.9rem;
	color: var(--text-dim);
}

.footer-bottom p {
	margin: 0;
	color: inherit;
}
