/* ============================================================
   Layout D — "split-rail index"
   与前三套版式都不同的结构：
     1. hero-d    分屏：左实色面板 / 右满高图（各占半屏，非全幅底图）
     2. d-shell   左粘性数字索引导航 + 右内容区（内容区不再用 .container 约束）
     3. spec-d    产品表格式清单（表头 + 发丝分隔行 + 右侧缩略图）
     4. stack-d   能力双列瀑布（两列错落，卡片高度不等）
     5. acc-d     手风琴流程（原生 details/summary，可展开，无需 JS）
     6. about-d   左侧粘性事实清单 + 右侧长文案
     7. contact-d 顶部大号邮箱横幅 + 下方信息/表单双栏
   ============================================================ */

/* ---------- 1. HERO D：分屏 ---------- */
.hero-d {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 72px 0 0;                 /* 让开固定导航；顶部留白 = 导航高度，视觉连续 */
  min-height: 100vh;
  min-height: 100dvh;                /* 移动端动态视口高度，避免地址栏抖动 */
}

.hero-d-panel {
  display: grid;
  align-content: center;
  /* 分屏时左半屏本身只有一半宽度，不再额外做容器左缘对齐，否则正文会被压到很窄 */
  padding: clamp(56px, 7vh, 96px) clamp(28px, 6vw, 88px);
  color: #fff;
  background:
    radial-gradient(130% 100% at 5% 0%, color-mix(in srgb, var(--c-accent) 42%, transparent), transparent 62%),
    linear-gradient(155deg, var(--c-primary), var(--c-primary-dark) 78%);
}
.hero-d-inner { max-width: 620px; }

.hero-d-kicker {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 0.78rem; letter-spacing: 0.18em;
  text-transform: uppercase; color: rgba(255, 255, 255, 0.82);
  margin-bottom: 22px;
}
.hero-d-kicker::before { content: ""; width: 28px; height: 2px; background: rgba(255, 255, 255, 0.6); }

