/* ==========================================================================
   宏海科技 · Apple 风格主题层
   叠加在 site.css 之上，只改「材质 / 排版 / 节奏 / 动效」四件事：
   1) 半透明毛玻璃顶栏 + 滚动边缘渐显（不占固定白条）
   2) 字号随尺寸变字距：大字收紧、正文接近 0；行高反向
   3) 圆角胶囊按钮 + 按下 0.97 缩放（pointerdown 即反馈）
   4) 下拉面板「材质化」：模糊 + 缩放，从触发器方向展开
   ========================================================================== */

:root {
  --blue: #0071e3;
  --blue-dark: #0062c4;
  --blue-soft: #eff6ff;
  --blue-line: #d7e7fb;
  --navy: #0a0a0c;
  --navy-2: #141419;
  --ink: #1d1d1f;
  --text: #3d3d41;
  --muted: #6e6e73;
  --line: #e6e6eb;
  --soft: #f5f5f7;
  --radius: 18px;
  --shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 22px 60px rgba(0, 0, 0, 0.14);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-io: cubic-bezier(0.4, 0, 0.2, 1);
  --max: 1120px;
}

html {
  scroll-padding-top: 76px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-size: 18px;
  line-height: 1.72;
  letter-spacing: 0;
  color: var(--ink);
  background: #fff;
}

h1, h2, h3, h4 {
  font-weight: 600;
  line-height: 1.14;
  letter-spacing: -0.02em;
}

p { text-wrap: pretty; }

:focus-visible {
  outline: 3px solid rgba(0, 113, 227, 0.5);
  outline-offset: 3px;
  border-radius: 6px;
}

.container { width: min(var(--max), 100% - 56px); }

/* ---------------------------------------------------------------- 顶栏 */

.utility {
  background: #fafafc;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  font-size: 12px;
  letter-spacing: 0.01em;
  color: var(--muted);
}
.utility .container { min-height: 36px; padding-block: 4px; }
.utility .u-item svg, .utility .u-right svg { width: 13px; height: 13px; color: #9a9aa0; }
.utility a:hover { color: var(--blue); }

.masthead {
  position: sticky;
  top: 0;
  z-index: 90;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: border-color 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
/* 毛玻璃放在伪元素上：header 本身不带 filter，否则内部 fixed 元素会被困住 */
.masthead::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(251, 251, 253, 0.72);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  pointer-events: none;
}
/* 滚动边缘效果：一根渐显的细线，而不是常驻硬边框 */
.masthead::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: rgba(0, 0, 0, 0.1);
  opacity: 0;
  transition: opacity 0.35s var(--ease);
  pointer-events: none;
}
body[data-scrolled="true"] .masthead::after { opacity: 1; }

.masthead .container { min-height: 62px; gap: 30px; }
.brand img { height: 38px; }

.nav { gap: 30px; font-size: 15px; letter-spacing: 0; }
.nav a {
  padding: 21px 0;
  color: rgba(29, 29, 31, 0.82);
  font-weight: 400;
  transition: color 0.2s var(--ease-io);
}
.nav a:hover { color: var(--blue); }
.nav a[aria-current="page"] { color: var(--blue); font-weight: 500; }
.nav a[aria-current="page"]::after {
  bottom: 11px;
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background: var(--blue);
}

/* 顶栏右侧按钮在导航里稍小一号（Apple 顶栏按钮克制） */
.head-actions .btn { padding: 9px 18px; font-size: 14px; }

/* ---------------------------------------------------------------- 按钮 */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border: 0;
  border-radius: 980px;
  background: var(--blue);
  color: #fff;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: background 0.25s var(--ease-io), transform 0.25s var(--ease),
    box-shadow 0.25s var(--ease-io);
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { background: #0077ed; }
.btn:active { transform: scale(0.97); transition-duration: 0.08s; }
.btn svg { width: 17px; height: 17px; transition: transform 0.3s var(--ease); }
.btn:hover svg { transform: translateX(2px); }

.btn-lg { height: auto; padding: 15px 30px; font-size: 17px; }
.btn-ghost-light {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.3);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  backdrop-filter: blur(12px) saturate(160%);
}
.btn-ghost-light:hover { background: rgba(255, 255, 255, 0.2); }

