/* ============================================================
   天津海蝶信息技术有限公司 - 全站样式
   品牌色：navy #0B2E4F / teal #0E6B5C（取自 haidie-service 品牌资产）
   无外部依赖，纯 CSS，响应式断点 992 / 768 / 576
   ============================================================ */

:root {
  --navy: #0B2E4F;
  --navy-deep: #071E36;
  --navy-soft: #14406B;
  --teal: #0E6B5C;
  --teal-bright: #16A085;
  --teal-light: #E3F2EF;
  --ink: #1C2B3A;
  --body: #46586B;
  --muted: #7A8A9A;
  --line: #E4EAF1;
  --bg: #F6F9FC;
  --white: #FFFFFF;
  --panel: #FFFFFF;
  --header-bg: rgba(255,255,255,.97);
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 6px 24px rgba(11, 46, 79, 0.08);
  --shadow-hover: 0 12px 32px rgba(11, 46, 79, 0.14);
  --font: "PingFang SC", "Microsoft YaHei", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --nav-h: 68px;
}

/* ---------- 夜间模式变量（07:00-19:00 日间 / 19:00-次日07:00 夜间，可手动覆盖） ---------- */
[data-theme="dark"] {
  --ink: #E6EDF5;
  --body: #AFBDCC;
  --muted: #8695A6;
  --line: #24313F;
  --bg: #101923;
  --white: #0B1219;
  --panel: #141E29;
  --header-bg: rgba(11,18,25,.97);
  --teal-light: #11302A;
  --shadow: 0 6px 24px rgba(0, 0, 0, .4);
  --shadow-hover: 0 12px 32px rgba(0, 0, 0, .55);
}
/* 夜间模式下依赖品牌深蓝的文字/图形提亮 */
[data-theme="dark"] .nav-links a:hover { color: var(--ink); }
[data-theme="dark"] .nav-links a.active { background: var(--teal); }
[data-theme="dark"] .nav-toggle span { background: var(--ink); }
[data-theme="dark"] .btn-outline { color: #9CC3EA; border-color: #33506E; }
[data-theme="dark"] .btn-outline:hover { background: var(--navy-soft); color: #fff; }
[data-theme="dark"] .stat-num { color: #6EB4E6; }
[data-theme="dark"] .product-tagline { color: #8FBBE4; }
[data-theme="dark"] .product-aside h4 { color: #8FBBE4; }
[data-theme="dark"] .tech-tags span { color: #A9C8E8; background: var(--panel); }
[data-theme="dark"] .qual-item strong { color: #8FBBE4; }
[data-theme="dark"] .error-page .code { color: #6EB4E6; }

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--body);
  background: var(--white);
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

h1, h2, h3, h4 { color: var(--ink); line-height: 1.35; font-weight: 700; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-block;
  padding: 12px 30px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all .25s ease;
  text-align: center;
}
.btn-primary { background: var(--teal); color: #fff; }
.btn-primary:hover { background: var(--teal-bright); transform: translateY(-2px); box-shadow: 0 8px 20px rgba(14, 107, 92, .3); }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.55); }
.btn-ghost:hover { background: rgba(255,255,255,.12); border-color: #fff; }
.btn-outline { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-outline:hover { background: var(--navy); color: #fff; }
.btn-sm { padding: 9px 22px; font-size: 14px; }

/* ---------- 顶部导航 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--header-bg);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
}
.nav-inner {
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand img.logo { height: 34px; width: auto; }
.brand .brand-sub { font-size: 12px; color: var(--muted); letter-spacing: .12em; }

.nav-links { display: flex; gap: 6px; align-items: center; }
.nav-links a {
  padding: 8px 16px; font-size: 15px; color: var(--body);
  border-radius: 999px; transition: all .2s;
}
.nav-links a:hover { color: var(--navy); background: var(--bg); }
.nav-links a.active { color: #fff; background: var(--navy); }
.nav-cta { margin-left: 10px; }

/* 日夜间切换按钮 */
.theme-toggle {
  width: 36px; height: 36px; margin-left: 8px; align-self: center;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--panel); border: 1px solid var(--line); border-radius: 50%;
  color: var(--ink); font-size: 15px; line-height: 1; cursor: pointer;
  transition: border-color .2s, color .2s, transform .2s;
}
.theme-toggle:hover { border-color: var(--teal); color: var(--teal); transform: rotate(20deg); }

.nav-toggle {
  display: none; background: none; border: 0; cursor: pointer;
  width: 40px; height: 40px; position: relative;
}
.nav-toggle span {
  position: absolute; left: 8px; right: 8px; height: 2px;
  background: var(--navy); transition: all .25s; border-radius: 2px;
}
.nav-toggle span:nth-child(1) { top: 12px; }
.nav-toggle span:nth-child(2) { top: 19px; }
.nav-toggle span:nth-child(3) { top: 26px; }
.nav-toggle.open span:nth-child(1) { top: 19px; transform: rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { top: 19px; transform: rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(135deg, var(--navy-deep) 0%, var(--navy) 55%, var(--navy-soft) 100%);
  color: #fff; position: relative; overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; right: -120px; top: -120px;
  width: 420px; height: 420px; border-radius: 50%;
  background: radial-gradient(circle, rgba(22,160,133,.28), transparent 70%);
}
.hero-inner { padding: 96px 0 88px; position: relative; z-index: 1; max-width: 780px; }
.hero .eyebrow {
  display: inline-block; font-size: 13px; letter-spacing: .22em;
  color: #7FD8C9; border: 1px solid rgba(127,216,201,.45);
  padding: 5px 16px; border-radius: 999px; margin-bottom: 22px;
}
.hero h1 { color: #fff; font-size: 44px; margin-bottom: 18px; font-weight: 800; }
.hero h1 em { font-style: normal; color: #5ADBC6; }
.hero p.lead { font-size: 18px; color: rgba(255,255,255,.82); margin-bottom: 34px; max-width: 640px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* 页面内页头 */
.page-hero {
  background: linear-gradient(135deg, var(--navy-deep), var(--navy));
  color: #fff; padding: 64px 0;
}
.page-hero h1 { color: #fff; font-size: 34px; margin-bottom: 10px; }
.page-hero p { color: rgba(255,255,255,.78); max-width: 720px; font-size: 16px; }
.breadcrumb { font-size: 13px; color: rgba(255,255,255,.6); margin-bottom: 14px; }
.breadcrumb a { color: #7FD8C9; }

/* ---------- 数据带 ---------- */
.stats-band { background: var(--white); border-bottom: 1px solid var(--line); }
.stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 20px; padding: 40px 0; text-align: center;
}
.stat-num { font-size: 40px; font-weight: 800; color: var(--navy); line-height: 1.1; }
.stat-num small { font-size: 20px; color: var(--teal); margin-left: 2px; }
.stat-label { font-size: 14px; color: var(--muted); margin-top: 6px; }

/* ---------- 区块 ---------- */
.section { padding: 76px 0; }
.section.alt { background: var(--bg); }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 46px; }
.section-head .kicker {
  font-size: 13px; letter-spacing: .2em; color: var(--teal);
  font-weight: 700; text-transform: uppercase;
}
.section-head h2 { font-size: 32px; margin: 10px 0 12px; }
.section-head p { color: var(--muted); font-size: 16px; }

/* ---------- 卡片网格 ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 26px; }

.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px 28px; transition: all .25s ease; position: relative;
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); border-color: transparent; }
.card .card-icon {
  width: 52px; height: 52px; border-radius: 14px;
  background: var(--teal-light); color: var(--teal);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; margin-bottom: 18px;
}
.card h3 { font-size: 19px; margin-bottom: 10px; }
.card p { font-size: 15px; color: var(--body); flex: 1; }
.card .card-link {
  margin-top: 18px; color: var(--teal); font-weight: 600; font-size: 14px;
}
.card .card-link::after { content: " →"; transition: .2s; }
.card:hover .card-link::after { content: " →→"; }

/* 产品卡（首页） */
.product-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: all .25s; display: flex; flex-direction: column;
}
.product-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); }
.product-card .pc-head {
  background: linear-gradient(135deg, var(--navy), var(--navy-soft));
  color: #fff; padding: 24px 26px;
}
.product-card .pc-head .tag {
  font-size: 12px; background: rgba(22,160,133,.9); padding: 3px 12px;
  border-radius: 999px; display: inline-block; margin-bottom: 10px;
}
.product-card .pc-head h3 { color: #fff; font-size: 21px; }
.product-card .pc-body { padding: 24px 26px; flex: 1; display: flex; flex-direction: column; }
.product-card .pc-body p { font-size: 15px; }
.product-card ul.feature-mini { margin: 14px 0 20px; }
.product-card ul.feature-mini li {
  font-size: 14px; padding-left: 20px; position: relative; margin-bottom: 7px; color: var(--body);
}
.product-card ul.feature-mini li::before {
  content: ""; position: absolute; left: 0; top: 9px;
  width: 8px; height: 8px; border-radius: 50%; background: var(--teal);
}
.product-card .btn { margin-top: auto; }

/* ---------- 流程条 ---------- */
.flow { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; counter-reset: step; }
.flow-item {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 18px; text-align: center; position: relative;
}
.flow-item::before {
  counter-increment: step; content: "0" counter(step);
  display: block; font-size: 30px; font-weight: 800; color: var(--teal-light);
  -webkit-text-stroke: 1px var(--teal); margin-bottom: 10px;
}
.flow-item h4 { font-size: 16px; margin-bottom: 6px; }
.flow-item p { font-size: 13px; color: var(--muted); }

/* ---------- 产品详情区 ---------- */
.product-block { padding: 70px 0; border-bottom: 1px solid var(--line); scroll-margin-top: calc(var(--nav-h) + 10px); }
.product-block:last-of-type { border-bottom: 0; }
.product-layout { display: grid; grid-template-columns: 1.15fr .85fr; gap: 46px; align-items: start; }
.product-no {
  font-size: 13px; letter-spacing: .2em; color: var(--teal); font-weight: 700;
}
.product-block h2 { font-size: 30px; margin: 8px 0 6px; }
.product-tagline { font-size: 17px; color: var(--navy-soft); font-weight: 600; margin-bottom: 16px; }
.product-block .desc { margin-bottom: 22px; }
.feature-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 22px; margin-bottom: 24px; }
.feature-list li {
  font-size: 15px; padding-left: 26px; position: relative; color: var(--body);
}
.feature-list li::before {
  content: "✓"; position: absolute; left: 0; top: 0;
  color: var(--teal); font-weight: 700;
}
.tech-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }
.tech-tags span {
  font-size: 12.5px; background: var(--bg); border: 1px solid var(--line);
  color: var(--navy-soft); padding: 4px 13px; border-radius: 999px;
}
.product-aside {
  background: var(--bg); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 28px;
}
.product-aside h4 { font-size: 15px; margin-bottom: 14px; color: var(--navy); }
.product-aside dl { display: grid; gap: 14px; }
.product-aside dt { font-size: 13px; color: var(--muted); }
.product-aside dd { font-size: 15px; color: var(--ink); font-weight: 600; }

/* ---------- 案例 ---------- */
.industry-block { padding: 56px 0; border-bottom: 1px solid var(--line); scroll-margin-top: calc(var(--nav-h) + 10px); }
.industry-block:last-of-type { border-bottom: 0; }
.industry-head { display: flex; align-items: center; gap: 16px; margin-bottom: 30px; }
.industry-head .i-icon {
  width: 54px; height: 54px; border-radius: 14px; flex-shrink: 0;
  background: var(--navy); color: #7FD8C9;
  display: flex; align-items: center; justify-content: center; font-size: 26px;
}
.industry-head h2 { font-size: 26px; }
.industry-head p { font-size: 14px; color: var(--muted); }

.case-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; transition: all .25s; height: 100%;
}
.case-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-4px); }
.case-card .case-tag {
  display: inline-block; font-size: 12px; font-weight: 700;
  color: var(--teal); background: var(--teal-light);
  padding: 3px 12px; border-radius: 999px; margin-bottom: 12px;
}
.case-card h3 { font-size: 18px; margin-bottom: 10px; }
.case-card p.case-bg { font-size: 14.5px; margin-bottom: 14px; }
.case-card ul { margin-bottom: 16px; }
.case-card ul li {
  font-size: 14px; padding-left: 18px; position: relative; margin-bottom: 5px;
}
.case-card ul li::before {
  content: ""; position: absolute; left: 2px; top: 9px;
  width: 6px; height: 6px; background: var(--teal); border-radius: 50%;
}

/* ---------- 关于 ---------- */
.about-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 46px; align-items: center; }
.about-grid h2 { font-size: 30px; margin-bottom: 18px; }
.about-grid p { margin-bottom: 14px; }
.value-list { display: grid; gap: 20px; }
.value-item {
  display: flex; gap: 18px; background: var(--panel);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 24px;
}
.value-item .v-num {
  font-size: 26px; font-weight: 800; color: var(--teal-light);
  -webkit-text-stroke: 1px var(--teal); line-height: 1;
}
.value-item h3 { font-size: 17px; margin-bottom: 6px; }
.value-item p { font-size: 14.5px; }

.qualification {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
}
.qual-item {
  background: var(--panel); border: 1px dashed var(--line); border-radius: var(--radius);
  text-align: center; padding: 30px 16px; color: var(--muted); font-size: 14px;
}
.qual-item strong { display: block; color: var(--navy); font-size: 16px; margin-bottom: 4px; }

/* ---------- 联系 ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.contact-info { display: grid; gap: 18px; }
.contact-item {
  display: flex; gap: 16px; align-items: flex-start;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px 24px;
}
.contact-item .c-icon {
  width: 46px; height: 46px; border-radius: 12px; flex-shrink: 0;
  background: var(--teal-light); color: var(--teal);
  display: flex; align-items: center; justify-content: center; font-size: 20px;
}
.contact-item h4 { font-size: 15px; margin-bottom: 3px; }
.contact-item p { font-size: 15px; color: var(--body); }

.contact-form {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 34px;
}
.contact-form h3 { font-size: 20px; margin-bottom: 6px; }
.contact-form .form-note { font-size: 13.5px; color: var(--muted); margin-bottom: 22px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-field { margin-bottom: 16px; }
.form-field label {
  display: block; font-size: 14px; font-weight: 600;
  color: var(--ink); margin-bottom: 7px;
}
.form-field input, .form-field textarea, .form-field select {
  width: 100%; padding: 11px 14px; font-size: 15px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  font-family: var(--font); color: var(--ink); background: var(--panel);
  transition: border-color .2s;
}
.form-field input:focus, .form-field textarea:focus, .form-field select:focus {
  outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(14,107,92,.12);
}
.form-field textarea { resize: vertical; min-height: 110px; }
.form-hint { font-size: 13px; color: var(--muted); margin-top: 14px; }

/* ---------- CTA 条 ---------- */
.cta-band {
  background: linear-gradient(135deg, var(--navy-deep), var(--navy-soft));
  color: #fff; text-align: center; padding: 64px 0;
}
.cta-band h2 { color: #fff; font-size: 30px; margin-bottom: 12px; }
.cta-band p { color: rgba(255,255,255,.78); margin-bottom: 28px; }
.cta-band .btn-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ---------- 页脚 ---------- */
.site-footer { background: var(--navy-deep); color: rgba(255,255,255,.72); font-size: 14px; }
.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 36px; padding: 56px 0 40px;
}
.footer-grid img.f-logo { height: 32px; margin-bottom: 14px; }
.footer-grid h4 { color: #fff; font-size: 15px; margin-bottom: 16px; }
.footer-grid p { font-size: 13.5px; line-height: 1.8; }
.footer-grid ul li { margin-bottom: 9px; }
.footer-grid ul a { color: rgba(255,255,255,.72); font-size: 14px; transition: color .2s; }
.footer-grid ul a:hover { color: #5ADBC6; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.12);
  padding: 20px 0; font-size: 13px; text-align: center; color: rgba(255,255,255,.5);
}
.footer-bottom a { color: rgba(255,255,255,.6); }
.footer-bottom a:hover { color: #5ADBC6; }

/* ---------- 404 ---------- */
.error-page {
  min-height: calc(100vh - var(--nav-h));
  display: flex; align-items: center; justify-content: center;
  text-align: center; background: var(--bg); padding: 40px 24px;
}
.error-page .code { font-size: 90px; font-weight: 800; color: var(--navy); line-height: 1; }
.error-page h1 { font-size: 26px; margin: 16px 0 10px; }
.error-page p { color: var(--muted); margin-bottom: 26px; }

/* ---------- 动效（进入视口） ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 992px) {
  .hero h1 { font-size: 36px; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .flow { grid-template-columns: repeat(3, 1fr); }
  .product-layout { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .qualification { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 30px; }
}

@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none; position: absolute; top: var(--nav-h); left: 0; right: 0;
    background: var(--panel); flex-direction: column; align-items: stretch;
    padding: 14px 24px 22px; border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow); gap: 4px;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 14px; }
  .nav-cta { margin: 10px 0 0; }
  .hero-inner { padding: 64px 0 58px; }
  .hero h1 { font-size: 30px; }
  .hero p.lead { font-size: 16px; }
  .section { padding: 54px 0; }
  .section-head h2 { font-size: 26px; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .flow { grid-template-columns: 1fr 1fr; }
  .feature-list { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .page-hero { padding: 44px 0; }
  .page-hero h1 { font-size: 27px; }
  .product-block h2 { font-size: 25px; }
  .industry-head { flex-direction: row; }
  .form-row { grid-template-columns: 1fr; }
  .stat-num { font-size: 32px; }
}

@media (max-width: 576px) {
  .flow { grid-template-columns: 1fr; }
  .qualification { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .hero-actions .btn { width: 100%; }
  .stats-grid { grid-template-columns: 1fr 1fr; padding: 30px 0; }
}

/* 打印时隐藏导航 */
@media print {
  .site-header, .site-footer, .cta-band { display: none; }
}
