/* APIKIT homepage v3 — 2026-11-02
   Scope: /zh and /en landing pages only. Sub-pages keep /brand/apikit.css.
   Palette: deep-navy infrastructure dark + TDesign dark brand blue. */

:root {
  --bg: #16223a;
  --bg-2: #1a2740;
  --bg-3: #121b2e;
  --bg-deep: #111a2d;
  --surface: #1d2b45;
  --card: #22314d;
  --card-hi: #28405f;
  --line: #2c3d5c;
  --line-2: #3a4e72;
  --line-3: #465b82;
  --txt: #ffffff;
  --txt-2: #b9c7dd;
  --txt-3: #8b9cb8;
  --txt-4: #7b8daa;
  --brand: #4582e6;
  --brand-soft: rgba(69, 130, 230, 0.12);
  --brand-line: rgba(69, 130, 230, 0.45);
  --brand-2: #8ab4f8;
  --ok: #2ba471;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --radius: 6px;
  --radius-lg: 9px;
  --nav-h: 72px;
}

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

html { -webkit-text-size-adjust: 100%; }

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

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.01em; }
ul { margin: 0; padding: 0; list-style: none; }

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: 4px;
}

.container {
  width: min(1200px, calc(100% - 48px));
  margin: 0 auto;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 99;
  padding: 10px 16px;
  background: var(--brand);
  color: #fff;
  border-radius: 0 0 6px 0;
}
.skip:focus { left: 0; }

/* ---------------- header ---------------- */
.nav {
  position: relative;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: var(--nav-h);
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--txt);
}
.logo-symbol { display: inline-flex; width: 26px; height: 26px; color: var(--txt); }
.logo-symbol svg { width: 26px; height: 26px; }
.logo-tail { color: var(--brand); margin-left: -4px; }

.desktop-nav { display: flex; align-items: center; gap: 34px; }
.desktop-nav a {
  font-size: 14px;
  color: var(--txt-2);
  transition: color 0.18s ease;
}
.desktop-nav a:hover { color: var(--txt); }
.desktop-nav a.active { color: var(--txt); }

.nav-actions { display: flex; align-items: center; gap: 20px; }
.nav-actions .lang {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--txt-3);
  transition: color 0.18s ease;
}
.nav-actions .lang:hover { color: var(--txt-2); }
.nav-actions .login-link { font-size: 14px; color: #d3ddec; }
.nav-actions .login-link:hover { color: var(--txt); }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  height: 48px;
  padding: 0 26px;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}
