/* ==========================================================================
   Nivelhome — 前台设计系统
   轨道：品牌物料轨（网页 UI）→ 全站无衬线、禁渐变、禁投影、墨黑不纯黑
   色彩纪律：暖白底 + 墨黑文字 + 唯一主色（陶土橙，仅用于 CTA 与状态）
   栅格：8px 基准，间距层级 8 / 16 / 24 / 48 / 80 / 120
   ========================================================================== */

:root {
  /* 底色层 */
  --paper: #FAF9F6;      /* 暖白，页面底色 */
  --surface: #FFFFFF;    /* 卡片、浮层 */
  --sand: #EFECE5;       /* 次级块、图片底 */
  --line: #DCD8CF;       /* 分隔线 */
  --line-strong: #C4BFB3;

  /* 文字层：墨黑，不用 #000 */
  --ink: #1C1F22;
  --ink-2: #4B5259;      /* 次要正文 */
  --ink-3: #858C93;      /* 辅助说明 */

  /* 唯一主色：陶土橙。小面积使用，禁铺底 */
  --accent: #B4512A;
  --accent-dark: #8F3D1E;
  --accent-tint: #F5E7DE;

  /* 类型 */
  --sans: "Inter", "Helvetica Neue", "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  --font-display: 600;
  --tracking-tight: -0.02em;

  /* 间距（8px 基准） */
  --s1: 8px; --s2: 16px; --s3: 24px; --s4: 48px; --s5: 80px; --s6: 120px;

  --radius: 2px;         /* 全线 2px，拒绝圆胖 */
  --wrap: 1240px;
  --header-h: 76px;
  --dur: 200ms;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.62;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3, h4 { margin: 0; font-weight: var(--font-display); letter-spacing: var(--tracking-tight); line-height: 1.15; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

::selection { background: var(--accent-tint); }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--ink); color: #fff; padding: 12px 20px;
}
.skip-link:focus { left: 0; }

/* ---------- 栅格与容器 ---------- */

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.section { padding: 96px 0; }
.section--tight { padding: 64px 0; }
.section--sand { background: var(--sand); }
.section--ink { background: var(--ink); color: #F2F0EC; }

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

/* ---------- 排版组件 ---------- */

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 20px;
}
.eyebrow::before { content: ""; width: 24px; height: 1px; background: currentColor; }
.section--ink .eyebrow { color: #E08F6B; }

.h1 { font-size: clamp(40px, 5.4vw, 68px); max-width: 15ch; }
.h2 { font-size: clamp(30px, 3.6vw, 46px); max-width: 20ch; }
.h3 { font-size: clamp(22px, 2.2vw, 28px); }
.lede { font-size: 18px; color: var(--ink-2); max-width: 62ch; margin-top: 20px; }
.section--ink .lede { color: #B9BEC4; }

.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; margin-bottom: 48px; }
.section-head .link-more { flex-shrink: 0; }

/* 链接：下划线由 1px 变 2px，不用颜色变化（对比度足够） */
.link-more {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 600; letter-spacing: 0.02em;
  border-bottom: 1px solid var(--line-strong); padding-bottom: 4px;
  transition: border-color var(--dur);
}
.link-more:hover { border-color: var(--ink); }
.link-more svg { width: 14px; height: 14px; }

/* ---------- 按钮 ---------- */

.btn {
  white-space: nowrap;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 52px; padding: 0 28px;
  border: 1px solid transparent; border-radius: var(--radius);
  font-size: 15px; font-weight: 600; letter-spacing: 0.01em;
  transition: background var(--dur), color var(--dur), border-color var(--dur);
}
.btn svg { width: 16px; height: 16px; }
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-dark); }
.btn--ghost { border-color: var(--line-strong); color: var(--ink); }
.btn--ghost:hover { border-color: var(--ink); background: var(--surface); }
.btn--light { background: #F2F0EC; color: var(--ink); }
.btn--light:hover { background: #fff; }
.btn--sm { height: 40px; padding: 0 18px; font-size: 13px; }
.btn--block { width: 100%; }

/* ---------- 顶部条 + 导航 ---------- */

.topbar {
  background: var(--ink); color: #C9CDD2;
  font-size: 12.5px; letter-spacing: 0.01em;
}
.topbar .wrap { display: flex; justify-content: space-between; align-items: center; height: 38px; gap: 24px; }
.topbar a:hover { color: #fff; }
.topbar-right { display: flex; gap: 24px; }

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 249, 246, 0.94);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; height: var(--header-h); gap: 40px; }

.brand { display: inline-flex; align-items: center; gap: 12px; flex-shrink: 0; }
.brand-mark {
  width: 36px; height: 36px; display: grid; place-items: center;
  background: var(--ink); color: var(--paper);
  font-size: 13px; font-weight: 700; letter-spacing: 0.02em;
}
.brand-name { font-size: 19px; font-weight: 600; letter-spacing: -0.01em; }
.brand-logo { height: 34px; width: auto; }

.nav { display: flex; gap: 32px; margin-left: auto; }
.nav a {
  position: relative; font-size: 14.5px; font-weight: 500; color: var(--ink-2);
  padding: 6px 0; transition: color var(--dur);
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }
.nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
  background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform var(--dur);
}
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }
.header-actions { display: flex; align-items: center; gap: 12px; }

