/* ============================================================
   模板 2 样式 —— 左侧固定竖导航 + 右侧 Bento 面板
   配套模板：src/templates/user/2.njk
   与模板 1 换骨：侧栏布局 / Bento 网格 / v2- 独立类名体系
   配色由 sk.palette 注入 :root（无 palette 时用下方默认工业蓝）
   ============================================================ */

:root {
  --primary: #1456b8;
  --primary-dark: #0e3f8a;
  --accent: #f5a623;
  --bg-soft: #f4f7fb;
  --footer-bg: #16202e;
  --text: #1f2937;
  --text-soft: #5b6675;
  --border: #e5e9f0;
  --radius: 14px;
  --shadow: 0 6px 20px rgba(17, 24, 39, 0.08);
  --aside-w: 264px;
}

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

body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  line-height: 1.7;
  background: var(--bg-soft);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul, ol { list-style: none; }

/* ---------------- 整体骨架：左栏 + 右主区 ---------------- */
.v2-shell {
  display: grid;
  grid-template-columns: var(--aside-w) 1fr;
  min-height: 100vh;
}

/* ---------------- 左侧栏（sticky 固定） ---------------- */
.v2-aside {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 34px 26px;
  background: var(--footer-bg);
  color: #fff;
  overflow-y: auto;
}
.v2-brand {
  font-size: 22px;
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: 0.5px;
}
.v2-brand-region {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 20px;
  background: color-mix(in srgb, var(--accent) 90%, transparent);
  background: var(--accent); /* 回退：不支持 color-mix 的浏览器 */
  color: #fff;
  vertical-align: middle;
}

.v2-nav {
  margin-top: 42px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}
.v2-nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 15px;
  transition: background 0.2s ease, color 0.2s ease;
}
.v2-nav-link:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}
.v2-nav-no {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--accent);
  min-width: 22px;
}
.v2-nav-txt { flex: 1; }

.v2-aside-foot {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}
.v2-aside-tel {
  display: block;
  font-size: 19px;
  font-weight: 800;
  color: var(--accent);
}
.v2-aside-copy {
  margin-top: 10px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.6;
}

/* ---------------- 右主区 ---------------- */
.v2-main {
  min-width: 0; /* 防止 grid 子项被内容撑破 */
  padding: 0 clamp(20px, 4vw, 64px) 40px;
}

/* ---------------- 按钮 ---------------- */
.v2-btn {
  display: inline-block;
  padding: 13px 32px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.v2-btn:hover { transform: translateY(-2px); }
.v2-btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18); /* 回退：中性阴影 */
  box-shadow: 0 8px 18px color-mix(in srgb, var(--accent) 35%, transparent); /* 辉光跟随 accent */
}
.v2-btn-light {
  background: #fff;
  color: var(--primary);
}

/* ---------------- 首屏：左右分屏 ---------------- */
.v2-hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
  padding: clamp(48px, 8vw, 96px) 0 clamp(40px, 6vw, 72px);
}
/* 无 banner：不输出右侧视觉块，文案独占单栏铺满 */
.v2-hero-solo { grid-template-columns: 1fr; }
.v2-hero-eyebrow {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--primary);
  text-transform: uppercase;
}
.v2-hero-title {
  margin-top: 14px;
  font-size: clamp(30px, 4vw, 48px);
  font-weight: 900;
  line-height: 1.2;
  color: var(--text);
}
.v2-hero-sub {
  margin-top: 16px;
  font-size: 17px;
  color: var(--text-soft);
  max-width: 32em;
}
.v2-hero-tags {
  margin-top: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.v2-hero-tags li {
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 20px;
  background: #fff;
  border: 1px solid var(--border);
  color: var(--text-soft);
}
.v2-hero .v2-btn-primary { margin-top: 28px; }

.v2-hero-visual {
  border-radius: 20px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  /* 首屏封顶：4/3 盒子在超宽视口下别顶穿一屏，超高则封顶、图片 cover 居中裁切 */
  max-height: calc(100vh - 120px);
  box-shadow: var(--shadow);
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
}
.v2-hero-visual img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.v2-hero-glyph {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.92);
  font-size: clamp(56px, 9vw, 120px);
  font-weight: 900;
  letter-spacing: 4px;
}

