/* ============================================================
   杭州鸿潮智创科技有限公司 · 企业官网样式
   结构：变量 → 基础 → 组件（导航/Hero/简介/业务范围/场景/产品/页脚）→ 响应式
   说明：站点主题色、圆角、阴影等统一定义在 :root 变量中，
        如需整体换色只需修改 :root 中的色值。
   ============================================================ */

/* ---------- 设计变量 ---------- */
:root {
  /* 品牌色 */
  --primary: #2563eb;            /* 科技蓝 */
  --primary-dark: #1d4ed8;
  --primary-deep: #1e3a8a;
  --accent: #06b6d4;             /* 青蓝点缀 */

  /* 中性色 */
  --ink: #0f172a;                /* 主文字 */
  --ink-2: #475569;              /* 次级文字 */
  --ink-3: #94a3b8;              /* 弱化文字 */
  --bg: #ffffff;
  --bg-alt: #f1f5f9;             /* 交替区块背景 */
  --line: #e2e8f0;

  /* 深色（Hero / 页脚） */
  --dark-bg: #0b1226;
  --dark-bg-2: #10213f;

  /* 形状 */
  --radius: 16px;
  --radius-sm: 10px;

  /* 阴影 */
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, .06);
  --shadow-md: 0 10px 30px rgba(15, 23, 42, .08);
  --shadow-lg: 0 24px 60px rgba(15, 23, 42, .14);

  /* 布局 */
  --maxw: 1180px;
  --nav-h: 72px;

  --grad-primary: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
}

/* ---------- 基础重置 ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 12px);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "Helvetica Neue", Arial, system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.7;
  font-size: 16px;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font: inherit; cursor: pointer; border: none; background: none; }

/* ---------- 布局容器 ---------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 24px;
}

/* 区块通用 */
.section { padding-block: 96px; }
.section-alt { background: var(--bg-alt); }

/* 区块标题 */
.section-head {
  max-width: 640px;
  margin: 0 auto 56px;
  text-align: center;
}
.section-tag {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--primary);
  background: rgba(37, 99, 235, .08);
  border: 1px solid rgba(37, 99, 235, .18);
  margin-bottom: 16px;
}
.section-head h2 {
  font-size: clamp(28px, 4vw, 38px);
  font-weight: 800;
  letter-spacing: 1px;
  line-height: 1.3;
  margin-bottom: 12px;
}
.section-head p { color: var(--ink-2); font-size: 16px; }

/* ============================================================
   ① 顶部导航
   ============================================================ */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--nav-h);
  color: #fff;
  transition: background .3s ease, color .3s ease, box-shadow .3s ease;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

/* 品牌 Logo */
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--grad-primary);
  color: #fff;
  box-shadow: 0 6px 18px rgba(37, 99, 235, .35);
}
.brand-mark svg { width: 24px; height: 24px; }
.brand-name {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: 2px;
}
.brand-name small {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 2.5px;
  color: var(--ink-3);
}
.site-header:not(.scrolled) .brand-name small { color: rgba(255, 255, 255, .55); }
.site-header.scrolled .brand-name small { color: var(--ink-3); }

