/* ============================================================
   云启科技 企业官网 | 响应式样式
   设计原则：移动优先、CSS 自定义属性、Flexbox/Grid、可访问性
   ============================================================ */

:root {
  /* 颜色 */
  --c-primary: #1d4ed8;
  --c-primary-dark: #1e3a8a;
  --c-primary-light: #dbeafe;
  --c-ink: #0f172a;
  --c-body: #475569;
  --c-muted: #94a3b8;
  --c-bg: #ffffff;
  --c-bg-alt: #f8fafc;
  --c-border: #e2e8f0;

  /* 间距与排版 */
  --radius: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 10px 30px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 20px 50px rgba(29, 78, 216, 0.18);
  --container: 1140px;
  --header-h: 68px;

  --font: "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, -apple-system, sans-serif;
}

/* ---------- 基础重置 ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--c-body);
  background: var(--c-bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { color: var(--c-ink); line-height: 1.25; margin: 0 0 0.5em; }
p { margin: 0 0 1em; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 20px;
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--c-primary);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { background: var(--c-primary-dark); box-shadow: var(--shadow-md); }
.btn-ghost {
  background: transparent;
  color: var(--c-primary);
  border-color: var(--c-primary);
}
.btn-ghost:hover { background: var(--c-primary-light); }
.btn-block { width: 100%; }

/* 焦点可见性（无障碍必须保留） */
.btn:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
button:focus-visible {
  outline: 3px solid var(--c-primary);
  outline-offset: 2px;
}

/* ---------- 顶部导航 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--c-border);
  transition: box-shadow 0.2s ease;
}
.site-header.scrolled { box-shadow: var(--shadow-sm); }

.nav-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; color: var(--c-ink); }
.brand-mark {
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  border-radius: 9px;
  background: var(--c-primary);
  color: #fff;
  font-size: 1rem;
}
.brand-name { font-size: 1.1rem; }

.nav-desktop { display: flex; gap: 28px; }
.nav-desktop a {
  color: var(--c-body);
  font-weight: 500;
  position: relative;
  padding: 4px 0;
}
.nav-desktop a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 0; height: 2px;
  background: var(--c-primary);
  transition: width 0.2s ease;
}
.nav-desktop a:hover::after,
.nav-desktop a.active::after { width: 100%; }

.nav-cta { padding: 9px 18px; }

/* 汉堡按钮（默认隐藏，移动端显示） */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px; height: 42px;
  background: transparent;
  border: 1px solid var(--c-border);
  border-radius: 10px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 20px; height: 2px;
  background: var(--c-ink);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* 移动端抽屉 */
