/* ==========================================================================
   公司官网（小型事务所版）— 样式表
   无外部依赖（不引 CDN 字体/框架）。改配色只需改下面 :root 里的变量。
   结构：顶栏 / 首屏 / 公司简介 / 服务内容 / 联系我们 / 页脚
   板块抬头（.section-title 及各标题）的字体/字号/颜色对齐参考网站 hfgip.com。
   ========================================================================== */

:root {
  --navy: #0e2a47;        /* 主色：顶栏、页脚、深色区块 */
  --navy-2: #123b5e;
  --accent: #c8102e;      /* 强调色：按钮、下划线、序号 */
  --accent-dark: #a20d25;
  --ink: #15202b;         /* 正文 */
  --heading: #1a1a1a;     /* 板块抬头文字色（参考网站：近黑） */
  --muted: #5b6b7c;       /* 次要文字 */
  --line: #e3e8ee;        /* 分隔线 */
  --soft: #f5f7fa;        /* 浅底 */
  --white: #fff;
  --shadow-sm: 0 1px 2px rgba(14, 42, 71, .06), 0 4px 14px rgba(14, 42, 71, .06);
  --shadow-md: 0 10px 30px rgba(14, 42, 71, .12);
  --radius: 4px;
  --radius-lg: 8px;
  --container: 1140px;
  --header-h: 74px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans SC",
          "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  /* 标题字体：参考网站用 Source Sans Pro，未安装该字体时回落到系统无衬线 */
  --font-head: "Source Sans Pro", "Helvetica Neue", system-ui, -apple-system,
          "Segoe UI", Roboto, "Noto Sans SC", "PingFang SC", "Hiragino Sans GB",
          "Microsoft YaHei", sans-serif;
}

/* ---------- 基础 ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.75;
  color: var(--ink); background: var(--white); overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
h1, h2, h3 { margin: 0 0 .5em; line-height: 1.3; font-weight: 600; font-family: var(--font-head); }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; list-style: none; }
svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 200; padding: 10px 16px;
  background: var(--navy); color: #fff; border-radius: var(--radius); transition: top .2s;
}
.skip-link:focus { top: 12px; color: #fff; }

/* ---------- 通用组件 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 26px; border: 1px solid transparent; border-radius: var(--radius);
  font-weight: 600; font-size: 15px; cursor: pointer;
  transition: background-color .18s, color .18s, border-color .18s, transform .18s;
}
.btn:hover { transform: translateY(-1px); color: inherit; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); color: #fff; }
.btn-outline-light { border-color: rgba(255,255,255,.65); color: #fff; }
.btn-outline-light:hover { background: #fff; color: var(--navy); }

.eyebrow {
  display: inline-block; margin: 0 0 10px; font-size: 13px; font-weight: 700;
  letter-spacing: .18em; text-transform: uppercase; color: var(--accent);
}
.section { padding: 80px 0; }
.section-alt { background: var(--soft); }
/* 板块抬头：字号对齐参考网站（约 2rem / 桌面 32px），近黑，中等偏粗字重 */
.section-title {
  font-family: var(--font-head); font-size: clamp(25px, 2.6vw, 32px);
  font-weight: 600; line-height: 1.25; letter-spacing: -.005em;
  color: var(--heading); margin-bottom: .35em;
}
.lead { font-size: 17px; color: var(--muted); }
.section-head { margin-bottom: 40px; }

/* ---------- 顶栏 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100; background: #fff; border-bottom: 1px solid var(--line);
}
.header-inner {
  min-height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.brand img { height: 42px; width: auto; }

.primary-nav { display: flex; align-items: center; gap: 26px; }
.menu { display: flex; align-items: center; gap: 2px; }
.menu-link {
  display: inline-block; padding: 10px 14px; font-size: 15px; font-weight: 600;
  color: var(--navy); border-radius: var(--radius);
}
.menu-link:hover { color: var(--accent); background: var(--soft); }

.header-actions { display: flex; align-items: center; }
.lang-switch {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px;
  border: 1px solid var(--line); border-radius: 999px; font-size: 14px;
}
.lang-link { color: var(--muted); font-weight: 600; }
.lang-link:hover { color: var(--accent); }
.lang-link.is-active { color: var(--navy); }
.lang-sep { color: var(--line); }

.nav-toggle {
  display: none; align-items: center; gap: 8px; padding: 9px 14px; background: none;
  border: 1px solid var(--line); border-radius: var(--radius); font-size: 14px;
  font-weight: 600; cursor: pointer;
}
.nav-toggle-bar, .nav-toggle-bar::before, .nav-toggle-bar::after {
  content: ""; display: block; width: 18px; height: 2px; background: var(--navy); position: relative;
}
.nav-toggle-bar::before { position: absolute; top: -6px; }
.nav-toggle-bar::after { position: absolute; top: 6px; }

/* ---------- 首屏 ---------- */
.hero {
  position: relative; color: #fff; background: var(--navy);
  background-image:
    linear-gradient(100deg, rgba(9,24,41,.92) 0%, rgba(9,24,41,.70) 46%, rgba(9,24,41,.38) 100%),
    url("/assets/img/hero-1.jpg?v=20260927");  /* 绝对路径：避免部分国产浏览器内核解析相对路径出错 */
  background-size: cover; background-position: center 45%;
}
/* 注意：不要在这里收窄 max-width，否则整块首屏会相对顶栏/页脚居中错位，
   限制行宽请用下面 .hero-title 的 max-width。 */