.button svg { width: 12px; height: 12px; }
.button.primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 8px 24px -6px rgba(69, 130, 230, 0.45);
}
.button.primary:hover { background: #5590f0; transform: translateY(-1px); }
.button.secondary {
  background: #1f2d47;
  border: 1px solid var(--line-2);
  color: #eaf1fb;
  font-weight: 500;
}
.button.secondary:hover { border-color: #3a4e72; background: #26365a; }
.button.compact { height: 38px; padding: 0 18px; font-size: 14px; }

.menu-toggle {
  display: none;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  color: var(--txt-2);
  align-items: center;
  justify-content: center;
}
.mobile-nav { display: none; }

/* ---------------- hero ---------------- */
.hero {
  position: relative;
  padding: 104px 0 84px;
  text-align: center;
  background:
    radial-gradient(720px 420px at 50% 0%, rgba(69, 130, 230, 0.18), transparent 72%),
    var(--bg);
  overflow: hidden;
}
.hero > .container { position: relative; display: flex; flex-direction: column; align-items: center; gap: 28px; }

.promo-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 6px 0 14px;
  border: 1px solid var(--brand-line);
  border-radius: 999px;
  background: rgba(40, 58, 92, 0.92);
  font-size: 13px;
  color: #d3ddec;
}
.promo-pill .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 3px rgba(43, 164, 113, 0.18);
}
.promo-pill b { font-weight: 500; }
.promo-pill .pill-cta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: #3a6cb8;
  color: #fff;
  font-size: 12px;
  font-weight: 500;
}
.promo-pill .pill-cta:hover { background: #3a6cb8; }
.promo-pill svg { width: 10px; height: 10px; }

.hero h1 {
  font-size: clamp(38px, 5.3vw, 76px);
  line-height: 1.28;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.hero h1 .grad {
  background: linear-gradient(92deg, #ffffff 8%, #8fb0f0 92%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero .sub {
  max-width: 720px;
  font-size: 17px;
  line-height: 1.76;
  color: var(--txt-2);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

.trust-row {
  display: flex;
  align-items: center;
  gap: 28px;
  padding-top: 12px;
  font-size: 13px;
  color: var(--txt-3);
}
.trust-row .item { display: inline-flex; align-items: baseline; gap: 7px; }
.trust-row b {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 600;
  color: var(--txt);
  letter-spacing: -0.01em;
}
.trust-row .sep { width: 1px; height: 12px; background: var(--line-3); }

/* ---------------- section shell ---------------- */
.section { padding: 96px 0; }
.section.alt { background: var(--bg-2); }
.section.deep { background: var(--bg-3); }

.section-head { display: flex; flex-direction: column; gap: 14px; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  color: var(--brand);
  text-transform: uppercase;
}
.eyebrow::before {
  content: "";
  width: 24px;
  height: 1px;
  background: var(--brand);
}
.section-head h2 {
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.34;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.section-head .sub {
  max-width: 720px;
  font-size: 16px;
  line-height: 1.75;
  color: var(--txt-2);
}

/* ---------------- architecture ---------------- */
.arch { margin-top: 44px; padding: 44px 40px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); }
.flow { display: flex; align-items: center; }
.flow .link { flex: 1 1 60px; height: 1px; min-width: 24px; }
.flow .link.l { background: linear-gradient(90deg, var(--line-2), var(--brand)); }
.flow .link.r { background: linear-gradient(90deg, var(--brand), var(--line-2)); }

.app-card {
  flex: 0 0 220px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 20px;
  border: 1px solid #3a4f74;
  border-radius: var(--radius);
  background: var(--card);
}
.app-card .k {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--txt-3);
}
.app-card strong { font-size: 16px; font-weight: 600; }
.app-card li { font-size: 13px; color: var(--txt-2); line-height: 1.9; }
.app-card .note { font-family: var(--mono); font-size: 11px; color: var(--brand); }

.hub {
  flex: 0 0 200px;
  height: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid rgba(77, 133, 222, 0.55);
  border-radius: 14px;
  background: radial-gradient(110% 110% at 50% 30%, #3a6bab 0%, #1a2a45 100%);
  box-shadow: 0 0 60px rgba(69, 130, 230, 0.35);
}
.hub .mark { width: 36px; height: 36px; color: #fff; }
.hub .mark svg { width: 36px; height: 36px; }
.hub .name {
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.3em;
  padding-left: 0.3em;
}
.hub .desc {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.18em;
  color: var(--brand-2);
}

.nodes { flex: 0 0 320px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.node {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px 12px;
  border: 1px solid #3a4f74;
  border-radius: var(--radius);
  background: var(--card);
}
.node .k { font-family: var(--mono); font-size: 9px; letter-spacing: 0.14em; color: var(--txt-3); }
.node .v { font-family: var(--mono); font-size: 12px; color: #eaf1fb; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.arch-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin-top: 40px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}
.arch-stats > div { padding: 0 28px; border-left: 1px solid var(--line); }
.arch-stats > div:first-child { padding-left: 0; border-left: 0; }
.arch-stats .idx { font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; color: var(--brand); }
.arch-stats h3 { margin: 6px 0 4px; font-size: 15px; font-weight: 600; }
.arch-stats p { font-size: 13px; line-height: 1.7; color: var(--txt-3); }

/* ---------------- model catalog ---------------- */
.catalog-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
}
.catalog-search { position: relative; flex: 0 0 280px; }
.catalog-search input {
  width: 100%;
  height: 44px;
  padding: 0 14px 0 38px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  background: #1f2d47;
  color: var(--txt);
  font-family: var(--sans);
  font-size: 13px;
}
.catalog-search input::placeholder { color: var(--txt-4); }
.catalog-search input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.catalog-search svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  color: var(--txt-4);
}

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 32px 0 0; }
.filters button {
  height: 32px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  font-size: 13px;
  color: var(--txt-2);
  transition: color 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}
.filters button:hover { color: var(--txt); border-color: var(--line-3); }
.filters button.selected {
  background: #23477e;
  border-color: rgba(69, 130, 230, 0.6);
  color: #fff;
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-top: 24px;
}
.catalog-model {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}
.catalog-model:hover {
  border-color: rgba(69, 130, 230, 0.55);
  background: #25334f;
  transform: translateY(-1px);
}
.catalog-model span {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--txt-3);
}
.catalog-model strong {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  color: #eaf1fb;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.catalog-model i {
  position: absolute;
  right: 12px;
  top: 12px;
  width: 10px;
  height: 10px;
  color: var(--brand);
  opacity: 0;
  transition: opacity 0.16s ease;
}
.catalog-model i svg { width: 10px; height: 10px; }
.catalog-model:hover i { opacity: 1; }

.catalog-empty {
  margin-top: 24px;
  padding: 32px;
  border: 1px dashed var(--line-2);
  border-radius: var(--radius);
  text-align: center;
  font-size: 14px;
  color: var(--txt-3);
}
.catalog-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 28px;
}
.catalog-foot .count { font-size: 12px; color: var(--txt-4); }
.catalog-foot .count b { font-family: var(--mono); color: var(--txt-2); font-weight: 500; }

/* ---------------- capabilities ---------------- */
.caps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin-top: 44px; }
.cap { padding: 20px 40px 0 0; border-top: 1px solid var(--line); }
.cap:nth-child(n + 4) { margin-top: 56px; }
.cap .row { display: flex; align-items: center; gap: 10px; }
.cap .row svg { width: 18px; height: 18px; color: var(--brand); }
.cap .idx { font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; color: var(--txt-4); }
.cap h3 { margin: 14px 0 8px; font-size: 19px; font-weight: 600; }
.cap p { font-size: 14px; line-height: 1.78; color: var(--txt-2); }

/* ---------------- final cta ---------------- */
.final-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 72px 60px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  text-align: center;
  background:
    radial-gradient(560px 260px at 50% 0%, rgba(69, 130, 230, 0.14), transparent 75%),
    #1b2740;
}
.final-cta h2 { font-size: clamp(26px, 2.9vw, 40px); line-height: 1.36; font-weight: 600; letter-spacing: -0.02em; }
.final-cta p { font-size: 15px; line-height: 1.7; color: var(--txt-2); }
.final-cta .eyebrow::before { display: none; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }

