/**
 * 改版首页首屏样式 — 上线时复制到站点根 /css/home-hero.css
 *
 * 视觉与组件须与站点根 design-system.html 范本一致（云标签 ds-tag、按钮 ds-btn、令牌 cn-design-tokens）。
 *
 * 【右侧轮播图素材】与设计系统轮播同源；推荐每帧正方形 WebP ≈560×560（见 design-system #carousel）
 * 可选统一命名：home-hero-mc.webp … home-hero-ic.webp；当前沿用各产品线占位图。
 */

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

/* 供 design-system.css 中 ds-btn / ds-tag 变量继承（范本中原定义在 .ds-shell 上） */
body.kr-home {
  margin: 0;
  font-family: var(--cn-font-sans, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif);
  color: var(--cn-color-ink);
  background: var(--cn-color-canvas, #f7f8fa);
  --ds-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ds-accent-warm: #D96A28;
  --ds-accent-warm-hover: #B85A22;
  --ds-slate: #2d3a4a;
  --ds-ink-strong: #14181f;
}

.kr-hero {
  background: linear-gradient(145deg, #0f1419 0%, #162536 42%, #1a1f2e 100%);
  color: #fff;
  padding: clamp(38px, 4.6vw, 58px) 5% clamp(32px, 3.8vw, 46px);
  display: grid;
  grid-template-columns: minmax(0, 45%) minmax(0, 45%);
  justify-content: space-between; /* 45% + 45% + 约10%呼吸空间 */
  gap: 0;
  align-items: center;
  overflow: hidden;
}

.kr-hero > * { min-width: 0; }

.kr-hero-copy {
  max-width: 520px;
}

@media (max-width: 960px) {
  .kr-hero {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .kr-hero-copy {
    max-width: none;
    text-align: left;
  }

  .kr-hero h1,
  .kr-hero-sub {
    text-align: center;
  }

  .kr-hero-pillars {
    margin-left: auto;
    margin-right: auto;
    text-align: left;
  }
}

.kr-hero h1 {
  font-size: clamp(1.35rem, 2.8vw, 2rem);
  font-weight: 800;
  line-height: 1.35;
  margin: 0 0 14px;
  color: #f3f7ff;
  letter-spacing: -0.02em;
}

.kr-hero h1 span {
  display: block;
}

.kr-hero h1 span:last-child {
  white-space: nowrap;
}

@media (max-width: 420px) {
  .kr-hero h1 span:last-child {
    white-space: normal;
  }
}

.kr-hero-sub {
  font-size: 0.9rem;
  color: rgba(195, 215, 245, 0.9);
  line-height: 1.6;
  margin: 0 0 0.85rem;
  max-width: 31rem;
}

/* 首屏三条核心卖点（短句，降低阅读压力） */
.kr-hero-pillars {
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
  font-size: 0.84rem;
  font-weight: 500;
  color: rgba(210, 225, 248, 0.96);
  line-height: 1.42;
  max-width: 29rem;
}

.kr-hero-pillars li {
  margin-bottom: 0.28rem;
  padding-left: 1.15em;
  position: relative;
}

.kr-hero-pillars li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cn-color-accent);
  box-shadow: 0 0 0 2px rgba(39, 144, 244, 0.25);
}

/* 首屏以下：浅色区 — 产品线入口 + 价值细化（原首屏下移内容） */
.kr-home-continue {
  padding: clamp(4.5rem, 7vw, 6rem) 5%;
  background: #f5f7fa;
  border-bottom: 1px solid #e4ebf3;
}

.kr-home-continue-inner {
  max-width: min(960px, 100%);
  margin: 0 auto;
}

.kr-home-continue-h {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--cn-color-ink);
  margin: 0 0 0.35rem;
  text-align: center;
  letter-spacing: -0.02em;
}

.kr-home-continue-lead {
  margin: 0 0 1.75rem;
  text-align: center;
  font-size: 0.92rem;
  color: var(--cn-color-ink-muted);
  line-height: 1.65;
}

