/* ============================================================
   Shengya Electronics — 全站样式表 (site.css)
   设计系统：DESIGN.md | Plus Jakarta Sans | 海军蓝+蓝CTA+浅灰
   ============================================================ */

:root {
  --color-primary: #0F172A;
  --color-on-primary: #FFFFFF;
  --color-secondary: #334155;
  --color-accent: #0369A1;
  --color-accent-hover: #0284C7;
  --color-background: #F8FAFC;
  --color-foreground: #020617;
  --color-muted: #E8ECF1;
  --color-border: #E2E8F0;
  --color-destructive: #DC2626;
  --radius-card: 8px;
  --radius-btn: 6px;
  --shadow-card: 0 1px 3px rgba(2,6,23,.08);
  --shadow-lift: 0 8px 24px rgba(2,6,23,.12);
  --space-page: 24px;
  --space-section: 96px;
  --space-card: 32px;
  --font: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
}

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

html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--color-background);
  color: var(--color-foreground);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-accent); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--color-accent-hover); }
h1, h2, h3, h4 { font-weight: 800; line-height: 1.2; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 4vw, 3.25rem); }
h2 { font-size: clamp(1.5rem, 2.5vw, 2.25rem); }
h3 { font-size: 1.25rem; }
p { max-width: 72ch; }

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

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: .8rem 1.6rem; border-radius: var(--radius-btn);
  font-weight: 700; font-size: 1rem; cursor: pointer; transition: all .2s ease;
  border: none; text-decoration: none; gap: .5rem;
}
.btn-primary { background: var(--color-accent); color: #fff; }
.btn-primary:hover { background: var(--color-accent-hover); color: #fff; transform: translateY(-1px); }
.btn-outline { background: transparent; color: var(--color-on-primary); border: 2px solid rgba(255,255,255,.5); }
.btn-outline:hover { border-color: #fff; color: #fff; }
.btn-dark { background: var(--color-primary); color: #fff; }
.btn-dark:hover { background: var(--color-secondary); color: #fff; }

/* ---------- 页眉 ---------- */
.site-header {
  background: var(--color-primary); color: var(--color-on-primary);
  position: sticky; top: 0; z-index: 50;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.nav-wrap { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.brand { display: flex; align-items: center; gap: .6rem; font-weight: 800; font-size: 1.1rem; color: #fff; }
.brand:hover { color: #fff; }
.brand img { height: 34px; width: auto; }
.main-nav { display: flex; gap: 1.6rem; align-items: center; }
.main-nav a { color: rgba(255,255,255,.85); font-weight: 600; font-size: .95rem; }
.main-nav a:hover { color: #fff; }
.nav-cta { display: flex; align-items: center; gap: 1rem; }
.nav-tel { color: rgba(255,255,255,.7); font-size: .9rem; }
.nav-toggle { display: none; background: none; border: 0; color: #fff; font-size: 1.6rem; cursor: pointer; }

@media (max-width: 900px) {
  .main-nav {
    display: none; position: absolute; top: 76px; left: 0; right: 0;
    background: var(--color-primary); flex-direction: column; gap: 0;
    padding: 1rem 0; border-top: 1px solid rgba(255,255,255,.08);
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: .9rem var(--space-page); width: 100%; border-bottom: 1px solid rgba(255,255,255,.06); }
  .nav-toggle { display: block; }
  .nav-tel { display: none; }
}

/* ---------- Hero ---------- */
.hero {
  background: var(--color-primary); color: #fff;
  padding: var(--space-section) 0 calc(var(--space-section) * .8);
  position: relative; overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(600px 400px at 85% 20%, rgba(3,105,161,.25), transparent 70%);
}
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 3rem; align-items: center; position: relative; z-index: 1; }
.hero h1 { color: #fff; margin-bottom: 1.25rem; }
.hero p { color: rgba(255,255,255,.75); font-size: 1.125rem; margin-bottom: 2rem; }
.hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-top: 3rem; }
.stat { border-left: 2px solid var(--color-accent); padding-left: 1rem; }
.stat b { font-size: 1.75rem; color: #fff; display: block; line-height: 1.2; }
.stat span { color: rgba(255,255,255,.6); font-size: .85rem; }
.hero-fig { text-align: center; }
.hero-fig img { border-radius: var(--radius-card); box-shadow: var(--shadow-lift); }
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- 区块通用 ---------- */
.section { padding: var(--space-section) 0; }
.section-alt { background: #fff; }
.section-dark { background: var(--color-primary); color: #fff; }
.section-blue { background: var(--color-accent); color: #fff; }
.section-head { max-width: 720px; margin-bottom: 3rem; }
.section-head h2 { margin-bottom: .75rem; }
.section-head p { color: var(--color-secondary); }
.section-dark .section-head p, .section-blue .section-head p { color: rgba(255,255,255,.7); }

/* ---------- 卡片网格 ---------- */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-card); }
.card-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.card {
  background: #fff; border: 1px solid var(--color-border);
  border-radius: var(--radius-card); padding: 1.5rem;
  box-shadow: var(--shadow-card); transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
.card h3 { margin-bottom: .5rem; }
.card p { color: var(--color-secondary); font-size: .95rem; }
.card .icon { font-size: 1.75rem; margin-bottom: .75rem; display: block; }
@media (max-width: 900px) { .card-grid, .card-grid.cols-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .card-grid, .card-grid.cols-4 { grid-template-columns: 1fr; } }

/* ---------- 产品网格 ---------- */
.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-card); }
.product-card {
  background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-card);
  overflow: hidden; box-shadow: var(--shadow-card); transition: transform .2s ease, box-shadow .2s ease;
  display: flex; flex-direction: column;
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
.product-card img { width: 100%; aspect-ratio: 768/755; object-fit: cover; background: var(--color-muted); }
.product-card .pc-body { padding: 1.25rem; flex: 1; display: flex; flex-direction: column; }
.product-card h3 { font-size: 1.05rem; margin-bottom: .5rem; }
.product-card .pc-specs { font-size: .85rem; color: var(--color-secondary); margin-bottom: .75rem; line-height: 1.5; }
.product-card .pc-link { margin-top: auto; font-weight: 700; font-size: .9rem; }
@media (max-width: 1024px) { .product-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 768px) { .product-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .product-grid { grid-template-columns: 1fr; } }

/* ---------- 参数表 ---------- */
.spec-table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; background: #fff; }
.spec-table th, .spec-table td { border: 1px solid var(--color-border); padding: .85rem 1.25rem; text-align: left; }
.spec-table th { background: var(--color-primary); color: #fff; font-weight: 700; }
.spec-table tr:nth-child(even) td { background: var(--color-background); }

/* ---------- 应用卡 ---------- */
.app-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.app-card { border: 1px solid rgba(255,255,255,.15); border-radius: var(--radius-card); padding: 1.5rem; transition: background .2s ease; }
.app-card:hover { background: rgba(255,255,255,.06); }
.app-card h3 { color: #fff; margin-bottom: .5rem; }
.app-card p { color: rgba(255,255,255,.7); font-size: .9rem; }
@media (max-width: 900px) { .app-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .app-grid { grid-template-columns: 1fr; } }

/* ---------- 信任区 ---------- */
.trust-list { display: flex; flex-wrap: wrap; gap: 1rem; }
.trust-item {
  background: #fff; border: 1px solid var(--color-border); border-radius: 50px;
  padding: .6rem 1.2rem; font-size: .9rem; font-weight: 600; color: var(--color-primary);
}

/* ---------- CTA 区 ---------- */
.cta-box { text-align: center; }
.cta-box h2 { color: #fff; margin-bottom: 1rem; }
.cta-box p { color: rgba(255,255,255,.85); margin: 0 auto 2rem; }
.cta-box .btn { background: #fff; color: var(--color-accent); }
.cta-box .btn:hover { background: var(--color-muted); }

/* ---------- 页脚 ---------- */
.site-footer { background: var(--color-primary); color: rgba(255,255,255,.75); padding: 4rem 0 2rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2.5rem; }
.footer-grid h4 { color: #fff; margin-bottom: 1rem; font-size: .95rem; }
.footer-grid a { display: block; color: rgba(255,255,255,.65); margin-bottom: .5rem; font-size: .9rem; }
.footer-grid a:hover { color: #fff; }
.footer-addr { font-size: .9rem; line-height: 1.7; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); margin-top: 3rem; padding-top: 1.5rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; font-size: .85rem; }
.lang-links a { margin-right: 1rem; color: rgba(255,255,255,.6); }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- 页面内容 ---------- */
.page-hero {
  background: var(--color-primary); color: #fff; padding: 4.5rem 0 3.5rem;
}
.page-hero h1 { color: #fff; margin-bottom: .5rem; }
.page-hero .breadcrumb { color: rgba(255,255,255,.6); font-size: .9rem; margin-bottom: 1rem; }
.breadcrumb a { color: rgba(255,255,255,.8); }
.breadcrumb a:hover { color: #fff; }
.prose { max-width: 820px; margin: 0 auto; }
.prose h2 { margin: 2.5rem 0 1rem; }
.prose h3 { margin: 2rem 0 .75rem; }
.prose p, .prose li { color: var(--color-secondary); margin-bottom: 1rem; }
.prose ul { padding-left: 1.5rem; margin-bottom: 1.5rem; }
.prose strong { color: var(--color-foreground); }

/* ---------- 表单 ---------- */
.form-card { background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-card); padding: 2rem; box-shadow: var(--shadow-card); max-width: 640px; }
.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; font-weight: 600; margin-bottom: .4rem; font-size: .9rem; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: .75rem 1rem; border: 1px solid var(--color-border);
  border-radius: var(--radius-btn); font-family: var(--font); font-size: 1rem;
  background: var(--color-background); transition: border-color .2s ease;
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
  outline: 2px solid var(--color-accent); border-color: var(--color-accent);
}
.form-note { font-size: .85rem; color: var(--color-secondary); margin-top: .5rem; }
.form-success { background: #ECFDF5; border: 1px solid #6EE7B7; color: #065F46; padding: 1rem 1.25rem; border-radius: var(--radius-btn); margin-bottom: 1rem; display: none; }

/* ---------- 动效 ---------- */
.js .reveal { opacity: 0; transform: translateY(20px); transition: opacity .5s ease, transform .5s ease; }
.js .reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ---------- misc ---------- */
.contact-row { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: start; }
@media (max-width: 768px) { .contact-row { grid-template-columns: 1fr; } }