/* ---------------- 首屏轮播（充满 v2-hero-visual，淡入切换） ---------------- */
.v2-carousel { position: relative; width: 100%; height: 100%; }
.v2-carousel-track { position: absolute; inset: 0; }
.v2-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.6s ease;
}
.v2-slide.is-active { opacity: 1; }
.v2-slide img { width: 100%; height: 100%; object-fit: cover; object-position: center; }

.v2-carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.32);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
  transition: background 0.2s ease;
}
.v2-carousel-arrow:hover { background: rgba(0, 0, 0, 0.5); }
.v2-carousel-arrow.prev { left: 12px; }
.v2-carousel-arrow.next { right: 12px; }

.v2-carousel-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 12px;
  display: flex;
  justify-content: center;
  gap: 8px;
  z-index: 2;
}
.v2-carousel-dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition: background 0.2s ease, width 0.2s ease;
}
.v2-carousel-dot.is-active {
  width: 22px;
  border-radius: 5px;
  background: var(--accent);
}

/* ---------------- 内容面板 ---------------- */
.v2-panel {
  margin-top: 30px;
  padding: clamp(26px, 3vw, 40px);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  scroll-margin-top: 20px;
}
.v2-panel-head {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding-bottom: 20px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
}
.v2-panel-no {
  font-size: 26px;
  font-weight: 900;
  line-height: 1;
  color: var(--accent);
  letter-spacing: 1px;
}
.v2-panel-title {
  font-size: clamp(20px, 2.4vw, 27px);
  font-weight: 800;
  color: var(--text);
}
.v2-panel-title::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 18px;
  margin-right: 10px;
  border-radius: 3px;
  background: var(--primary);
  vertical-align: -2px;
}
.v2-panel-sub {
  margin-top: 6px;
  font-size: 14px;
  color: var(--text-soft);
}

/* ---------------- 段落型 ---------------- */
.v2-prose {
  font-size: 15.5px;
  color: var(--text-soft);
  line-height: 1.9;
}
.v2-prose + .v2-prose { margin-top: 14px; }
.v2-about-local { color: var(--text); }
.v2-about {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 30px;
  align-items: start;
}
.v2-about-card {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

/* ---------------- 指标型 ---------------- */
.v2-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
}
.v2-stat {
  padding: 24px 18px;
  text-align: center;
  border-radius: var(--radius);
  background: var(--bg-soft);
  border: 1px solid var(--border);
}
.v2-stat-value {
  display: block;
  font-size: clamp(26px, 3.4vw, 40px);
  font-weight: 900;
  color: var(--primary);
  line-height: 1.1;
}
.v2-stat-label {
  display: block;
  margin-top: 8px;
  font-size: 14px;
  color: var(--text-soft);
}

