/* ============================================================
   DAVIS 戴维斯喷泉官网 — 首页样式
   视觉基调：深海蓝 + 科技浅灰 + 水光白（极简工业科技风）
   布局：上深下浅两段式（导航深色半透 / Hero 深蓝 / 优势白底 / 业务浅灰 / 案例白底）
   ============================================================ */

/* ---------- 设计令牌 ---------- */
:root {
  --navy-950: #06131f;
  --navy-900: #0a1e36;
  --navy-800: #0d2742;
  --navy-700: #123a5f;
  --navy-600: #174f83;
  --navy-500: #1e64a5;
  --aqua: #3fa9d9;
  --water: #f3f8fb;
  --gray-100: #f5f7fa;
  --gray-200: #e6ebf1;
  --gray-400: #8b99ab;
  --gray-600: #4a5a70;
  --ink: #0b1524;
  --white: #ffffff;

  --grad: linear-gradient(135deg, #1e64a5 0%, #3fa9d9 100%);

  --font-sans: "PingFang SC", "Microsoft YaHei", "Noto Sans SC",
    "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 999px;

  --shadow-sm: 0 1px 3px rgba(10, 30, 54, 0.08);
  --shadow-md: 0 10px 28px rgba(10, 30, 54, 0.12);
  --shadow-lg: 0 24px 56px rgba(10, 30, 54, 0.18);

  --nav-h: 72px;
  --container: 1200px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input { font-family: inherit; }
ul { list-style: none; }

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

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 30px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease),
    border-color 0.25s var(--ease), filter 0.25s var(--ease),
    transform 0.25s var(--ease);
}
.btn-primary { background: var(--navy-700); color: var(--white); }
.btn-primary:hover { background: var(--navy-500); }
.btn-light { background: var(--white); color: var(--navy-700); }
.btn-light:hover { background: #e6eef6; }
.btn-outline {
  background: transparent;
  color: var(--navy-700);
  border: 1px solid var(--navy-700);
}
.btn-outline:hover { background: var(--navy-700); color: var(--white); }
.btn-gradient { background: var(--grad); color: var(--white); border-radius: var(--radius-full); }
.btn-gradient:hover { filter: brightness(1.08); }
.btn-block { width: 100%; }

.btn-wx { background: #07C160; color: #fff; }
.btn-wx:hover { background: #06ad56; }

/* ============================================================
   顶部导航（深色半透底，白色文字）
   ============================================================ */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-h);
  color: var(--white);
  background: rgba(6, 19, 31, 0.62);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: background-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.site-nav.scrolled {
  background: rgba(6, 19, 31, 0.92);
  box-shadow: var(--shadow-sm);
}
.nav-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

/* Logo（文字 DAVIS + 副标题） */
.brand { display: flex; align-items: baseline; gap: 10px; line-height: 1; flex-shrink: 0; }
.brand-mark {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: inherit;
}
.brand-sub {
  font-size: 12px;
  letter-spacing: 0.28em;
  color: var(--aqua);
  white-space: nowrap;
}

/* 链接 */
.nav-links { display: flex; align-items: center; gap: 2px; }
.nav-links a {
  position: relative;
  padding: 8px 13px;
  font-size: 15px;
  font-weight: 500;
  color: inherit;
  border-radius: var(--radius-sm);
  transition: color 0.2s var(--ease);
  white-space: nowrap;
}
.nav-links a:hover { color: var(--aqua); }
.nav-links a.active { color: var(--aqua); }

/* 智管平台登录按钮 */
.btn-login {
  min-height: 40px;
  padding: 0 18px;
  margin-left: 12px;
  background: var(--navy-600);
  color: var(--white);
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.btn-login:hover { background: var(--navy-500); border-color: var(--navy-500); }

/* 右侧：语言切换 EN 圆形按钮 + 汉堡 */
.nav-right { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.lang-toggle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.5);
  color: var(--white);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.lang-toggle:hover { background: rgba(255, 255, 255, 0.15); }

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  color: inherit;
}
.hamburger span {
  display: block;
  height: 2px;
  width: 100%;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   Hero 首屏（21:9 夜景喷泉大图背景）
   ============================================================ */
.hero {
  position: relative;
  min-height: max(calc(100vw * 9 / 21 * 0.75), 480px);
  display: flex;
  align-items: center;
  color: var(--white);
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-color: var(--navy-900);
  background-image: url("../images/hero.jpg");
  background-size: cover;
  background-position: center;
  z-index: 0;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    180deg,
    rgba(6, 19, 31, 0.78) 0%,
    rgba(10, 30, 54, 0.5) 45%,
    rgba(6, 19, 31, 0.72) 100%
  );
}
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 820px;
  padding: 160px 0 120px;
  margin-left: -25vw;
}
.hero-title {
  font-size: clamp(1.9rem, 3.4vw, 3rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0.01em;
  margin-bottom: 20px;
  white-space: nowrap;
}
.hero-sub {
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  font-weight: 500;
  color: #cfe4f4;
  margin-bottom: 40px;
  max-width: 640px;
}
.hero-actions { display: flex; gap: 18px; flex-wrap: wrap; }

/* 向下滚动提示（克制） */
.scroll-hint {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  width: 1px;
  height: 56px;
  background: rgba(255, 255, 255, 0.35);
  overflow: hidden;
}
.scroll-hint::after {
  content: "";
  position: absolute;
  top: -40%;
  left: 0;
  width: 100%;
  height: 40%;
  background: var(--white);
  animation: scrollLine 2.2s var(--ease) infinite;
}
@keyframes scrollLine {
  0% { top: -40%; }
  60%, 100% { top: 100%; }
}

/* ============================================================
   通用区块
   ============================================================ */
.section { padding: 96px 0; }
.section-head { margin-bottom: 48px; }
.section-title {
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  font-weight: 800;
  color: var(--navy-900);
  letter-spacing: 0.01em;
}
.section-title::before {
  content: "";
  display: block;
  width: 44px;
  height: 4px;
  border-radius: 2px;
  background: var(--aqua);
  margin-bottom: 16px;
}

/* ---------- 核心优势（白底，4 卡带图标） ---------- */
.advantages { background: var(--white); }
.advantages .section-title { color: var(--navy-900); }
.advantages .section-title::before { background: var(--aqua); }
.cards-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.adv-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease),
    border-color 0.3s var(--ease);
}
.adv-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: #c8dcea;
}
.adv-card img {
  width: 100%;
  height: auto;
  display: block;
}

