:root {
  --ink: #111827;
  --muted: #5f6b7a;
  --line: #d8ded8;
  --surface: #f7f8f5;
  --paper: #ffffff;
  --accent: #0b7a53;
  --accent-dark: #075f42;
  --code: #101614;
  --code-text: #d8f5e7;
  --max: 1120px;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

code,
pre {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 28px;
  min-height: 68px;
  padding: 0 max(20px, calc((100vw - var(--max)) / 2));
  background: rgba(247, 248, 245, 0.92);
  border-bottom: 1px solid rgba(17, 24, 39, 0.08);
  backdrop-filter: blur(14px);
}

.brand,
.nav,
.hero-actions,
.footer {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-weight: 760;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  color: white;
  background: var(--accent);
  font-weight: 800;
}

.nav {
  justify-content: center;
  gap: 22px;
  color: var(--muted);
  font-size: 14px;
}

.nav a,
.external-link,
.footer a {
  transition: color 160ms ease;
}

.nav a:hover,
.nav a.is-active,
.external-link:hover,
.footer a:hover {
  color: var(--accent);
}

.external-link {
  color: var(--accent-dark);
  font-weight: 650;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(360px, 0.78fr);
  gap: 64px;
  align-items: center;
  min-height: calc(100svh - 68px);
  padding: 72px max(20px, calc((100vw - var(--max)) / 2)) 64px;
  background:
    linear-gradient(90deg, rgba(247, 248, 245, 0.96), rgba(247, 248, 245, 0.82)),
    repeating-linear-gradient(0deg, transparent 0 36px, rgba(11, 122, 83, 0.06) 36px 37px),
    repeating-linear-gradient(90deg, transparent 0 36px, rgba(11, 122, 83, 0.06) 36px 37px);
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 760;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(48px, 7.2vw, 92px);
  line-height: 0.94;
  letter-spacing: 0;
}

h2 {
  margin: 0;
  max-width: 760px;
  font-size: clamp(32px, 4vw, 56px);
  line-height: 1;
  letter-spacing: 0;
}

h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
}

.hero-text,
.section-heading p {
  max-width: 650px;
  color: var(--muted);
  font-size: 18px;
}

.hero-text {
  margin: 24px 0 0;
}

.hero-actions {
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.primary-action,
.secondary-action,
.sample-head button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid transparent;
  font-weight: 720;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.primary-action {
  color: white;
  background: var(--accent);
}

.secondary-action {
  color: var(--ink);
  background: transparent;
  border-color: var(--line);
}

.primary-action:hover,
.secondary-action:hover,
.sample-head button:hover {
  transform: translateY(-1px);
}

.primary-action:hover {
  background: var(--accent-dark);
}

.hero-visual {
  position: relative;
  min-height: 540px;
  display: grid;
  align-content: end;
  overflow: hidden;
}

.request-map {
  position: absolute;
  inset: 0 0 120px 32px;
  border-left: 2px solid rgba(11, 122, 83, 0.28);
  border-bottom: 2px solid rgba(11, 122, 83, 0.28);
}

.pin {
  position: absolute;
  top: 84px;
  left: 45%;
  width: 18px;
  height: 18px;
  background: var(--accent);
  transform: rotate(45deg);
}

.pin::after {
  content: "";
  position: absolute;
  inset: 5px;
  background: white;
}

.route,
.parcel {
  position: absolute;
  display: block;
  border: 1px solid rgba(11, 122, 83, 0.46);
}

.route {
  height: 2px;
  background: rgba(11, 122, 83, 0.36);
  border: 0;
  transform-origin: left center;
}

.route-a {
  top: 112px;
  left: 20%;
  width: 58%;
  transform: rotate(-12deg);
}

.route-b {
  top: 220px;
  left: 8%;
  width: 74%;
  transform: rotate(18deg);
}

.parcel-a {
  right: 8%;
  top: 148px;
  width: 34%;
  height: 88px;
}

.parcel-b {
  left: 18%;
  bottom: 68px;
  width: 32%;
  height: 112px;
}

.parcel-c {
  right: 16%;
  bottom: 20px;
  width: 26%;
  height: 88px;
}

.hero-visual pre,
.code-sample pre {
  position: relative;
  margin: 0;
  overflow-x: auto;
  background: var(--code);
  color: var(--code-text);
  box-shadow: 0 18px 50px rgba(17, 24, 39, 0.12);
}

.hero-visual pre {
  padding: 26px;
}

.muted {
  color: #8bb6a1;
}

.trust-band,
.section,
.final-cta,
.footer {
  padding-left: max(20px, calc((100vw - var(--max)) / 2));
  padding-right: max(20px, calc((100vw - var(--max)) / 2));
}

.trust-band {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.trust-band p {
  margin: 0;
  padding: 28px;
  background: var(--paper);
  color: var(--muted);
}

.trust-band strong {
  color: var(--ink);
}

.section {
  padding-top: 96px;
  padding-bottom: 96px;
  background: var(--paper);
}

.section-light {
  background: var(--surface);
}

.section-heading {
  margin-bottom: 40px;
}

.section-heading p {
  margin: 18px 0 0;
}

.section-actions {
  margin-top: 28px;
}

.code-columns,
.feature-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.code-sample {
  min-width: 0;
}

.sample-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 12px;
}

.sample-head button {
  min-height: 36px;
  padding: 0 12px;
  background: transparent;
  border-color: var(--line);
  color: var(--accent-dark);
  cursor: pointer;
}

.code-sample pre {
  min-height: 280px;
  padding: 24px;
}

.feature-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}

