/* ============================================================
   康冠时代官网 · 页面布局与响应式
   依赖 styles/tokens.css 与 styles/components.css。
   ============================================================ */

/* ---------------- Hero（居中纯文字，约 55% 视口高；下方截图区露出顶部）---------------- */
.hero {
  background: var(--mist);
  min-height: 56vh;
  display: flex;
  align-items: center;
  padding: 64px 0 48px;
}
.hero-inner { width: 100%; }
.hero-copy {
  max-width: 820px;
  margin: 0 auto;
  text-align: center;
}
.hero-title {
  font-size: clamp(34px, 5vw, 52px);
  line-height: 1.16;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -.01em;
}
.hero-title .accent { color: var(--accent); }
.hero-sub {
  margin-top: 22px;
  font-size: 17px;
  color: var(--text-muted);
  line-height: 1.75;
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 34px;
}
.hero-points { justify-content: center; margin-top: 26px; }

/* ---------------- 首屏之下的产品截图轮播（真实界面 · 已脱敏）---------------- */
.hero-shot-section { background: var(--mist); margin-top: -36px; padding: 0 0 104px; }
.carousel { max-width: 1040px; margin: 0 auto; }
.carousel-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-slide {
  flex: 0 0 100%;
  scroll-snap-align: center;
  margin: 0;
}
.carousel-slide .browser-frame { box-shadow: 0 24px 60px rgba(29, 39, 51, .16); }
.carousel-caption {
  margin-top: 12px;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
}
.carousel-tabs {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0 auto 22px;
  width: fit-content;
  max-width: 100%;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  box-shadow: var(--shadow-sm);
}
.carousel-tab {
  border: none;
  padding: 8px 18px;
  border-radius: 999px;
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background .18s ease, color .18s ease;
}
.carousel-tab:hover { color: var(--accent); }
.carousel-tab.is-active {
  background: var(--accent);
  color: #fff;
}
.carousel-tab:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 35%, transparent);
  outline-offset: 2px;
}
.hero-shot-caption {
  margin: 18px auto 0;
  max-width: 680px;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ---------------- 通用区块 ---------------- */
.section { padding: 96px 0; }
.section-mist { background: var(--mist); }
.section-tight { padding: 72px 0; }

/* ---------------- 产品展示区（4 卡网格；大截图已移至首屏之下）---------------- */
.showcase-lead {
  max-width: 720px;
  margin: -30px 0 40px;
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.75;
}
.showcase-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.showcase-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: 26px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  transition: transform .18s ease, box-shadow .18s ease;
}
.showcase-item:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.showcase-item h3 { font-size: 16.5px; font-weight: 700; color: var(--ink); line-height: 1.4; }
.showcase-item .showcase-en {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
}
.showcase-item p { font-size: 13.5px; color: var(--text-muted); line-height: 1.65; }
.showcase-item a { color: var(--accent); font-weight: 600; font-size: 14px; margin-top: auto; }
.showcase-item a:hover { text-decoration: underline; }

/* ---------------- 能力 / 场景网格 ---------------- */
.cap-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.scn-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.why-grid, .pillar-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

/* ---------------- 定价布局 ---------------- */
.pricing-section { background: var(--surface-2); }
.pricing-layout {
  display: grid;
  grid-template-columns: minmax(290px, .85fr) minmax(0, 1.15fr);
  gap: 24px;
  align-items: stretch;
}

/* ---------------- 开源区 ---------------- */
.os-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(290px, .85fr);
  gap: 24px;
  align-items: start;
}
.os-list li {
  position: relative;
  padding-left: 24px;
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 12px;
}
.os-list li::before {
  position: absolute;
  top: 4px;
  left: 0;
  width: 15px; height: 15px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  content: "✓";
  font-size: 10px;
  font-weight: 800;
  line-height: 15px;
  text-align: center;
}
.os-card {
  padding: 30px;
  border: 1px solid color-mix(in srgb, var(--accent) 38%, var(--border));
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow-md);
}
.os-card h3 { font-size: 19px; font-weight: 800; color: var(--ink); }
.os-card .os-card-sub { margin-top: 8px; font-size: 13.5px; color: var(--text-muted); line-height: 1.7; }
.os-links { display: grid; gap: 10px; margin: 22px 0 24px; }
.os-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 13px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  transition: border-color .18s ease, background .18s ease;
}
.os-links a:hover { border-color: var(--accent); background: var(--accent-soft); }
.os-links a span { color: var(--accent); font-weight: 800; }

/* ---------------- AI Engineering 区 ---------------- */
.eng-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 40px;
  align-items: start;
}
.eng-grid .eng-side { display: grid; gap: 18px; }
.eng-highlight-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 40px;
}
.eng-highlight {
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
}
.eng-highlight h3 { font-size: 15px; font-weight: 700; color: var(--ink); line-height: 1.45; }
.eng-highlight p { margin-top: 8px; font-size: 13px; color: var(--text-muted); line-height: 1.65; }

/* ---------------- Engineering 页 ---------------- */
.philosophy {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 36px;
}
.philosophy-card {
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
}
.philosophy-card strong {
  display: block;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: .02em;
}
.philosophy-card span { display: block; margin-top: 8px; font-size: 13px; color: var(--text-muted); line-height: 1.65; }

.role-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}
.role-card {
  padding: 22px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
}
.role-card h3 { font-size: 15px; font-weight: 700; color: var(--ink); }
.role-card .role-tag {
  display: inline-block;
  margin-top: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
}
.role-card p { margin-top: 10px; font-size: 12.5px; color: var(--text-muted); line-height: 1.6; }

