:root {
  --bg: #f7f9fc;
  --surface: #ffffff;
  --surface-muted: #eef4fb;
  --ink: #132033;
  --muted: #5b6b7f;
  --line: #d8e1ec;
  --brand: #0f67d8;
  --brand-dark: #084aa3;
  --brand-soft: #e8f1ff;
  --success: #0f8f69;
  --code-bg: #111827;
  --code-line: #263244;
  --shadow: 0 18px 48px rgba(19, 32, 51, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

body.menu-open {
  overflow: hidden;
  overscroll-behavior: none;
}

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

button,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

img {
  max-width: 100%;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 6vw;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(216, 225, 236, 0.8);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}

.logo {
  display: block;
  width: 210px;
  height: auto;
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.primary-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
}

.primary-nav a:hover,
.primary-nav a:focus-visible {
  background: var(--brand-soft);
  color: var(--brand);
  outline: none;
}

.primary-nav .nav-cta {
  margin-left: 4px;
  background: var(--brand);
  color: #ffffff;
}

.primary-nav .nav-cta:hover,
.primary-nav .nav-cta:focus-visible {
  background: var(--brand-dark);
  color: #ffffff;
}

.menu-toggle,
.menu-close {
  display: none;
}

.hero-section,
.section,
.contact-cta,
.site-footer {
  padding-inline: 6vw;
}

.hero-section {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.75fr);
  gap: clamp(28px, 5vw, 70px);
  align-items: center;
  padding-top: clamp(58px, 8vw, 96px);
  padding-bottom: clamp(48px, 7vw, 86px);
  background:
    radial-gradient(circle at 82% 20%, rgba(15, 103, 216, 0.12), transparent 32%),
    linear-gradient(180deg, #ffffff 0%, #f4f8fc 100%);
  border-bottom: 1px solid var(--line);
}

.hero-content {
  max-width: 760px;
}

.eyebrow {
  display: block;
  margin-bottom: 12px;
  color: var(--brand);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 820px;
  margin-bottom: 20px;
  color: var(--ink);
  font-size: clamp(2.4rem, 5.8vw, 5rem);
  font-weight: 800;
  line-height: 1.02;
}

h2 {
  margin-bottom: 14px;
  font-size: clamp(1.8rem, 3.4vw, 3rem);
  line-height: 1.1;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.08rem;
  line-height: 1.3;
}

.lead,
.section-heading p,
.api-copy p,
.card p,
.site-footer p,
.note {
  color: var(--muted);
}

.lead {
  max-width: 720px;
  margin-bottom: 0;
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 18px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 750;
  line-height: 1;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

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

.btn-primary {
  background: var(--brand);
  color: #ffffff;
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--brand-dark);
  outline: none;
}

.btn-secondary {
  background: #ffffff;
  border-color: var(--line);
  color: var(--ink);
}

.btn-secondary:hover,
.btn-secondary:focus-visible {
  border-color: var(--brand);
  color: var(--brand);
  outline: none;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 38px;
}

.metric {
  min-height: 104px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.metric strong {
  display: block;
  color: var(--brand);
  font-size: 1.45rem;
  line-height: 1.15;
}

.metric span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.35;
}

.hero-visual {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.hero-image {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: contain;
  object-position: center;
  background: #08111f;
  border: 1px solid rgba(15, 103, 216, 0.18);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.hero-panel {
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.panel-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--ink);
  font-weight: 800;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--success);
  box-shadow: 0 0 0 5px rgba(15, 143, 105, 0.12);
}

.scan-card {
  padding: 16px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.scan-card.highlighted {
  background: var(--brand-soft);
  border-color: rgba(15, 103, 216, 0.25);
}

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

.scan-label {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.scan-flow {
  width: 2px;
  height: 22px;
  margin: 8px auto;
  background: var(--line);
}

.section {
  padding-top: clamp(56px, 8vw, 88px);
  padding-bottom: clamp(56px, 8vw, 88px);
}

.section-muted {
  background: var(--surface-muted);
  border-block: 1px solid var(--line);
}

.section-heading {
  max-width: 820px;
  margin: 0 auto 30px;
  text-align: center;
}

.section-heading p {
  max-width: 720px;
  margin-inline: auto;
  margin-bottom: 0;
}

.architecture-figure {
  max-width: 1180px;
  margin: 0 auto 28px;
}

.architecture-figure a {
  display: block;
}

.architecture-figure img {
  display: block;
  width: 100%;
  height: auto;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 32px rgba(19, 32, 51, 0.08);
}

.architecture-figure figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.86rem;
  text-align: center;
}

.comparison-section {
  background: #f2f7fd;
  border-block: 1px solid var(--line);
}

.comparison-table-wrap {
  max-width: 1180px;
  margin: 0 auto;
  overflow-x: auto;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(19, 32, 51, 0.06);
}

.comparison-table {
  width: 100%;
  min-width: 900px;
  border-collapse: collapse;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.comparison-table th,
.comparison-table td {
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.comparison-table thead th {
  background: #0b1b35;
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.comparison-table tbody th {
  width: 18%;
  color: var(--ink);
  font-weight: 800;
}

.comparison-table tbody td {
  width: 27.333%;
}

.comparison-table tbody td:last-child {
  background: rgba(15, 103, 216, 0.045);
  color: var(--ink);
  font-weight: 600;
}

.comparison-table tbody tr:last-child th,
.comparison-table tbody tr:last-child td {
  border-bottom: 0;
}

.comparison-takeaway {
  max-width: 900px;
  margin: 24px auto 0;
  padding-left: 18px;
  border-left: 3px solid var(--brand);
  color: var(--muted);
}

.comparison-takeaway strong {
  color: var(--ink);
}

.source-coverage {
  max-width: 1180px;
  margin: 34px auto 0;
  padding-top: 30px;
  border-top: 1px solid var(--line);
}

.source-coverage-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
}

.source-coverage-heading h3,
.source-coverage-heading p {
  margin: 0;
}

.source-coverage-heading h3 {
  color: var(--ink);
  font-size: 1.35rem;
}

.source-coverage-heading p {
  max-width: 620px;
  color: var(--muted);
  text-align: right;
}

.source-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  padding: 1px;
  overflow: hidden;
  background: var(--line);
  border-radius: 8px;
  list-style: none;
}

.source-list li {
  min-width: 0;
  padding: 18px;
  background: var(--surface);
}

.source-list strong,
.source-list span {
  display: block;
}

.source-list strong {
  margin-bottom: 4px;
  color: var(--ink);
  font-size: 0.96rem;
}

.source-list span {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.feature-grid,
.identifier-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  max-width: 1180px;
  margin: 0 auto;
}

.card {
  min-width: 0;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(19, 32, 51, 0.06);
}

.card h3 {
  color: var(--ink);
}

.card p {
  margin-bottom: 0;
}

.check-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.check-list li {
  position: relative;
  padding-left: 24px;
  color: var(--muted);
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.28em;
  width: 7px;
  height: 12px;
  border-right: 2px solid var(--success);
  border-bottom: 2px solid var(--success);
  transform: rotate(45deg);
}

.badge-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 10px;
  background: var(--brand-soft);
  border: 1px solid rgba(15, 103, 216, 0.18);
  border-radius: 999px;
  color: var(--brand-dark);
  font-size: 0.86rem;
  font-weight: 700;
}

.note {
  max-width: 760px;
  margin: 22px auto 0;
  text-align: center;
  font-size: 0.95rem;
}

.api-section {
  background: #ffffff;
  border-top: 1px solid var(--line);
}

.api-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.55fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  max-width: 1180px;
  margin: 0 auto;
}

.api-copy {
  padding: 28px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.api-copy p {
  margin-bottom: 24px;
}

.code-card {
  min-width: 0;
  padding: 18px;
  background: var(--code-bg);
  border: 1px solid var(--code-line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

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

.toolbar label {
  color: #cbd5e1;
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

select,
.toolbar button {
  min-height: 38px;
  padding: 8px 10px;
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 8px;
  color: #ffffff;
}

.toolbar button {
  margin-left: auto;
  font-weight: 750;
  min-width: 96px;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.toolbar button.is-copied {
  background: #0f766e;
  border-color: #2dd4bf;
  color: #ffffff;
}

.toolbar button.has-error {
  background: #991b1b;
  border-color: #f87171;
  color: #ffffff;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

pre {
  max-height: 460px;
  margin: 0;
  padding: 16px;
  overflow: auto;
  background: #08111f;
  border: 1px solid #243247;
  border-radius: 8px;
  color: #9ed2ff;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.83rem;
  line-height: 1.55;
  white-space: pre-wrap;
}

.response-title {
  margin-top: 16px;
  margin-bottom: 8px;
  color: #a7f3d0;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.response-box {
  max-height: 240px;
  color: #67e8b9;
  border-left: 3px solid var(--success);
}

.contact-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 44px;
  padding-bottom: 44px;
  background: var(--ink);
  color: #ffffff;
}

.contact-cta h2 {
  max-width: 760px;
  margin-bottom: 0;
  color: #ffffff;
  font-size: clamp(1.5rem, 3vw, 2.5rem);
}

.contact-cta .eyebrow {
  color: #9ed2ff;
}

.site-footer {
  padding-top: 38px;
  padding-bottom: 30px;
  background: #0d1624;
  color: #cbd5e1;
}

.site-footer h3 {
  margin-bottom: 6px;
  color: #ffffff;
}

.site-footer p {
  max-width: 640px;
  margin-bottom: 24px;
  color: #a7b4c6;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  margin-bottom: 26px;
}

.site-footer a {
  color: #dbeafe;
  font-weight: 650;
}

.site-footer a:hover {
  color: #ffffff;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding-top: 24px;
  border-top: 1px solid #243247;
  color: #8fa0b8;
  font-size: 0.9rem;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background: rgba(13, 22, 36, 0.74);
  backdrop-filter: blur(8px);
}

.modal-content {
  position: relative;
  width: min(100%, 680px);
  max-height: min(92vh, 820px);
  overflow: auto;
  padding: 28px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.modal-content h3 {
  padding-right: 80px;
  color: var(--ink);
  font-size: 1.35rem;
}

.close-modal {
  position: absolute;
  top: 16px;
  right: 16px;
  min-height: 36px;
  padding: 8px 10px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-weight: 750;
}

.close-modal:hover,
.close-modal:focus-visible {
  color: var(--ink);
  border-color: var(--brand);
  outline: none;
}

.demo-textarea {
  display: block;
  width: 100%;
  min-height: 130px;
  margin: 18px 0 16px;
  padding: 14px;
  resize: vertical;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
}

.demo-textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(15, 103, 216, 0.12);
  outline: none;
}

.demo-response-area {
  display: none;
  margin-top: 18px;
}

.demo-response {
  max-height: 260px;
}

@media (max-width: 1080px) {
  .site-header {
    padding-inline: 5vw;
    backdrop-filter: none;
  }

  .menu-toggle {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 44px;
    height: 44px;
    padding: 0;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 8px;
  }

  .menu-toggle span {
    width: 18px;
    height: 2px;
    background: var(--ink);
    border-radius: 999px;
  }

  .menu-close {
    position: fixed;
    top: max(20px, env(safe-area-inset-top));
    right: max(5vw, env(safe-area-inset-right));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
  }

  .menu-close span {
    position: absolute;
    width: 20px;
    height: 2px;
    background: #ffffff;
    border-radius: 999px;
  }

  .menu-close span:first-child {
    transform: rotate(45deg);
  }

  .menu-close span:last-child {
    transform: rotate(-45deg);
  }

  .primary-nav {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    width: 100vw;
    min-height: 100vh;
    height: 100dvh;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 8px;
    padding: max(92px, calc(env(safe-area-inset-top) + 72px)) max(7vw, env(safe-area-inset-right)) max(40px, env(safe-area-inset-bottom)) max(7vw, env(safe-area-inset-left));
    overflow-y: auto;
    overscroll-behavior: contain;
    background: #0d1624;
  }

  .primary-nav.is-open {
    display: flex;
  }

  .primary-nav a,
  .primary-nav .nav-cta {
    justify-content: center;
    min-height: 54px;
    margin: 0;
    color: #ffffff;
    font-size: 1.15rem;
  }

  .primary-nav a:hover,
  .primary-nav a:focus-visible {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
  }

  .primary-nav .nav-cta {
    margin-top: 8px;
    background: var(--brand);
  }

  .hero-section,
  .api-layout {
    grid-template-columns: 1fr;
  }

  .hero-visual,
  .hero-panel {
    max-width: 720px;
  }

  .feature-grid,
  .identifier-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .source-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 960px) {
  .metrics,
  .feature-grid,
  .identifier-grid {
    grid-template-columns: 1fr;
  }

  .source-coverage-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .source-coverage-heading p {
    text-align: left;
  }

  .source-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .comparison-table-wrap {
    overflow: visible;
    background: transparent;
    border: 0;
    box-shadow: none;
  }

  .comparison-table,
  .comparison-table tbody,
  .comparison-table tr,
  .comparison-table th,
  .comparison-table td {
    display: block;
    width: 100%;
  }

  .comparison-table {
    min-width: 0;
  }

  .comparison-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }

  .comparison-table tbody tr {
    margin-bottom: 14px;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 8px;
  }

  .comparison-table tbody th,
  .comparison-table tbody td {
    width: 100%;
    padding: 14px 16px;
  }

  .comparison-table tbody th {
    background: #0b1b35;
    border-bottom-color: #1e3556;
    color: #ffffff;
  }

  .comparison-table tbody td::before {
    display: block;
    margin-bottom: 5px;
    color: var(--brand-dark);
    content: attr(data-label);
    font-size: 0.72rem;
    font-weight: 850;
    text-transform: uppercase;
  }

  .contact-cta {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .logo {
    width: 174px;
  }

  .source-list {
    grid-template-columns: 1fr;
  }

  .hero-section,
  .section,
  .contact-cta,
  .site-footer {
    padding-inline: 20px;
  }

  .hero-section {
    padding-top: 44px;
  }

  .hero-actions,
  .contact-cta .btn {
    width: 100%;
  }

  .hero-actions {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  .metric,
  .card,
  .api-copy,
  .code-card,
  .hero-image,
  .hero-panel,
  .modal-content {
    padding: 18px;
  }

  .hero-image {
    padding: 0;
    aspect-ratio: 3 / 2;
  }

  .toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .toolbar button {
    margin-left: 0;
  }

  pre {
    font-size: 0.78rem;
  }

  .footer-bottom {
    flex-direction: column;
  }
}
