@font-face {
  font-family: "Recall Display";
  src: url("assets/fonts/NotoSansSC-Bold.otf") format("opentype");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

:root {
  --paper: #f9f9f9;
  --surface: #ffffff;
  --surface-soft: #f6f7f8;
  --ink: #0c0c0c;
  --ink-soft: #4b5563;
  --cobalt: #184dcf;
  --cobalt-dark: #103ba5;
  --teal: #006871;
  --teal-soft: #e9f3f3;
  --orange: #d9773f;
  --rule: #d8dadd;
  --rule-soft: #eceef0;
  --focus: #ed7a38;
  --container: 1200px;
  --font-ui: "Segoe UI Variable", "Segoe UI", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
  --font-display: "Recall Display", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
  --font-code: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: var(--paper);
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

::selection {
  color: #fff;
  background: var(--cobalt);
}

:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--focus) 78%, white);
  outline-offset: 3px;
}

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .22em; }

/* ===== Navigation ===== */
nav {
  position: sticky;
  z-index: 50;
  top: 0;
  border-bottom: 1px solid var(--rule);
  background: color-mix(in srgb, var(--paper) 96%, transparent);
  backdrop-filter: blur(8px);
}

.nav-inner {
  display: flex;
  align-items: center;
  width: min(100%, var(--container));
  height: 64px;
  margin: 0 auto;
  padding: 0 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: none;
  text-decoration: none;
  letter-spacing: -.025em;
  white-space: nowrap;
  font-size: 18px;
  font-weight: 600;
}

.menu-toggle {
  display: none;
  margin-left: auto;
  padding: 8px 12px;
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: var(--surface);
  font-size: 18px;
  cursor: pointer;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.2vw, 36px);
  margin-left: auto;
  font-size: 14px;
  font-weight: 560;
}

.nav-links a {
  position: relative;
  text-decoration: none;
  color: var(--ink);
  transition: color .2s ease;
}

.nav-links a:hover { color: var(--cobalt); }

.nav-links a.btn {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  padding: 0 18px;
  border: 1px solid var(--cobalt);
  border-radius: 4px;
  color: var(--cobalt);
  background: var(--surface);
  cursor: pointer;
  transition: color .2s ease, background-color .2s ease, transform .2s var(--ease-out);
}

.nav-links a.btn:hover {
  color: #fff;
  background: var(--cobalt);
  transform: translateY(-1px);
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 4px;
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: color .2s ease, background-color .2s ease, border-color .2s ease, transform .2s var(--ease-out), box-shadow .2s ease;
}

.btn {
  color: #fff;
  background: var(--cobalt);
}

.btn:hover {
  background: var(--cobalt-dark);
  box-shadow: 0 8px 18px rgba(24, 77, 207, .16);
  transform: translateY(-2px);
}

.btn.secondary {
  border-color: var(--cobalt);
  color: var(--cobalt);
  background: #fff;
}

.btn.secondary:hover {
  color: #fff;
  background: var(--cobalt);
}

/* ===== Hero ===== */
.hero {
  display: grid;
  grid-template-columns: minmax(360px, 1.1fr) 1fr;
  gap: 48px;
  width: min(100%, var(--container));
  min-height: calc(100vh - 64px);
  margin: 0 auto;
  padding: 58px 28px 54px;
  border-right: 1px solid var(--rule);
  border-left: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.hero-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero h1 {
  margin: 0 0 26px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(36px, 3.5vw, 52px);
  line-height: 1.14;
  letter-spacing: -.035em;
  text-wrap: balance;
}

.hero-sub {
  margin: 0 0 14px;
  color: #232b39;
  font-size: clamp(18px, 1.5vw, 24px);
  font-weight: 600;
  line-height: 1.5;
}

.hero-desc {
  max-width: 52ch;
  margin: 0 0 14px;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.85;
}

.hero-claim {
  margin: 8px 0 0;
  font-weight: 700;
  font-size: 15px;
}

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

.hero-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border: 1px solid var(--rule);
  border-radius: 20px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 600;
  background: var(--surface-soft);
}

/* ===== Hero Card ===== */
.hero-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--rule);
  border-radius: 6px;
  background: var(--surface);
  overflow: hidden;
}

.hero-card-label {
  padding: 14px 18px;
  border-bottom: 1px solid var(--rule);
  color: var(--cobalt);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  background: var(--surface-soft);
}

.hero-card-body {
  padding: 18px;
  flex: 1;
}

.hero-card-line {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 0;
  border-bottom: 1px solid var(--rule-soft);
  font-size: 13px;
}

.hero-card-line:last-child { border-bottom: 0; }

.hero-card-line .key {
  color: var(--ink-soft);
  font-weight: 600;
  flex-shrink: 0;
}

.hero-card-line .val {
  color: var(--ink);
  text-align: right;
  word-break: break-word;
}

.hero-card-line .tag {
  display: inline-flex;
  padding: 2px 8px;
  border: 1px solid var(--teal);
  border-radius: 3px;
  color: var(--teal);
  font-size: 11px;
  font-weight: 700;
}