.nav-toggle { display: none; width: 44px; height: 44px; border: 1px solid var(--line-strong); background: transparent; }
.nav-toggle span { display: block; width: 18px; height: 1.5px; background: var(--ink); margin: 4px auto; }

/* ---------- Hero ---------- */

.hero { position: relative; background: var(--sand); overflow: hidden; }
.hero-slide { display: none; position: relative; }
.hero-slide.is-active { display: block; }
/* 轮播图按上传原图比例完整显示，不裁切、不变形 */
.hero-slide img { width: 100%; height: auto; max-width: 100%; object-fit: contain; display: block; }
.hero-copy { display: flex; flex-direction: column; justify-content: center; padding: 80px 64px 80px 0; }
.hero-copy .eyebrow { margin-bottom: 24px; }
.hero-copy h1 { font-size: clamp(38px, 4.6vw, 60px); max-width: 13ch; }
.hero-copy p { margin-top: 24px; font-size: 17px; color: var(--ink-2); max-width: 46ch; }
.hero-cta { display: flex; gap: 12px; margin-top: 40px; flex-wrap: wrap; }

.hero-media { position: relative; background: #E3DFD6; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero-media .hero-tag {
  position: absolute; left: 24px; bottom: 24px;
  background: var(--paper); padding: 12px 16px;
  font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
}

.hero-nav {
  position: absolute; left: 50%; transform: translateX(-50%); bottom: 20px; z-index: 2;
  background: var(--paper); padding: 6px 10px; border-radius: 999px;
}
.hero-dots { display: flex; gap: 8px; align-items: center; }
.hero-dots button { width: 9px; height: 9px; border: 0; padding: 0; background: var(--line-strong); border-radius: 50%; cursor: pointer; transition: background var(--dur); }
.hero-dots button:hover { background: var(--ink-3); }
.hero-dots button[aria-current="true"] { background: var(--ink); }
.hero-arrow { width: 34px; height: 34px; border: 1px solid var(--line); background: transparent; display: grid; place-items: center; }
.hero-arrow:hover { border-color: var(--ink); }
.hero-arrow svg { width: 14px; height: 14px; }

/* 优势条 */
.proof { border-bottom: 1px solid var(--line); }
.proof .wrap { display: grid; grid-template-columns: repeat(4, 1fr); }
.proof-item { padding: 28px 24px; border-left: 1px solid var(--line); }
.proof-item:first-child { border-left: 0; padding-left: 0; }
.proof-item strong { display: block; font-size: 15px; font-weight: 600; }
.proof-item span { display: block; font-size: 13.5px; color: var(--ink-3); margin-top: 4px; }

/* ---------- 分类卡（1:1 方形） ---------- */

.cat-card { display: block; background: var(--surface); border: 1px solid var(--line); }
.cat-media { position: relative; aspect-ratio: 1 / 1; background: var(--sand); overflow: hidden; }
.cat-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 500ms ease; }
.cat-card:hover .cat-media img { transform: scale(1.03); }
.cat-body { padding: 24px; display: flex; flex-direction: column; gap: 8px; }
.cat-body h3 { font-size: 19px; }
.cat-body p { font-size: 14px; color: var(--ink-2); }
.cat-body .cat-count { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); margin-top: 8px; display: flex; justify-content: space-between; align-items: center; }
.cat-card:hover .cat-body .cat-count svg { transform: translateX(3px); }
.cat-count svg { width: 14px; height: 14px; transition: transform var(--dur); }