.nav-mobile {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 20px 20px;
  border-top: 1px solid var(--c-border);
  background: #fff;
}
.nav-mobile a {
  padding: 12px 8px;
  color: var(--c-ink);
  font-weight: 500;
  border-radius: var(--radius-sm);
}
.nav-mobile a:hover { background: var(--c-bg-alt); }
.nav-mobile .btn { margin-top: 8px; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background: radial-gradient(1200px 600px at 80% -10%, var(--c-primary-light), transparent 60%),
              linear-gradient(180deg, #fff, var(--c-bg-alt));
  padding-block: clamp(48px, 8vw, 96px);
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 40px;
}
.eyebrow {
  display: inline-block;
  color: var(--c-primary);
  font-weight: 600;
  letter-spacing: 0.04em;
  margin-bottom: 12px;
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -0.01em;
}
.lead { font-size: clamp(1rem, 2.2vw, 1.15rem); max-width: 46ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 8px; }

.hero-visual { position: relative; min-height: 280px; }
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
  opacity: 0.9;
}
.orb-1 { width: 180px; height: 180px; background: var(--c-primary); top: 10%; left: 12%; box-shadow: var(--shadow-lg); }
.orb-2 { width: 120px; height: 120px; background: #60a5fa; bottom: 8%; left: 40%; }
.orb-3 { width: 90px; height: 90px; background: #93c5fd; top: 30%; right: 8%; }

/* ---------- 通用区块 ---------- */
.section { padding-block: clamp(48px, 7vw, 88px); }
.section-alt { background: var(--c-bg-alt); }
.section-head { max-width: 640px; margin-bottom: 36px; }
.section-head h2 { font-size: clamp(1.5rem, 3.5vw, 2.2rem); font-weight: 800; }
.tag {
  display: inline-block;
  color: var(--c-primary);
  background: var(--c-primary-light);
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 12px;
}

/* ---------- 关于我们 ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 32px;
  align-items: center;
}
.about-text { font-size: 1.05rem; }
.about-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.about-list li {
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 16px 20px;
  font-weight: 500;
  box-shadow: var(--shadow-sm);
}
.about-list strong { color: var(--c-primary); font-size: 1.3rem; margin-right: 6px; }

/* ---------- 卡片网格（服务） ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.card {
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 26px 22px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.card-icon { font-size: 2rem; margin-bottom: 10px; }
.card h3 { font-size: 1.15rem; }
.card p { margin: 0; color: var(--c-body); }

/* ---------- 核心优势数据 ---------- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  text-align: center;
}
.stat {
  background: linear-gradient(160deg, var(--c-primary), var(--c-primary-dark));
  color: #fff;
  border-radius: var(--radius);
  padding: 30px 16px;
  box-shadow: var(--shadow-md);
}
.stat-num, .stat-plus { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 800; }
.stat p { margin: 6px 0 0; color: rgba(255, 255, 255, 0.85); }

/* ---------- 新闻 ---------- */
.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.news-card {
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.news-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.news-card time { color: var(--c-primary); font-weight: 600; font-size: 0.85rem; }
.news-card h3 { font-size: 1.1rem; margin: 8px 0; }
.news-card p { margin: 0; color: var(--c-body); }

/* ---------- 联系我们 ---------- */
.contact { background: var(--c-bg-alt); }
.contact-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}
.contact-copy h2 { font-size: clamp(1.5rem, 3.5vw, 2.2rem); font-weight: 800; }
.contact-meta { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 10px; color: var(--c-ink); }

.contact-form {
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow-md);
  display: grid;
  gap: 16px;
}
.field { display: grid; gap: 6px; }
.field label { font-weight: 600; color: var(--c-ink); font-size: 0.92rem; }
.req { color: #dc2626; }
.field input,
.field textarea {
  font: inherit;
  padding: 11px 14px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--c-ink);
  width: 100%;
  resize: vertical;
}
.field input:focus,
.field textarea:focus { border-color: var(--c-primary); }
.error { color: #dc2626; font-size: 0.82rem; min-height: 1em; }
.form-status { margin: 0; font-weight: 600; }
.form-status.ok { color: #16a34a; }
.form-status.bad { color: #dc2626; }

/* ---------- 页脚 ---------- */
.site-footer { background: var(--c-ink); color: #cbd5e1; padding-block: 40px; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.footer-brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 600; }
.footer-links { display: flex; flex-wrap: wrap; gap: 20px; }
.footer-links a:hover { color: #fff; }
.copyright { width: 100%; margin: 8px 0 0; color: var(--c-muted); font-size: 0.85rem; }

/* ---------- 返回顶部 ---------- */
.back-top {
  position: fixed;
  right: 20px; bottom: 20px;
  width: 46px; height: 46px;
  border-radius: 50%;
  border: none;
  background: var(--c-primary);
  color: #fff;
  font-size: 1.3rem;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  z-index: 40;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.back-top:hover { transform: translateY(-3px); }

/* ============================================================
   响应式断点
   ============================================================ */

/* 平板：<= 900px */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { min-height: 200px; order: -1; }
  .about-grid { grid-template-columns: 1fr; }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .news-grid { grid-template-columns: 1fr; }
  .contact-inner { grid-template-columns: 1fr; }
}

/* 手机：<= 640px */
@media (max-width: 640px) {
  .nav-desktop, .nav-cta { display: none; }
  .nav-toggle { display: flex; }

  .card-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}

/* 尊重用户的减少动效偏好 */
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
