/* ============================================================
   神开 · 水泽盾 企业官网（资讯版）
   方案：HTML5 + CSS3 媒体查询 + 原生 JavaScript
   写法：移动优先（先写手机样式，再用 min-width 媒体查询逐档增强）
   断点：640px（大屏手机/小平板）、768px（平板）、1024px（电脑）
   ============================================================ */

/* ---------- 1. 设计变量：颜色统一管理，改一处全站生效 ---------- */
:root {
  --paper: #f2f4f5;        /* 浅灰页面底色 */
  --surface: #ffffff;      /* 白色区块底色 */
  --ink: #131519;          /* 主文字色 */
  --muted-ink: #5a6270;    /* 次要文字色 */
  --navy: #0f2f5e;         /* 品牌深蓝 */
  --navy-deep: #0a2144;    /* 更深的蓝（联系/页脚背景） */
  --orange: #fe5000;       /* 品牌橙（按钮、强调） */
  --orange-dark: #d94400;  /* 橙色悬停态 */
  --line: #dde2e6;         /* 分隔线 */
}

/* ---------- 2. 基础重置 ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Noto Sans CJK SC", "Noto Sans SC", sans-serif;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }   /* 图片永不超出容器，响应式关键 */
a { text-decoration: none; color: inherit; }
button { font: inherit; cursor: pointer; background: none; border: none; color: inherit; }

::selection { background: var(--orange); color: #fff; }

section[id] { scroll-margin-top: 76px; }

a:focus-visible, button:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

/* ---------- 3. 通用 ---------- */
.container { max-width: 1280px; margin: 0 auto; padding: 0 20px; }

h1, h2 {
  font-family: "Bahnschrift", "DIN Alternate", -apple-system, "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.num {
  font-variant-numeric: tabular-nums;
  font-family: "Bahnschrift", "DIN Alternate", "Arial Narrow", -apple-system,
    "PingFang SC", "Microsoft YaHei", sans-serif;
}

/* ---------- 4. 按钮 ---------- */
.btn-orange {
  display: inline-block;
  background: var(--orange);
  color: #fff;
  padding: 14px 28px;
  font-size: 15px;
  font-weight: 700;
  transition: background 0.2s;
}
.btn-orange:hover { background: var(--orange-dark); }

.btn-ghost {
  display: inline-block;
  border: 1px solid rgba(255, 255, 255, 0.6);
  color: #fff;
  padding: 14px 28px;
  font-size: 15px;
  font-weight: 700;
  transition: border-color 0.2s, background 0.2s;
}
.btn-ghost:hover { border-color: #fff; background: rgba(255, 255, 255, 0.1); }

/* ---------- 5. 顶部服务条（手机上只保留电话） ---------- */
.topbar { background: var(--paper); border-bottom: 1px solid var(--line); font-size: 13px; }
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 8px;
  padding-bottom: 8px;
}
.topbar-left { color: var(--muted-ink); display: none; }
.topbar-right { display: flex; align-items: center; gap: 20px; }
.topbar-right a { color: var(--muted-ink); transition: color 0.2s; }
.topbar-right a:hover { color: var(--orange); }
.topbar-mail { display: none; }

/* ---------- 6. 头部导航 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 68px;
}

.brand { display: flex; align-items: baseline; gap: 10px; flex-shrink: 0; }
.brand-cn { font-size: 22px; font-weight: 800; letter-spacing: 0.08em; color: var(--navy); }
.brand-en { display: none; font-size: 11px; font-weight: 600; letter-spacing: 0.24em; color: var(--muted-ink); }

/* 品牌右侧竖线标语（手机隐藏，电脑显示） */
.brand-slogan {
  display: none;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  border-left: 1px solid var(--line);
  padding-left: 20px;
  margin-right: auto;
}

.main-nav { display: none; }
.main-nav a {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  padding: 4px 0;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.main-nav a:hover { color: var(--orange); border-bottom-color: var(--orange); }

.nav-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
}
.nav-toggle .icon-close { display: none; }
.nav-toggle.open .icon-menu { display: none; }
.nav-toggle.open .icon-close { display: block; }

.mobile-nav { display: none; border-top: 1px solid var(--line); background: #fff; }
.mobile-nav.open { display: block; }
.mobile-nav a {
  display: block;
  padding: 15px 24px;
  font-size: 16px;
  font-weight: 500;
  border-bottom: 1px solid var(--line);
}
.mobile-nav a.mobile-tel { background: var(--orange); color: #fff; font-weight: 700; border-bottom: none; }

/* ---------- 7. 首屏轮播 ---------- */
.hero { position: relative; overflow: hidden; background: var(--navy-deep); }

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.8s ease;
  pointer-events: none;
}
.hero-slide.is-active { position: relative; opacity: 1; pointer-events: auto; }

.hero-slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-overlay { position: absolute; inset: 0; background: rgba(10, 33, 68, 0.55); }

.hero-content { position: relative; padding: 72px 20px 88px; }
.hero-line {
  font-size: 24px;
  font-weight: 800;
  line-height: 1.5;
  color: #fff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}
.hero-cta { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 14px; }

.hero-dots {
  position: absolute;
  bottom: 20px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 10px;
  z-index: 2;
}
.hero-dot {
  width: 28px;
  height: 4px;
  background: rgba(255, 255, 255, 0.4);
  transition: background 0.3s;
}
.hero-dot.is-active { background: var(--orange); }

/* ---------- 8. 区块通用 ---------- */
.section { padding: 64px 0; }
.section-surface { background: var(--surface); }

/* 带橙色方块的栏目标题（参考站风格） */
.section-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 16px;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 16px;
}
.section-bar h2 { flex: 1 1 100%; font-size: 22px; color: var(--ink); display: flex; align-items: center; gap: 12px; }
.bar-sq { display: inline-block; width: 10px; height: 22px; background: var(--orange); }
.section-more { flex-shrink: 0; font-size: 14px; color: var(--muted-ink); transition: color 0.2s; }
.section-more:hover { color: var(--orange); }

/* ---------- 9. 公司速览 ---------- */
.intro-grid { display: grid; grid-template-columns: 1fr; gap: 36px; }
.intro-main h2 { font-size: 26px; color: var(--ink); margin-bottom: 20px; }
.intro-main p { font-size: 15px; line-height: 1.9; color: var(--muted-ink); }
.intro-main .intro-sub { margin-top: 14px; }

.intro-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
  align-self: start;
}
.stat { border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); padding: 20px 18px; }
.stat-value { font-size: 24px; font-weight: 700; color: var(--navy); }
.stat-label { margin-top: 4px; font-size: 12px; color: var(--muted-ink); }

