/* 域优数官网主样式 - 色板：深蓝 #0f172a / 科技蓝 #1e3a8a / 亮蓝 #38bdf8 */
:root {
  --c-dark: #0f172a;
  --c-primary: #1e3a8a;
  --c-accent: #38bdf8;
  --c-text: #1e293b;
  --c-text-light: #64748b;
  --c-bg: #ffffff;
  --c-bg-soft: #f1f5f9;
  --c-border: #e2e8f0;
  --radius: 10px;
  --shadow: 0 6px 24px rgba(15, 23, 42, 0.08);
  --shadow-hover: 0 12px 36px rgba(30, 58, 138, 0.18);
  --container: 1200px;
  --header-h: 64px;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--c-text);
  background: var(--c-bg);
  line-height: 1.7;
  font-size: 15px;
  /* 锚点跳转留出顶栏高度 */
  scroll-padding-top: calc(var(--header-h) + 16px);
}

a { color: var(--c-primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--c-accent); }

img { max-width: 100%; display: block; }

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

/* 通用按钮 */
.btn {
  display: inline-block;
  padding: 10px 24px;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform .15s, box-shadow .2s, background .2s;
  text-align: center;
  line-height: 1.4;
}
.btn-primary {
  background: var(--c-primary);
  color: #fff;
  box-shadow: 0 4px 14px rgba(30, 58, 138, 0.25);
}
.btn-primary:hover {
  background: #1d4ed8;
  color: #fff;
  transform: translateY(-1px);
}
.btn-ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.5);
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}
.btn-block { width: 100%; display: block; }

/* 顶部导航 */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--c-border);
  z-index: 1000;
  transition: box-shadow .25s;
}
.header.scrolled { box-shadow: var(--shadow); }

.nav-wrap {
  display: flex;
  align-items: center;
  height: 100%;
  gap: 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--c-primary);
  font-weight: 700;
  font-size: 18px;
}
.logo:hover { color: var(--c-primary); }
.logo-icon {
  flex-shrink: 0;
  height: 28px;           /* 导航栏：28x28 方形 icon */
  width: auto;
  object-fit: contain;
  display: block;
}
.logo-footer .logo-icon {
  height: 34px;           /* 页脚：横向图标高度稍大 */
  aspect-ratio: 4 / 3;
}
@media (max-width: 768px) {
  .logo-icon { height: 24px; }
  .logo-footer .logo-icon { height: 28px; }
}
}

.nav { margin-left: auto; }
.nav-list {
  list-style: none;
  display: flex;
  gap: 28px;
}
.nav-link {
  color: var(--c-text);
  font-size: 15px;
  padding: 6px 2px;
  position: relative;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 2px;
  background: var(--c-accent);
  transition: width .25s;
}
.nav-link:hover::after,
.nav-link.active::after { width: 100%; }
.nav-link.active { color: var(--c-primary); }

.nav-cta { padding: 8px 20px; }

/* 移动端汉堡按钮，默认隐藏 */
.menu-toggle {
  display: none;
  width: 40px; height: 40px;
  background: transparent;
  border: none;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
}
.menu-toggle span {
  width: 22px; height: 2px;
  background: var(--c-text);
  transition: transform .25s, opacity .2s;
}
.menu-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.open span:nth-child(2) { opacity: 0; }
.menu-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Hero 首屏 */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  color: #fff;
  overflow: hidden;
  margin-top: 0;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-shapes { width: 100%; height: 100%; }

/* 光点微动效 */
.dot { transform-origin: center; }
.dot1 { animation: floaty 4s ease-in-out infinite; }
.dot2 { animation: floaty 5.5s ease-in-out infinite .8s; }
.dot3 { animation: floaty 4.8s ease-in-out infinite 1.4s; }
@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