.kr-product-line-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
  gap: 0.9rem;
  margin: 0 0 2.25rem;
}

.kr-product-line-card {
  display: block;
  min-height: 82px;
  padding: 1rem;
  border-radius: 16px;
  border: 1px solid #e8edf3;
  background: #fff;
  box-shadow: 0 6px 18px rgba(16, 24, 40, 0.06);
  text-decoration: none !important;
  transition: transform 0.18s var(--ds-ease), border-color 0.18s, box-shadow 0.18s;
}

.kr-product-line-card strong {
  display: block;
  margin-bottom: 0.28rem;
  color: #2d3a4a;
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.3;
}

.kr-product-line-card span {
  display: block;
  color: var(--cn-color-ink-muted);
  font-size: 0.76rem;
  font-weight: 600;
  line-height: 1.35;
}

.kr-product-line-card:hover {
  transform: translateY(-4px);
  border-color: #2d8cff;
  box-shadow: 0 12px 26px rgba(16, 24, 40, 0.1);
}

.kr-product-line-card:hover strong,
.kr-product-line-card:hover span {
  color: var(--cn-color-accent);
}

.kr-home-value-block {
  position: relative;
  background: #f8fafc;
  border: 1px solid #e8edf3;
  border-radius: 16px;
  padding: 1.35rem 1.35rem 1.15rem 1.6rem;
  box-shadow: 0 6px 18px rgba(16, 24, 40, 0.06);
}

.kr-home-value-block::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1rem;
  bottom: 1rem;
  width: 4px;
  border-radius: 0 999px 999px 0;
  background: var(--cn-color-accent);
}

.kr-home-value-h {
  font-size: 1.05rem;
  font-weight: 700;
  color: #2d3a4a;
  margin: 0 0 0.75rem;
}

.kr-home-continue .kr-values-intro {
  margin: 0 0 0.5rem;
  font-size: 0.88rem;
  color: var(--cn-color-ink-muted);
  line-height: 1.55;
}

.kr-home-continue .kr-values-inline {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.88rem;
  color: var(--cn-color-ink);
  line-height: 1.55;
}

.kr-home-continue .kr-values-inline li {
  margin-bottom: 0.4rem;
}

.kr-home-footnote {
  margin: 1.5rem 0 0;
  font-size: 0.8rem;
  color: var(--cn-color-ink-muted);
  text-align: center;
  line-height: 1.6;
}

.kr-section-inner {
  max-width: min(1120px, 100%);
  margin: 0 auto;
}

.kr-section-kicker {
  margin: 0 0 0.4rem;
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  color: var(--cn-color-accent);
}

.kr-section-title {
  margin: 0 0 0.55rem;
  font-size: clamp(1.25rem, 2.4vw, 1.75rem);
  font-weight: 800;
  line-height: 1.3;
  color: var(--cn-color-ink);
  letter-spacing: -0.02em;
}

.kr-section-desc {
  max-width: 42rem;
  margin: 0 0 clamp(1.5rem, 3vw, 2rem);
  color: var(--cn-color-ink-muted);
  font-size: 0.92rem;
  line-height: 1.65;
}

.kr-capabilities,
.kr-scenes {
  padding: clamp(4.5rem, 7vw, 6rem) 5%;
}

.kr-capabilities {
  background: #fff;
}

.kr-capability-grid {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.kr-capability-card {
  position: relative;
  min-height: 178px;
  overflow: hidden;
  border: 1px solid #e8edf3;
  border-radius: 16px;
  box-shadow: 0 6px 18px rgba(16, 24, 40, 0.06);
  transition: transform 0.18s var(--ds-ease), border-color 0.18s, box-shadow 0.18s;
}

.kr-capability-card:hover {
  transform: translateY(-4px);
  border-color: rgba(45, 140, 255, 0.45);
  box-shadow: 0 12px 26px rgba(16, 24, 40, 0.1);
}

.kr-capability-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: linear-gradient(90deg, var(--cn-color-accent), rgba(39, 144, 244, 0));
}