/* ---------------------------------------------------------------- 首屏 */

/* 首屏保留品牌蓝渐变（渐变本身在 site.css 的 .hero::before 里） */
.hero {
  color: #f5f5f7;
}
.hero-inner { position: relative; z-index: 1; }

.hero-eyebrow {
  font-size: 14px;
  letter-spacing: 0.16em;
  color: rgba(245, 245, 247, 0.55);
}
.hero h1 {
  font-size: clamp(40px, 4.8vw, 62px);
  line-height: 1.12;
  letter-spacing: -0.018em;
  font-weight: 600;
  text-wrap: balance;
}
.hero-lead {
  max-width: 33em;
  font-size: 19px;
  line-height: 1.68;
  color: rgba(245, 245, 247, 0.66);
  letter-spacing: 0;
}

.hero-stats li {
  padding-right: 0;
  margin-right: 0;
  border-right: 0;
}
.hero-stats {
  gap: 56px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.hero-stats strong {
  font-size: 34px;
  font-weight: 600;
  letter-spacing: -0.03em;
}
.hero-stats strong small { font-size: 15px; font-weight: 400; color: rgba(245, 245, 247, 0.5); }
.hero-stats span { margin-top: 6px; font-size: 13px; color: rgba(245, 245, 247, 0.5); }

/* ---------------------------------------------------------------- 区块节奏 */

.section { padding: 120px 0; }
.section--tight { padding: 84px 0; }
.section--soft { background: var(--soft); }

.sec-head { max-width: 760px; margin-bottom: 56px; }
.eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: none;
  color: var(--blue);
}
.sec-head h2 {
  margin-top: 14px;
  font-size: clamp(30px, 3.4vw, 48px);
  line-height: 1.18;
  letter-spacing: -0.015em;
  font-weight: 600;
}
.sec-sub {
  margin-top: 18px;
  font-size: 18px;
  line-height: 1.7;
  color: var(--muted);
  max-width: 40em;
}

/* ---------------------------------------------------------------- 卡片 */

.grid { gap: 20px; }

.card {
  padding: 30px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: var(--radius);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
  transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease),
    border-color 0.45s var(--ease);
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.1);
  border-color: rgba(0, 0, 0, 0.02);
}
.card h3 { font-size: 20px; letter-spacing: -0.015em; }
.card p { font-size: 15.5px; line-height: 1.68; color: var(--muted); }
.card .svc-no { font-size: 12px; letter-spacing: 0.1em; color: var(--muted); }
.card .svc-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--soft);
  color: var(--ink);
}
.card:hover .svc-icon { background: var(--blue-soft); color: var(--blue); }

/* ---------------------------------------------------------------- 内页页头 */

.page-head {
  background: var(--soft);
  border-bottom: 0;
  padding: 72px 0 64px;
}
.page-head h1 {
  margin-top: 14px;
  font-size: clamp(36px, 4.4vw, 58px);
  line-height: 1.14;
  letter-spacing: -0.018em;
  font-weight: 600;
}
.page-head .tagline {
  margin-top: 16px;
  max-width: 34em;
  font-size: 19px;
  line-height: 1.66;
  color: var(--muted);
}
.page-head .meta { border-top: 1px solid rgba(0, 0, 0, 0.08); }
.page-head .meta dt { font-size: 12px; letter-spacing: 0.06em; color: var(--muted); }
.page-head .meta dd { font-size: 16px; }

