@font-face {
  font-family: 'Space Grotesk';
  src: url('fonts/space-grotesk/SpaceGrotesk.ttf') format('truetype');
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #f4f4f4;
  --surface: #ffffff;
  --surface-2: #ececec;
  --text: #111111;
  --muted: #5f5f5f;
  --line: #dddddd;
  --invert-bg: #111111;
  --invert-text: #ffffff;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 12px 40px rgba(0, 0, 0, 0.08);
  --radius: 18px;
  --font: 'Space Grotesk', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: ui-monospace, 'Cascadia Mono', 'SFMono-Regular', Consolas, monospace;
  --wrap: 1120px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d0d0d;
    --surface: #161616;
    --surface-2: #1f1f1f;
    --text: #f2f2f2;
    --muted: #a3a3a3;
    --line: #2a2a2a;
    --invert-bg: #f2f2f2;
    --invert-text: #111111;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 12px 40px rgba(0, 0, 0, 0.45);
    color-scheme: dark;
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

code,
pre {
  font-family: var(--mono);
  font-size: 0.88em;
}

:not(pre) > code {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.08em 0.38em;
  overflow-wrap: anywhere;
}

pre {
  margin: 1rem 0 1.4rem;
  padding: 1.1rem 1.2rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow-x: auto;
  line-height: 1.55;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}

.skip {
  position: absolute;
  left: -999px;
}

.skip:focus {
  left: 16px;
  top: 12px;
  z-index: 10;
  background: var(--invert-bg);
  color: var(--invert-text);
  padding: 0.5rem 0.9rem;
  border-radius: 8px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  height: 68px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 1.08rem;
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
}

.logo-mark {
  display: block;
  flex: none;
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: auto;
}

.nav a {
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.15s, background 0.15s;
}

.nav a:hover,
.nav a[aria-current='page'] {
  color: var(--text);
  background: var(--surface-2);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 46px;
  padding: 0 1.25rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  font: 600 0.98rem/1 var(--font);
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.15s, background 0.15s, border-color 0.15s;
}

.btn:hover {
  transform: translateY(-1px);
  border-color: var(--text);
}

.btn-primary {
  background: var(--invert-bg);
  border-color: var(--invert-bg);
  color: var(--invert-text);
}

.btn-sm {
  min-height: 38px;
  padding: 0 1rem;
  font-size: 0.92rem;
}

.btn svg {
  width: 18px;
  height: 18px;
}

.hero {
  padding: 5.5rem 0 3rem;
  text-align: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.88rem;
}

.badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text);
}

.hero h1 {
  margin: 1.4rem auto 1rem;
  max-width: 15ch;
  font-size: clamp(2.4rem, 6vw, 4.4rem);
  line-height: 1.04;
  letter-spacing: -0.035em;
}

.lede {
  margin: 0 auto;
  max-width: 40rem;
  color: var(--muted);
  font-size: 1.2rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 2rem;
}

.hero-shot {
  margin: 3.5rem auto 0;
  max-width: 1040px;
}

.frame {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.frame-bar {
  display: flex;
  gap: 6px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.frame-bar span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--line);
}

.facts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem 2rem;
  margin: 2.5rem 0 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 0.95rem;
}

.facts li {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.facts svg {
  width: 16px;
  height: 16px;
  color: var(--text);
}

.section {
  padding: 5rem 0;
}

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

.section-head {
  max-width: 44rem;
  margin-bottom: 2.75rem;
}

.eyebrow {
  margin: 0 0 0.6rem;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.section h2 {
  margin: 0 0 0.8rem;
  font-size: clamp(1.8rem, 3.6vw, 2.6rem);
  line-height: 1.1;
  letter-spacing: -0.025em;
}

.section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 1.08rem;
}

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

.card {
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
}

.section-alt .card {
  background: var(--bg);
}

.card-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 1rem;
  border-radius: 12px;
  background: var(--invert-bg);
  color: var(--invert-text);
}

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

.card h3 {
  margin: 0 0 0.4rem;
  font-size: 1.12rem;
  letter-spacing: -0.01em;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
}