/* ---------- 核心业务（浅灰底，5 张图片卡片） ---------- */
.services { background: var(--gray-100); }
.services .section-title { color: var(--navy-900); }
.services .section-title::before { background: var(--aqua); }
.service-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
}
.service-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease),
    border-color 0.3s var(--ease);
}
.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: #c8dcea;
}
.service-card img {
  width: 100%;
  aspect-ratio: 21 / 9;
  object-fit: cover;
}
.svc-name {
  display: block;
  padding: 16px 14px;
  text-align: center;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--navy-900);
  letter-spacing: 0.02em;
  transition: color 0.2s var(--ease);
}
.service-card:hover .svc-name { color: var(--aqua); }

/* ---------- 经典案例（左 2 大图 + 右文字说明） ---------- */
.cases { background: var(--white); }
.case-layout {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: 48px;
  align-items: center;
}
.case-images {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.case-big {
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 21 / 9;
  background: var(--gray-100);
}
.case-big img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}
.case-big:hover img { transform: scale(1.05); }
.case-desc { display: flex; flex-direction: column; gap: 28px; }
.case-list li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 4px;
  border-bottom: 1px solid var(--gray-200);
  font-size: 16px;
  color: var(--gray-600);
  transition: color 0.2s var(--ease), padding-left 0.3s var(--ease);
}
.case-list li:hover { color: var(--navy-900); padding-left: 10px; }
.case-list li::before {
  content: "";
  flex-shrink: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--aqua);
}
.case-desc .btn-gradient { align-self: flex-start; }