.hero-d h1 {
  font-size: clamp(2.1rem, 3.9vw, 3.4rem);
  line-height: 1.06; letter-spacing: var(--tracking-head);
  color: #fff; margin-bottom: 22px; max-width: 18ch;
}
.hero-d h1 em { font-style: normal; color: #f5d0fe; }
.hero-d-sub { font-size: 1.05rem; color: rgba(255, 255, 255, 0.86); max-width: 46ch; margin-bottom: 32px; }
.hero-d-cta { display: flex; gap: 14px; flex-wrap: wrap; }

/* 面板是主色底，主按钮必须反过来用白色，否则按钮与背景同色 */
.hero-d-panel .btn-primary { background: #fff; color: #241247; box-shadow: 0 10px 26px rgba(0, 0, 0, 0.24); }
.hero-d-panel .btn-primary:hover { background: rgba(255, 255, 255, 0.88); }
.hero-d-panel .btn-ghost { color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.55); }
.hero-d-panel .btn-ghost:hover { background: #fff; color: #241247; }

.hero-d-facts {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px;
  margin-top: 44px; padding-top: 26px;
  border-top: 1px solid rgba(255, 255, 255, 0.22);
}
.hero-d-facts dt { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.12em; color: rgba(255, 255, 255, 0.64); }
.hero-d-facts dd { font-weight: 700; font-size: 1rem; margin-top: 3px; color: #fff; }

.hero-d-media { position: relative; overflow: hidden; background: var(--c-surface); }
.hero-d-media img { width: 100%; height: 100%; object-fit: cover; }
/* 从左侧面板溢出一层主色，让两半不显得生硬拼接 */
.hero-d-media::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, color-mix(in srgb, var(--c-primary) 42%, transparent), transparent 40%);
}
.hero-d-chip {
  position: absolute; left: 24px; bottom: 24px; z-index: 1;
  background: rgba(10, 7, 22, 0.72); color: #fff;
  backdrop-filter: blur(8px);
  border-radius: 999px; padding: 9px 16px;
  font-size: 0.8rem; font-weight: 600; letter-spacing: 0.02em;
}

/* ---------- 2. SHELL：左索引 + 右内容 ---------- */
.d-shell {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  gap: clamp(32px, 4vw, 72px);
  width: min(1240px, 94%);
  margin-inline: auto;
  padding-top: 88px;
  align-items: start;                /* 让左栏可 sticky（高度不拉伸） */
}

.d-rail { position: sticky; top: 104px; }
.d-rail-title { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.16em; color: var(--c-muted); margin-bottom: 16px; }
.d-rail-list { list-style: none; display: grid; gap: 2px; }
.d-rail-list a {
  display: grid; grid-template-columns: 30px 1fr; gap: 10px; align-items: baseline;
  padding: 10px 12px; border-radius: 10px; border-left: 2px solid transparent;
  font-size: 0.93rem; font-weight: 500; color: var(--c-muted);
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
.d-rail-list a span { font-family: var(--ff-head); font-weight: 700; font-size: 0.75rem; opacity: 0.72; }
.d-rail-list a:hover { color: var(--c-text); background: color-mix(in srgb, var(--c-primary) 14%, transparent); }
.d-rail-list a.is-active {
  color: var(--c-text); background: color-mix(in srgb, var(--c-primary) 20%, transparent);
  border-left-color: var(--c-soft, var(--c-primary));
}
.d-rail-list a.is-active span { color: var(--c-soft, var(--c-primary)); opacity: 1; }
.d-rail-mail {
  display: inline-block; margin-top: 24px;
  font-size: 0.82rem; font-weight: 600; color: var(--c-muted); word-break: break-all;
}
.d-rail-mail:hover { color: var(--c-soft, var(--c-primary)); }

.d-content { min-width: 0; }          /* 防止长英文撑破栅格 */
.d-content section { padding: 84px 0; }
.d-content section:first-child { padding-top: 0; }

/* Layout D 的段落标题：左对齐 + 顶部主色横线 */
.sec-head-d { max-width: 680px; margin-bottom: 46px; }
.sec-head-d.rule { padding-top: 22px; border-top: 2px solid var(--c-soft, var(--c-primary)); }
.sec-head-d h2 { margin-bottom: 14px; }
.sec-head-d p { color: var(--c-muted); }

/* ---------- 3. SPEC D：表格式产品清单 ---------- */
.spec-d-table { border-top: 1px solid color-mix(in srgb, var(--c-text) 16%, transparent); }
.spec-d-head,
.spec-d-row {
  display: grid;
  grid-template-columns: 56px minmax(0, 1.15fr) minmax(0, 1fr) 112px;
  gap: 24px; align-items: center;
}
.spec-d-head {
  padding: 12px 12px; margin-inline: -12px;
  font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--c-muted);
}
.spec-d-row {
  padding: 22px 12px; margin-inline: -12px; border-radius: 10px;
  border-top: 1px solid color-mix(in srgb, var(--c-text) 12%, transparent);
  transition: background 0.3s ease;
}
.spec-d-row:hover { background: color-mix(in srgb, var(--c-primary) 9%, transparent); }
.spec-d-idx { font-family: var(--ff-head); font-weight: 700; font-size: 0.9rem; color: var(--c-soft, var(--c-primary)); }
.spec-d-name h3 { margin-bottom: 6px; }
.spec-d-name p { color: var(--c-muted); font-size: 0.9rem; }
.spec-d-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.spec-d-tags li {
  font-size: 0.73rem; font-weight: 600; padding: 4px 10px; border-radius: 999px;
  background: color-mix(in srgb, var(--c-primary) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--c-primary) 30%, transparent);
}
.spec-d-thumb { width: 112px; height: 76px; border-radius: 10px; overflow: hidden; box-shadow: var(--shadow-card); }
.spec-d-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.spec-d-row:hover .spec-d-thumb img { transform: scale(1.07); }