/* 导航链接 */
.main-nav { display: flex; gap: 8px; }
.nav-link {
  position: relative;
  padding: 8px 16px;
  font-size: 15px;
  font-weight: 500;
  border-radius: 8px;
  transition: background .2s ease, color .2s ease;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 2px;
  height: 2px;
  border-radius: 2px;
  background: var(--grad-primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s ease;
}
.nav-link:hover::after,
.nav-link.active::after { transform: scaleX(1); }
.nav-link:hover { background: rgba(255, 255, 255, .1); }
.site-header.scrolled .nav-link:hover { background: rgba(37, 99, 235, .06); }

/* 滚动后状态（白底） */
.site-header.scrolled {
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(10px);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

/* 汉堡按钮（默认隐藏，移动端显示） */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  padding: 8px;
  border-radius: 10px;
}
.nav-toggle .bar {
  height: 2px;
  width: 100%;
  border-radius: 2px;
  background: currentColor;
  transition: transform .3s ease, opacity .3s ease;
}
body.nav-open .nav-toggle .bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.nav-open .nav-toggle .bar:nth-child(2) { opacity: 0; }
body.nav-open .nav-toggle .bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   ② Hero 公司名称区
   ============================================================ */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  padding-block: calc(var(--nav-h) + 56px) 0;
  color: #fff;
  overflow: hidden;
  background:
    radial-gradient(1100px 560px at 82% -12%, rgba(37, 99, 235, .5), transparent 62%),
    radial-gradient(900px 520px at 6% 112%, rgba(6, 182, 212, .32), transparent 60%),
    linear-gradient(158deg, #0a1023 0%, #0e1f42 55%, #123059 100%);
}

/* 网格纹理 */
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at center, rgba(0, 0, 0, .9), transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse at center, rgba(0, 0, 0, .9), transparent 78%);
}

/* 光晕 */
.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: .55;
  pointer-events: none;
}
.hero-glow-a { width: 420px; height: 420px; background: rgba(37, 99, 235, .55); top: -120px; right: -80px; }
.hero-glow-b { width: 360px; height: 360px; background: rgba(6, 182, 212, .4); bottom: -100px; left: -80px; }

.hero-inner {
  position: relative;
  z-index: 2;
  text-align: center;
  padding-bottom: 140px; /* 给波浪留白 */
}

.hero-eyebrow {
  display: inline-block;
  padding: 6px 16px;
  margin-bottom: 24px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 3px;
  color: rgba(255, 255, 255, .85);
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 999px;
  background: rgba(255, 255, 255, .06);
  backdrop-filter: blur(4px);
}

.hero-title {
  font-size: clamp(30px, 5.2vw, 56px);
  font-weight: 800;
  letter-spacing: 3px;
  line-height: 1.25;
  text-shadow: 0 4px 30px rgba(0, 0, 0, .3);
}

.hero-slogan {
  margin-top: 18px;
  font-size: clamp(18px, 2.6vw, 26px);
  font-weight: 600;
  letter-spacing: 4px;
  background: linear-gradient(90deg, #7dd3fc, #67e8f9 45%, #93c5fd);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.hero-desc {
  max-width: 720px;
  margin: 22px auto 0;
  font-size: 16px;
  line-height: 1.9;
  color: rgba(255, 255, 255, .78);
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 40px;
  flex-wrap: wrap;
}

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 32px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: var(--grad-primary);
  color: #fff;
  box-shadow: 0 10px 26px rgba(37, 99, 235, .4);
}
.btn-primary:hover { box-shadow: 0 14px 34px rgba(37, 99, 235, .55); }
.btn-ghost {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .4);
  background: rgba(255, 255, 255, .06);
}
.btn-ghost:hover { background: rgba(255, 255, 255, .14); }

/* Hero 技术标签 */
.hero-tech {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 46px;
  flex-wrap: wrap;
}
.hero-tech li {
  padding: 8px 18px;
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, .9);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, .16);
  background: rgba(255, 255, 255, .07);
}

/* 底部波浪 */
.hero-wave {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  z-index: 1;
  pointer-events: none;
}
.hero-wave svg { width: 100%; height: 90px; }

/* ============================================================
   ③ 产品展示区（2 行 × 3 列）
   ============================================================ */
.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);   /* 桌面：3 列 → 2 行 × 3 列 */
  gap: 28px;
}

.product-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .28s ease, box-shadow .28s ease;
  display: flex;
  flex-direction: column;
}
.product-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

/* 产品图区（占位渐变 / 正式图片二选一） */
.product-media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.product-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}
.product-card:hover .product-media img { transform: scale(1.05); }

.product-media.is-placeholder {
  color: rgba(255, 255, 255, .95);
}
.product-icon { width: 56px; height: 56px; opacity: .92; }