.hero-content {
  position: relative;
  z-index: 1;
  padding-top: var(--header-h);
}
.hero-title {
  font-size: clamp(28px, 5vw, 52px);
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 16px;
  /* 标题渐变文字 */
  background: linear-gradient(90deg, #fff, #bae6fd);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-sub {
  font-size: clamp(15px, 2.2vw, 20px);
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 32px;
  max-width: 640px;
}
.hero-btns { display: flex; gap: 16px; flex-wrap: wrap; }
.hero-tags {
  margin-top: 28px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
  letter-spacing: 0.5px;
}

/* 通用 section */
.section {
  padding: 80px 0;
}
.section-title {
  font-size: 30px;
  font-weight: 700;
  color: var(--c-primary);
  text-align: center;
  margin-bottom: 6px;
}
.section-sub {
  text-align: center;
  color: var(--c-text-light);
  font-size: 14px;
  letter-spacing: 1px;
  margin-bottom: 48px;
  text-transform: uppercase;
}

/* 关于我们 */
.about { background: var(--c-bg-soft); }
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}
.about-intro p {
  font-size: 16px;
  color: var(--c-text);
  line-height: 1.9;
}
.adv-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.adv-item {
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 22px 18px;
  transition: transform .2s, box-shadow .2s;
}
.adv-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}
.adv-icon { width: 32px; height: 32px; margin-bottom: 10px; }
.adv-item h3 { font-size: 17px; color: var(--c-primary); margin-bottom: 6px; }
.adv-item p { font-size: 13px; color: var(--c-text-light); line-height: 1.6; }

/* FAQ 区块 */
.faq {
  margin-top: 56px;
  max-width: 820px;
  margin-left: auto;
  margin-right: auto;
}
.faq-title {
  text-align: center;
  font-size: 20px;
  color: var(--c-primary);
  margin-bottom: 24px;
}
.faq-item {
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  margin-bottom: 12px;
  padding: 0 20px;
  overflow: hidden;
}
.faq-item summary {
  padding: 16px 0;
  cursor: pointer;
  font-weight: 500;
  list-style: none;
  position: relative;
  padding-right: 24px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 20px;
  color: var(--c-accent);
  transition: transform .2s;
}
.faq-item[open] summary::after { content: "−"; }
.faq-item p {
  padding: 0 0 16px;
  color: var(--c-text-light);
  font-size: 14px;
}

/* 案例展示 */
.case-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.case-loading { text-align: center; color: var(--c-text-light); grid-column: 1 / -1; }

.case-card {
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: transform .25s, box-shadow .25s;
  display: flex;
  flex-direction: column;
}
.case-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}
.case-cover {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--c-bg-soft);
  overflow: hidden;
}
.case-cover img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s;
}
.case-card:hover .case-cover img { transform: scale(1.04); }
/* 播放角标 */
.case-play {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 52px; height: 52px;
  border-radius: 50%;
  background: rgba(30, 58, 138, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: background .2s, transform .2s;
}
.case-card:hover .case-play {
  background: var(--c-accent);
  transform: translate(-50%, -50%) scale(1.08);
}
.case-play svg { width: 20px; height: 20px; margin-left: 2px; }

.case-body { padding: 16px 18px 20px; }
.case-title {
  font-size: 17px;
  color: var(--c-text);
  margin-bottom: 6px;
  font-weight: 600;
}
.case-desc {
  font-size: 13px;
  color: var(--c-text-light);
  line-height: 1.6;
  /* 单行省略 */
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 联系方式 */
.contact { background: var(--c-bg-soft); }
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
}
.contact-list {
  list-style: none;
  margin-top: 24px;
}
.contact-list li {
  padding: 10px 0;
  border-bottom: 1px dashed var(--c-border);
  font-size: 15px;
}
.ci-label { color: var(--c-text-light); margin-right: 6px; }

.wechat-qr {
  margin-top: 32px;
  text-align: center;
}
.wechat-qr img {
  width: 160px; height: 160px;
  margin: 0 auto 10px;
  border: 1px solid var(--c-border);
  border-radius: 8px;
  background: #fff;
}
.wechat-qr p { font-size: 13px; color: var(--c-text-light); }

/* 表单 */
.contact-form {
  background: #fff;
  padding: 28px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.contact-form h3 {
  font-size: 18px;
  color: var(--c-primary);
  margin-bottom: 18px;
}
.form-row { margin-bottom: 16px; }
.form-row label {
  display: block;
  font-size: 13px;
  color: var(--c-text-light);
  margin-bottom: 6px;
}
.form-row input,
.form-row textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--c-border);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  transition: border-color .2s, box-shadow .2s;
}
.form-row input:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--c-accent);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15);
}
.form-row textarea { resize: vertical; }
.form-tip {
  margin-top: 12px;
  font-size: 12px;
  color: var(--c-text-light);
  text-align: center;
}