.kr-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  margin: 1rem 0 0 1rem;
  border-radius: 999px;
  background: rgba(39, 144, 244, 0.1);
  color: var(--cn-color-accent);
  font-size: 0.76rem;
  font-weight: 800;
}

.kr-scenes {
  background: #f5f7fa;
  border-top: 1px solid #e2eaf3;
  border-bottom: 1px solid #e2eaf3;
}

.kr-scene-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.kr-scene-card {
  padding: 1.2rem;
  border: 1px solid #e8edf3;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(16, 24, 40, 0.06);
  transition: transform 0.18s var(--ds-ease), border-color 0.18s, box-shadow 0.18s;
}

.kr-scene-card:hover {
  transform: translateY(-4px);
  border-color: rgba(45, 140, 255, 0.45);
  box-shadow: 0 12px 26px rgba(16, 24, 40, 0.1);
}

.kr-scene-tag {
  display: inline-block;
  margin-bottom: 0.65rem;
  padding: 0.24rem 0.55rem;
  border-radius: 999px;
  background: rgba(39, 144, 244, 0.08);
  color: var(--cn-color-accent);
  font-size: 0.72rem;
  font-weight: 700;
}

.kr-scene-card h3 {
  margin: 0 0 0.45rem;
  font-size: 1rem;
  color: #2d3a4a;
}

.kr-scene-card p {
  margin: 0 0 0.75rem;
  color: var(--cn-color-ink-muted);
  font-size: 0.86rem;
  line-height: 1.6;
}

.kr-scene-card a,
.kr-docs-inline-link {
  color: var(--cn-color-accent);
  font-size: 0.86rem;
  font-weight: 700;
  text-decoration: none;
}

.kr-scene-card a:hover,
.kr-docs-inline-link:hover {
  color: var(--cn-color-accent-hover);
  text-decoration: underline;
}