.feature-list div {
  padding: 28px 28px 0 0;
}

.feature-list p,
.policy-lines p {
  color: var(--muted);
}

.endpoint-list {
  display: grid;
  border-top: 1px solid var(--line);
}

.endpoint-list a {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 72px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  transition: padding-left 160ms ease, color 160ms ease;
}

.endpoint-list a:hover {
  padding-left: 12px;
  color: var(--accent-dark);
}

.endpoint-list span {
  width: 58px;
  color: var(--accent);
  font-weight: 800;
}

.policy-lines {
  max-width: 820px;
  border-top: 1px solid var(--line);
}

.policy-lines p {
  margin: 0;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.policy-lines a {
  color: var(--accent-dark);
  font-weight: 700;
}

.final-cta {
  padding-top: 88px;
  padding-bottom: 92px;
  background: var(--ink);
  color: white;
}

.final-cta .secondary-action {
  color: white;
  border-color: rgba(255, 255, 255, 0.28);
}

.api-shell {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  max-width: 1360px;
  margin: 0 auto;
  background: var(--paper);
}

.api-sidebar {
  position: sticky;
  top: 68px;
  align-self: start;
  display: grid;
  gap: 2px;
  height: calc(100svh - 68px);
  padding: 18px 14px;
  border-right: 1px solid var(--line);
  background: #fbfcfa;
  overflow-y: auto;
}

.api-sidebar a {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  padding: 0 9px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 680;
}

.api-sidebar a:hover {
  color: var(--ink);
  background: rgba(11, 122, 83, 0.07);
}

.api-sidebar span,
.method {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.api-sidebar span {
  color: var(--accent);
  font-size: 11px;
}

.api-main {
  min-width: 0;
}

.api-section {
  padding: 34px clamp(22px, 4vw, 56px);
  border-bottom: 1px solid var(--line);
}

.api-section h1 {
  max-width: 760px;
  font-size: clamp(36px, 4.4vw, 58px);
  line-height: 1;
}

.api-section h2 {
  max-width: 820px;
  font-size: clamp(24px, 2.8vw, 34px);
  line-height: 1.08;
}

.api-section h3 {
  font-size: 15px;
}

.api-kicker {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 780;
  letter-spacing: 0;
  text-transform: uppercase;
}

.api-lead,
.api-section-copy,
.api-section-head p,
.field-list p {
  color: var(--muted);
}

.api-lead {
  max-width: 760px;
  margin: 14px 0 0;
  font-size: 17px;
}

.api-status-grid {
  display: grid;
  grid-template-columns: minmax(260px, 1.5fr) repeat(2, minmax(150px, 0.75fr));
  margin-top: 24px;
  border: 1px solid var(--line);
  background: var(--line);
  gap: 1px;
}

.api-status-grid article {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 14px;
  background: var(--paper);
}

.api-status-grid span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 780;
  text-transform: uppercase;
}

.api-note {
  max-width: 900px;
  margin-top: 14px;
  padding: 13px 14px;
  border-left: 3px solid var(--accent);
  background: var(--surface);
  color: var(--muted);
  font-size: 14px;
}

.api-note strong {
  color: var(--ink);
}

.api-section-head {
  max-width: 760px;
  margin-bottom: 18px;
}

.api-section-head p {
  margin: 8px 0 0;
}

.api-console {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.api-request-panel {
  display: grid;
  gap: 14px;
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  background: #fbfcfa;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.field-label {
  display: grid;
  gap: 6px;
  color: var(--ink);
  font-size: 11px;
  font-weight: 780;
  text-transform: uppercase;
}

.field-label input,
.field-label select,
.field-label textarea {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  text-transform: none;
}

.field-label input,
.field-label select {
  padding: 0 10px;
}

.field-label input:focus,
.field-label select:focus,
.field-label textarea:focus {
  outline: 2px solid rgba(11, 122, 83, 0.18);
  border-color: var(--accent);
}

.advanced-fields {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.advanced-fields summary {
  cursor: pointer;
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 720;
}

.advanced-fields .form-grid {
  margin-top: 12px;
}

.console-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.console-actions .primary-action,
.console-actions .secondary-action {
  min-height: 38px;
  padding: 0 13px;
}

.console-actions button {
  cursor: pointer;
}

.api-output-stack {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.preview-block {
  min-width: 0;
}

.preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 7px;
}

.preview-head span {
  color: var(--muted);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 12px;
}

.preview-block pre,
.api-code,
.response-layout pre {
  margin: 0;
  overflow-x: auto;
  background: var(--code);
  color: var(--code-text);
  padding: 16px;
  font-size: 13px;
  line-height: 1.55;
}

.preview-block pre {
  min-height: 132px;
}

.endpoint-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.method {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  min-height: 26px;
  color: white;
  background: var(--accent);
  font-size: 12px;
  font-weight: 800;
}

table {
  width: 100%;
  margin: 18px 0;
  border-collapse: collapse;
  background: var(--paper);
}

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

th {
  color: var(--ink);
  font-size: 11px;
  text-transform: uppercase;
}

td {
  color: var(--muted);
  font-size: 14px;
}

p code,
td code {
  color: var(--ink);
  background: rgba(11, 122, 83, 0.08);
  padding: 2px 5px;
}

.param-table {
  table-layout: fixed;
}

.param-table th:first-child,
.param-table td:first-child {
  width: 32%;
}

.param-table th:nth-child(2),
.param-table td:nth-child(2) {
  width: 20%;
}

.response-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(260px, 0.7fr);
  gap: 18px;
  align-items: start;
}

.field-list {
  border-top: 1px solid var(--line);
}

.field-list p {
  margin: 0;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}

.footer {
  justify-content: space-between;
  gap: 18px;
  min-height: 76px;
  color: var(--muted);
  background: var(--paper);
  border-top: 1px solid var(--line);
  font-size: 14px;
}

[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 520ms ease, transform 520ms ease;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 860px) {
  .topbar {
    grid-template-columns: 1fr auto;
  }

  .nav {
    display: none;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 42px;
    min-height: auto;
  }

  .hero-visual {
    min-height: 420px;
  }

  .trust-band,
  .code-columns,
  .feature-list,
  .response-layout,
  .api-shell,
  .api-console,
  .api-status-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .api-sidebar {
    position: static;
    display: flex;
    flex-wrap: wrap;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .api-section {
    padding: 28px 20px;
  }

  .param-table {
    table-layout: auto;
  }
}

@media (max-width: 560px) {
  .topbar {
    gap: 14px;
    min-height: 62px;
  }

  .external-link {
    font-size: 14px;
  }

  .hero {
    padding-top: 52px;
  }

  h1 {
    font-size: 42px;
  }

  .hero-visual pre,
  .code-sample pre,
  .preview-block pre,
  .api-code {
    padding: 18px;
    font-size: 12px;
  }

  .footer {
    flex-wrap: wrap;
    justify-content: flex-start;
    padding-top: 20px;
    padding-bottom: 20px;
  }
}