/* 案例详情弹窗 */
.modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal.open { display: flex; }
.modal-mask {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.7);
  animation: fade .2s ease;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.modal-box {
  position: relative;
  background: #fff;
  border-radius: 12px;
  max-width: 880px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px;
  animation: pop .25s ease;
}
@keyframes pop {
  from { transform: translateY(20px) scale(0.98); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}
.modal-close {
  position: absolute;
  top: 12px; right: 14px;
  width: 36px; height: 36px;
  border: none;
  background: transparent;
  font-size: 28px;
  line-height: 1;
  color: var(--c-text-light);
  cursor: pointer;
  z-index: 2;
}
.modal-close:hover { color: var(--c-primary); }
.modal-video-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 18px;
}
.modal-video-wrap video {
  width: 100%; height: 100%; display: block;
  /* 竖版视频在横版容器里保持原比例，不变形 */
  object-fit: contain;
  background: #000;
}
.modal-title { font-size: 20px; color: var(--c-primary); margin-bottom: 10px; }
.modal-meta {
  font-size: 13px;
  color: var(--c-text-light);
  margin-bottom: 12px;
}
.modal-meta span { margin-right: 14px; }
.modal-desc {
  font-size: 14px;
  color: var(--c-text);
  line-height: 1.8;
}

/* 页脚 */
.footer {
  background: var(--c-dark);
  color: rgba(255, 255, 255, 0.7);
  padding: 56px 0 0;
}
.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1.5fr;
  gap: 40px;
  padding-bottom: 40px;
}
.logo-footer { color: #fff; margin-bottom: 12px; }
.logo-footer:hover { color: #fff; }
.footer-desc { font-size: 13px; line-height: 1.8; }
.footer-col h4 {
  color: #fff;
  font-size: 15px;
  margin-bottom: 14px;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 8px; font-size: 13px; }
.footer-col a { color: rgba(255, 255, 255, 0.7); }
.footer-col a:hover { color: var(--c-accent); }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 18px 20px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
  max-width: var(--container);
  margin: 0 auto;
}
.footer-bottom a { color: rgba(255, 255, 255, 0.7); }

/* 返回顶部 */
.back-top {
  position: fixed;
  right: 24px; bottom: 24px;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--c-primary);
  color: #fff;
  border: none;
  font-size: 20px;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s, transform .25s, background .2s;
  z-index: 900;
  box-shadow: var(--shadow);
}
.back-top.show { opacity: 1; visibility: visible; }
.back-top:hover { background: #1d4ed8; transform: translateY(-2px); }

/* 更多案例按钮 */
.cases-footer {
  display: flex;
  justify-content: center;
  margin-top: 48px;
  padding-top: 8px;
}
.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border: 1.5px solid var(--c-primary);
  border-radius: 8px;
  background: transparent;
  color: var(--c-primary);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s ease;
}
.btn-outline:hover {
  background: var(--c-primary);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(37, 99, 235, .25);
}
.cases-more-arrow {
  transition: transform .2s ease;
}
.btn-outline:hover .cases-more-arrow { transform: translateX(4px); }

/* 视频弹窗控制行 */
.modal-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.modal-ctrl-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #fff;
  color: #475569;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all .18s ease;
}
.modal-ctrl-btn:hover {
  border-color: var(--c-primary);
  color: var(--c-primary);
  background: #eff6ff;
}
.modal-ctrl-btn.off {
  opacity: .55;
  text-decoration: line-through;
}
.modal-ctrl-btn.ghost {
  border-color: transparent;
  background: transparent;
  color: #64748b;
}
.modal-ctrl-btn.ghost:hover {
  background: #f1f5f9;
  color: var(--c-primary);
  border-color: transparent;
}

/* 全部案例清单弹窗 */
.modal-box-wide {
  max-width: 1100px;
  max-height: 85vh;
  overflow-y: auto;
}
.modal-sub {
  font-size: 14px;
  color: #64748b;
  margin: -6px 0 24px;
}
.modal-list .case-card {
  cursor: pointer;
}
.cases-list-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.cases-list-grid .case-card-list {
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  background: #fff;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.cases-list-grid .case-card-list:hover {
  transform: translateY(-3px);
  border-color: var(--c-primary);
  box-shadow: 0 12px 28px rgba(37, 99, 235, .15);
}
.cases-list-grid .case-cover {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #f1f5f9;
}
.cases-list-grid .case-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.cases-list-grid .case-card-list:hover .case-cover img { transform: scale(1.04); }
.cases-list-grid .case-body {
  padding: 14px 16px 16px;
}
.cases-list-grid .case-title {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 6px;
  line-height: 1.35;
}
.cases-list-grid .case-desc {
  font-size: 13px;
  color: #64748b;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width: 768px) {
  .cases-list-grid { grid-template-columns: 1fr; }
  .cases-footer { margin-top: 32px; }
  .modal-box-wide { max-width: 95vw; max-height: 90vh; }
}