/* ---------------- footer ---------------- */
.footer { padding: 64px 0 32px; background: var(--bg-deep); border-top: 1px solid #2c3d5c; }
.footer-top {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr 1.15fr;
  gap: 32px;
}
.footer-top .brand p,
.footer-top > div:first-child p {
  margin: 16px 0 0;
  font-size: 13px;
  line-height: 1.78;
  color: var(--txt-3);
}
.footer-top b {
  display: block;
  margin-bottom: 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--txt);
}
.footer-top a {
  display: block;
  padding: 5px 0;
  font-size: 13px;
  color: #a9bad4;
  transition: color 0.16s ease;
}
.footer-top a:hover { color: var(--txt); }
.footer-top .mail,
.footer-top a[href^="mailto:"] { font-family: var(--mono); font-size: 12px; color: var(--brand); }

.footer-links { margin-top: 48px; padding-top: 28px; border-top: 1px solid #2c3d5c; }
.footer-links-head { display: flex; align-items: baseline; gap: 14px; }
.footer-links-head b { font-size: 13px; font-weight: 600; }
.footer-links-head span {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--txt-4);
}
.footer-links-head a { margin-left: auto; font-size: 12px; color: var(--brand); }
.footer-links-head a:hover { color: var(--brand-2); }
.footer-links ul,
.footer-links-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 22px;
  margin-top: 16px;
}
.footer-links li a { font-size: 12px; color: #8899b5; }
.footer-links li a:hover { color: var(--txt-2); }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid #2c3d5c;
  font-size: 12px;
  color: var(--txt-4);
}
.footer-bottom .tag,
.footer-bottom span:last-child {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  color: #5d6d8a;
}