/* ---------- 10. 产品中心 ---------- */
.product-grid { display: grid; grid-template-columns: 1fr; gap: 24px; }
.product-card {
  background: #fff;
  border: 1px solid var(--line);
  overflow: hidden;
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}
.product-card:hover { box-shadow: 0 12px 32px rgba(15, 47, 94, 0.12); transform: translateY(-4px); }
.product-img { aspect-ratio: 4 / 3; overflow: hidden; }
.product-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease-out; }
.product-card:hover .product-img img { transform: scale(1.04); }
.product-body { padding: 20px; }
.product-body h3 { font-size: 17px; font-weight: 700; color: var(--ink); }
.product-code { margin-top: 6px; font-size: 13px; color: var(--muted-ink); }
.product-link {
  display: inline-block;
  margin-top: 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  transition: color 0.2s;
}
.product-link span { display: inline-block; transition: transform 0.2s; }
.product-link:hover { color: var(--orange); }
.product-link:hover span { transform: translateX(4px); }

/* ---------- 11. 施工团队 + 关于我们 ---------- */
.team-grid { display: grid; grid-template-columns: 1fr; gap: 40px; }
.team-main h2 { font-size: 26px; color: var(--ink); }
.team-slogan { margin-top: 8px; font-size: 18px; font-weight: 700; color: var(--navy); }
.team-desc { margin-top: 16px; font-size: 15px; line-height: 1.9; color: var(--muted-ink); }
.team-img { margin-top: 24px; border: 1px solid var(--line); }
.team-img img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }

.about-side { border-top: 2px solid var(--navy); padding-top: 24px; }
.about-text { font-size: 15px; line-height: 1.9; color: var(--muted-ink); }
.about-link {
  display: inline-block;
  margin-top: 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  transition: color 0.2s;
}
.about-link span { display: inline-block; transition: transform 0.2s; }
.about-link:hover { color: var(--orange); }
.about-link:hover span { transform: translateX(4px); }
.about-img { margin-top: 20px; border: 1px solid var(--line); }
.about-img img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }

/* ---------- 12. 客户案例 ---------- */
.case-grid { display: grid; grid-template-columns: 1fr; gap: 24px; }
.case-card { background: #fff; border: 1px solid var(--line); overflow: hidden; }
.case-img { aspect-ratio: 16 / 10; overflow: hidden; }
.case-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease-out; }
.case-card:hover .case-img img { transform: scale(1.04); }
.case-body { position: relative; padding: 20px 20px 24px; }
.case-body h3 { font-size: 17px; font-weight: 700; color: var(--navy); }
.case-body p { margin-top: 10px; font-size: 14px; line-height: 1.8; color: var(--muted-ink); }
.case-arrow {
  position: absolute;
  right: 20px;
  bottom: 20px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted-ink);
  transition: all 0.2s;
}
.case-card:hover .case-arrow { background: var(--orange); border-color: var(--orange); color: #fff; }

/* ---------- 13. 新闻资讯 ---------- */
.news-grid { display: grid; grid-template-columns: 1fr; gap: 24px; }
.news-card { background: #fff; border: 1px solid var(--line); overflow: hidden; }
.news-img { aspect-ratio: 16 / 9; overflow: hidden; }
.news-img img { width: 100%; height: 100%; object-fit: cover; }
.news-body { padding: 20px; }
.news-body h3 { font-size: 17px; font-weight: 700; color: var(--ink); }
.news-body p {
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--muted-ink);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.news-body time { display: block; margin-top: 14px; font-size: 13px; color: var(--muted-ink); }

/* ---------- 14. 联系我们 ---------- */
.section-contact { background: var(--navy-deep); color: #fff; }
.eyebrow { font-size: 14px; font-weight: 700; letter-spacing: 0.28em; color: var(--orange); margin-bottom: 12px; }
.section-contact h2 { font-size: 28px; color: #fff; }
.contact-desc { margin-top: 16px; max-width: 640px; font-size: 15px; line-height: 1.9; color: rgba(255, 255, 255, 0.75); }

.contact-hotline { margin-top: 36px; border-left: 4px solid var(--orange); padding-left: 24px; }
.contact-hotline p { font-size: 14px; color: rgba(255, 255, 255, 0.7); }
.contact-hotline a {
  display: block;
  margin-top: 8px;
  font-size: 34px;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: #fff;
  transition: color 0.2s;
}
.contact-hotline a:hover { color: var(--orange); }

.contact-rows { margin-top: 32px; max-width: 720px; }
.contact-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding: 16px 0;
}
.contact-row-last { border-bottom: 1px solid rgba(255, 255, 255, 0.2); }
.contact-row dt { font-size: 14px; color: rgba(255, 255, 255, 0.7); }
.contact-row dd a { font-size: 18px; font-weight: 700; color: #fff; text-underline-offset: 4px; }
.contact-row dd a:hover { text-decoration: underline; }
.contact-row .addr { font-size: 16px; font-weight: 600; }

/* ---------- 15. 页脚 ---------- */
.site-footer { background: var(--navy-deep); border-top: 1px solid rgba(255, 255, 255, 0.15); padding-top: 48px; color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 32px; }
.footer-col h3 { font-size: 16px; font-weight: 700; margin-bottom: 16px; color: #fff; }
.footer-col p, .footer-col a {
  display: block;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 8px;
  transition: color 0.2s;
}
.footer-col a:hover { color: #fff; }

/* 微信二维码占位框：替换 images/wechat-qr.jpg 后删除此框改用 <img> */
.qr-box {
  width: 140px;
  height: 140px;
  border: 1px dashed rgba(255, 255, 255, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.6;
}
.qr-box span { font-size: 11px; }

.footer-bottom {
  margin-top: 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: 20px;
  padding-bottom: 32px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
}

/* ---------- 16. 滚动渐现动画 ---------- */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.65s ease-out, transform 0.65s cubic-bezier(0.25, 0.1, 0.25, 1);
  transition-delay: calc(var(--stagger, 0) * 90ms);
}
.js [data-reveal].is-visible { opacity: 1; transform: translateY(0); }

/* ============================================================
   媒体查询：屏幕变宽时逐档增强（移动优先）
   ============================================================ */

/* ===== ≥640px：大屏手机 / 小平板 ===== */
@media (min-width: 640px) {
  .brand-en { display: inline; }
  .topbar-left { display: block; }
  .topbar-mail { display: inline; }

  .hero-content { padding: 96px 20px 104px; }
  .hero-line { font-size: 30px; }

  .section { padding: 80px 0; }
  .section-bar { flex-wrap: nowrap; gap: 16px; }
  .section-bar h2 { flex: 0 1 auto; font-size: 26px; }
  .intro-main h2, .team-main h2 { font-size: 30px; }

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

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

  .contact-hotline a { font-size: 44px; }
  .contact-row { flex-direction: row; align-items: baseline; justify-content: space-between; }

  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-bottom { flex-direction: row; justify-content: space-between; }
}

/* ===== ≥768px：平板 ===== */
@media (min-width: 768px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); }
  .news-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ===== ≥1024px：电脑 ===== */
@media (min-width: 1024px) {
  .container { padding: 0 32px; }

  .brand-slogan { display: block; }
  .main-nav { display: flex; align-items: center; gap: 26px; }
  .nav-toggle { display: none; }
  .mobile-nav { display: none !important; }

  .hero-content { padding: 120px 32px 128px; }
  .hero-line { font-size: 40px; }

  /* 公司速览：左文右数据 */
  .intro-grid { grid-template-columns: 7fr 5fr; gap: 56px; }
  .intro-stats { grid-template-columns: repeat(2, 1fr); }

  /* 施工团队左右分栏 */
  .team-grid { grid-template-columns: 1fr 1fr; gap: 56px; }
  .about-side { border-top: none; padding-top: 0; }

  .case-grid { grid-template-columns: repeat(3, 1fr); }

  .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px; }
}

/* ============================================================
   无障碍：用户系统开启"减弱动态效果"时，关闭动画
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js [data-reveal] { opacity: 1; transform: none; transition: none; }
  .hero-slide { transition: none; }
  .product-img img, .case-img img { transition: none; }
}