/* ---------------- 产品型 ---------------- */
.v2-prod {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 18px;
}
.v2-prod-card {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: #fff;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.v2-prod-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}
.v2-prod-img { aspect-ratio: 4 / 3; overflow: hidden; background: var(--bg-soft); }
.v2-prod-img img { width: 100%; height: 100%; object-fit: cover; }
.v2-prod-name {
  padding: 12px 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

/* ---------------- 问答型 ---------------- */
.v2-faq {
  display: grid;
  gap: 14px;
}
.v2-faq-item {
  padding: 18px 20px;
  border-radius: var(--radius);
  background: var(--bg-soft);
  border-left: 4px solid var(--primary);
}
.v2-faq-q {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}
.v2-faq-q::before {
  content: "Q";
  display: inline-block;
  width: 22px;
  height: 22px;
  margin-right: 10px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 13px;
  text-align: center;
  line-height: 22px;
}
.v2-faq-a {
  margin-top: 10px;
  font-size: 14.5px;
  color: var(--text-soft);
  padding-left: 32px;
}

/* ---------------- 流程型 ---------------- */
.v2-flow {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}
.v2-flow-step {
  position: relative;
  padding: 24px 20px 20px;
  border-radius: var(--radius);
  background: var(--bg-soft);
  border: 1px solid var(--border);
}
.v2-flow-no {
  position: absolute;
  top: -12px;
  left: 18px;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}
.v2-flow-title {
  margin-top: 6px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}
.v2-flow-desc {
  margin-top: 8px;
  font-size: 14px;
  color: var(--text-soft);
}

/* ---------------- 卡片型 Bento ---------------- */
.v2-bento {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.v2-bento-card {
  position: relative;
  padding: 26px 22px;
  border-radius: var(--radius);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.v2-bento-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}
/* 首块横跨两列 + 主色底，制造 Bento 大小块错落 */
.v2-bento-lead {
  grid-column: span 2;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-color: transparent;
}
.v2-bento-lead .v2-bento-title,
.v2-bento-lead .v2-bento-desc { color: #fff; }
.v2-bento-lead .v2-bento-idx { color: rgba(255, 255, 255, 0.4); }
.v2-bento-idx {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--accent);
}
.v2-bento-title {
  margin-top: 10px;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}
.v2-bento-desc {
  margin-top: 10px;
  font-size: 14.5px;
  color: var(--text-soft);
  line-height: 1.8;
}

/* ---------------- CTA 带 ---------------- */
.v2-cta {
  margin-top: 30px;
  padding: clamp(30px, 4vw, 48px);
  border-radius: var(--radius);
  background: linear-gradient(120deg, var(--primary), var(--primary-dark));
  color: #fff;
  display: flex;
  flex-wrap: wrap;
  gap: 18px 28px;
  align-items: center;
  justify-content: space-between;
}
.v2-cta-text { font-size: clamp(18px, 2.4vw, 24px); font-weight: 700; }

/* ---------------- 页脚 ---------------- */
.v2-foot {
  margin-top: 30px;
  padding: 30px 0 6px;
  text-align: center;
  border-top: 1px solid var(--border);
}
.v2-foot-name { font-size: 18px; font-weight: 800; color: var(--text); }
.v2-foot-desc {
  margin: 8px auto 0;
  max-width: 46em;
  font-size: 14px;
  color: var(--text-soft);
}
.v2-foot-copy { margin-top: 14px; font-size: 13px; color: var(--text-soft); }
.v2-foot-sites { margin-top: 12px; font-size: 13px; color: var(--text-soft); line-height: 1.9; }
.v2-foot-sites a { color: var(--primary); text-decoration: none; }
.v2-foot-sites a:hover { text-decoration: underline; }

/* ============================================================
   响应式：窄屏侧栏塌成顶栏，Bento 降列
   ============================================================ */
@media (max-width: 960px) {
  .v2-shell { grid-template-columns: 1fr; }
  .v2-aside {
    position: static;
    height: auto;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 20px;
    padding: 16px 20px;
  }
  .v2-brand { font-size: 19px; }
  .v2-nav {
    order: 3;
    width: 100%;
    margin-top: 8px;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 4px 6px;
  }
  .v2-nav-link { padding: 7px 10px; font-size: 13px; }
  .v2-aside-foot {
    margin: 0 0 0 auto;
    padding: 0;
    border: none;
    text-align: right;
  }
  .v2-aside-tel { font-size: 16px; }
  .v2-aside-copy { display: none; }
  .v2-hero { grid-template-columns: 1fr; gap: 28px; }
  .v2-hero-visual { order: -1; aspect-ratio: 16 / 9; }
  .v2-about { grid-template-columns: 1fr; }
  .v2-bento { grid-template-columns: repeat(2, 1fr); }
  .v2-bento-lead { grid-column: span 2; }
}

@media (max-width: 560px) {
  .v2-main { padding: 0 16px 32px; }
  .v2-bento { grid-template-columns: 1fr; }
  .v2-bento-lead { grid-column: span 1; }
  .v2-panel-head { gap: 12px; }
  .v2-cta { flex-direction: column; align-items: flex-start; }
}
