/* ============================================
   IteraCompute 官网样式
   设计风格参考 novita.ai:浅色主题、大标题、
   等宽字体技术元素、深色圆角 CTA
   ============================================ */

:root {
  --bg: #ffffff;
  --bg-soft: #fafaf9;
  --bg-card: #ffffff;
  --text: #0a0a0a;
  --text-secondary: #57534e;
  --text-muted: #a8a29e;
  --border: #e7e5e4;
  --border-strong: #d6d3d1;
  --accent: #0a0a0a;
  --accent-ink: #ffffff;
  --highlight: #16a34a;
  --radius: 14px;
  --radius-sm: 10px;
  --font-sans: "Inter", "SF Pro Display", -apple-system, BlinkMacSystemFont,
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", Roboto,
    sans-serif;
  --font-mono: "SF Mono", "JetBrains Mono", ui-monospace, Menlo, Consolas,
    monospace;
  --nav-height: 64px;
  --max-width: 1160px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

img {
  max-width: 100%;
  display: block;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- 通用元素 ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
}

.btn-primary:hover {
  background: #333;
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}

.btn-ghost:hover {
  border-color: var(--text);
  background: var(--bg-soft);
}

.section-label {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
}

.section-label::before {
  content: "";
  width: 24px;
  height: 1px;
  background: var(--border-strong);
}

h2 {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

/* ---------- 导航 ---------- */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.01em;
}

.logo-mark {
  width: 30px;
  height: 30px;
  display: block;
  flex: 0 0 auto;
  object-fit: contain;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 14.5px;
  font-weight: 500;
}

.nav-links a {
  color: var(--text-secondary);
  transition: color 0.15s;
}

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

.nav-cta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-cta .btn {
  padding: 9px 20px;
  font-size: 14px;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  margin: 5px 0;
  transition: 0.2s;
}

/* ---------- Hero ---------- */

.hero {
  padding: calc(var(--nav-height) + 90px) 0 70px;
  text-align: center;
  position: relative;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
      ellipse 60% 45% at 50% 0%,
      rgba(22, 163, 74, 0.05),
      transparent 70%
    ),
    radial-gradient(
      ellipse 40% 35% at 80% 10%,
      rgba(10, 10, 10, 0.03),
      transparent 70%
    );
  pointer-events: none;
}

.hero h1 {
  font-size: clamp(38px, 6.5vw, 68px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.08;
  margin-bottom: 22px;
}

.hero h1 .accent {
  background: linear-gradient(120deg, #16a34a, #0d9488);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  font-size: clamp(16px, 2vw, 19px);
  color: var(--text-secondary);
  max-width: 620px;
  margin: 0 auto 36px;
}

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

.hero-terminal {
  max-width: 720px;
  margin: 56px auto 0;
  background: #171615;
  border-radius: var(--radius);
  border: 1px solid #2c2a28;
  overflow: hidden;
  text-align: left;
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.25);
}

.hero-terminal-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid #2c2a28;
}

.hero-terminal-header .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #3f3d3b;
}

.hero-terminal-header .dot:first-child {
  background: #f87171;
}

.hero-terminal-header .dot:nth-child(2) {
  background: #fbbf24;
}

.hero-terminal-header .dot:nth-child(3) {
  background: #34d399;
}

.hero-terminal-header .title {
  font-family: var(--font-mono);
  font-size: 12px;
  color: #8b8885;
  margin-left: 8px;
}

.hero-terminal-body {
  padding: 20px 22px;
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.9;
  color: #d6d3d1;
  overflow-wrap: anywhere;
}

.hero-terminal-body .c {
  color: #78716c;
}

.hero-terminal-body .k {
  color: #7dd3fc;
}

.hero-terminal-body .s {
  color: #86efac;
}

.hero-terminal-body .cursor {
  display: inline-block;
  width: 8px;
  height: 16px;
  background: #a8a29e;
  vertical-align: text-bottom;
  animation: blink 1.1s step-end infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

/* ---------- 数据指标 ---------- */

.stats {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-soft);
  padding: 36px 0;
}

.stats-inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}