/* 产品信息 */
.product-body { padding: 22px 24px 26px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.product-body h3 { font-size: 18px; font-weight: 700; }
.product-body p { font-size: 14px; color: var(--ink-2); line-height: 1.8; flex: 1; }
.product-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.product-tags span {
  font-size: 12px;
  font-weight: 500;
  color: var(--primary);
  background: rgba(37, 99, 235, .08);
  border: 1px solid rgba(37, 99, 235, .16);
  border-radius: 999px;
  padding: 3px 11px;
}

/* 产品链接卡片（整卡可点击，新窗口打开） */
.product-card-link {
  display: block;
  color: inherit;
  text-decoration: none;
  border-radius: var(--radius);
}
.product-card-link .product-card { height: 100%; }
.product-link-hint {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  align-self: flex-start;
  margin-top: 2px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--primary);
  transition: gap .2s ease;
}
.product-card:hover .product-link-hint { gap: 8px; }

/* ============================================================
   ⑦ 页脚
   ============================================================ */
.site-footer {
  background: linear-gradient(170deg, var(--dark-bg) 0%, var(--dark-bg-2) 100%);
  color: rgba(255, 255, 255, .75);
  padding-top: 72px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 56px;
}
.footer-brand .brand-name { color: #fff; }
.footer-brand .brand-name small { color: rgba(255, 255, 255, .45); }
.footer-brand > p { margin-top: 18px; font-size: 14px; line-height: 1.9; max-width: 380px; }
.footer-col h4 {
  color: #fff;
  font-size: 15px;
  letter-spacing: 2px;
  margin-bottom: 18px;
  position: relative;
  padding-bottom: 10px;
}
.footer-col h4::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 28px;
  height: 2px;
  border-radius: 2px;
  background: var(--grad-primary);
}
.footer-col a {
  display: block;
  padding: 6px 0;
  font-size: 14px;
  transition: color .2s ease, transform .2s ease;
}
.footer-col a:hover { color: #67e8f9; transform: translateX(4px); }
.footer-col p { font-size: 14px; padding: 5px 0; line-height: 1.8; }

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .1);
  padding-block: 20px;
  text-align: center;
  font-size: 13px;
  color: rgba(255, 255, 255, .45);
}
.footer-bottom p + p { margin-top: 4px; }
.footer-bottom a {
  color: inherit;
  text-decoration: none;
  transition: color .2s ease;
}
.footer-bottom a:hover { color: #67e8f9; }

/* ============================================================
   滚动渐入动画（由 js 添加 .in 触发；无 JS 时不受影响）
   ============================================================ */
html.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .6s ease, transform .6s ease;
}
html.js .reveal.in {
  opacity: 1;
  transform: none;
}

/* ============================================================
   响应式适配
   ============================================================ */
@media (max-width: 1024px) {
  .section { padding-block: 76px; }

  /* 产品：3 列 → 2 列 */
  .products-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  /* ---------- 移动端导航（抽屉式下拉） ---------- */
  .nav-toggle { display: flex; color: inherit; }

  .main-nav {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 4px;
    padding: 16px 24px 24px;
    background: #fff;
    color: var(--ink);
    box-shadow: var(--shadow-md);
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s ease, transform .25s ease, visibility .25s;
  }
  body.nav-open .main-nav {
    transform: none;
    opacity: 1;
    visibility: visible;
  }
  .nav-link { padding: 14px 16px; font-size: 16px; }
  .nav-link::after { left: 16px; right: 16px; bottom: 8px; }
}

@media (max-width: 640px) {
  .section { padding-block: 60px; }
  .section-head { margin-bottom: 40px; }
  .container { padding-inline: 20px; }

  /* 产品：2 列 → 1 列 */
  .products-grid { grid-template-columns: 1fr; gap: 22px; }

  .footer-grid { grid-template-columns: 1fr; gap: 36px; }

  .hero-title { letter-spacing: 1px; }
  .hero-slogan { letter-spacing: 2px; }
  .hero-actions .btn { width: 100%; }
}

/* 减少动画偏好 */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html.js .reveal { opacity: 1; transform: none; transition: none; }
  .product-card:hover { transform: none; }
}
