/* ============================================================
   福州天心缘科技有限公司 官网样式
   —— 流体字号 + 响应式布局，支持宽屏 / 笔记本 / 平板 / 手机
   ============================================================ */

:root {
  --text: #4a5868;
  --text-light: #8593a3;
  --head: #16283c;
  --link: #0f6fd8;
  --accent: #e8590c;
  --accent-soft: #fff3ea;
  --bg: #f4f6f8;
  --line: #e8ecf0;
  --line-strong: #dbe2ea;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 1px 2px rgba(22, 40, 60, .05), 0 8px 24px rgba(22, 40, 60, .06);
  --shadow-lift: 0 1px 2px rgba(22, 40, 60, .05), 0 12px 32px rgba(22, 40, 60, .10);
  --focus: 0 0 0 3px rgba(232, 89, 12, .28);

  /* 流体尺寸：随视口平滑缩放 */
  /* --wrap 为真正的内容宽度；--card = 内容宽度 + 两侧内边距，用于卡片外壳 */
  --wrap: 1200px;
  --card: calc(var(--wrap) + 2 * var(--pad-x));
  --fs-base: clamp(15px, 0.22vw + 14.2px, 17px);
  --fs-h1: clamp(19px, 1.1vw + 15px, 27px);
  --fs-h2: clamp(21px, 1.5vw + 15px, 32px);
  --fs-h3: clamp(18px, 1.0vw + 14.5px, 25px);
  --fs-h4: clamp(16px, 0.5vw + 14.4px, 19px);
  --fs-body: clamp(15px, 0.25vw + 14px, 17px);
  --fs-small: clamp(13px, 0.15vw + 12.4px, 14px);
  --pad-x: clamp(16px, 2.6vw, 28px);
  --fig-pad: clamp(10px, 1.4vw, 18px);   /* 图片衬框内边距 */
  --qr-pad: 10px;                        /* 二维码四周白边 */
  --band-py: clamp(30px, 4.2vw, 52px);
  --hero-py: clamp(44px, 6vw, 86px);
  /* 正文阅读上限：所有卡片共用同一条内容栏，左右边缘保持一致 */
  --read-w: min(940px, 100%);
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "PingFang SC", "Microsoft YaHei", "Source Han Sans SC", "Noto Sans SC",
               -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: var(--fs-base);
  line-height: 1.9;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  -webkit-tap-highlight-color: transparent;
}

/* 选中文本高亮 */
::selection { background: #ffd9c2; color: var(--head); }

/* 键盘焦点可见（无障碍） */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}

/* 正文链接：默认无下划线，悬停时才显示并整体变橙 */
a {
  color: var(--link);
  text-decoration: none;
  text-decoration-color: rgba(15, 111, 216, .32);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color .18s ease, text-decoration-color .18s ease;
}
a:hover {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: currentColor;
}
img { max-width: 100%; height: auto; }

h1, h2, h3, h4 {
  color: var(--head);
  font-weight: 600;
  line-height: 1.45;
  margin: 0;
  letter-spacing: .01em;
  text-wrap: balance;
}
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); text-align: center; margin: 0 0 20px; }
h3 {
  font-size: var(--fs-h3);
  text-align: center;
  margin: 0 0 16px;
  position: relative;
  padding-top: 22px;
}
/* 区块标题上方的小装饰线（绝对定位，不额外占用版面） */
.band h3::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 34px;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, rgba(232, 89, 12, 0), var(--accent), rgba(232, 89, 12, 0));
}
h4 {
  font-size: var(--fs-h4);
  margin: clamp(24px, 2.4vw, 36px) 0 14px;
  padding: 2px 0 2px 14px;
  border-left: 3px solid var(--accent);
  border-radius: 2px;
  background: linear-gradient(90deg, rgba(232, 89, 12, .07), rgba(232, 89, 12, 0) 55%);
  line-height: 1.5;
}

p { margin: 0 0 1em; text-wrap: pretty; }

.wrap {
  /* --card = 内容宽 + 两侧内边距：保证 header / 卡片 / footer 的内容左右对齐 */
  max-width: var(--card);
  margin: 0 auto;
  padding: 0 var(--pad-x);
}