.stat .num {
  font-size: clamp(28px, 3.5vw, 38px);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.stat .num em {
  font-style: normal;
  color: var(--highlight);
}

.stat .num .amp {
  font-weight: 400;
  color: var(--highlight);
  margin: 0 2px;
}

.stat .label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ---------- 产品区块 ---------- */

.product {
  padding: 96px 0;
}

.product + .product {
  border-top: 1px solid var(--border);
}

.product-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 44px;
}

.product-head .step {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.product-head h2 {
  max-width: 560px;
}

.product-head p {
  color: var(--text-secondary);
  max-width: 560px;
  margin-top: 14px;
  font-size: 16px;
}

.product-head .link {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid var(--border-strong);
  padding-bottom: 2px;
  flex-shrink: 0;
  transition: border-color 0.15s;
}

.product-head .link:hover {
  border-color: var(--text);
}

.hero-note {
  margin-top: 20px;
  font-size: 13.5px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* ---------- 模型阵容网格 ---------- */

.model-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.model-grid-note {
  font-size: 13.5px;
  color: var(--text-muted);
}

.model-card {
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 18px;
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s, transform 0.15s;
}

.model-card:hover,
.model-card:focus-visible {
  border-color: var(--text);
  transform: translateY(-2px);
}

.model-card .name {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 14.5px;
  min-height: 40px;
}

.model-card .ext {
  margin-left: auto;
  color: var(--text-muted);
  font-size: 13px;
  opacity: 0;
  transition: opacity 0.15s;
}

.model-card:hover .ext,
.model-card:focus-visible .ext {
  opacity: 1;
}

.model-card .badge-logo {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.model-card .badge-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 8px;
  display: block;
}

.model-card .meta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 10px;
}

.model-card .tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 2px 8px;
  margin-top: 10px;
}

/* ---------- 标语 ---------- */

.slogans {
  display: grid;
  gap: 6px;
  font-size: 19px;
  font-weight: 650;
  letter-spacing: -0.01em;
  border-left: 3px solid var(--highlight);
  padding-left: 16px;
}

/* 双栏特色区块 */

.product-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

/* 允许分栏子元素收缩到内容以下,避免长文本撑破布局 */
.product-split > * {
  min-width: 0;
}

.endpoint-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: 0 12px 40px -18px rgba(0, 0, 0, 0.12);
}

.endpoint-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 12px 0;
  border-bottom: 1px dashed var(--border);
}

.endpoint-row:last-child {
  border-bottom: none;
}

.endpoint-row .k {
  color: var(--text-muted);
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.08em;
}

.endpoint-row .v {
  font-weight: 600;
  overflow-wrap: anywhere;
  text-align: right;
}

.endpoint-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--highlight);
}

.endpoint-status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--highlight);
  animation: pulse 2s ease infinite;
}

@keyframes pulse {
  50% {
    opacity: 0.4;
  }
}

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

.metric {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  text-align: center;
}

.metric .v {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
}

.metric .k {
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 2px;
}

/* GPU 三卡 */

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

.gpu-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: border-color 0.15s, transform 0.15s;
}

.gpu-card:hover {
  border-color: var(--text);
  transform: translateY(-3px);
}

.gpu-card .num {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}

.gpu-card h3 {
  font-size: 19px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.gpu-card p {
  color: var(--text-secondary);
  font-size: 14.5px;
  flex: 1;
}

.gpu-card ul {
  list-style: none;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-secondary);
  display: grid;
  gap: 8px;
  padding-top: 14px;
  border-top: 1px dashed var(--border);
}

.gpu-card ul li::before {
  content: "▸ ";
  color: var(--highlight);
}

/* ---------- 语言切换按钮 ---------- */

.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 8px 16px;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.lang-toggle:hover {
  border-color: var(--text);
  color: var(--text);
}

/* ---------- 合作生态 ---------- */

.eco {
  padding: 96px 0;
  text-align: center;
}

.eco p.eco-sub {
  color: var(--text-secondary);
  max-width: 560px;
  margin: 14px auto 40px;
}

.eco-badges {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

.eco-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 10px 20px;
  color: var(--text-secondary);
  background: var(--bg-card);
}

/* ---------- CTA ---------- */

.cta {
  padding: 110px 0;
  text-align: center;
  background: #141312;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse 55% 60% at 50% 110%,
    rgba(22, 163, 74, 0.18),
    transparent 65%
  );
  pointer-events: none;
}

