/* =========================================================
   嘉兴市晟耀科技有限公司 · 企业官网样式
   设计理念：简约大气 · 科技质感 · 留白优先
   性能优先：纯 CSS、无外部依赖、移动端友好
   ========================================================= */

/* ---------- 设计令牌 ---------- */
:root {
  --ink: #0f172a;          /* 主文字 */
  --ink-soft: #334155;
  --muted: #64748b;        /* 次要文字 */
  --line: #e2e8f0;         /* 分隔线 */
  --bg: #ffffff;
  --bg-soft: #f8fafc;      /* 浅灰背景 */
  --bg-deep: #0b1220;      /* 深色 Hero */
  --accent: #0ea5e9;       /* 科技蓝 */
  --accent-2: #6366f1;     /* 靛紫 */
  --accent-ink: #1e40af;
  --grad: linear-gradient(135deg, #0ea5e9 0%, #6366f1 100%);
  --grad-soft: linear-gradient(135deg, rgba(14,165,233,.12), rgba(99,102,241,.12));
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px -12px rgba(15,23,42,.18);
  --shadow-lg: 0 24px 60px -20px rgba(15,23,42,.28);
  --container: 1200px;
  --header-h: 72px;
  --ease: cubic-bezier(.4,0,.2,1);
}

/* ---------- 基础重置 ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB",
    system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0; font-weight: 700; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }

/* ---------- 布局容器 ---------- */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.section { padding: 88px 0; }
.section--soft { background: var(--bg-soft); }
.section--tight { padding: 64px 0; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 26px; border-radius: 999px; font-weight: 600; font-size: 15px;
  cursor: pointer; border: 1px solid transparent; transition: all .25s var(--ease);
  white-space: nowrap;
}
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 10px 24px -10px rgba(99,102,241,.6); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 30px -10px rgba(99,102,241,.7); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-ink); background: #fff; }
.btn-light { background: #fff; color: var(--accent-ink); }
.btn-light:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 56px; }
.eyebrow {
  display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: .08em;
  color: var(--accent-ink); background: var(--grad-soft);
  padding: 6px 14px; border-radius: 999px; margin-bottom: 18px; text-transform: uppercase;
}
.section-title { font-size: clamp(26px, 3.4vw, 38px); }
.section-sub { color: var(--muted); font-size: 17px; margin-top: 14px; }