/* ===== Sections ===== */
main { width: 100%; }

section {
  width: min(100%, var(--container));
  margin: 0 auto;
  padding: 100px 28px;
}

section h2 {
  margin: 0 0 16px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(32px, 3.5vw, 48px);
  line-height: 1.14;
  letter-spacing: -.035em;
  text-wrap: balance;
}

.section-intro {
  max-width: 64ch;
  margin: 0 0 48px;
  color: var(--ink-soft);
  font-size: 17px;
  line-height: 1.8;
}

/* ===== Grid & Cards ===== */
.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.card {
  padding: 28px;
  border: 1px solid var(--rule);
  border-radius: 6px;
  background: var(--surface);
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s var(--ease-out);
}

.card:hover {
  border-color: var(--cobalt);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .06);
  transform: translateY(-2px);
}

.card .icon-box {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  margin-bottom: 16px;
  border: 1px solid var(--rule);
  border-radius: 8px;
  font-size: 20px;
  background: var(--surface-soft);
}

.card h3 {
  margin: 0 0 10px;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -.02em;
}

.card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.7;
}

.card .meta {
  margin-top: 14px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 600;
}

/* ===== Pipeline ===== */
.pipeline-steps {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.step {
  position: relative;
  padding: 32px 20px 28px;
  border-right: 1px solid var(--rule-soft);
}

.step:last-child { border-right: 0; }

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin-bottom: 16px;
  border: 1px solid var(--cobalt);
  border-radius: 50%;
  color: var(--cobalt);
  font-family: var(--font-code);
  font-size: 13px;
  font-weight: 700;
}

.step-title {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -.02em;
}

.step-desc {
  margin: 0;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.6;
}

.pipeline-close {
  margin: 28px 0 0;
  color: var(--ink-soft);
  font-size: 15px;
}

/* ===== API Cards ===== */
.api-card {
  margin-bottom: 32px;
  padding: 36px;
  border: 1px solid var(--rule);
  border-radius: 6px;
  background: var(--surface);
}

.api-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}

.api-tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border: 1px solid var(--cobalt);
  border-radius: 3px;
  color: var(--cobalt);
  font-family: var(--font-code);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
}

.api-header h3 {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -.025em;
}

.api-desc {
  max-width: 72ch;
  margin: 0 0 20px;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.7;
}

.api-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding: 12px 16px;
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: var(--surface-soft);
}

.method-get, .method-post {
  display: inline-grid;
  min-width: 54px;
  height: 28px;
  place-items: center;
  border-radius: 3px;
  font-family: var(--font-code);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
}

.method-get {
  color: var(--teal);
  background: var(--teal-soft);
}

.method-post {
  color: var(--orange);
  background: #fef3e8;
}

.api-meta code.path {
  font-family: var(--font-code);
  font-size: 13px;
  color: var(--ink);
}

.api-example { margin-bottom: 20px; }

.api-example-label {
  margin-bottom: 8px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
}

.code-block {
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: #111617;
  overflow-x: auto;
}

.code-block pre {
  margin: 0;
  padding: 20px 24px;
  color: #dbe3e5;
  font-family: var(--font-code);
  font-size: 13px;
  line-height: 1.65;
  white-space: pre;
  overflow-x: auto;
}

.code-block code {
  font-family: var(--font-code);
  font-size: 13px;
}

.api-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.copy-btn {
  margin-top: 12px;
  padding: 8px 16px;
  border: 1px solid var(--rule);
  border-radius: 4px;
  color: var(--ink-soft);
  background: var(--surface-soft);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .2s ease, color .2s ease, background-color .2s ease;
}

.copy-btn:hover {
  border-color: var(--teal);
  color: var(--teal);
  background: var(--teal-soft);
}

/* ===== Metrics ===== */
.metric {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 36px 20px;
  border-right: 1px solid var(--rule);
  text-align: center;
}

.metric:last-child { border-right: 0; }

.metric-val {
  color: var(--cobalt);
  font-family: var(--font-code);
  font-size: clamp(28px, 3vw, 42px);
  font-weight: 700;
  letter-spacing: -.035em;
  line-height: 1.1;
}

.metric:nth-child(2n) .metric-val { color: var(--teal); }

.metric-label {
  margin-top: 10px;
  font-size: 14px;
  font-weight: 650;
  color: var(--ink-soft);
}

/* ===== Chart Area ===== */
.chart-area {
  margin-top: 40px;
  padding: 32px;
  border: 1px solid var(--rule);
  border-radius: 6px;
  background: var(--surface);
}

.chart-label {
  margin-bottom: 20px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
}

.chart-note {
  margin-top: 20px;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.7;
}

/* ===== Quality ===== */
.quality-tag {
  display: inline-flex;
  margin-top: 14px;
  padding: 4px 10px;
  border: 1px solid var(--teal);
  border-radius: 3px;
  color: var(--teal);
  font-size: 11px;
  font-weight: 700;
}

/* ===== Quick Start / Code Snippet ===== */
.code-snippet {
  margin-top: 40px;
  border: 1px solid var(--rule);
  border-radius: 6px;
  background: var(--surface);
  overflow: hidden;
}