.gov-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.gov-card {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
}
.gov-card h3 { font-size: 15.5px; font-weight: 700; color: var(--ink); line-height: 1.45; }
.gov-card .gov-src {
  display: block;
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--accent);
}
.gov-card p { margin-top: 10px; font-size: 13px; color: var(--text-muted); line-height: 1.65; }

.case-section { background: var(--surface-2); }
.case-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: -26px 0 36px;
}
.case-meta li {
  padding: 5px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
}
.phase-list { display: grid; gap: 14px; max-width: 860px; }
.phase-item {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.6fr);
  gap: 18px;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
}
.phase-item h3 { font-size: 15px; font-weight: 700; color: var(--ink); line-height: 1.5; }
.phase-item .phase-date {
  display: block;
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
}
.phase-item p { font-size: 13.5px; color: var(--text-muted); line-height: 1.7; }

.scope-note {
  margin-top: 28px;
  max-width: 860px;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.75;
}

/* ---------------- 响应式 ---------------- */
@media (max-width: 1080px) {
  .nav-links { gap: 17px; }
  .nav-links a { font-size: 14px; }
  .role-grid { grid-template-columns: repeat(3, 1fr); }
  .eng-highlight-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .cap-grid { grid-template-columns: repeat(2, 1fr); }
  .why-grid, .pillar-grid, .scn-grid { grid-template-columns: 1fr; }
  .pricing-layout { grid-template-columns: 1fr; }
  .showcase-grid { grid-template-columns: repeat(2, 1fr); }
  .os-grid { grid-template-columns: 1fr; }
  .eng-grid { grid-template-columns: minmax(0, 1fr); }
  .flow-steps { grid-template-columns: 1fr; }
  .flow-arrow { display: none; }
  .stats-band { grid-template-columns: repeat(2, 1fr); }
  .gov-grid { grid-template-columns: repeat(2, 1fr); }
  .phase-item { grid-template-columns: 1fr; gap: 8px; }
}

@media (max-width: 768px) {
  .top-nav-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    height: auto;
    min-height: 72px;
    gap: 8px 12px;
    padding-top: 12px;
    padding-bottom: 8px;
  }
  .brand { grid-column: 1; grid-row: 1; }
  .nav-right { grid-column: 2; grid-row: 1; gap: 8px; }
  .nav-links {
    grid-column: 1 / -1;
    grid-row: 2;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px 16px;
    margin: 0;
  }
  .nav-links a { padding: 10px 6px; }
  section { scroll-margin-top: 144px; }
  .section { padding: 72px 0; }
  .section-title { margin-bottom: 36px; }
  .footer-top { flex-direction: column; gap: 28px; }
  .footer-cols { gap: 40px; }
  .section-lead { margin-top: -20px; margin-bottom: 32px; }
  .section-sub { margin-top: -18px; margin-bottom: 32px; }
  .pricing-card { padding: 24px; }
  .deploy-grid { grid-template-columns: 1fr; }
  .philosophy { grid-template-columns: 1fr; }
  .role-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
  .nav-right .btn { padding: 13px 16px; }
  .cap-grid { grid-template-columns: 1fr; }
  .hero { min-height: 0; padding: 64px 0 56px; }
  .hero-shot-section { padding: 16px 0 72px; }
  .nav-right .nav-cta-secondary { display: none; }
  .hero-points { gap: 6px; }
  .hero-points li { font-size: 11px; }
  .showcase-grid { grid-template-columns: 1fr; }
  .pricing-price span { font-size: 46px; }
  .pricing-rule { gap: 12px; padding: 18px; }
  .faq-item summary { padding: 17px; font-size: 15px; }
  .faq-item p { padding: 15px 17px 18px; }
  .stats-band { grid-template-columns: 1fr; }
  .gov-grid { grid-template-columns: 1fr; }
  .role-grid { grid-template-columns: 1fr; }
  .eng-highlight-grid { grid-template-columns: 1fr; }
}

/* English labels need room to wrap without changing the Chinese page layout. */
html[lang="en"] .hero-title,
html[lang="en"] .section-title { overflow-wrap: anywhere; }
html[lang="en"] .wf-en { display: none; }
@media (max-width: 1080px) {
  html[lang="en"] .top-nav-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    height: auto;
    min-height: 72px;
    gap: 8px 12px;
    padding-top: 12px;
    padding-bottom: 8px;
  }
  html[lang="en"] .brand { grid-column: 1; grid-row: 1; }
  html[lang="en"] .nav-right { grid-column: 2; grid-row: 1; gap: 8px; }
  html[lang="en"] .nav-links {
    display: flex;
    grid-column: 1 / -1;
    grid-row: 2;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px 12px;
    margin: 0;
  }
  html[lang="en"] .nav-links a { padding: 10px 4px; }
  html[lang="en"] section { scroll-margin-top: 180px; }
}
@media (max-width: 560px) {
  html[lang="en"] .nav-right .btn { padding: 13px 16px; }
  html[lang="en"] .btn { white-space: normal; text-align: center; }
  html[lang="en"] .hero-actions { flex-wrap: wrap; }
}

.locale-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.locale-center-actions { justify-content: center; }
.locale-space-12 { margin-top: 12px; }
.locale-space-18 { margin-top: 18px; }
.locale-space-32 { margin-top: 32px; }
.locale-space-56 { margin-top: 56px; }
@media (max-width: 980px) { html[lang="en"] .eng-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) { html[lang="en"] .locale-stats { grid-template-columns: minmax(0, 1fr); } }
