@font-face {
  font-family: "Outfit";
  src: url("/fonts/outfit-regular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Outfit";
  src: url("/fonts/outfit-bold.woff") format("woff");
  font-weight: 600 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/fonts/bricolage-regular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/fonts/bricolage-bold.woff") format("woff");
  font-weight: 600 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("/fonts/geist-mono-regular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("/fonts/geist-mono-bold.woff") format("woff");
  font-weight: 600 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #0d1117;
  --bg-elevated: #11161d;
  --bg-inset: #161b22;
  --border: #30363d;
  --border-muted: #21262d;
  --text: #e6edf3;
  --text-muted: #8b949e;
  --text-faint: #6e7681;
  --accent: #7ee787;
  --accent-2: #58a6ff;
  --accent-ink: #04120b;
  --danger: #ff5f56;
  --warning: #ffbd2e;
  --success: #27c93f;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow-card: 0 1px 0 rgba(255, 255, 255, 0.03) inset, 0 12px 32px -16px rgba(0, 0, 0, 0.6);
  --font-sans: "Outfit", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-display: "Bricolage Grotesque", "Outfit", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "Geist Mono", "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  --nav-h: 64px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

html[data-theme="light"] {
  --bg: #ffffff;
  --bg-elevated: #f6f8fa;
  --bg-inset: #eef1f4;
  --border: #d0d7de;
  --border-muted: #e6e9ec;
  --text: #1f2328;
  --text-muted: #57606a;
  --text-faint: #6e7781;
  --accent: #1a7f37;
  --accent-2: #0969da;
  --accent-ink: #ffffff;
  --shadow-card: 0 1px 0 rgba(255, 255, 255, 0.6) inset, 0 12px 28px -18px rgba(31, 35, 40, 0.25);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}

img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }

.skip-link {
  position: absolute;
  left: 12px;
  top: -48px;
  background: var(--accent-2);
  color: #fff;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  z-index: 200;
  transition: top 0.15s var(--ease);
}
.skip-link:focus { top: 12px; }

:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
  border-radius: 4px;
}

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

.mono { font-family: var(--font-mono); }

.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--border-muted);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.01em;
}
.brand img { width: 36px; height: 36px; object-fit: contain; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-links a {
  text-decoration: none;
  font-size: 13.5px;
  color: var(--text-muted);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  transition: color 0.15s var(--ease), background 0.15s var(--ease);
}
.nav-links a:hover { color: var(--text); background: var(--bg-elevated); }

.nav-links a.nav-github {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text);
  border: 1px solid var(--border);
}
.nav-links a.nav-github:hover { border-color: var(--accent-2); }

.nav-right { display: flex; align-items: center; gap: 8px; }

.theme-switch {
  display: flex;
  gap: 2px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2px;
}
.theme-switch button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 26px;
  background: transparent;
  border: none;
  border-radius: 6px;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.15s var(--ease), color 0.15s var(--ease);
}
.theme-switch button.active { background: var(--bg); color: var(--text); }
.theme-switch button:hover { color: var(--text); }
.theme-switch svg { width: 14px; height: 14px; }

.nav-toggle {
  display: none;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  position: relative;
}
.nav-toggle-icon { display: flex; }
.nav-toggle-icon svg { width: 16px; height: 16px; }
.nav-toggle > svg { width: 16px; height: 16px; }
.nav-toggle .icon-close { display: none; }
.nav-toggle.is-open .icon-menu { display: none; }
.nav-toggle.is-open .icon-close { display: flex; }

.mobile-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  visibility: hidden;
}
.mobile-overlay.open { visibility: visible; }

.mobile-overlay-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(1, 4, 9, 0.55);
  opacity: 0;
  transition: opacity 0.25s var(--ease);
}
html[data-theme="light"] .mobile-overlay-backdrop { background: rgba(31, 35, 40, 0.35); }
.mobile-overlay.open .mobile-overlay-backdrop { opacity: 1; }

.mobile-overlay-panel {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  height: 100dvh;
  width: min(88vw, 360px);
  background: var(--bg);
  border-left: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.32s var(--ease);
}
.mobile-overlay.open .mobile-overlay-panel { transform: translateX(0); }

.mobile-overlay-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  height: var(--nav-h);
  border-bottom: 1px solid var(--border-muted);
  flex-shrink: 0;
}

.mobile-overlay-head .nav-toggle { display: flex; }

.mobile-overlay-links {
  display: flex;
  flex-direction: column;
  padding: 8px 12px;
  overflow-y: auto;
  flex: 1;
}
.mobile-overlay-links a {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  padding: 16px 8px;
  border-bottom: 1px solid var(--border-muted);
  font-size: 16px;
  font-weight: 500;
}
.mobile-overlay-links a svg { width: 17px; height: 17px; color: var(--text-muted); }