/* ---------- 4. STACK D：双列瀑布 ---------- */
.stack-d-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
.stack-d-col { display: grid; gap: 24px; }
.stack-d-col:last-child { padding-top: 56px; }   /* 错落错位，避免两列齐平 */
.stack-card {
  background: var(--c-surface); border-radius: var(--r-card);
  box-shadow: var(--shadow-card); padding: 30px;
}
.stack-card.tall { padding-bottom: 46px; }
.stack-card .sc-badge {
  display: inline-grid; place-items: center; width: 42px; height: 42px; margin-bottom: 16px;
  border-radius: 11px; font-family: var(--ff-head); font-weight: 700; font-size: 0.95rem;
  background: color-mix(in srgb, var(--c-primary) 22%, transparent);
  color: var(--c-soft, var(--c-primary));
}
.stack-card h3 { margin-bottom: 10px; }
.stack-card p { color: var(--c-muted); font-size: 0.94rem; }
.sc-list { margin-top: 16px; display: grid; gap: 8px; }
.sc-list li { position: relative; padding-left: 18px; font-size: 0.88rem; color: var(--c-muted); }
.sc-list li::before {
  content: ""; position: absolute; left: 2px; top: 0.62em;
  width: 6px; height: 6px; border-radius: 50%; background: var(--c-soft, var(--c-primary));
}

/* ---------- 5. ACC D：手风琴流程 ---------- */
.acc-d-list { border-top: 1px solid color-mix(in srgb, var(--c-text) 16%, transparent); }
.acc-item { border-bottom: 1px solid color-mix(in srgb, var(--c-text) 16%, transparent); }
.acc-item > summary {
  display: grid; grid-template-columns: 58px 1fr 28px; align-items: center; gap: 18px;
  padding: 24px 4px; cursor: pointer; list-style: none;
  font-family: var(--ff-head); font-weight: 700;
  font-size: clamp(1.02rem, 1.9vw, 1.28rem); letter-spacing: var(--tracking-head);
  transition: color 0.25s ease;
}
.acc-item > summary::-webkit-details-marker { display: none; }
.acc-item > summary:hover { color: var(--c-soft, var(--c-primary)); }
.acc-item[open] > summary { color: var(--c-soft, var(--c-primary)); }
.acc-idx { font-size: 0.82rem; font-weight: 700; letter-spacing: 0.06em; color: var(--c-soft, var(--c-primary)); }
/* 自绘 +/− 图标：open 时竖线收起变横线 */
.acc-mark { position: relative; width: 18px; height: 18px; justify-self: end; }
.acc-mark::before,
.acc-mark::after { content: ""; position: absolute; background: currentColor; border-radius: 2px; transition: transform 0.3s ease, opacity 0.3s ease; }
.acc-mark::before { left: 0; right: 0; top: 8px; height: 2px; }
.acc-mark::after { top: 0; bottom: 0; left: 8px; width: 2px; }
.acc-item[open] > summary .acc-mark::after { transform: scaleY(0); opacity: 0; }
.acc-body { padding: 0 4px 30px 76px; color: var(--c-muted); font-size: 0.96rem; max-width: 68ch; }