.kr-docs-cta {
  padding: clamp(4.5rem, 7vw, 6rem) 5%;
  background: var(--cn-color-canvas, #f7f8fa);
}

.kr-docs-cta-inner {
  max-width: min(1120px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.5rem;
  align-items: center;
  padding: clamp(1.25rem, 3vw, 2rem);
  border-radius: 16px;
  border: 1px solid rgba(39, 144, 244, 0.22);
  background: linear-gradient(145deg, #101925 0%, #17283c 100%);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.16);
}

.kr-docs-cta-title {
  margin: 0 0 0.65rem;
  font-size: clamp(1.15rem, 2.3vw, 1.65rem);
  line-height: 1.35;
  color: #fff;
  letter-spacing: -0.02em;
}

.kr-docs-cta-desc {
  max-width: 42rem;
  margin: 0 0 0.8rem;
  color: rgba(220, 232, 250, 0.86);
  font-size: 0.9rem;
  line-height: 1.65;
}

.kr-docs-cta .kr-section-kicker {
  color: rgba(140, 190, 255, 0.95);
}

.kr-docs-inline-link {
  color: rgba(140, 190, 255, 0.95);
}

.kr-docs-inline-link:hover {
  color: #fff;
}

.kr-docs-cta-actions {
  justify-content: flex-end;
  min-width: 280px;
}

.kr-docs-secondary.ds-btn--secondary {
  background: rgba(255, 255, 255, 0.96);
  border-color: rgba(255, 255, 255, 0.92);
}

@media (max-width: 860px) {
  .kr-docs-cta-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .kr-docs-cta-actions {
    min-width: 0;
    justify-content: center;
  }
}

.kr-hero-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

@media (max-width: 960px) {
  .kr-hero-btns { justify-content: center; }
}

/* 次级按钮在深色条上：浅底保持与设计系统 secondary 一致即可辨认 */
.kr-hero .kr-hero-cta-secondary.ds-btn--secondary {
  background: rgba(255, 255, 255, 0.96);
  border-color: rgba(255, 255, 255, 0.92);
}

.kr-hero .kr-hero-cta-secondary.ds-btn--secondary:hover {
  background: #fff;
}

/* 右侧核心产品：与设计系统 design-system.html 相同的横向滚动 + 分页点（单屏一图） */
.kr-hero-carousel-wrap {
  position: relative;
  width: 100%;
  max-width: 460px;
  margin: 0;
  justify-self: end;
}

@media (max-width: 960px) {
  .kr-hero-carousel-wrap {
    max-width: 390px;
    margin: 0 auto;
    justify-self: center;
  }
}

.kr-hero .kr-hero-carousel-view .kr-hero-carousel.ds-carousel {
  position: relative;
  z-index: 0;
  border-radius: 12px;
  gap: 0;
  padding: 0;
  margin: 0;
}

/* 每屏仅一帧：覆写范本页 ds-slide 的固定最小宽度 */
.kr-hero .kr-hero-carousel .ds-slide.kr-hero-slide {
  flex: 0 0 100%;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 0;
  padding: 0;
  aspect-ratio: 1;
  position: relative;
  scroll-snap-align: center;
  border-radius: 12px;
  border: 1px solid rgba(120, 168, 235, 0.28);
  background: #243044;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.kr-hero .kr-hero-carousel .kr-hero-slide:hover {
  border-color: rgba(39, 144, 244, 0.55);
  box-shadow: 0 10px 32px rgba(39, 144, 244, 0.15);
}

.kr-hero .kr-hero-slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.kr-hero-slide-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 8px 10px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(transparent, rgba(15, 22, 35, 0.9));
  pointer-events: none;
}

/* 轮播图视口：箭头叠在两侧（形态同 design-system.css .ds-dot--edge 三角） */
.kr-hero-carousel-view {
  position: relative;
  width: 100%;
}

.kr-hero-carousel-arrow {
  position: absolute;
  z-index: 4;
  top: 50%;
  transform: translateY(-50%);
  box-sizing: border-box;
  width: 2.25rem;
  height: 2.25rem;
  min-width: 2.25rem;
  min-height: 2.25rem;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  /* 半透明底，保证浅/亮产品图上三角仍可见（形态仍同范本 CSS 三角） */
  background: rgba(15, 22, 35, 0.55);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  appearance: none;
  font-size: 0;
  line-height: 0;
  color: transparent;
}

.kr-hero-carousel-arrow::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 0;
  height: 0;
  border-style: solid;
  transition: border-color 0.2s ease, filter 0.2s ease;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.45));
}

.kr-hero-carousel-arrow--prev {
  left: 8px;
}

.kr-hero-carousel-arrow--prev::before {
  margin-left: -1px;
  border-width: 6px 9px 6px 0;
  border-color: transparent #ffffff transparent transparent;
}

.kr-hero-carousel-arrow--next {
  right: 8px;
}

.kr-hero-carousel-arrow--next::before {
  margin-left: 1px;
  border-width: 6px 0 6px 9px;
  border-color: transparent transparent transparent #ffffff;
}

.kr-hero-carousel-arrow:hover {
  background: rgba(39, 144, 244, 0.45);
}

.kr-hero-carousel-arrow--prev:hover::before {
  border-right-color: #ffffff;
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.8));
}

.kr-hero-carousel-arrow--next:hover::before {
  border-left-color: #ffffff;
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.8));
}

.kr-hero-carousel-arrow:focus-visible {
  outline: 2px solid var(--cn-color-accent);
  outline-offset: 3px;
}

/* 仅底部分页圆点居中 */
.kr-hero-carousel-controls {
  display: flex;
  justify-content: center;
  margin-top: 0.45rem;
}

/* 深色首屏上的分页圆点 */
.kr-hero-carousel-wrap .kr-hero-dots .ds-dot {
  background: rgba(255, 255, 255, 0.35);
}

.kr-hero-carousel-wrap .kr-hero-dots .ds-dot:hover {
  background: rgba(255, 255, 255, 0.5);
}

@media (prefers-reduced-motion: reduce) {
  .kr-hero .kr-hero-carousel {
    scroll-behavior: auto;
  }
}