.hero-inner { padding-top: clamp(80px, 11vw, 150px); padding-bottom: clamp(80px, 11vw, 150px); }
.hero-title { max-width: 820px; }
.hero-title { font-size: clamp(28px, 4vw, 46px); color: #fff; margin-bottom: .4em; font-weight: 700; }
/* 英文标题比中文长得多，同样字号会占满整屏、断行难看：缩小一档并放宽行宽 */
html[lang="en"] .hero-title { font-size: clamp(25px, 3.2vw, 38px); max-width: 900px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- 公司简介 ---------- */
.about-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 52px; align-items: center; }
.about-media img { border-radius: var(--radius-lg); box-shadow: var(--shadow-md); }
.about-body p { color: var(--muted); }
.about-body .lead { color: var(--ink); }

/* ---------- 服务内容 ---------- */
.service-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.service-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 26px 24px; transition: box-shadow .2s, transform .2s, border-color .2s;
}
.service-card:hover { box-shadow: var(--shadow-sm); transform: translateY(-2px); border-color: #cfd8e3; }
.service-card h3 {
  font-size: 19px; color: var(--heading); margin-bottom: 8px; padding-bottom: 10px;
  border-bottom: 2px solid var(--accent); display: inline-block;
}
.service-card p { margin: 0; font-size: 14.5px; color: var(--muted); }

/* ---------- 联系我们 ---------- */
/* 删掉说明段后内容变少，这里单独收紧上下留白（.section.contact 提高优先级，
   窄屏媒体查询里的 .section 也压不过它），并让左右两列垂直居中，避免左侧留一大块空 */
.section.contact { background: var(--navy); color: rgba(255,255,255,.82); padding: 40px 0; }
.contact-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 52px; align-items: center; }
.contact-intro .section-title { color: #fff; }
.contact-intro .eyebrow { color: #ff9aa8; }
.contact-intro .lead { color: rgba(255,255,255,.82); margin-bottom: 0; }
.contact-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; }
.contact-list > div {
  padding: 16px 20px; border-top: 1px solid rgba(255,255,255,.16);
}
/* 第一行（地址）占满整宽，其后各项两列排布 */
.contact-list > div:first-child { grid-column: 1 / -1; }
.contact-list dt {
  font-size: 13px; letter-spacing: .1em; text-transform: uppercase;
  color: rgba(255,255,255,.55); margin-bottom: 4px;
}
.contact-list dd { margin: 0; font-size: 15.5px; color: #fff; }
.contact-list a:hover { color: #fff; text-decoration: underline; }

/* ---------- 页脚 ---------- */
.site-footer { background: var(--navy); color: rgba(255,255,255,.8); padding-top: 36px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1.2fr; gap: 40px; padding-bottom: 40px; }
.footer-brand img { margin-bottom: 14px; }
.footer-note { font-size: 14px; color: rgba(255,255,255,.62); margin: 0; }
.footer-col h3 { font-size: 15px; color: #fff; margin: 0 0 14px; }
.footer-col ul li { font-size: 14px; margin-bottom: 9px; color: rgba(255,255,255,.68); line-height: 1.65; }
.footer-col a:hover { color: #fff; text-decoration: underline; }
.footer-bottom {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding-top: 18px; padding-bottom: 24px; border-top: 1px solid rgba(255,255,255,.14);
  font-size: 13.5px; color: rgba(255,255,255,.58);
}
.footer-bottom p { margin: 0; }
.legal-links { display: flex; gap: 18px; flex-wrap: wrap; }

/* 返回顶部 */
.to-top {
  position: fixed; right: 20px; bottom: 20px; z-index: 90; width: 44px; height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--navy); color: #fff; border: 0; border-radius: 50%;
  box-shadow: var(--shadow-md); cursor: pointer;
  opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: opacity .22s, transform .22s, visibility .22s, background-color .22s;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.to-top:hover { background: var(--accent); }
.to-top svg { width: 20px; height: 20px; }

/* ==========================================================================
   响应式
   ========================================================================== */
@media (max-width: 1024px) {
  .about-grid { gap: 36px; }
}

@media (max-width: 860px) {
  .section { padding: 60px 0; }
  .about-grid, .contact-grid { grid-template-columns: 1fr; gap: 32px; }
  .about-media { order: -1; }
  .service-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 30px; }

  /* 移动端：导航折叠为抽屉 */
  .nav-toggle { display: inline-flex; }
  .primary-nav {
    position: fixed; left: 0; right: 0; top: var(--header-h);
    max-height: calc(100vh - var(--header-h)); overflow-y: auto;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; border-top: 1px solid var(--line);
    padding: 10px 24px 26px; box-shadow: var(--shadow-md);
    opacity: 0; visibility: hidden; transform: translateY(-12px);
    transition: opacity .2s, transform .2s, visibility .2s;
  }
  .primary-nav.is-open { opacity: 1; visibility: visible; transform: translateY(0); }
  .menu { flex-direction: column; align-items: stretch; }
  .menu li { border-bottom: 1px solid var(--line); }
  .menu-link { display: block; padding: 15px 4px; font-size: 16px; }
  .header-actions { padding: 16px 0 4px; }
}

@media (max-width: 620px) {
  .container { padding: 0 18px; }
  .contact-list { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-actions .btn { width: 100%; }
  .section-title { font-size: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .001ms !important; }
}