/* ---------- 品牌结语 ---------- */
.statement { background: var(--water); text-align: center; }
.statement-inner { max-width: 780px; }
.statement-title {
  font-size: clamp(1.8rem, 3.6vw, 2.7rem);
  font-weight: 800;
  color: var(--navy-900);
  line-height: 1.3;
  margin-bottom: 24px;
  text-wrap: balance;
}
.statement-sub { font-size: 16px; color: var(--gray-600); }

/* ============================================================
   页脚
   ============================================================ */
.footer { background: var(--navy-950); color: #b7c6d6; padding: 64px 0 32px; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 48px;
}
.footer .brand-mark { color: var(--white); font-size: 22px; font-weight: 800; letter-spacing: 0.14em; }
.footer-tagline {
  margin-top: 16px;
  font-size: 14px;
  color: #8fa3ba;
  letter-spacing: 0.04em;
}
.footer h4 {
  color: var(--white);
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: 0.06em;
}
.footer-contact p {
  font-size: 14px;
  color: #8fa3ba;
  margin-bottom: 8px;
  display: flex;
  gap: 10px;
}
.footer-contact .k { color: #b7c6d6; flex-shrink: 0; }
.footer-lang { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; }
.lang-switch { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.lang-btn { color: #8fa3ba; font-weight: 600; transition: color 0.2s var(--ease); }
.lang-btn:hover { color: var(--white); }
.lang-btn.active { color: var(--aqua); }
.copyright {
  font-size: 12.5px;
  color: #5f738a;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 20px;
  width: 100%;
}
.footer-bottom {
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
}
.icp {
  font-size: 12.5px;
  color: #5f738a;
  text-decoration: none;
  transition: color 0.2s var(--ease);
}
.icp:hover { color: var(--aqua); }

/* ============================================================
   登录弹窗（居中半透明，背景高斯虚化）
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(8, 20, 34, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s var(--ease), visibility 0.3s var(--ease);
}
.modal-overlay.show { opacity: 1; visibility: visible; }
.modal {
  position: relative;
  width: 100%;
  max-width: 400px;
  background: rgba(18, 38, 64, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  padding: 40px 36px 36px;
  color: var(--white);
  transform: translateY(12px);
  transition: transform 0.3s var(--ease);
}
.modal-overlay.show .modal { transform: translateY(0); }
.modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 36px;
  height: 36px;
  font-size: 22px;
  line-height: 1;
  color: #9fb4cb;
  transition: color 0.2s var(--ease);
}
.modal-close:hover { color: var(--white); }
.modal-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 28px;
  letter-spacing: 0.02em;
  color: var(--white);
}
.login-form label { display: block; margin-bottom: 18px; }
.login-form label > span {
  display: block;
  font-size: 13px;
  color: #9fb4cb;
  margin-bottom: 7px;
}
.login-form input[type="text"],
.login-form input[type="password"] {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  color: var(--white);
  font-size: 15px;
  transition: border-color 0.2s var(--ease);
}
.login-form input::placeholder { color: #64788f; }
.login-form input:focus { outline: none; border-color: var(--aqua); }
.login-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}
.checkbox {
  display: flex !important;
  align-items: center;
  gap: 8px;
  margin: 0 !important;
  cursor: pointer;
}
.checkbox input { width: auto; height: auto; }
.checkbox span { font-size: 13px; color: #9fb4cb; }
.forgot { font-size: 13px; color: var(--aqua); }
.forgot:hover { text-decoration: underline; }
.register-link {
  display: block;
  margin-top: 14px;
  text-align: center;
  font-size: 14px;
  color: var(--aqua);
}
.register-link:hover { text-decoration: underline; }
.form-hint {
  margin-top: 14px;
  font-size: 13px;
  text-align: center;
  color: var(--aqua);
  min-height: 0;
}
.modal .btn-primary { background: var(--navy-600); }
.modal .btn-primary:hover { background: var(--navy-500); }

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 1024px) {
  .hamburger { display: flex; }
  .lang-toggle { display: none; }
  .nav-links {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--navy-950);
    color: var(--white);
    box-shadow: var(--shadow-md);
    padding: 12px 24px 24px;
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.3s var(--ease), opacity 0.3s var(--ease),
      visibility 0.3s var(--ease);
  }
  .nav-links.open { transform: translateY(0); opacity: 1; visibility: visible; }
  .nav-links a { padding: 14px 8px; font-size: 16px; border-bottom: 1px solid rgba(255, 255, 255, 0.12); }
  .btn-login { margin: 16px 0 0; min-height: 48px; width: 100%; }
  .cards-4 { grid-template-columns: repeat(2, 1fr); }
  .service-grid { grid-template-columns: repeat(3, 1fr); }
  .case-layout { grid-template-columns: 1fr; gap: 32px; }
  .hero-content { margin-left: 0; }
}

@media (max-width: 640px) {
  .container { padding: 0 20px; }
  .section { padding: 64px 0; }
  .cards-4 { grid-template-columns: 1fr; }
  .service-grid { grid-template-columns: repeat(2, 1fr); }
  .case-images { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .hero-content { padding: 140px 0 90px; }
  .hero-title { white-space: normal; }
}

/* ---------- 减少动效偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .scroll-hint { display: none; }
}

/* ============ 微信扫码登录弹窗（白色卡片） ============ */
.modal-wx { background: #fff; color: #333; max-width: 440px; padding: 48px 28px 20px; }
.modal-wx .modal-close { color: #9aa5b1; }
.modal-wx .modal-close:hover { color: #333; }
.wx-reg { position: absolute; top: 14px; left: 20px; background: #0d6efd; color: #fff; border: none; border-radius: 14px; padding: 5px 14px; font-size: 13px; cursor: pointer; }
.wx-tabs { display: flex; border-bottom: 2px solid #eef1f5; margin-bottom: 18px; }
.wx-tab { flex: 1; background: none; border: none; padding: 12px 0; font-size: 17px; color: #9aa5b1; cursor: pointer; position: relative; }
.wx-tab.active { color: #0d6efd; font-weight: 700; }
.wx-tab.active::after { content: ''; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; background: #0d6efd; }
.wx-pane { text-align: center; }
.wx-pane.hidden { display: none; }
#wx_qr_container { min-height: 420px; display: flex; align-items: center; justify-content: center; }
#wx_qr_container iframe { width: 300px; height: 400px; }
.wx-status { color: #888; font-size: 13px; margin: 10px 0 14px; }
.wx-lastlogin { display: flex; align-items: center; justify-content: center; gap: 14px; font-size: 14px; color: #555; padding-top: 14px; border-top: 1px solid #f0f2f5; }
.wx-lastlogin label { display: flex; align-items: center; gap: 5px; cursor: pointer; }
.modal-wx .login-form input[type="text"],
.modal-wx .login-form input[type="password"] { width: 100%; height: 46px; padding: 0 14px; border: 1px solid #d5dbe3; background: #fff; color: #333; font-size: 15px; box-sizing: border-box; }
.modal-wx .form-hint { color: #d00; font-size: 14px; margin-top: 8px; min-height: 20px; text-align: left; }
.wx-foot { margin-top: 18px; text-align: center; font-size: 13px; color: #8894a3; }
.wx-foot a { color: #8894a3; text-decoration: none; margin: 0 6px; cursor: pointer; }
.wx-foot a:hover { color: #0d6efd; }
