/* ==========================================================================
   海口龙华胥迎荷信息咨询工作室 — 官网样式
   ========================================================================== */

:root {
  --primary: #2563eb;
  --primary-dark: #1e40af;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --bg: #f8fafc;
  --white: #ffffff;
  --radius: 16px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06), 0 1px 3px rgba(15, 23, 42, 0.08);
  --shadow-md: 0 10px 25px rgba(15, 23, 42, 0.08);
  --container: 1140px;
  --header-h: 72px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
}

body {
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
    "Noto Sans SC", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--white);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

a {
  text-decoration: none;
  color: inherit;
}

ul, ol {
  list-style: none;
}

.container {
  width: min(var(--container), 92%);
  margin-inline: auto;
}

/* ======================== 顶部导航 ======================== */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--header-h);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  z-index: 100;
  transition: box-shadow 0.25s ease;
}

.site-header.scrolled {
  box-shadow: var(--shadow-sm);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.logo-mark svg {
  display: block;
  border-radius: 8px;
}

.logo-text {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
  display: flex;
  flex-direction: column;
}

.logo-text small {
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0.28em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link {
  position: relative;
  padding: 8px 14px;
  font-size: 15px;
  color: #334155;
  border-radius: 8px;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover {
  color: var(--primary);
  background: rgba(37, 99, 235, 0.06);
}

.nav-link.active {
  color: var(--primary);
  font-weight: 600;
}

.nav-link.active::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 2px;
  height: 2px;
  border-radius: 2px;
  background: var(--primary);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  padding: 9px;
  background: none;
  border: 0;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

body.nav-open .nav-toggle span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

body.nav-open .nav-toggle span:nth-child(2) {
  opacity: 0;
}

body.nav-open .nav-toggle span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ======================== 首屏 ======================== */

.hero {
  padding-top: calc(var(--header-h) + 64px);
  padding-bottom: 96px;
  background:
    radial-gradient(1100px 480px at 88% -12%, rgba(37, 99, 235, 0.10), transparent 60%),
    radial-gradient(760px 380px at -8% 112%, rgba(13, 148, 136, 0.08), transparent 60%),
    var(--bg);
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 56px;
}

.hero-tag {
  display: inline-block;
  font-size: 13px;
  letter-spacing: 0.12em;
  color: var(--primary);
  background: rgba(37, 99, 235, 0.08);
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 999px;
  padding: 5px 14px;
  margin-bottom: 20px;
}

.hero h1 {
  font-size: clamp(30px, 4.2vw, 46px);
  line-height: 1.28;
  font-weight: 700;
  letter-spacing: 0.01em;
  margin-bottom: 20px;
}

.hero-desc {
  font-size: 16px;
  color: var(--muted);
  max-width: 34em;
  margin-bottom: 32px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 36px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 500;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.28);
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-outline {
  border: 1.5px solid var(--line);
  color: var(--ink);
  background: var(--white);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-points li {
  font-size: 14px;
  color: #334155;
  padding-left: 26px;
  position: relative;
}

.hero-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(37, 99, 235, 0.12) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232563eb' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 13 4 4L19 7'/%3E%3C/svg%3E") center / 10px no-repeat;
}

.hero-media {
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  background: linear-gradient(160deg, rgba(37, 99, 235, 0.08), rgba(13, 148, 136, 0.06));
}

.hero-media svg {
  display: block;
  width: 100%;
  height: auto;
}

/* ======================== 通用区块 ======================== */

.section {
  padding: 88px 0;
}

.section-head {
  text-align: center;
  margin-bottom: 56px;
}

.section-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.35em;
  color: var(--primary);
  margin-bottom: 10px;
}

.section-head h2 {
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.section-sub {
  margin-top: 14px;
  color: var(--muted);
  font-size: 14px;
}

/* ======================== 关于我们 ======================== */

.about {
  background: var(--white);
}

.about-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 56px;
  align-items: center;
}

.about-media {
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  background: linear-gradient(160deg, rgba(37, 99, 235, 0.06), rgba(13, 148, 136, 0.08));
}

.about-media svg {
  display: block;
  width: 100%;
  height: auto;
}

.about-content h3 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 16px;
}

.about-content > p {
  color: var(--muted);
  font-size: 15px;
  margin-bottom: 14px;
  text-align: justify;
}

.about-values {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.about-values li {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 14px;
  color: var(--muted);
}

.about-values strong {
  display: block;
  color: var(--ink);
  font-size: 16px;
  margin-bottom: 2px;
}

/* ======================== 服务项目 ======================== */

.services {
  background: var(--bg);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.service-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: rgba(37, 99, 235, 0.35);
}

.service-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  background: rgba(37, 99, 235, 0.1);
  margin-bottom: 20px;
}

.service-icon svg {
  width: 26px;
  height: 26px;
}

.service-card h3 {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 10px;
}

.service-card p {
  font-size: 14px;
  color: var(--muted);
}

/* ======================== 服务流程 ======================== */

.process-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  counter-reset: step;
}

.process-grid li {
  position: relative;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--shadow-sm);
}

.step-num {
  display: inline-block;
  font-size: 26px;
  font-weight: 700;
  color: rgba(37, 99, 235, 0.22);
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}

.process-grid h3 {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 8px;
}

.process-grid p {
  font-size: 14px;
  color: var(--muted);
}

/* ======================== 联系我们 ======================== */

.contact {
  background: var(--bg);
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.contact-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.contact-card h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 8px;
}

.contact-card p {
  font-size: 15px;
  color: var(--ink);
  word-break: break-all;
}

/* ======================== 页脚 ======================== */

.site-footer {
  background: #0f1e3d;
  color: rgba(255, 255, 255, 0.78);
  padding: 56px 0 0;
  font-size: 14px;
}

.footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  flex-wrap: wrap;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-name {
  font-size: 16px;
  font-weight: 600;
  color: #fff;
}

.footer-slogan {
  font-size: 12px;
  letter-spacing: 0.2em;
  color: rgba(255, 255, 255, 0.55);
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 26px;
}

.footer-nav a {
  color: rgba(255, 255, 255, 0.78);
  transition: color 0.2s ease;
}

.footer-nav a:hover {
  color: #fff;
}

.footer-bottom {
  padding: 22px 0 28px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer-bottom p {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
}

/* ICP 备案号：必须悬挂于首页底部并链接至工信部备案官网 */
.beian a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s ease;
}

.beian a:hover {
  color: #fff;
}

/* ======================== 返回顶部 ======================== */

.back-top {
  position: fixed;
  right: 26px;
  bottom: 26px;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.35);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
  z-index: 90;
}

.back-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-top svg {
  width: 20px;
  height: 20px;
}

/* ======================== 滚动显现动画 ======================== */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.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: 1020px) {
  .services-grid,
  .contact-grid,
  .process-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 860px) {
  .hero {
    padding-top: calc(var(--header-h) + 40px);
    padding-bottom: 64px;
  }

  .hero-inner,
  .about-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .about-media {
    max-width: 560px;
  }

  .nav-toggle {
    display: flex;
  }

  .site-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    padding: 12px 4%;
    display: none;
  }

  body.nav-open .site-nav {
    display: flex;
  }

  .nav-link {
    padding: 12px 14px;
  }

  .nav-link.active::after {
    display: none;
  }

  .footer-top {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 560px) {
  .section {
    padding: 64px 0;
  }

  .services-grid,
  .contact-grid,
  .process-grid,
  .about-values {
    grid-template-columns: 1fr;
  }

  .hero-actions .btn {
    flex: 1;
  }

  .footer-nav {
    gap: 8px 18px;
  }
}
