:root {
  --bg: #f7f8fa;
  --surface: rgba(255, 255, 255, 0.86);
  --surface-strong: #ffffff;
  --line: #e8eaee;
  --line-strong: #d9dde5;
  --text: #111317;
  --muted: #8b929f;
  --soft: #f2f4f7;
  --brand: #111317;
  --accent: #ef7b62;
  --blue: #4b8df7;
  --green: #12b981;
  --shadow: 0 18px 60px rgba(18, 24, 38, 0.07);
  --radius: 24px;
  --container: min(1180px, calc(100% - 32px));
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 22% 0%, rgba(179, 224, 255, 0.54), transparent 29%),
    radial-gradient(circle at 76% 0%, rgba(197, 244, 232, 0.58), transparent 30%),
    linear-gradient(180deg, #f4fbff 0%, #ffffff 34%, var(--bg) 100%);
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  min-height: 100vh;
}

body.modal-open,
body.menu-open {
  overflow: hidden;
}

a,
button {
  font: inherit;
}

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

button {
  border: 0;
  cursor: pointer;
}

.site-shell {
  width: var(--container);
  margin: 0 auto;
  padding-bottom: 54px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  min-height: 70px;
  backdrop-filter: blur(18px);
}

.brand,
.site-nav,
.header-actions,
.hero-actions,
.panel-toolbar,
.api-row,
.copy-line {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.brand-mark {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 32% 30%, #ffffff 0 18%, transparent 19%),
    conic-gradient(from 130deg, #4a7cff, #24d7c2, #ff5f8e, #4a7cff);
  box-shadow: 0 0 16px rgba(80, 133, 255, 0.34);
}

.site-nav {
  justify-content: center;
  gap: 28px;
}

.site-nav a,
.nav-link,
.ghost-link {
  color: #565d68;
  background: transparent;
  font-size: 14px;
  font-weight: 650;
}

.site-nav a:hover,
.nav-link:hover,
.ghost-link:hover {
  color: var(--text);
}

.header-actions {
  justify-content: flex-end;
  gap: 10px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-weight: 750;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

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

.button-dark {
  color: #fff;
  background: #08090b;
  border-color: #08090b;
}

.button-light {
  color: var(--text);
  background: rgba(255, 255, 255, 0.72);
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  margin-left: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.78);
}

.menu-button span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  border-radius: 99px;
  background: var(--text);
}

.hero-section {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(460px, 1.08fr);
  gap: 28px;
  align-items: center;
  padding: 86px 0 54px;
}

.eyebrow,
.section-heading span,
.modal-kicker {
  color: #707783;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.hero-copy h1 {
  margin: 12px 0 0;
  font-size: clamp(56px, 9vw, 104px);
  line-height: 0.96;
  letter-spacing: 0;
}

.hero-subtitle {
  max-width: 640px;
  margin: 24px 0 0;
  color: #6f7682;
  font-size: 18px;
  line-height: 1.85;
}

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

.hero-panel,
.model-card,
.info-card,
.step-card,
.faq-list details,
.modal-card {
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.hero-panel {
  border-radius: 30px;
  padding: 16px;
}

.panel-toolbar {
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px 16px;
  color: #4f5662;
  font-size: 13px;
  font-weight: 750;
}

.status-dot,
.api-dot {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border-radius: 99px;
}

.status-dot,
.green {
  background: var(--green);
}

.blue {
  background: var(--blue);
}

.toolbar-pill {
  margin-left: auto;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.metric-card {
  min-height: 132px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
}

.metric-card span,
.metric-card small,
.api-row small,
.model-card small,
.doc-block label {
  color: var(--muted);
}

.metric-card strong {
  display: block;
  margin: 14px 0 8px;
  font-size: 28px;
  letter-spacing: 0;
}

.accent-card {
  background: #fff6e8;
}

.api-list {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
  overflow: hidden;
}

.api-row {
  gap: 14px;
  padding: 18px;
}

.api-row + .api-row {
  border-top: 1px solid var(--line);
}

.api-row div {
  min-width: 0;
  flex: 1;
}

.api-row strong,
.api-row small {
  display: block;
}

.api-row small,
code {
  overflow-wrap: anywhere;
}

.api-row button,
.copy-line button {
  flex: 0 0 auto;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: #555c67;
  font-size: 13px;
  font-weight: 750;
}

.section-block {
  padding: 38px 0;
}

.section-heading {
  margin-bottom: 24px;
  text-align: center;
}

.section-heading.align-left {
  text-align: left;
}

.section-heading h2 {
  margin: 10px 0;
  font-size: clamp(30px, 5vw, 52px);
  line-height: 1.08;
  letter-spacing: 0;
}

.section-heading p {
  max-width: 640px;
  margin: 0 auto;
  color: #7a818c;
  line-height: 1.75;
}

.section-heading.align-left p {
  margin-left: 0;
  margin-bottom: 22px;
}

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

.model-card,
.step-card,
.info-card {
  border-radius: var(--radius);
  padding: 22px;
}

.provider-logo {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-bottom: 16px;
  color: var(--accent);
  font-size: 28px;
  line-height: 1;
}

.model-card h3,
.step-card h3 {
  margin: 0 0 12px;
  font-size: 18px;
}

.model-card p,
.step-card p,
.faq-list p,
.modal-card p {
  margin: 0;
  color: #747b86;
  line-height: 1.7;
}

.model-card small {
  display: block;
  margin-top: 26px;
}

.split-section {
  display: grid;
  grid-template-columns: 0.82fr 1.18fr;
  gap: 28px;
  align-items: center;
}

.info-stack {
  display: grid;
  gap: 14px;
}

.info-card {
  display: grid;
  gap: 10px;
  background: #fff;
}

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

.info-card code,
.copy-line code {
  color: #666d78;
}

.step-card span {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 18px;
  border-radius: 999px;
  color: #fff;
  background: #08090b;
  font-weight: 850;
}

.faq-section {
  display: grid;
  grid-template-columns: 0.44fr 0.56fr;
  gap: 28px;
}

.faq-list {
  display: grid;
  gap: 12px;
}

.faq-list details {
  border-radius: 20px;
  background: #fff;
}

.faq-list summary {
  position: relative;
  padding: 20px 52px 20px 22px;
  font-weight: 800;
  cursor: pointer;
  list-style: none;
}

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

.faq-list summary::after {
  content: "+";
  position: absolute;
  right: 22px;
  top: 50%;
  transform: translateY(-50%);
  color: #818894;
}

.faq-list details[open] summary::after {
  content: "-";
}

.faq-list p {
  padding: 0 22px 20px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(17, 19, 23, 0.28);
  backdrop-filter: blur(10px);
}

.modal-backdrop[hidden] {
  display: none;
}

.modal-card {
  position: relative;
  width: min(520px, 100%);
  max-height: min(780px, calc(100vh - 40px));
  overflow: auto;
  padding: 26px;
  border-radius: 28px;
  background: #fff;
}

.docs-modal {
  width: min(720px, 100%);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: #6f7682;
  font-size: 22px;
}

.modal-card h2 {
  margin: 8px 44px 10px 0;
  font-size: 30px;
}

.qr-frame {
  display: grid;
  place-items: center;
  margin: 22px 0;
  padding: 18px;
  border: 1px dashed var(--line-strong);
  border-radius: 24px;
  background: #f8fafc;
}

.qr-frame img {
  display: block;
  width: min(320px, 100%);
  aspect-ratio: 1 / 1;
  object-fit: contain;
  border-radius: 18px;
  background: #fff;
}

.full-width {
  width: 100%;
}

.doc-block {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.copy-line {
  justify-content: space-between;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #f8fafc;
}

pre {
  margin: 18px 0;
  padding: 16px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #0c0d10;
  color: #f7f8fa;
  line-height: 1.7;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 80;
  transform: translate(-50%, 18px);
  padding: 10px 14px;
  border-radius: 999px;
  background: #08090b;
  color: #fff;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  font-size: 14px;
  font-weight: 750;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 980px) {
  .site-header {
    grid-template-columns: auto auto;
  }

  .menu-button {
    display: block;
  }

  .site-nav,
  .header-actions {
    display: none;
  }

  .site-nav.is-open,
  .header-actions.is-open {
    position: absolute;
    left: 0;
    right: 0;
    display: grid;
    justify-content: stretch;
    gap: 8px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--shadow);
  }

  .site-nav.is-open {
    top: 68px;
  }

  .header-actions.is-open {
    top: 248px;
  }

  .site-nav.is-open a,
  .site-nav.is-open button,
  .header-actions.is-open a {
    justify-content: flex-start;
    width: 100%;
    min-height: 42px;
    padding: 0 12px;
    text-align: left;
  }

  .hero-section,
  .split-section,
  .faq-section {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 760px) {
  .site-shell {
    width: min(100% - 24px, 1180px);
  }

  .hero-copy h1 {
    font-size: 58px;
  }

  .hero-subtitle {
    font-size: 16px;
  }

  .hero-panel {
    padding: 12px;
  }

  .metric-grid,
  .model-grid,
  .step-grid {
    grid-template-columns: 1fr;
  }

  .panel-toolbar,
  .api-row,
  .copy-line {
    align-items: flex-start;
  }

  .panel-toolbar {
    flex-wrap: wrap;
  }

  .api-row,
  .copy-line {
    flex-direction: column;
  }

  .api-row button,
  .copy-line button {
    width: 100%;
  }

  .section-heading h2 {
    font-size: 32px;
  }

  .modal-card {
    padding: 22px;
  }
}

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

  *,
  *::before,
  *::after {
    transition: none !important;
  }
}