/* ---------- 产品卡 ---------- */

.product-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); }
.product-media { position: relative; aspect-ratio: 1 / 1; background: var(--sand); overflow: hidden; }
.product-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 500ms ease; }
.product-card:hover .product-media img { transform: scale(1.03); }
.product-badge {
  position: absolute; top: 12px; left: 12px; background: var(--paper);
  font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; padding: 6px 10px;
}
.product-body { padding: 20px 20px 24px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.product-meta { display: flex; gap: 8px; font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); }
.product-body h3 { font-size: 18px; letter-spacing: -0.01em; }
.product-body p { font-size: 14px; color: var(--ink-2); }
.product-foot { margin-top: auto; padding-top: 12px; display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--ink-3); border-top: 1px solid var(--line); }
.product-foot strong { color: var(--ink); font-weight: 600; }
.product-foot svg { width: 14px; height: 14px; transition: transform var(--dur); }
.product-card:hover .product-foot svg { transform: translateX(3px); }

/* ---------- 为什么选我们 ---------- */

.why-item { padding: 32px 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 48px 1fr; gap: 20px; }
.section--ink .why-item { border-color: #33383D; }
.why-num { font-size: 13px; font-variant-numeric: tabular-nums; color: var(--accent); padding-top: 4px; }
.section--ink .why-num { color: #E08F6B; }
.why-item h3 { font-size: 20px; margin-bottom: 8px; }
.why-item p { font-size: 15px; color: var(--ink-2); }
.section--ink .why-item p { color: #B9BEC4; }

/* ---------- 统计数字 ---------- */

.stats { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); }
.stat { padding: 32px 24px 0 0; }
.stat strong { display: block; font-size: clamp(34px, 3.6vw, 48px); font-weight: 600; letter-spacing: -0.03em; line-height: 1; }
.stat span { display: block; margin-top: 12px; font-size: 13.5px; color: var(--ink-3); }
/* 单行紧凑版（About 页右栏） */
.stats--inline { gap: 0 12px; }
.stats--inline .stat { padding: 24px 12px 0 0; }
.stats--inline .stat strong { font-size: clamp(20px, 1.9vw, 27px); white-space: nowrap; }
.stats--inline .stat span { margin-top: 8px; font-size: 12.5px; }

/* ---------- 流程 ---------- */

.process { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border-top: 1px solid var(--line-strong); }
.process-step { padding: 32px 24px 0 0; position: relative; }
.process-step::before { content: ""; position: absolute; top: -5px; left: 0; width: 9px; height: 9px; background: var(--accent); }
.process-step em { font-style: normal; font-size: 12px; letter-spacing: 0.12em; color: var(--ink-3); }
.process-step h3 { font-size: 18px; margin: 10px 0 8px; }
.process-step p { font-size: 14px; color: var(--ink-2); }

/* ---------- CTA 条 ---------- */

.cta { background: var(--ink); color: #F2F0EC; }
.cta .wrap { display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: center; padding-top: 80px; padding-bottom: 40px; }
.cta h2 { font-size: clamp(28px, 3vw, 40px); max-width: 18ch; }
.cta p { margin-top: 16px; color: #B9BEC4; font-size: 16px; max-width: 46ch; }
.cta-actions { display: flex; gap: 12px; justify-content: flex-end; flex-wrap: wrap; }

/* ---------- 页脚 ---------- */

.site-footer { background: var(--ink); color: #A9AFB6; padding: 36px 0 32px; font-size: 14px; }
.footer-grid { display: grid; grid-template-columns: 1.1fr 2.2fr; gap: 40px; align-items: center; } /* logo 与右侧栏组垂直居中 */
.footer-cols { display: grid; grid-template-columns: 1fr 1fr 1.1fr; gap: 40px; align-items: start; } /* 三列顶对齐 */
.footer-brand .brand-mark { background: var(--paper); color: var(--ink); }
.footer-brand .brand-name { color: #F2F0EC; }
.footer-brand .brand { display: block; }
.footer-brand .footer-logo { display: block; width: 100%; max-width: 320px; aspect-ratio: 1 / 1; height: auto; object-fit: contain; object-position: center; margin: 0; /* 1:1 画布，内容垂直居中 */ }
.footer-brand p { margin-top: 4px; max-width: 34ch; line-height: 1.7; }
.site-footer h4 { color: #F2F0EC; font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 18px; font-weight: 600; }
.site-footer li { margin-bottom: 10px; }
.site-footer a:hover { color: #fff; }
.footer-bottom {
  margin-top: 56px; padding-top: 24px; border-top: 1px solid #30353A;
  display: flex; justify-content: space-between; gap: 24px; font-size: 12.5px; color: #7D848C; flex-wrap: wrap;
}
.socials { display: flex; gap: 8px; margin-top: 20px; }
.socials a { width: 34px; height: 34px; border: 1px solid #3A4046; display: grid; place-items: center; }
.socials a:hover { border-color: #F2F0EC; color: #fff; }
.socials svg { width: 15px; height: 15px; }

/* ---------- 内页页头 ---------- */

.page-head { padding: 64px 0 48px; border-bottom: 1px solid var(--line); background: var(--paper); }
.page-head .crumb { font-size: 13px; color: var(--ink-3); margin-bottom: 20px; }
.page-head .crumb a:hover { color: var(--ink); }
.page-head h1 { font-size: clamp(32px, 4vw, 52px); max-width: none; white-space: nowrap; }
.page-head p { margin-top: 16px; font-size: 17px; color: var(--ink-2); max-width: none; }

/* ---------- 筛选条 ---------- */

.filter-bar {
  position: sticky; top: var(--header-h); z-index: 30;
  background: var(--paper); border-bottom: 1px solid var(--line);
}
.filter-bar .wrap { display: flex; align-items: center; gap: 12px; min-height: 64px; flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; }
.chip {
  height: 36px; padding: 0 16px; border: 1px solid var(--line-strong); background: transparent;
  font-size: 13.5px; font-weight: 500; display: inline-flex; align-items: center; gap: 8px;
}
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.chip small { font-size: 11px; opacity: 0.6; font-variant-numeric: tabular-nums; }
.search-box { margin-left: auto; display: flex; align-items: center; border: 1px solid var(--line-strong); height: 36px; padding: 0 12px; gap: 8px; min-width: 260px; background: var(--surface); }
.search-box input { border: 0; outline: 0; background: transparent; font: inherit; font-size: 13.5px; width: 100%; }
.search-box svg { width: 15px; height: 15px; color: var(--ink-3); flex-shrink: 0; }

/* ---------- 产品详情 ---------- */

.pdp { display: grid; grid-template-columns: 1.15fr 1fr; gap: 56px; padding: 56px 0 96px; align-items: start; }
.pdp-gallery { position: sticky; top: calc(var(--header-h) + 24px); }
.pdp-main { aspect-ratio: 1 / 1; background: var(--sand); border: 1px solid var(--line); overflow: hidden; }
/* ---------- About 页工厂图片 ---------- */
.about-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 48px; }
.about-gallery--4 { grid-template-columns: repeat(4, 1fr); gap: 12px; }
/* About 页：左文 1.2fr / 右图 1fr，窄屏恢复单列 */
.grid--about { grid-template-columns: 1.2fr 1fr; }
.about-gallery figure { margin: 0; border: 1px solid var(--line); background: var(--paper); }
.about-gallery img { width: 100%; height: 100%; aspect-ratio: 3 / 2; object-fit: cover; display: block; }

.pdp-main img { width: 100%; height: 100%; object-fit: cover; }
.pdp-thumbs { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.pdp-thumbs button { width: 84px; aspect-ratio: 4 / 3; padding: 0; border: 1px solid var(--line); background: var(--sand); overflow: hidden; }
.pdp-thumbs button[aria-current="true"] { border-color: var(--ink); }
.pdp-thumbs img { width: 100%; height: 100%; object-fit: cover; }

.pdp-copy h1 { font-size: clamp(28px, 3vw, 38px); }
.pdp-sku { margin-top: 12px; font-size: 13px; color: var(--ink-3); letter-spacing: 0.04em; display: flex; gap: 16px; flex-wrap: wrap; }
.pdp-sku span { display: inline-flex; align-items: center; gap: 6px; }
.pdp-desc { margin-top: 20px; font-size: 16px; color: var(--ink-2); }

.price-row { display: flex; align-items: baseline; gap: 12px; margin: 28px 0; padding: 20px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.price-row strong { font-size: 28px; font-weight: 600; letter-spacing: -0.02em; }
.price-row span { font-size: 13px; color: var(--ink-3); }

.feat-list { display: grid; gap: 16px; margin: 8px 0 28px; }
.feat-list li { display: grid; grid-template-columns: 20px 1fr; gap: 12px; font-size: 14.5px; color: var(--ink-2); }
.feat-list svg { width: 16px; height: 16px; color: var(--accent); margin-top: 4px; }
.feat-list strong { display: block; color: var(--ink); font-weight: 600; font-size: 15px; }

.pdp-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.trust-list { margin-top: 32px; display: grid; gap: 10px; font-size: 13.5px; color: var(--ink-2); }
.trust-list li { display: flex; gap: 10px; align-items: center; }
.trust-list svg { width: 15px; height: 15px; color: var(--ink-3); }

/* 规格表 */
.spec-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.spec-table th, .spec-table td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.spec-table th { width: 34%; font-weight: 500; color: var(--ink-2); background: var(--paper); }
.spec-table td { color: var(--ink); }

.tabs { display: flex; gap: 32px; border-bottom: 1px solid var(--line); margin-bottom: 32px; }
.tabs button { border: 0; background: transparent; padding: 14px 0; font-size: 15px; font-weight: 600; color: var(--ink-3); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs button[aria-selected="true"] { color: var(--ink); border-color: var(--accent); }

.prose { max-width: 74ch; font-size: 15.5px; color: var(--ink-2); }
.prose h2 { font-size: 24px; margin: 40px 0 12px; color: var(--ink); }
.prose h3 { font-size: 19px; margin: 32px 0 10px; color: var(--ink); }
.prose p { margin: 0 0 16px; }
.prose ul, .prose ol { margin: 0 0 20px; padding-left: 20px; list-style: disc; }
.prose li { margin-bottom: 8px; }
.prose a { border-bottom: 1px solid var(--line-strong); color: var(--ink); }
.prose img { margin: 24px 0; border: 1px solid var(--line); }
.prose table { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: 14px; }
.prose th, .prose td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; }
.prose th { background: var(--sand); }

/* ---------- 表单 ---------- */

.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field--full { grid-column: 1 / -1; }
.field label { font-size: 13px; font-weight: 600; letter-spacing: 0.02em; }
.field label .req { color: var(--accent); }
.field input, .field select, .field textarea {
  height: 48px; padding: 0 14px; border: 1px solid var(--line-strong); background: var(--surface);
  font: inherit; font-size: 15px; color: var(--ink); border-radius: var(--radius); width: 100%;
  transition: border-color var(--dur);
}
.field textarea { height: auto; min-height: 132px; padding: 12px 14px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--ink); }
.field .hint { font-size: 12.5px; color: var(--ink-3); }
.field .err { font-size: 12.5px; color: var(--accent); display: none; }
.field.is-invalid input, .field.is-invalid textarea { border-color: var(--accent); }
.field.is-invalid .err { display: block; }

/* ---------- 询盘成功弹窗 ---------- */

.modal-mask {
  position: fixed; inset: 0; background: rgba(28, 31, 34, 0.55);
  display: none; place-items: center; z-index: 200; padding: 24px;
}
.modal-mask.is-open { display: grid; }
.modal-card { background: var(--surface); max-width: 480px; width: 100%; padding: 48px 40px 40px; text-align: center; border: 1px solid var(--line); }
.modal-card .ok-icon { width: 56px; height: 56px; margin: 0 auto 24px; border: 1px solid var(--accent); color: var(--accent); display: grid; place-items: center; }
.modal-card .ok-icon svg { width: 24px; height: 24px; }
.modal-card h2 { font-size: 26px; }
.modal-card p { margin: 14px 0 28px; color: var(--ink-2); font-size: 15px; }

/* ---------- 博客 / 文章卡 ---------- */

.post-card { display: flex; flex-direction: column; border-top: 1px solid var(--ink); padding-top: 20px; }
.post-card .post-date { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.post-card h3 { font-size: 20px; margin: 14px 0 10px; }
.post-card p { font-size: 14.5px; color: var(--ink-2); margin-bottom: 20px; }
.post-card .post-media { aspect-ratio: 16 / 10; background: var(--sand); margin-bottom: 20px; overflow: hidden; }
.post-card .post-media img { width: 100%; height: 100%; object-fit: cover; }

.post-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 64px; padding: 56px 0 96px; align-items: start; }
.post-layout .prose { max-width: none; font-size: 16.5px; }
.post-aside { position: sticky; top: calc(var(--header-h) + 24px); border: 1px solid var(--line); padding: 24px; background: var(--surface); }
.post-aside h3 { font-size: 16px; margin-bottom: 10px; }
.post-aside p { font-size: 14px; color: var(--ink-2); margin-bottom: 18px; }

/* ---------- FAQ 手风琴 ---------- */

.faq-list { border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-q { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 22px 0; background: none; border: 0; text-align: left; font-size: 16.5px; font-weight: 500; }
.faq-q .plus { position: relative; width: 16px; height: 16px; flex-shrink: 0; }
.faq-q .plus::before, .faq-q .plus::after { content: ""; position: absolute; background: var(--ink); transition: transform var(--dur); }
.faq-q .plus::before { left: 0; top: 7px; width: 16px; height: 1.5px; }
.faq-q .plus::after { left: 7px; top: 0; width: 1.5px; height: 16px; }
.faq-item.is-open .plus::after { transform: scaleY(0); }
.faq-a { display: none; padding: 0 48px 24px 0; font-size: 15px; color: var(--ink-2); }
.faq-item.is-open .faq-a { display: block; }

/* ---------- 提示 / 空状态 ---------- */

.notice { padding: 14px 18px; border: 1px solid var(--line); border-left: 3px solid var(--accent); background: var(--surface); font-size: 14px; color: var(--ink-2); }
.empty { padding: 72px 24px; text-align: center; border: 1px dashed var(--line-strong); color: var(--ink-3); font-size: 14px; }
.skeleton { background: var(--sand); animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.55; } }

.toast-wrap { position: fixed; right: 24px; bottom: 24px; z-index: 300; display: grid; gap: 8px; }

/* ---------- 右侧固定联系入口 ---------- */
.quick-contact {
  position: fixed; right: 20px; top: 50%; transform: translateY(-50%);
  z-index: 60; display: grid; gap: 10px;
}
.quick-contact a {
  display: grid; place-items: center; width: 52px; height: 52px;
  border-radius: 50%; background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); box-shadow: 0 1px 0 rgba(28, 31, 34, 0.04);
  transition: background var(--dur), color var(--dur), border-color var(--dur);
}
.quick-contact a svg { width: 24px; height: 24px; }
.quick-contact a:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.quick-contact a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
@media (max-width: 860px) {
  .quick-contact { right: 12px; top: auto; bottom: 18px; transform: none; grid-auto-flow: column; }
  .quick-contact a { width: 48px; height: 48px; }
}
@media (prefers-reduced-motion: reduce) {
  .quick-contact a { transition: none; }
}
.toast { background: var(--ink); color: #F2F0EC; padding: 14px 20px; font-size: 14px; max-width: 360px; }
.toast.is-error { background: var(--accent-dark); }

/* ---------- 分页 ---------- */

.pager { display: flex; gap: 6px; justify-content: center; margin-top: 56px; }
.pager button { min-width: 40px; height: 40px; border: 1px solid var(--line-strong); background: transparent; font-size: 14px; }
.pager button[aria-current="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.pager button:disabled { opacity: 0.35; cursor: not-allowed; }

/* ---------- 响应式 ---------- */

@media (max-width: 1080px) {
  .nav { display: none; }
  .nav-toggle { display: block; margin-left: auto; }
  .header-actions .btn--ghost { display: none; }
  .site-header.is-open .nav {
    display: flex; flex-direction: column; gap: 0;
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--paper); border-bottom: 1px solid var(--line); padding: 8px 24px 24px;
  }
  .site-header.is-open .nav a { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 16px; }
  .pdp { grid-template-columns: 1fr; gap: 32px; }
  .pdp-gallery { position: static; }
  .post-layout { grid-template-columns: 1fr; gap: 40px; }
  .post-aside { position: static; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-cols { grid-template-columns: 1fr 1fr 1fr; }
  .cta .wrap { grid-template-columns: 1fr; }
  .cta-actions { justify-content: flex-start; }
}

@media (max-width: 860px) {
  .section { padding: 64px 0; }
  .grid--3, .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .proof .wrap { grid-template-columns: repeat(2, 1fr); }
  .proof-item:nth-child(3) { border-left: 0; padding-left: 0; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 0 24px; }
  .process { grid-template-columns: repeat(2, 1fr); }
  .process-step { padding-bottom: 28px; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 16px; }
  .about-gallery { grid-template-columns: repeat(2, 1fr); }
  .about-gallery--4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  :root { --header-h: 64px; }
  .wrap { padding: 0 20px; }
  .topbar-right span:first-child { display: none; }
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .filter-bar { position: static; }
  .search-box { margin-left: 0; width: 100%; }
  .tabs { gap: 20px; overflow-x: auto; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-cols { grid-template-columns: 1fr 1fr; gap: 32px 24px; }
  .footer-cols > div:last-child { grid-column: 1 / -1; }
  .hero-copy h1 { font-size: 34px; }
  .spec-table th { width: 40%; }
  .post-layout { padding-top: 32px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ==========================================================================
   案例展示页 /projects —— 编辑式章节版式
   原则：全宽主图定调，题头与图组用不对称栅格制造节奏；
   颜色只用既有 token，主色仅出现在 eyebrow 与模型链接上。
   ========================================================================== */

.case-section { padding-top: 64px; }

/* 顶部索引：缩略图 + 产品名 */
.case-index {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px;
  padding-bottom: 32px; margin-bottom: 8px;
  border-bottom: 1px solid var(--line-strong);
}
.case-index a {
  display: flex; flex-direction: column; gap: 10px;
  font-size: 14px; color: var(--ink-3);
}
.case-index a .case-thumb {
  display: block; aspect-ratio: 7 / 5; overflow: hidden;
  border: 1px solid var(--line); background: var(--sand);
}
.case-index a .case-thumb img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform var(--dur);
}
.case-index a:hover .case-thumb img { transform: scale(1.03); }
.case-index a strong { color: var(--ink); font-weight: 600; letter-spacing: var(--tracking-tight); }
.case-index a:hover strong { color: var(--accent); }

/* 章节 */
.case { padding: 80px 0 96px; border-bottom: 1px solid var(--line); }
.case:last-child { border-bottom: 0; }

.case-head { max-width: 820px; }
.case-head .eyebrow { color: var(--accent); margin-bottom: 16px; }
.case-title { font-size: clamp(24px, 2.3vw, 31px); max-width: none; white-space: nowrap; }
.case-summary { margin-top: 16px; font-size: 18px; color: var(--ink-2); max-width: 52ch; }

.case-facts {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px;
  margin: 40px 0 0; padding-top: 24px;
  border-top: 1px solid var(--line);
}
.case-facts dt { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-3); }
.case-facts dd { margin: 4px 0 0; font-size: 15px; font-weight: 500; }
.case-model { text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.case-model:hover { color: var(--accent); text-decoration-color: var(--accent); }

/* 主图（已并入索引缩略图，规则保留以兼容后台预览） */
.case-hero { margin: 48px 0 0; border: 1px solid var(--line); background: var(--sand); }
.case-hero img { width: 100%; aspect-ratio: 2 / 1; object-fit: cover; }

/* 叙述 */
.case-body { max-width: 640px; margin-top: 48px; }
.case-body p { color: var(--ink-2); }
.case-body p + p { margin-top: 16px; }
.case-body .link-more { display: inline-block; margin-top: 32px; }

/* 图组：不对称 12 栏 */
.case-gallery {
  display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px;
  margin-top: 64px;
}
.case-g { margin: 0; }
.case-g img {
  width: 100%; aspect-ratio: 3 / 2; object-fit: cover;
  border: 1px solid var(--line); background: var(--sand);
}
.case-g figcaption { margin-top: 8px; font-size: 13px; color: var(--ink-3); }
.case-g:nth-child(odd) { grid-column: span 7; }
.case-g:nth-child(even) { grid-column: span 5; }
.case-gallery[data-n="3"] .case-g:nth-child(3) { grid-column: 3 / span 8; }
/* 2 图组：第二张与第一张等重 */
.case-gallery[data-n="2"] .case-g:nth-child(2) { grid-column: span 5; }

/* 章节间距在窄屏收缩 */
@media (max-width: 860px) {
  .case { padding: 64px 0; }
  .case-facts { grid-template-columns: 1fr; gap: 12px; }
  .case-hero img { aspect-ratio: 4 / 3; }
  .case-gallery { gap: 16px; margin-top: 48px; }
  .case-g:nth-child(odd), .case-g:nth-child(even),
  .case-gallery[data-n="3"] .case-g:nth-child(3) { grid-column: span 12; }
  /* 标题一行只在桌面放开，移动端允许折行 */
  .page-head h1, .case-title { white-space: normal; }
  .case-index { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
}