/* ---------- 头部导航 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100; height: var(--header-h);
  background: rgba(255,255,255,.82); backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent; transition: all .3s var(--ease);
}
.site-header.is-scrolled { border-color: var(--line); box-shadow: 0 6px 24px -18px rgba(15,23,42,.4); }
.nav-wrap { display: flex; align-items: center; justify-content: space-between; height: 100%; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand-logo { height: 38px; width: auto; flex: none; object-fit: contain; }
.brand-name { font-size: 20px; font-weight: 800; letter-spacing: .04em; color: var(--ink); line-height: 1.1; }
.nav { display: flex; align-items: center; gap: 6px; }
.nav-link {
  padding: 9px 16px; border-radius: 999px; font-size: 15px; font-weight: 500; color: var(--ink-soft);
  transition: all .2s var(--ease);
}
.nav-link:hover { color: var(--accent-ink); background: var(--bg-soft); }
.nav-link.active { color: var(--accent-ink); background: var(--grad-soft); font-weight: 600; }
.nav-cta { margin-left: 10px; padding: 10px 22px; }
.lang-switch { display: flex; align-items: center; gap: 2px; margin-left: 16px; padding: 5px 10px; border: 1px solid var(--line); border-radius: 999px; background: #fff; font-size: 13px; }
.lang-switch .lang-opt { color: var(--muted); text-decoration: none; padding: 2px 5px; border-radius: 6px; font-weight: 600; line-height: 1; }
.lang-switch .lang-opt.is-active { color: var(--accent-ink); }
.lang-switch .lang-opt:hover { color: var(--accent-ink); }
.lang-switch .lang-sep { color: var(--line); margin: 0 1px; }
.nav-toggle {
  display: none; flex-direction: column; gap: 5px; width: 44px; height: 44px;
  border: none; background: transparent; cursor: pointer; padding: 10px; border-radius: 10px;
}
.nav-toggle span { display: block; height: 2px; width: 100%; background: var(--ink); border-radius: 2px; transition: .3s var(--ease); }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background: radial-gradient(1200px 600px at 80% -10%, rgba(99,102,241,.35), transparent 60%),
              radial-gradient(900px 500px at 0% 110%, rgba(14,165,233,.3), transparent 55%),
              linear-gradient(160deg, #0b1220 0%, #111c33 100%);
  padding: 110px 0 120px;
}
.hero::after {
  content: ""; position: absolute; inset: 0; opacity: .5;
  background-image: radial-gradient(rgba(255,255,255,.08) 1px, transparent 1px);
  background-size: 26px 26px; mask-image: linear-gradient(180deg, #000, transparent 70%);
}
.hero-grid { position: relative; z-index: 2; display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600;
  padding: 7px 16px; border: 1px solid rgba(255,255,255,.2); border-radius: 999px;
  background: rgba(255,255,255,.06); margin-bottom: 22px;
}
.hero-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 0 4px rgba(74,222,128,.25); }
.hero h1 { font-size: clamp(32px, 5vw, 56px); letter-spacing: -.02em; }
.hero h1 .grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-lead { font-size: 18px; color: rgba(255,255,255,.82); margin: 22px 0 34px; max-width: 520px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-visual { position: relative; display: flex; justify-content: center; align-items: center; min-height: 320px; }
.cube { width: 280px; height: 280px; filter: drop-shadow(0 30px 50px rgba(14,165,233,.4)); animation: float 6s ease-in-out infinite; }
@keyframes float { 0%,100% { transform: translateY(0) } 50% { transform: translateY(-16px) } }
.hero-stats { position: relative; z-index: 2; display: grid; grid-template-columns: repeat(4,1fr); gap: 24px; margin-top: 72px;
  padding-top: 36px; border-top: 1px solid rgba(255,255,255,.14); }
.hero-stats .num { font-size: clamp(26px, 3vw, 38px); font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-stats .lbl { font-size: 14px; color: rgba(255,255,255,.7); margin-top: 4px; }

/* ---------- 卡片网格 ---------- */
.grid { display: grid; gap: 26px; }
.grid-3 { grid-template-columns: repeat(3,1fr); }
.grid-2 { grid-template-columns: repeat(2,1fr); }
.grid-4 { grid-template-columns: repeat(4,1fr); }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 32px; transition: all .3s var(--ease); height: 100%;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: transparent; }
.card-icon {
  width: 54px; height: 54px; border-radius: 14px; background: var(--grad-soft);
  display: flex; align-items: center; justify-content: center; margin-bottom: 20px; color: var(--accent-ink);
}
.card h3 { font-size: 19px; margin-bottom: 10px; }
.card p { color: var(--muted); margin: 0; font-size: 15px; }
.card-tag { display: inline-block; font-size: 12px; color: var(--accent-ink); background: var(--grad-soft); padding: 4px 10px; border-radius: 999px; margin-bottom: 14px; font-weight: 600; }