.mobile-overlay-foot {
  padding: 16px;
  border-top: 1px solid var(--border-muted);
  display: flex;
  justify-content: center;
  flex-shrink: 0;
}

body.no-scroll { overflow: hidden; }

.hero {
  padding: 72px 0 88px;
}
.hero .container {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 56px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  padding: 5px 10px;
  border-radius: 999px;
  margin-bottom: 20px;
}
.eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

h1.headline {
  font-family: var(--font-display);
  font-size: clamp(30px, 4.4vw, 44px);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.03em;
  margin: 0 0 18px;
}

.lede {
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.65;
  max-width: 46ch;
  margin: 0 0 28px;
}

.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  padding: 11px 18px;
  border-radius: var(--radius-md);
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s var(--ease), border-color 0.15s var(--ease), background 0.15s var(--ease), opacity 0.15s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 15px; height: 15px; }

.btn-primary { background: var(--text); color: var(--bg); }
html[data-theme="light"] .btn-primary { background: #1f2328; color: #fff; }
.btn-primary:hover { opacity: 0.88; }
.btn-primary:disabled { opacity: 0.55; cursor: default; transform: none; }

.btn-secondary {
  background: var(--bg-elevated);
  color: var(--text);
  border-color: var(--border);
}
.btn-secondary:hover { border-color: var(--accent-2); }

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

.preview-frame {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-elevated);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.preview-chrome {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-muted);
}
.preview-dots { display: flex; gap: 6px; }
.preview-dots span { width: 10px; height: 10px; border-radius: 50%; display: block; }
.preview-dots span:nth-child(1) { background: var(--danger); }
.preview-dots span:nth-child(2) { background: var(--warning); }
.preview-dots span:nth-child(3) { background: var(--success); }

.preview-url {
  flex: 1;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-faint);
  background: var(--bg-inset);
  border: 1px solid var(--border-muted);
  border-radius: 999px;
  padding: 4px 12px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.preview-body {
  position: relative;
  padding: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
}

.preview-body img {
  width: 100%;
  border-radius: 12px;
  opacity: 0;
  transform: scale(0.98);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
}
.preview-body img.is-visible { opacity: 1; transform: scale(1); }

.preview-skeleton {
  position: absolute;
  inset: 22px;
  border-radius: 12px;
  background: linear-gradient(100deg, var(--bg-inset) 30%, var(--border-muted) 50%, var(--bg-inset) 70%);
  background-size: 200% 100%;
  animation: shimmer 1.3s linear infinite;
  opacity: 1;
  transition: opacity 0.2s var(--ease);
}
.preview-skeleton.is-hidden { opacity: 0; pointer-events: none; }

@keyframes shimmer {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}

.preview-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px;
  border-top: 1px solid var(--border-muted);
}
.preview-hint { font-size: 12px; color: var(--text-faint); }

.preview-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-top: 1px solid var(--border-muted);
  flex-wrap: wrap;
}
.preview-theme-label { font-size: 12px; color: var(--text-faint); }
.theme-select {
  background: var(--bg-inset);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 5px 10px;
  font-size: 12.5px;
  cursor: pointer;
}
.theme-select:hover { border-color: var(--accent-2); }

.hero-visual {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero-art {
  width: 100%;
  max-width: 380px;
  height: auto;
  display: block;
  margin: 0 auto;
  filter: drop-shadow(0 18px 34px rgba(0, 0, 0, 0.28));
}

.hero-card {
  width: 100%;
  max-width: 440px;
  margin-top: -48px;
  position: relative;
  z-index: 2;
}

section { padding: 72px 0; }
section.alt { background: var(--bg-elevated); border-top: 1px solid var(--border-muted); border-bottom: 1px solid var(--border-muted); }

.section-head { max-width: 60ch; margin: 0 0 40px; }
.section-kicker {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent-2);
  margin: 0 0 10px;
  letter-spacing: 0.02em;
}
h2.section-title { font-family: var(--font-display); font-weight: 700; font-size: clamp(22px, 3vw, 30px); letter-spacing: -0.02em; margin: 0 0 10px; }
.section-desc { color: var(--text-muted); font-size: 15px; line-height: 1.65; margin: 0; }

.usage-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; }