.code-snippet-label {
  padding: 14px 20px;
  border-bottom: 1px solid var(--rule);
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  background: var(--surface-soft);
}

.code-snippet .code-block {
  border: 0;
  border-radius: 0;
}

/* ===== Pricing ===== */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid var(--ink);
  border-left: 1px solid var(--rule);
}

.pricing-card {
  display: flex;
  flex-direction: column;
  padding: 32px 24px 26px;
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  background: var(--surface);
}

.pricing-card.recommended {
  box-shadow: inset 0 3px 0 var(--cobalt);
}

.pricing-card h3 {
  margin: 0 0 8px;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -.03em;
}

.pricing-card .price {
  display: flex;
  align-items: baseline;
  gap: 7px;
  min-height: 60px;
  padding: 14px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  font-size: clamp(20px, 2vw, 28px);
  font-weight: 700;
  letter-spacing: -.025em;
  color: var(--ink);
}

.pricing-card ul {
  flex: 1;
  margin: 20px 0;
  padding: 0;
  list-style: none;
}

.pricing-card li {
  padding: 8px 0;
  border-bottom: 1px solid var(--rule-soft);
  font-size: 14px;
  color: var(--ink-soft);
}

.pricing-card .btn {
  width: 100%;
}

/* ===== FAQ ===== */
.faq-list {
  border-top: 1px solid var(--ink);
}

.faq-list details {
  border-bottom: 1px solid var(--rule);
}

.faq-list summary {
  position: relative;
  padding: 24px 48px 24px 0;
  font-size: 18px;
  font-weight: 650;
  cursor: pointer;
  list-style: none;
}

.faq-list summary::-webkit-details-marker { display: none; }

.faq-list summary::before,
.faq-list summary::after {
  position: absolute;
  top: 50%;
  right: 8px;
  width: 16px;
  height: 2px;
  content: "";
  background: var(--ink);
  transition: transform .25s var(--ease-out);
}

.faq-list summary::after { transform: rotate(90deg); }

.faq-list details[open] summary::after { transform: rotate(0); }

.faq-list details p {
  max-width: 72ch;
  margin: -4px 0 0;
  padding: 0 48px 26px 0;
  color: var(--ink-soft);
  line-height: 1.8;
}

/* ===== Final CTA ===== */
.final-cta {
  padding: 90px 28px;
  color: #fff;
  background: var(--teal);
  text-align: center;
}

.final-cta h2 {
  max-width: 20ch;
  margin: 0 auto 16px;
  color: #fff;
}

.final-cta p {
  max-width: 56ch;
  margin: 0 auto 32px;
  color: #cce4e5;
  font-size: 17px;
}

.final-cta .btn {
  background: #fff;
  color: var(--teal);
}

.final-cta .btn:hover {
  background: var(--surface-soft);
  box-shadow: 0 8px 18px rgba(0, 0, 0, .12);
}

.final-cta .btn.secondary {
  border-color: rgba(255, 255, 255, .5);
  color: #fff;
  background: transparent;
}

.final-cta .btn.secondary:hover {
  background: rgba(255, 255, 255, .1);
}

.final-cta-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}

/* ===== Footer ===== */
footer {
  border-top: 1px solid var(--rule);
  background: var(--surface);
}

.footer-inner {
  width: min(100%, var(--container));
  margin: 0 auto;
  padding: 48px 28px;
  text-align: center;
}

.footer-inner p {
  margin: 0 0 10px;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.7;
}

.footer-inner p:last-child { margin-bottom: 0; }

/* ===== Modal ===== */
.modal {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
}

.modal.is-open { display: flex; }

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .45);
}

.modal-content {
  position: relative;
  z-index: 2;
  max-width: 420px;
  width: 90%;
  padding: 36px;
  border-radius: 8px;
  background: var(--surface);
  text-align: center;
  box-shadow: 0 24px 64px rgba(0, 0, 0, .18);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  padding: 4px 10px;
  border: 0;
  background: transparent;
  font-size: 24px;
  color: var(--ink-soft);
  cursor: pointer;
  transition: color .2s ease;
}

.modal-close:hover { color: var(--ink); }

.modal-content h2 {
  margin: 0 0 10px;
  font-size: 22px;
  font-weight: 700;
}

.modal-content p {
  margin: 0 0 20px;
  color: var(--ink-soft);
  font-size: 14px;
}

.modal-content img {
  max-width: 220px;
  width: 100%;
  border-radius: 6px;
}

.modal-note {
  margin-top: 16px !important;
  font-size: 12px !important;
  color: var(--ink-soft);
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .hero-card { order: -1; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .pipeline-steps { grid-template-columns: repeat(3, 1fr); }
  .pricing-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .menu-toggle { display: inline-flex; }
  .hero { padding: 36px 20px; }
  section { padding: 64px 20px; }
  .grid-4 { grid-template-columns: 1fr; }
  .pipeline-steps { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; }
  .api-meta { flex-wrap: wrap; }
  .api-card { padding: 24px; }
  .final-cta { padding: 64px 20px; }
}