/* ---------- 产品预览条 ---------- */
.product-strip { display: grid; grid-template-columns: repeat(6,1fr); gap: 16px; }
.product-pill {
  text-align: center; padding: 24px 10px; border-radius: var(--radius-sm); border: 1px solid var(--line);
  background: #fff; transition: all .25s var(--ease);
}
.product-pill:hover { border-color: var(--accent); transform: translateY(-4px); box-shadow: var(--shadow); }
.product-pill .pk { font-weight: 800; font-size: 22px; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.product-pill .pn { font-size: 13px; color: var(--muted); margin-top: 6px; }

/* ---------- 应用领域 ---------- */
.app-list { display: grid; grid-template-columns: repeat(4,1fr); gap: 20px; }
.app-item {
  padding: 28px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 12px; transition: all .25s var(--ease);
}
.app-item:hover { box-shadow: var(--shadow); transform: translateY(-4px); }
.app-item .ai-ico { width: 46px; height: 46px; color: var(--accent-ink); }
.app-item h4 { font-size: 17px; }
.app-item p { color: var(--muted); font-size: 14px; margin: 0; }

/* ---------- 关于/时间线 ---------- */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.about-copy h2 { font-size: clamp(26px,3vw,36px); margin-bottom: 18px; }
.about-copy p { color: var(--ink-soft); }
.about-copy .lead { font-size: 18px; color: var(--ink); }
.kv-list { margin-top: 24px; display: grid; gap: 14px; }
.kv-list li { display: flex; gap: 12px; align-items: flex-start; color: var(--ink-soft); }
.kv-list .tick { color: var(--accent); flex: none; margin-top: 4px; }

.cap-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.cap-card {
  background: #fff; border: 1px solid var(--line); border-radius: 16px;
  padding: 22px 20px; transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.cap-card:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(46,54,120,.10); border-color: var(--accent); }
.cap-ico {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: var(--grad-soft); color: var(--accent-ink); font-size: 22px; margin-bottom: 14px;
}
.cap-card h4 { font-size: 16px; margin: 0 0 8px; }
.cap-card p { color: var(--muted); font-size: 14px; line-height: 1.6; margin: 0; }

/* ---------- 产品详情页 ---------- */
.product-card { display: flex; flex-direction: column; }
.product-card .pc-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.product-card .pc-code {
  width: 56px; height: 56px; flex: none; border-radius: 14px; background: var(--grad);
  color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 18px;
}
.product-card h3 { font-size: 19px; }
.product-card .pc-meta { font-size: 13px; color: var(--muted); }
.product-card ul { margin: 14px 0 0; display: grid; gap: 8px; }
.product-card li { display: flex; gap: 9px; font-size: 14px; color: var(--ink-soft); }
.product-card li svg { color: var(--accent); flex: none; margin-top: 4px; }

.service-row { display: grid; grid-template-columns: repeat(4,1fr); gap: 20px; }
.svc { padding: 30px; border-radius: var(--radius); border: 1px solid var(--line); background: #fff; transition: .25s var(--ease); }
.svc:hover { box-shadow: var(--shadow); border-color: transparent; transform: translateY(-4px); }
.svc .svc-ico { width: 44px; height: 44px; color: var(--accent-ink); margin-bottom: 16px; }
.svc h4 { font-size: 17px; margin-bottom: 8px; }
.svc p { color: var(--muted); font-size: 14px; margin: 0; }

/* ---------- 联系页 ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.contact-info { display: grid; gap: 18px; }
.ci-item { display: flex; gap: 16px; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.ci-ico { width: 46px; height: 46px; flex: none; border-radius: 12px; background: var(--grad-soft); color: var(--accent-ink); display: flex; align-items: center; justify-content: center; }
.ci-item h4 { font-size: 15px; color: var(--muted); font-weight: 600; margin-bottom: 4px; }
.ci-item p, .ci-item a { font-size: 16px; color: var(--ink); margin: 0; font-weight: 600; }
.ci-item a:hover { color: var(--accent-ink); }

.form-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 34px; box-shadow: var(--shadow); }
.form-card h3 { font-size: 22px; margin-bottom: 6px; }
.form-card .form-hint { color: var(--muted); font-size: 14px; margin-bottom: 24px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 13px 15px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  font: inherit; color: var(--ink); background: var(--bg-soft); transition: .2s var(--ease);
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); background: #fff; box-shadow: 0 0 0 4px var(--grad-soft); }
.field textarea { resize: vertical; min-height: 120px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-note { font-size: 13px; color: var(--muted); margin-top: 6px; }
.form-success { display: none; padding: 14px 16px; border-radius: var(--radius-sm); background: #ecfdf5; color: #047857; font-size: 14px; margin-bottom: 16px; border: 1px solid #a7f3d0; }
.form-success.show { display: block; }

.contact-map {
  margin-top: 40px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line);
  background: #fff; padding: 24px;
}
.contact-map h4 { font-size: 17px; margin-bottom: 14px; color: var(--ink); }
.map-info { margin-bottom: 18px; color: var(--muted); font-size: 14px; line-height: 1.8; }
.map-info strong { color: var(--ink); font-weight: 700; }
.map-info .coord { font-size: 12px; color: var(--muted); font-family: monospace; margin-top: 6px; }
.map-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- 页脚 ---------- */
.site-footer { background: var(--bg-deep); color: rgba(255,255,255,.72); padding: 64px 0 28px; margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 40px; }
.site-footer .brand-logo { background: #fff; padding: 7px 10px; border-radius: 10px; box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.site-footer .brand-name { color: #fff; }
.footer-about { margin: 18px 0; font-size: 14px; max-width: 320px; }
.footer-col h4 { color: #fff; font-size: 15px; margin-bottom: 16px; }
.footer-col a { display: block; font-size: 14px; padding: 6px 0; color: rgba(255,255,255,.7); transition: .2s; }
.footer-col a:hover { color: #fff; padding-left: 4px; }
.footer-contact li { display: flex; gap: 10px; font-size: 14px; padding: 6px 0; align-items: flex-start; }
.footer-contact svg { flex: none; color: var(--accent); margin-top: 3px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 44px; padding-top: 22px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: 13px; color: rgba(255,255,255,.5); }

/* ---------- 通用工具 ---------- */
.text-center { text-align: center; }
.mt-40 { margin-top: 40px; }
.fade-up { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.fade-up.in { opacity: 1; transform: none; }
.cta-band {
  background: var(--grad); color: #fff; border-radius: 24px; padding: 56px 48px; text-align: center;
  box-shadow: var(--shadow-lg);
}
.cta-band h2 { font-size: clamp(24px,3vw,34px); color: #fff; }
.cta-band p { color: rgba(255,255,255,.9); margin: 14px auto 28px; max-width: 560px; }
.cta-band .btn-light { background: #fff; }

/* ---------- 响应式 ---------- */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { order: -1; min-height: 240px; }
  .cube { width: 200px; height: 200px; }
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .cap-grid { grid-template-columns: 1fr 1fr; }
  .grid-3, .grid-4 { grid-template-columns: repeat(2,1fr); }
  .app-list, .service-row { grid-template-columns: repeat(2,1fr); }
  .product-strip { grid-template-columns: repeat(3,1fr); }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .section { padding: 60px 0; }
  .cap-grid { grid-template-columns: 1fr; }
  .nav { position: fixed; inset: var(--header-h) 0 auto 0; flex-direction: column; align-items: stretch;
    background: #fff; padding: 16px; gap: 6px; border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow); transform: translateY(-130%); transition: transform .3s var(--ease); z-index: 99; }
  .nav.open { transform: none; }
  .nav-link { padding: 13px 16px; }
  .nav-cta { margin: 6px 0 0; }
  .nav-toggle { display: flex; }
  .nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle.open span:nth-child(2) { opacity: 0; }
  .nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .grid-2, .grid-3, .grid-4, .app-list, .service-row { grid-template-columns: 1fr; }
  .product-strip { grid-template-columns: repeat(2,1fr); }
  .hero-stats { grid-template-columns: repeat(2,1fr); gap: 20px; }
  .field-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .cta-band { padding: 40px 24px; }
}

/* 减少动画偏好 */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto !important; transition: none !important; }
  .fade-up { opacity: 1; transform: none; }
}