.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;
}

.copy-notice {
  position: fixed;
  left: 50%;
  bottom: 32px;
  transform: translateX(-50%);
  z-index: 60;
  padding: 10px 18px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: #25334f;
  font-size: 13px;
  color: var(--txt);
}

/* ---------------- responsive ---------------- */
@media (max-width: 1180px) {
  .catalog-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .footer-top { grid-template-columns: 1.5fr 1fr 1fr 1fr; }
  .footer-top > div:last-child { grid-column: 1 / -1; }
}

@media (max-width: 980px) {
  .desktop-nav { display: none; }
  .menu-toggle { display: inline-flex; }
  .mobile-nav {
    display: none;
    flex-direction: column;
    padding: 8px 0 20px;
    border-bottom: 1px solid var(--line);
    background: var(--bg);
  }
  .mobile-nav:not([hidden]) { display: flex; }
  .mobile-nav a { padding: 10px 2px; font-size: 15px; color: var(--txt-2); }

  .hero { padding: 72px 0 64px; }
  .hero .sub { font-size: 16px; }

  .arch { padding: 28px 24px; }
  .flow { flex-direction: column; align-items: stretch; gap: 0; }
  .flow .link { flex: 0 0 28px; width: 1px; min-width: 1px; margin: 0 auto; height: 28px; }
  .flow .link.l, .flow .link.r { background: linear-gradient(180deg, var(--line-2), var(--brand)); }
  .flow .link.r { background: linear-gradient(180deg, var(--brand), var(--line-2)); }
  .app-card, .hub, .nodes { flex: 0 0 auto; }
  .hub { height: 160px; }
  .nodes { width: 100%; }
  .arch-stats { grid-template-columns: 1fr; gap: 24px; padding-top: 24px; }
  .arch-stats > div { padding: 0; border-left: 0; }

  .catalog-head { flex-direction: column; align-items: stretch; gap: 24px; }
  .catalog-search { flex: 0 0 auto; }
  .catalog-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .caps { grid-template-columns: repeat(2, 1fr); }
  .cap { padding-right: 24px; }
  .cap:nth-child(n + 4) { margin-top: 0; }
  .cap:nth-child(n + 3) { margin-top: 48px; }
  .final-cta { padding: 56px 28px; }
  .footer-top { grid-template-columns: repeat(2, 1fr); gap: 28px; }
}

@media (max-width: 640px) {
  .container { width: calc(100% - 32px); }
  .nav-actions .login-link, .nav-actions .lang { display: none; }
  .hero { padding: 56px 0 48px; }
  .hero h1 { font-size: 34px; line-height: 1.34; }
  .hero .sub { font-size: 15px; }
  .promo-pill { height: auto; padding: 8px 10px 8px 14px; flex-wrap: wrap; justify-content: center; row-gap: 6px; }
  .hero-actions .button { width: 100%; }
  .trust-row { flex-wrap: wrap; justify-content: center; gap: 14px; }
  .trust-row .sep { display: none; }
  .section { padding: 64px 0; }
  .catalog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .caps { grid-template-columns: 1fr; }
  .cap, .cap:nth-child(n + 3) { margin-top: 0; }
  .cap + .cap { margin-top: 40px; }
  .final-cta { padding: 44px 20px; }
  .footer-top { grid-template-columns: 1fr; gap: 24px; }
  .footer-links ul { gap: 2px 16px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