/* ---------- 6. ABOUT D：粘性事实栏 + 长文案 ---------- */
.about-d { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: clamp(32px, 4vw, 64px); align-items: start; }
.about-d-facts { position: sticky; top: 104px; display: grid; gap: 22px; }
.about-d-facts > div { border-top: 2px solid var(--c-soft, var(--c-primary)); padding-top: 12px; }
.about-d-facts dt { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--c-muted); }
.about-d-facts dd { font-weight: 700; font-size: 0.95rem; margin-top: 4px; }
.about-d-copy h2 { margin-bottom: 18px; }
.about-d-copy p { color: var(--c-muted); margin-bottom: 16px; max-width: 68ch; }
.about-d-media { margin-top: 30px; border-radius: var(--r-card); overflow: hidden; box-shadow: var(--shadow-card); aspect-ratio: 16 / 9; }
.about-d-media img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- 7. CONTACT D：大邮箱横幅 + 双栏 ---------- */
.contact-d-banner {
  border-radius: var(--r-card); padding: clamp(34px, 5vw, 58px);
  color: #fff;
  background:
    radial-gradient(120% 120% at 100% 0%, color-mix(in srgb, var(--c-accent) 40%, transparent), transparent 58%),
    linear-gradient(140deg, var(--c-primary), var(--c-primary-dark) 80%);
}
.contact-d-banner .eyebrow { color: rgba(255, 255, 255, 0.78); }
.contact-d-banner h2 { color: #fff; margin-bottom: 20px; }
.contact-d-mail {
  display: inline-block; padding-bottom: 4px;
  font-family: var(--ff-head); font-weight: 700;
  font-size: clamp(1.12rem, 2.5vw, 1.85rem); letter-spacing: -0.01em;
  color: #fff; border-bottom: 2px solid rgba(255, 255, 255, 0.42);
  word-break: break-all;
}
.contact-d-mail:hover { border-color: #fff; }
.contact-d-meta { display: flex; flex-wrap: wrap; gap: 10px 28px; margin-top: 26px; font-size: 0.9rem; color: rgba(255, 255, 255, 0.86); }

.contact-d-grid {
  display: grid; grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(28px, 3.5vw, 56px); margin-top: 44px; align-items: start;
}
.contact-d-lines { display: grid; gap: 18px; }
.contact-d-lines > div { padding-bottom: 16px; border-bottom: 1px solid color-mix(in srgb, var(--c-text) 14%, transparent); }
.contact-d-lines dt { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--c-muted); }
.contact-d-lines dd { font-weight: 600; font-size: 0.95rem; margin-top: 4px; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1024px) {
  .d-shell { grid-template-columns: 1fr; gap: 0; padding-top: 72px; }
  .d-rail { position: static; margin-bottom: 30px; }
  .d-rail-title,
  .d-rail-mail { display: none; }
  /* 索引栏在窄屏折叠成可横向滚动的胶囊条 */
  .d-rail-list { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; -webkit-overflow-scrolling: touch; }
  .d-rail-list li { flex: 0 0 auto; }
  .d-rail-list a {
    display: flex; gap: 8px; padding: 9px 14px; border-radius: 999px;
    border: 1px solid color-mix(in srgb, var(--c-text) 16%, transparent);
    border-left-width: 1px; white-space: nowrap;
  }
  .d-rail-list a.is-active { border-color: var(--c-soft, var(--c-primary)); }
  .about-d { grid-template-columns: 1fr; }
  .about-d-facts { position: static; grid-template-columns: 1fr 1fr; gap: 18px 24px; }
}

@media (max-width: 900px) {
  .hero-d { grid-template-columns: 1fr; min-height: 0; padding-top: 72px; }
  .hero-d-panel { padding: 56px 4%; }
  .hero-d-media { aspect-ratio: 4 / 3; }
  .hero-d-media::after { display: none; }
  .d-content section { padding: 66px 0; }
  .spec-d-head { display: none; }
  .spec-d-row { grid-template-columns: 44px minmax(0, 1fr) 88px; gap: 16px; align-items: start; }
  .spec-d-idx { grid-row: 1; grid-column: 1; }
  .spec-d-name { grid-row: 1; grid-column: 2; }
  .spec-d-thumb { grid-row: 1; grid-column: 3; width: 88px; height: 64px; }
  .spec-d-tags { grid-row: 2; grid-column: 2 / 4; margin-top: 10px; }
  .stack-d-cols { grid-template-columns: 1fr; }
  .stack-d-col:last-child { padding-top: 0; }
  .contact-d-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .hero-d-facts { grid-template-columns: 1fr 1fr; }
  .hero-d-chip { display: none; }
  .acc-item > summary { grid-template-columns: 40px 1fr 22px; gap: 12px; }
  .acc-body { padding-left: 0; }
  .about-d-facts { grid-template-columns: 1fr; }
  .stack-card { padding: 24px; }
}