.showcase {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.shot {
  margin: 0;
}

.shot a {
  display: block;
  text-decoration: none;
}

.shot .frame {
  transition: transform 0.2s, border-color 0.2s;
}

.shot a:hover .frame {
  transform: translateY(-3px);
  border-color: var(--muted);
}

.shot figcaption {
  margin-top: 0.85rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.shot figcaption strong {
  display: block;
  color: var(--text);
  font-size: 1.02rem;
}

.mobile-row {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 1.25rem;
  align-items: center;
  margin-top: 1.25rem;
}

.mobile-row > a {
  display: block;
  min-width: 0;
}

.phone {
  width: 100%;
  max-width: min(260px, 100%);
  margin: 0 auto;
  border-radius: 28px;
}

.mobile-copy h3 {
  margin: 0 0 0.5rem;
  font-size: 1.4rem;
  letter-spacing: -0.015em;
}

.mobile-copy p {
  margin: 0;
  color: var(--muted);
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  position: relative;
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  counter-increment: step;
}

.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin-bottom: 1rem;
  border-radius: 50%;
  border: 1px solid var(--text);
  font-weight: 700;
  font-size: 0.95rem;
}

.steps h3 {
  margin: 0 0 0.4rem;
  font-size: 1.1rem;
}

.steps p {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
}

.steps pre {
  margin: 0.9rem 0 0;
  font-size: 0.8rem;
}

.license {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 2.5rem;
  align-items: start;
}

.license ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.license li {
  display: flex;
  gap: 0.75rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
}

.license li:last-child {
  border-bottom: 0;
}

.license li svg {
  flex: none;
  width: 20px;
  height: 20px;
  margin-top: 0.2rem;
}

.license .note {
  margin-top: 0.75rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.cta {
  padding: 3.5rem 2rem;
  border-radius: 28px;
  background: var(--invert-bg);
  color: var(--invert-text);
  text-align: center;
}

.cta h2 {
  margin: 0 0 0.6rem;
}

.cta p {
  margin: 0 auto;
  max-width: 34rem;
  opacity: 0.75;
}

.cta .btn {
  background: var(--invert-text);
  color: var(--invert-bg);
  border-color: var(--invert-text);
}

.cta .btn-ghost {
  background: transparent;
  color: var(--invert-text);
  border-color: color-mix(in srgb, var(--invert-text) 35%, transparent);
}

.site-footer {
  padding: 2.5rem 0 3rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.site-footer a {
  text-decoration: none;
}

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

.docs {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 3.5rem;
  padding-top: 3rem;
  padding-bottom: 4rem;
}

.toc {
  position: sticky;
  top: 92px;
  align-self: start;
  max-height: calc(100vh - 110px);
  overflow-y: auto;
}

.toc p {
  margin: 0 0 0.6rem;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.toc a {
  display: block;
  padding: 0.38rem 0.75rem;
  border-left: 2px solid var(--line);
  color: var(--muted);
  font-size: 0.94rem;
  text-decoration: none;
}

.toc a:hover {
  color: var(--text);
  border-left-color: var(--text);
}

.doc {
  min-width: 0;
  max-width: 760px;
}

.doc-head h1 {
  margin: 0 0 0.6rem;
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.doc-head p {
  margin: 0 0 2rem;
  color: var(--muted);
  font-size: 1.12rem;
}

.doc section {
  padding: 2.25rem 0 0.5rem;
  border-top: 1px solid var(--line);
}

.doc h2 {
  margin: 0 0 0.9rem;
  font-size: 1.6rem;
  letter-spacing: -0.02em;
}

.doc h3 {
  margin: 1.6rem 0 0.5rem;
  font-size: 1.12rem;
}

.doc p,
.doc li {
  color: var(--text);
}

.doc ul,
.doc ol {
  padding-left: 1.25rem;
}

.doc li {
  margin: 0.3rem 0;
}

.table-wrap {
  margin: 1rem 0 1.4rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.94rem;
}

th,
td {
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  background: var(--surface-2);
  font-weight: 600;
}

tr:last-child td {
  border-bottom: 0;
}

td:first-child {
  white-space: nowrap;
}

.callout {
  margin: 1.2rem 0 1.4rem;
  padding: 1rem 1.2rem;
  border: 1px solid var(--line);
  border-left: 3px solid var(--text);
  border-radius: 10px;
  background: var(--surface);
}

.callout p {
  margin: 0;
}

.callout p + p {
  margin-top: 0.5rem;
}

.tree {
  font-size: 0.85rem;
}

@media (max-width: 960px) {
  .grid,
  .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .license {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.5rem;
  }

  .docs {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.5rem;
  }

  .toc {
    position: static;
    max-height: none;
    padding: 1rem 1.1rem;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
  }

  .toc ol {
    columns: 2;
    column-gap: 1rem;
  }
}

@media (max-width: 720px) {
  body {
    font-size: 16px;
  }

  .wrap {
    padding: 0 16px;
  }

  .site-header .wrap {
    gap: 0.75rem;
  }

  .nav .hide-sm {
    display: none;
  }

  .nav a {
    padding: 0.4rem 0.6rem;
  }

  .hero {
    padding: 3.5rem 0 2rem;
  }

  .lede {
    font-size: 1.06rem;
  }

  .section {
    padding: 3.5rem 0;
  }

  .grid,
  .steps,
  .showcase {
    grid-template-columns: minmax(0, 1fr);
  }

  .mobile-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .mobile-copy {
    grid-column: 1 / -1;
    order: -1;
  }

  .cta {
    padding: 2.5rem 1.25rem;
    border-radius: 22px;
  }

  .toc ol {
    columns: 1;
  }
}

@media (max-width: 520px) {
  .logo-text {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .btn,
  .shot .frame {
    transition: none;
  }

  .btn:hover,
  .shot a:hover .frame {
    transform: none;
  }
}

.logo-mark img {
  width: 32px;
  height: 32px;
}

.sprite {
  display: none;
}

.icon {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.actions-left {
  justify-content: flex-start;
  margin-top: 1.5rem;
}

.nowrap {
  white-space: nowrap;
}