/* ---------- header ---------- */
.site-header {
  background: rgba(255, 255, 255, .94);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
  transition: box-shadow .22s ease;
}
/* 页面滚动后给头部加投影，与内容分离 */
.site-header.scrolled {
  box-shadow: 0 4px 18px rgba(22, 40, 60, .08);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: clamp(12px, 1.2vw, 18px);
  padding-bottom: clamp(12px, 1.2vw, 18px);
}
.site-title { min-width: 0; flex: 1 1 auto; }
.site-title a {
  color: var(--head);
  font-size: clamp(15px, 1.1vw + 11px, 22px);
  font-weight: 600;
  line-height: 1.4;
  text-decoration: none;
  letter-spacing: .02em;
  transition: color .18s ease;
  display: block;
}
/* 宽屏显示完整标题，窄屏只显示公司全名 */
.site-title .t-long { display: inline; }
.site-title .t-short { display: none; }
.site-title a:hover { text-decoration: none; color: var(--link); }

.nav { display: flex; align-items: center; gap: clamp(16px, 1.8vw, 26px); flex: none; }
.nav a {
  color: var(--text);
  font-size: clamp(14px, 0.5vw + 12.6px, 16px);
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  text-decoration: none;
  letter-spacing: .03em;
  transition: color .18s ease, border-color .18s ease;
}
.nav a:hover { color: var(--link); text-decoration: none; }
.nav a.active { color: var(--accent); border-bottom-color: var(--accent); }

.icon-btn {
  background: none;
  border: 0;
  cursor: pointer;
  padding: 5px;
  color: var(--text-light);
  display: inline-flex;
  border-radius: 6px;
  transition: color .18s ease, background .18s ease;
}
.icon-btn:hover { color: var(--accent); background: var(--accent-soft); }
.icon-btn svg { width: 16px; height: 16px; fill: currentColor; }
.menu-btn { display: none; cursor: pointer; }

/* 移动端菜单开关：纯 CSS 实现，禁用 JS 时导航依然可用。
   复选框视觉隐藏但保留可聚焦性，键盘用户可用 Tab 聚焦、Space 展开。 */