.codeblock {
  position: relative;
  background: var(--bg-inset);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.codeblock-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-muted);
}
.codeblock-label { font-family: var(--font-mono); font-size: 11.5px; color: var(--text-faint); }
.codeblock pre {
  margin: 0;
  padding: 16px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
}
.codeblock code { color: var(--text); }
.tok-string { color: var(--accent); }
.tok-key { color: var(--accent-2); }
.tok-comment { color: var(--text-faint); }
.tok-method { color: #ff9d5c; font-weight: 700; }

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 12px;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: color 0.15s var(--ease), border-color 0.15s var(--ease);
}
.copy-btn svg { width: 13px; height: 13px; }
.copy-btn:hover { color: var(--text); border-color: var(--accent-2); }
.copy-btn.copied { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 50%, transparent); }

.readme-mock {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-inset);
}
.readme-mock-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-muted);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-faint);
}
.readme-mock-head svg { width: 13px; height: 13px; color: var(--text-faint); }
.readme-mock-body { padding: 16px; }
.readme-mock-body img { border-radius: 10px; border: 1px solid var(--border-muted); }

.api-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-elevated);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.api-endpoint {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-muted);
  flex-wrap: wrap;
}
.method-badge {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  padding: 3px 8px;
  border-radius: 6px;
}
.api-path { font-family: var(--font-mono); font-size: 14px; }
.api-body { padding: 20px; display: grid; gap: 24px; }
.api-body .codeblock pre { font-size: 12.5px; }

.params-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.params-table th, .params-table td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--border-muted); vertical-align: top; }
.params-table th { color: var(--text-faint); font-weight: 600; font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.04em; }
.params-table td.param-name code, .params-table td code { font-family: var(--font-mono); font-size: 12.5px; background: var(--bg-inset); padding: 2px 6px; border-radius: 4px; }
.params-table td.param-desc { color: var(--text-muted); }

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border-muted);
  border: 1px solid var(--border-muted);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.feature-card {
  background: var(--bg);
  padding: 26px;
}
.feature-icon {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--accent-2);
  margin-bottom: 14px;
}
.feature-icon svg { width: 17px; height: 17px; }
.feature-card h3 { font-family: var(--font-display); font-weight: 700; font-size: 15px; margin: 0 0 6px; letter-spacing: -0.01em; }
.feature-card p { font-size: 13.5px; color: var(--text-muted); margin: 0; line-height: 1.6; }

.oss-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--bg-elevated), var(--bg-inset));
  box-shadow: var(--shadow-card);
  padding: 32px;
}
.oss-copy { max-width: 46ch; }
.oss-copy h2 { font-family: var(--font-display); font-weight: 700; margin: 0 0 8px; font-size: 21px; letter-spacing: -0.02em; }
.oss-copy p { margin: 0; color: var(--text-muted); font-size: 14px; line-height: 1.6; }
.oss-actions { display: flex; gap: 10px; flex-wrap: wrap; }

footer.site-footer {
  border-top: 1px solid var(--border-muted);
  padding: 40px 0 32px;
}
.footer-top {
  display: flex;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.footer-brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 14px; }
.footer-brand img { width: 30px; height: 30px; object-fit: contain; }
.footer-desc { color: var(--text-muted); font-size: 13px; max-width: 40ch; margin: 10px 0 0; line-height: 1.6; }
.footer-links { display: flex; gap: 28px; flex-wrap: wrap; }
.footer-col h4 { font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-faint); margin: 0 0 10px; }
.footer-col a { display: block; font-size: 13px; color: var(--text-muted); text-decoration: none; padding: 4px 0; }
.footer-col a:hover { color: var(--text); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 20px;
  border-top: 1px solid var(--border-muted);
  font-size: 12.5px;
  color: var(--text-faint);
}
.footer-bottom a { text-decoration: none; color: var(--text-faint); }
.footer-bottom a:hover { color: var(--text-muted); }

.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.5s var(--ease), transform 0.5s var(--ease); }
.reveal.in-view { opacity: 1; transform: translateY(0); }

.toast {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 16px;
  border-radius: var(--radius-md);
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
  box-shadow: var(--shadow-card);
  z-index: 200;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast svg { width: 14px; height: 14px; color: var(--accent); }

@media (max-width: 900px) {
  .hero .container { grid-template-columns: 1fr; }
  .hero { padding: 48px 0 56px; }
  .usage-grid { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .container { padding: 0 18px; }
  section { padding: 52px 0; }
  .oss-card { padding: 24px; }
  .footer-top { flex-direction: column; }
}

@media (max-width: 480px) {
  .features-grid { grid-template-columns: 1fr; }
  .cta-row { flex-direction: column; align-items: stretch; }
  .cta-row .btn { justify-content: center; }
  h1.headline { font-size: 28px; }
  .preview-body { padding: 14px; }
  .api-endpoint { padding: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
}