.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  letter-spacing: 0;
  color: #5c5c61;
}
.crumbs a {
  color: #5c5c61;
  transition: color 0.2s var(--ease-io);
}
.crumbs a:hover { color: var(--blue); }
.crumbs .sep { color: #bfbfc6; }
.crumbs > span:last-child { color: var(--ink); font-weight: 500; }

/* ---------------------------------------------------------------- 下拉面板（材质化） */

.mega {
  padding: 16px 22px 20px;
  /* 液态玻璃：半透明渐变 + 大半径模糊 + 提亮，边缘用内阴影做出高光 */
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.1' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url%28%23n%29' opacity='0.09'/%3E%3C/svg%3E") repeat,
    linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.78) 0%,
      rgba(238, 244, 253, 0.58) 55%,
      rgba(232, 240, 252, 0.52) 100%
    );
  background-blend-mode: soft-light, normal;
  -webkit-backdrop-filter: blur(64px) saturate(190%) brightness(1.04);
  backdrop-filter: blur(64px) saturate(190%) brightness(1.04);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 22px;
  box-shadow:
    0 30px 72px rgba(8, 20, 40, 0.24),
    0 2px 10px rgba(8, 20, 40, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    inset 0 0 30px rgba(255, 255, 255, 0.4);
  transform-origin: 50% 0;
  transform: translate(-50%, 6px) scale(0.98);
  transition: opacity 0.28s var(--ease), transform 0.32s var(--ease),
    visibility 0.32s;
}

