:root {
  color-scheme: light;
  --bg: #ffffff;
  --surface: #f5f5f7;
  --text: #1d1d1f;
  --text-secondary: #6e6e73;
  --text-tertiary: #626267;
  --accent: #0071e3;
  --accent-hover: #0077ed;
  --accent-foreground: #ffffff;
  --accent-text: #0066cc;
  --hairline: rgba(0, 0, 0, 0.08);
  --nav-bg: rgba(255, 255, 255, 0.72);
  --code-bar: rgba(0, 0, 0, 0.03);
  --status-ok: #1d8348;
  --tok-kw: #9b2393;
  --tok-fn: #1c5ec4;
  --tok-str: #1d7e48;
  --tok-num: #b25000;
  --max-width: 980px;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #000000;
    --surface: #161617;
    --text: #f5f5f7;
    --text-secondary: #a1a1a6;
    --text-tertiary: #a1a1a6;
    --accent: #0a84ff;
    --accent-hover: #409cff;
    --accent-foreground: #000000;
    --accent-text: #2997ff;
    --hairline: rgba(255, 255, 255, 0.12);
    --nav-bg: rgba(22, 22, 23, 0.72);
    --code-bar: rgba(255, 255, 255, 0.03);
    --status-ok: #30d158;
    --tok-kw: #fc5fa3;
    --tok-fn: #67b7a4;
    --tok-str: #fc6a5d;
    --tok-num: #d0bf69;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", Inter, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.47059;
  letter-spacing: -0.022em;
}
a { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--accent-text); outline-offset: 3px; }
code, pre { font-family: "SF Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; }
.container { width: min(calc(100% - 44px), var(--max-width)); margin-inline: auto; }

/* Nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 52px;
  background: var(--nav-bg);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--hairline);
}
.header-inner {
  width: min(calc(100% - 44px), var(--max-width));
  height: 100%;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; font-size: 15px; letter-spacing: -0.015em; }
.brand-mark { width: 26px; height: 26px; object-fit: contain; display: block; }
nav { display: flex; align-items: center; gap: 22px; }
.nav-link { text-decoration: none; font-size: 12px; letter-spacing: -0.01em; color: var(--text-secondary); transition: color 0.2s ease; }
.nav-link:hover, .nav-link:focus-visible { color: var(--text); }
.nav-pill {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 980px;
  background: var(--accent);
  color: var(--accent-foreground);
  text-decoration: none;
  font-size: 12px;
  font-weight: 500;
}
.nav-pill:hover { background: var(--accent-hover); }

/* Typography & Controls */
.eyebrow { margin: 0 0 12px; font-size: 13px; font-weight: 600; letter-spacing: 0.02em; color: var(--text-tertiary); }
h1, h2, h3 { margin: 0; font-weight: 600; color: var(--text); }
h1 { font-size: clamp(44px, 6.5vw, 68px); line-height: 1.05; letter-spacing: -0.032em; }
h2 { font-size: clamp(30px, 4.2vw, 44px); line-height: 1.09; letter-spacing: -0.028em; }
h3 { font-size: 21px; line-height: 1.24; letter-spacing: -0.018em; }
.pill-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 22px;
  border-radius: 980px;
  background: var(--accent);
  color: var(--accent-foreground);
  text-decoration: none;
  font-size: 17px;
  transition: background-color 0.2s ease;
}
.pill-button:hover { background: var(--accent-hover); }
.pill-button:active, .nav-pill:active { transform: scale(0.98); }
.link-chevron { display: inline-flex; align-items: center; gap: 4px; color: var(--accent-text); text-decoration: none; font-size: 17px; }
.link-chevron:hover { text-decoration: underline; text-underline-offset: 3px; }
:is(.lede, .section-copy, .mcp-meta) code { padding: 2px 7px; border-radius: 6px; background: var(--surface); color: var(--text); font-size: 0.85em; }

/* Hero */
.hero { text-align: center; padding: 88px 0 72px; }
.lede { margin: 20px auto 0; max-width: 640px; font-size: 21px; line-height: 1.38; letter-spacing: -0.016em; color: var(--text-secondary); }
.hero-actions, .cta-actions { margin-top: 28px; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 24px; }
.hero-specs { margin: 28px auto 0; padding: 0; list-style: none; display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 24px; font-size: 13px; color: var(--text-tertiary); }
.hero .code-window { margin: 56px auto 0; max-width: 780px; text-align: left; }