.cta h2 {
  margin-bottom: 16px;
}

.cta p {
  color: #a8a29e;
  max-width: 560px;
  margin: 0 auto 36px;
}

.cta .btn-primary {
  background: #fff;
  color: #0a0a0a;
}

.cta .btn-primary:hover {
  background: #e7e5e4;
}

.cta .btn-ghost {
  color: #d6d3d1;
  border-color: #44403c;
}

.cta .btn-ghost:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: #78716c;
}

/* ---------- 页脚 ---------- */

.footer {
  background: #fff;
  border-top: 1px solid var(--border);
  padding: 64px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 56px;
}

.footer-brand p {
  color: var(--text-secondary);
  font-size: 14px;
  margin-top: 14px;
  max-width: 300px;
}

.footer-col h4 {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.footer-col ul {
  list-style: none;
  display: grid;
  gap: 10px;
}

.footer-col a {
  color: var(--text-secondary);
  font-size: 14px;
  transition: color 0.15s;
}

.footer-col a:hover {
  color: var(--text);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--text-muted);
}

.footer-social {
  display: flex;
  gap: 18px;
}

.footer-social a {
  color: var(--text-secondary);
  transition: color 0.15s;
}

.footer-social a:hover {
  color: var(--text);
}

/* ---------- 滚动入场动画 ---------- */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ---------- 响应式 ---------- */

@media (max-width: 900px) {
  .nav-links {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

  .nav-cta .btn-ghost,
  .nav-cta .btn-primary {
    display: none;
  }

  .lang-toggle {
    padding: 7px 12px;
    font-size: 12.5px;
  }

  .nav-open .nav-links {
    display: flex;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 24px;
    gap: 16px;
  }

  .stats-inner {
    grid-template-columns: repeat(2, 1fr);
  }

  .product-split {
    grid-template-columns: 1fr;
  }

  .gpu-grid {
    grid-template-columns: 1fr;
  }

  .model-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .product-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 560px) {
  .stats-inner {
    grid-template-columns: 1fr 1fr;
  }

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

  /* 指标网格改两列,容纳较长的英文单词 */
  .endpoint-metrics {
    grid-template-columns: 1fr 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero-actions .btn {
    width: 100%;
    justify-content: center;
  }
}

/* 减少动效偏好 */
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .live-badge::before,
  .endpoint-status::before {
    animation: none;
  }
}

/* ---------- 法务页面 ---------- */

.legal {
  padding: calc(var(--nav-height) + 72px) 0 96px;
}

.legal h1 {
  font-size: clamp(30px, 4.5vw, 42px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.legal-updated {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 40px;
}

.legal-section {
  margin-bottom: 32px;
  max-width: 760px;
}

.legal-section h2 {
  font-size: 18px;
  font-weight: 650;
  margin-bottom: 10px;
}

.legal-section p {
  color: var(--text-secondary);
  font-size: 15px;
}

.legal-section a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- API 文档页 ---------- */

.code-block {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.8;
  color: var(--text);
  overflow-x: auto;
  white-space: pre;
  margin: 14px 0 10px;
  max-width: 760px;
}

.code-block .c {
  color: var(--text-muted);
}

.code-block .s {
  color: var(--highlight);
}

.code-block .k {
  color: #2563eb;
}

.doc-table {
  border-collapse: collapse;
  font-size: 14px;
  width: 100%;
  max-width: 760px;
  margin: 14px 0 10px;
}

.doc-table th,
.doc-table td {
  border: 1px solid var(--border);
  text-align: left;
  padding: 8px 12px;
  vertical-align: top;
}

.doc-table th {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-soft);
}

.doc-table td:first-child {
  font-family: var(--font-mono);
  font-size: 13px;
  white-space: nowrap;
}

.doc-inline {
  font-family: var(--font-mono);
  font-size: 0.92em;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 1px 6px;
  white-space: nowrap;
}

/* 长模型名在窄屏换行,避免撑破卡片 */
.model-card .name {
  flex-wrap: wrap;
  overflow-wrap: anywhere;
}

/* 数据条:允许长技术词换行 */
.stat .num {
  overflow-wrap: anywhere;
}

@media (max-width: 560px) {
  .stat .num {
    font-size: 21px;
  }
}