.nav-toggle { display: none; }
.nav-toggle:focus-visible + .menu-btn {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

/* 仅供读屏软件使用的文本 */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ---------- page title ---------- */
.page-title {
  background: linear-gradient(180deg, #fff 0%, #fbfcfd 100%);
  border-bottom: 1px solid var(--line);
  padding: clamp(18px, 2.2vw, 28px) 0;
  margin-bottom: clamp(16px, 2vw, 24px);
}
.page-title h1 {
  color: var(--head);
  display: inline-block;
  padding-left: 14px;
  border-left: 4px solid var(--accent);
  border-radius: 2px;
  letter-spacing: .02em;
}

/* ---------- color bands ---------- */
.band {
  padding: var(--band-py) 0;
  /* 卡片化：宽屏下不顶到屏幕边缘，保留圆角与投影 */
  max-width: var(--card);
  margin: 0 auto clamp(16px, 2vw, 24px);
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
/* 正文限宽，保证阅读行长舒适；
   所有卡片共用同一条内容栏，居中排版，左右边缘保持一致 */
.band > .wrap > p,
.band > .wrap > ul,
.band > .wrap > ol,
.band > .wrap > h4 {
  max-width: var(--read-w);
  margin-left: auto;
  margin-right: auto;
}
.band p { font-size: var(--fs-body); margin: 0 0 16px; }
.band ul, .band ol { font-size: var(--fs-body); margin: 0 0 16px; padding-left: clamp(20px, 2vw, 26px); }
.band li { margin-bottom: 10px; }
.band li::marker { color: var(--accent); font-weight: 600; }
.band li:last-child { margin-bottom: 0; }
.band figure { margin: clamp(18px, 2vw, 26px) 0 0; text-align: center; }
/* 图片与正文共用同一条内容栏，居中对齐 */
.band > .wrap > figure {
  max-width: var(--read-w);
  margin-left: auto;
  margin-right: auto;
}

/* 居中的副标题（紧跟 h3 的说明句） */
.band .tagline {
  text-align: center;
  color: var(--text-light);
  font-size: calc(var(--fs-body) - 1px);
  margin-bottom: clamp(18px, 2vw, 26px);
}

/* 图片：浅底衬框 + 悬停微放大
   box-sizing: content-box —— 让 aspect-ratio 作用在图片内容区，
   这样按原始宽高比预留空间，图片不会被拉伸变形 */
.band figure img {
  display: inline-block;
  box-sizing: content-box;
  border-radius: var(--radius);
  padding: var(--fig-pad);
  background: linear-gradient(150deg, #f8fafc, #eef2f6);
  box-shadow: inset 0 0 0 1px rgba(22, 40, 60, .05);
  transition: transform .28s ease, box-shadow .28s ease;
}
.band figure:hover img {
  transform: translateY(-2px);
  box-shadow: inset 0 0 0 1px rgba(22, 40, 60, .05), 0 10px 26px rgba(22, 40, 60, .10);
}

/* hero：整幅铺满，内部内容与卡片同宽对齐 */
.band-hero {
  position: relative;
  isolation: isolate;
  max-width: none;
  background:
    radial-gradient(760px 360px at 50% 118%, rgba(232, 89, 12, .20), transparent 62%),
    radial-gradient(520px 300px at 12% 0%, rgba(255, 255, 255, .07), transparent 60%),
    linear-gradient(135deg, #16283c 0%, #2a4a6b 100%);
  color: rgba(255, 255, 255, .8);
  text-align: center;
  padding: var(--hero-py) 0;
  margin: 0 0 clamp(16px, 2vw, 24px);
  border-radius: 0;
  box-shadow: none;
  overflow: hidden;
}
/* 首屏的极淡斜纹底纹，增加层次但不干扰文字 */
.band-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: repeating-linear-gradient(135deg,
    rgba(255, 255, 255, .035) 0 1px, transparent 1px 12px);
  pointer-events: none;
}
.band-hero h2 {
  color: #fff;
  font-size: clamp(22px, 2.2vw + 14px, 36px);
  margin-bottom: 18px;
  letter-spacing: .04em;
  text-shadow: 0 2px 10px rgba(0, 0, 0, .28);
}
.band-hero p {
  color: rgba(255, 255, 255, .74);
  margin-bottom: 8px;
  font-size: clamp(14.5px, 0.5vw + 13.4px, 17px);
  letter-spacing: .02em;
}
.band-hero p:last-child { margin-top: 20px; }
.band-hero a { color: #ffb478; text-decoration-color: rgba(255, 180, 120, .45); }
.band-hero a:hover { color: #fff; text-decoration-color: currentColor; }

/* 图片尺寸
   width 为图片内容宽度，衬框内边距另计，因此衬框整体宽度与原先一致；
   aspect-ratio 与图片原始宽高比一致：懒加载时浏览器可提前预留空间，
   图片也不会因 CSS 设定宽度而被拉伸 */
.img-product { width: calc(clamp(240px, 22vw, 330px) - 2 * var(--fig-pad)); }
.img-ltd { aspect-ratio: 756 / 580; }
.img-hge { aspect-ratio: 654 / 582; }
.img-qrcode { width: clamp(180px, 15vw, 210px); aspect-ratio: 1 / 1; }
.img-about {
  width: calc(clamp(280px, 40vw, 560px) - 2 * var(--fig-pad));
  max-width: 100%;
  aspect-ratio: 1000 / 681;
}

/* 说明书下载：链接做成标签 + 下载图标 */
.band-manual p { margin-bottom: 14px; }
.band-manual a {
  display: inline-block;
  padding: 4px 13px 4px 12px;
  margin: 3px 6px 3px 0;
  background: #f2f6fb;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: calc(var(--fs-body) - 1.5px);
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(22, 40, 60, .04);
  transition: background .18s ease, color .18s ease, border-color .18s ease,
              box-shadow .18s ease, transform .18s ease;
}
.band-manual a::after {
  content: "";
  display: inline-block;
  width: 13px;
  height: 13px;
  margin-left: 7px;
  vertical-align: -1px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 3v11m0 0 4.2-4.2M12 14l-4.2-4.2M4.5 17.5v1.2a2.3 2.3 0 0 0 2.3 2.3h10.4a2.3 2.3 0 0 0 2.3-2.3v-1.2' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 3v11m0 0 4.2-4.2M12 14l-4.2-4.2M4.5 17.5v1.2a2.3 2.3 0 0 0 2.3 2.3h10.4a2.3 2.3 0 0 0 2.3-2.3v-1.2' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
.band-manual a:hover {
  background: var(--accent-soft);
  color: var(--accent);
  text-decoration: none;
  border-color: #f6d3bb;
  box-shadow: 0 4px 12px rgba(232, 89, 12, .14);
  transform: translateY(-1px);
}
.band-manual a:active { transform: translateY(0); }

/* 联系信息：左右两栏，整体沿用与其它卡片相同的内容栏 */
.band-contact .contact-row, .band-contactpage .contact-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: clamp(24px, 4vw, 48px);
  max-width: var(--read-w);
  margin: 0 auto;
}
.band-contact .info, .band-contactpage .info { flex: 1 1 320px; min-width: 0; }
.band-contact .info p, .band-contactpage .info p { margin-bottom: 12px; }
/* 二维码做成独立卡片，突出"要扫的东西" */
.band-contact figure, .band-contactpage figure {
  margin: 0;
  flex: 0 0 auto;
  text-align: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 6px 12px;
  box-shadow: var(--shadow);
  transition: box-shadow .24s ease, transform .24s ease;
}
.band-contact figure:hover, .band-contactpage figure:hover {
  box-shadow: var(--shadow-lift);
  transform: translateY(-2px);
}
.band-contact figure img, .band-contactpage figure img {
  /* 二维码为正方形：边框盒比例与内容一致，不会变形 */
  box-sizing: border-box;
  padding: var(--qr-pad);
  background: #fff;
  box-shadow: none;
  border-radius: 4px;
  display: block;
  margin: 0 auto;
  aspect-ratio: 1 / 1;
}
.band-contact figure figcaption, .band-contactpage figure figcaption {
  font-size: var(--fs-small);
  color: var(--text-light);
  margin-top: 6px;
  line-height: 1.6;
}

.band-products, .band-advantage, .band-manual,
.band-principle, .band-contact, .band-about, .band-contactpage { background: #fff; }

.site-footer {
  text-align: center;
  padding: clamp(20px, 2.4vw, 26px) 0 clamp(30px, 3.4vw, 40px);
  color: var(--text-light);
  font-size: var(--fs-small);
  border-top: 1px solid var(--line);
  letter-spacing: .02em;
}

/* ============================================================
   宽屏优化（>=1600px）
   ============================================================ */
@media (min-width: 1600px) {
  :root {
    --wrap: 1320px;
    --read-w: min(1160px, 100%);
    --fig-pad: 22px;
  }
  .band-hero { padding: 108px 0; }
  .band-hero h2 { font-size: 38px; }
  .band-hero p { font-size: 18px; }
  .band h3 { font-size: 26px; }
  .img-product { width: calc(380px - 2 * var(--fig-pad)); }
  .img-about { width: calc(680px - 2 * var(--fig-pad)); }
}

/* 超宽屏：适度加宽内容栏，避免文字过于松散 */
@media (min-width: 1920px) {
  :root {
    --wrap: 1400px;
    --read-w: min(1240px, 100%);
  }
  .band-hero { padding: 124px 0; }
  .img-qrcode { width: 230px; }
  .img-product { width: calc(400px - 2 * var(--fig-pad)); }
  .img-about { width: calc(760px - 2 * var(--fig-pad)); }
}

/* ============================================================
   平板 / 小笔记本（<=1080px）
   ============================================================ */
@media (max-width: 1080px) {
  .band > .wrap > p,
  .band > .wrap > ul,
  .band > .wrap > ol,
  .band > .wrap > h4 { max-width: 100%; }
  /* 联系信息区与其它卡片正文栏保持同样的左右边界 */
  .band-contact .contact-row,
  .band-contactpage .contact-row { max-width: 100%; }
}

/* ============================================================
   窄屏 / 移动端（<=860px）
   ============================================================ */
@media (max-width: 860px) {
  :root { --fig-pad: 12px; }
  /* 复选框视觉隐藏但保留在无障碍树与 Tab 顺序中 */
  .nav-toggle {
    display: inline-block;
    position: absolute;
    width: 1px; height: 1px;
    margin: -1px; padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
  }
  .menu-btn { display: inline-flex; }
  .nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: #fff;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 0;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 8px 20px rgba(22, 40, 60, .07);
    max-height: calc(100vh - 100%);
    overflow-y: auto;
  }
  /* 纯 CSS 展开：不依赖 JS */
  .nav-toggle:checked ~ .nav { display: flex; }
  .nav.open { display: flex; }
  .nav a {
    padding: 14px var(--pad-x);
    font-size: 16px;
    border-bottom: 0;
    border-left: 3px solid transparent;
  }
  .nav a.active { border-bottom: 0; border-left-color: var(--accent); background: var(--accent-soft); }
  .icon-btn { padding: 8px; }

  .band-hero { padding: 48px 0; }
  .band-contact .contact-row, .band-contactpage .contact-row { gap: 26px; }
}

/* 窄屏：只显示公司全名，标题字号仍高于正文，保持品牌感 */
@media (max-width: 1180px) {
  .site-title .t-long { display: none; }
  .site-title .t-short { display: inline; }
  .site-title a {
    font-size: clamp(16px, 0.6vw + 13px, 20px);
    line-height: 1.4;
    overflow-wrap: anywhere;
  }
}

/* ============================================================
   小手机（<=560px）
   ============================================================ */
@media (max-width: 560px) {
  :root {
    --band-py: 26px;
    --hero-py: 40px;
    --fig-pad: 8px;
  }
  .site-header .wrap { gap: 10px; }

  .band-hero h2 { font-size: 21px; }
  .band-hero p { font-size: 14.5px; }
  .band-hero p:last-child { margin-top: 14px; }

  .band h3 { padding-top: 16px; }
  .band h4 { margin-top: 22px; padding-left: 11px; }
  .band p, .band ul, .band ol { margin-bottom: 12px; }
  .band li { margin-bottom: 8px; }
  .band figure { margin-top: 16px; }

  .band-manual a {
    display: block;
    margin: 0 0 6px;
    text-align: center;
  }
  .band-manual p { margin-bottom: 16px; }

  .band-contact .contact-row, .band-contactpage .contact-row { flex-direction: column; }
  .band-contact figure, .band-contactpage figure { align-self: center; width: 100%; max-width: 280px; }

  .page-title h1 { padding-left: 11px; }
}

/* ============================================================
   超窄屏（<=380px）
   ============================================================ */
@media (max-width: 380px) {
  :root { --pad-x: 14px; }
  .band-hero h2 { font-size: 19px; }
  .band-hero p { font-size: 13.5px; }
  .nav a { padding: 13px var(--pad-x); }
}

/* 横屏手机：压缩纵向留白 */
@media (max-height: 480px) and (orientation: landscape) {
  .band-hero { padding: 32px 0; }
  .band-hero h2 { font-size: 22px; margin-bottom: 10px; }
  .band-hero p { margin-bottom: 4px; }
}

/* 触控设备：加大点击区域 */
@media (pointer: coarse) {
  .icon-btn { padding: 10px; }
  .icon-btn svg { width: 20px; height: 20px; }
}

/* 减少动效偏好 */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .band figure:hover img,
  .band-manual a:hover,
  .band-contact figure:hover,
  .band-contactpage figure:hover { transform: none; }
}

/* ============================================================
   打印样式：去掉导航与交互元素，链接展开为网址
   ============================================================ */
@media print {
  body { background: #fff; color: #000; font-size: 12pt; line-height: 1.7; }
  .site-header, .menu-btn, .page-title, .icon-btn, .nav-toggle { display: none !important; }
  .band {
    box-shadow: none;
    border: 1px solid #ddd;
    border-radius: 0;
    break-inside: avoid;
    page-break-inside: avoid;
  }
  .band-hero {
    background: none !important;
    color: #000;
    border: 0;
  }
  .band-hero h2, .band-hero p, .band-hero a { color: #000 !important; text-shadow: none; }
  .band figure img { box-shadow: none; }
  .band figure:hover img, .band-manual a:hover { transform: none; }
  .band-manual a { background: none; border: 1px solid #ccc; box-shadow: none; }
  a { color: #000; text-decoration: underline; }
  .band a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; color: #555; }
  .site-footer { border-top: 1px solid #ddd; }
  h1, h2, h3, h4 { break-after: avoid; page-break-after: avoid; }
}