/* Code Window */
.code-window { background: var(--surface); border-radius: 18px; overflow: hidden; border: 1px solid var(--hairline); }
.window-bar { height: 42px; padding: 0 16px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; background: var(--code-bar); border-bottom: 1px solid var(--hairline); }
.window-dots { display: flex; gap: 7px; }
.window-dots i { width: 11px; height: 11px; border-radius: 50%; background: var(--hairline); }
.window-title { font-size: 12px; font-weight: 500; color: var(--text-tertiary); }
.copy-button { justify-self: end; border: 0; background: transparent; color: var(--accent-text); font: 500 12px/1 inherit; cursor: pointer; padding: 6px 8px; border-radius: 6px; }
.copy-button:hover { background: var(--hairline); }
.copy-button:active { background: var(--hairline); transform: scale(0.96); }
.copy-button.is-copied { color: var(--status-ok); }
.code-window pre { margin: 0; padding: 24px 26px; overflow-x: auto; font-size: 13.5px; line-height: 1.65; }
.tok-kw { color: var(--tok-kw); }
.tok-fn { color: var(--tok-fn); }
.tok-str { color: var(--tok-str); }
.tok-num { color: var(--tok-num); }
.window-footer { padding: 12px 24px; border-top: 1px solid var(--hairline); display: flex; align-items: center; gap: 14px; overflow-x: auto; font-size: 12.5px; }
.status-text { display: inline-flex; align-items: center; gap: 7px; color: var(--status-ok); font: 600 12.5px "SF Mono", ui-monospace, monospace; white-space: nowrap; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.window-footer code { color: var(--text-secondary); white-space: nowrap; }
.shell-code span { display: block; }
.shell-code span::before { content: "$ "; color: var(--text-tertiary); user-select: none; }

/* Sections */
.section-block { padding: 88px 0; border-top: 1px solid var(--hairline); }
.section-intro { max-width: 680px; }
.section-copy { margin: 16px 0 0; color: var(--text-secondary); font-size: 19px; line-height: 1.45; letter-spacing: -0.015em; }
.steps-grid {
  position: relative;
  margin-top: 52px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.steps-grid::before {
  content: "";
  position: absolute;
  top: 27px;
  left: calc(16.666% + 12px);
  right: calc(16.666% + 12px);
  height: 1px;
  background: var(--hairline);
}
.step-item {
  position: relative;
  min-width: 0;
  padding: 28px;
  border: 1px solid var(--hairline);
  border-radius: 20px;
  background: var(--bg);
}
.step-marker {
  position: relative;
  z-index: 1;
  width: 32px;
  height: 32px;
  margin-bottom: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: 0 0 0 8px var(--bg);
  color: var(--accent-text);
  font-size: 13px;
  font-weight: 600;
}
.step-item h3 { margin-bottom: 10px; text-wrap: balance; }
.step-item h3 code { font-size: 0.9em; font-weight: 600; }
.step-item p { max-width: 30ch; margin: 0; color: var(--text-secondary); font-size: 15px; line-height: 1.55; }

.section-header-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 40px; }
.bento-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.surface-card { background: var(--surface); border-radius: 20px; padding: 32px; display: flex; flex-direction: column; gap: 10px; }
.card-kicker { margin: 0; font-size: 12px; font-weight: 600; letter-spacing: 0.02em; color: var(--text-tertiary); text-transform: uppercase; }
.surface-card p { margin: 0; color: var(--text-secondary); font-size: 15px; line-height: 1.5; flex-grow: 1; }
.endpoint-code { margin-top: 10px; font-size: 13px; font-weight: 500; }

.split-layout { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 56px; align-items: center; }
.split-layout .link-chevron { margin-top: 20px; }
.clean-list { margin: 28px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--hairline); }
.clean-list li { padding: 14px 0; border-bottom: 1px solid var(--hairline); font-size: 15px; color: var(--text-secondary); }
.note-card h3 { font-size: 22px; }
.note-card .link-chevron { margin-top: 12px; font-size: 15px; }
.mcp-meta { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 10px; font-size: 13px; color: var(--text-tertiary); align-items: center; }

/* Final CTA & Footer */
.final-cta { border-top: 1px solid var(--hairline); text-align: center; padding: 104px 0; }
.final-cta h2 { max-width: 680px; margin-inline: auto; }
.site-footer { border-top: 1px solid var(--hairline); padding: 24px 0 36px; color: var(--text-tertiary); font-size: 12px; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.footer-inner p { margin: 0; }
.footer-inner a { color: var(--text-secondary); text-decoration: none; }
.footer-inner a:hover { text-decoration: underline; }

@media (max-width: 860px) {
  .nav-link { display: none; }
  .steps-grid, .split-layout { grid-template-columns: 1fr; gap: 32px; }
  .steps-grid::before { top: 44px; bottom: 44px; left: 43px; right: auto; width: 1px; height: auto; }
  .step-item { padding: 24px 24px 24px 76px; }
  .step-marker { position: absolute; top: 24px; left: 27px; margin: 0; }
  .step-item p { max-width: 52ch; }
  .section-header-row { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 600px) {
  .brand > span { display: none; }
  .hero { padding: 60px 0 56px; }
  .section-block { padding: 64px 0; }
  .bento-grid { grid-template-columns: 1fr; }
  .surface-card { padding: 24px; }
  .code-window pre { padding: 18px; font-size: 12.5px; }
  .final-cta { padding: 76px 0; }
  .nav-pill { min-height: 44px; }
}
@media (prefers-contrast: more) {
  :root { --hairline: rgba(0, 0, 0, 0.28); --text-secondary: #3f3f43; --text-tertiary: #4a4a4f; }
}
@media (prefers-color-scheme: dark) and (prefers-contrast: more) {
  :root { --hairline: rgba(255, 255, 255, 0.34); --text-secondary: #d1d1d6; --text-tertiary: #c7c7cc; }
}
@media (prefers-reduced-transparency: reduce) {
  .site-header { background: var(--bg); backdrop-filter: none; -webkit-backdrop-filter: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}