/* 浏览器不支持 backdrop-filter 时退回实心，保证可读 */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .mega { background: rgba(255, 255, 255, 0.98); }
}
.nav-item--mega:hover .mega,
.nav-item--mega:focus-within .mega {
  transform: translate(-50%, 0) scale(1);
}
.mega-head {
  padding-bottom: 12px;
  margin-bottom: 8px;
  border-bottom: 1px solid rgba(20, 40, 70, 0.1);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.mega-list a {
  padding: 11px 12px;
  border-radius: 12px;
  transition: background 0.2s var(--ease-io), transform 0.2s var(--ease-io);
}
.mega-list a:hover { background: rgba(255, 255, 255, 0.6); transform: translateX(2px); }
.mega-name { font-size: 15px; font-weight: 500; letter-spacing: -0.01em; }
.mega-cat { font-size: 12px; letter-spacing: 0.02em; }

/* ---------------------------------------------------------------- CTA 条 */

.cta {
  background:
    radial-gradient(900px 420px at 82% 0%, rgba(35, 125, 240, 0.22), transparent 62%),
    linear-gradient(118deg, #071427 0%, #0a2242 52%, #0b2b55 100%);
  color: #f5f5f7;
  padding: 88px 0;
}
.cta::after { display: none; }
.cta h2 {
  font-size: clamp(28px, 3.2vw, 44px);
  line-height: 1.16;
  letter-spacing: -0.018em;
  font-weight: 600;
  color: #f5f5f7;
}
.cta p { color: rgba(245, 245, 247, 0.6); font-size: 16px; }

/* ---------------------------------------------------------------- 页脚 */

.site-foot {
  background: #08182e;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  color: rgba(245, 245, 247, 0.6);
  font-size: 14px;
  padding-top: 72px;
}
.foot h3 { color: #f5f5f7; font-size: 13px; letter-spacing: 0.06em; font-weight: 600; }
.foot a { color: rgba(245, 245, 247, 0.6); }
.foot a:hover { color: #f5f5f7; }
.foot p { color: rgba(245, 245, 247, 0.48); }
.foot .contact-line b { color: #f5f5f7; }
.foot-bottom { border-top: 1px solid rgba(255, 255, 255, 0.1); font-size: 12.5px; color: rgba(245, 245, 247, 0.42); }

/* ---------------------------------------------------------------- 列表 / 表格排版 */

.case-row { border-bottom: 1px solid rgba(0, 0, 0, 0.07); }
.case-row:hover { background: var(--soft); }
.cert-group-head { border-bottom: 1px solid rgba(0, 0, 0, 0.08); }
.cert-group-head h3 { font-size: 20px; letter-spacing: -0.015em; }
.cert.cert-row { border-bottom: 1px solid rgba(0, 0, 0, 0.07); }
.cert.cert-row:hover { background: var(--soft); }

.about-text p { font-size: 18px; line-height: 1.78; color: var(--text); max-width: 42em; }
.about-intro h1 { font-size: clamp(34px, 4.2vw, 54px); letter-spacing: -0.018em; line-height: 1.14; }

/* ---------------------------------------------------------------- 移动端菜单（上滑面板） */

@media (max-width: 900px) {
  .mobile-nav {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 85;
    background: #fbfbfd;

    border: 0;
    border-radius: 0;
    transform: translateY(12px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s var(--ease), transform 0.36s var(--ease),
      visibility 0.36s;
    overflow-y: auto;
  }
  html[data-nav="open"] .mobile-nav,
  [data-nav="open"] .mobile-nav {
    transform: none;
    opacity: 1;
    visibility: visible;
  }
  /* .masthead .container 是 flex，会把菜单内容排成一行，这里复位 */
  .masthead .mobile-nav .container {
    display: block;
    min-height: 0;
    gap: 0;
    padding: 88px 0 40px;
  }
  .mobile-nav .inner { padding: 0; }
  .mobile-nav a.m-link {
    font-size: 24px;
    font-weight: 600;
    letter-spacing: -0.02em;
    padding: 14px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.07);
  }
  .mobile-nav a.m-link span { color: #c7c7cc; font-size: 18px; }
  .mobile-nav .m-contact { font-size: 14px; color: var(--muted); }

  .section { padding: 72px 0; }
  .page-head { padding: 44px 0 40px; }
  .hero h1 { font-size: clamp(34px, 9vw, 46px); }
  .hero-lead { font-size: 17px; }
  .card { padding: 24px; }
}

/* ---------------------------------------------------------------- 无障碍 */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .mega { transform: translate(-50%, 0); }
  .card:hover { transform: none; }
  .btn:active { transform: none; }
  .mobile-nav { transform: none; }
}

@media (prefers-reduced-transparency: reduce) {
  .masthead { background: #fff; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .mega { background: #fff; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .mobile-nav { background: #fff; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .btn-ghost-light { background: rgba(255, 255, 255, 0.18); -webkit-backdrop-filter: none; backdrop-filter: none; }
}

@media (prefers-contrast: more) {
  .masthead { background: #fff; }
  .mega { background: #fff; box-shadow: 0 0 0 2px #1d1d1f, 0 30px 70px rgba(0, 0, 0, 0.2); }
  .card { border-color: #1d1d1f; }
}


/* 菜单展开时顶栏转为实心，logo 不被透视冲淡 */
html[data-nav="open"] .masthead::before {
  background: #fbfbfd;
}


/* 菜单展开时，顶栏内容压在面板之上（面板是 header 的子元素） */
.masthead > .container {
  position: relative;
  z-index: 100;
}
html[data-nav="open"] .nav-toggle { font-size: 0; }
html[data-nav="open"] .nav-toggle .bars { display: none; }
html[data-nav="open"] .nav-toggle::after {
  content: "关闭";
  font-size: 15px;
  color: var(--ink);
}


/* ---------------------------------------------------------------- 侧栏报价卡 */

.aside-cta {
  background: #f5f5f7;
  color: var(--ink);
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 18px;
  padding: 26px;
}
.aside-cta h3 { color: var(--ink); font-size: 20px; letter-spacing: -0.015em; }
.aside-cta p { color: var(--muted); font-size: 14.5px; line-height: 1.65; }
.aside-cta .btn { background: var(--blue); color: #fff; width: 100%; }
.aside-cta .btn:hover { background: #0077ed; color: #fff; }
.aside-cta .sub { color: var(--muted); }
