/* ============================================
   首页样式（暗色 · LED 点阵 Hero）
   ============================================ */

/* ================= Hero ================= */
.hero {
  position: relative;
  /* 扣除固定页头高度（page-main 已有 72px padding-top），保证 hero 恰好占满首屏、slogan 不出视口 */
  height: calc(100svh - var(--header-h));
  min-height: 600px;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(60% 55% at 50% 30%, #10143a 0%, transparent 70%),
    var(--bg);
  overflow: hidden;
}

#ledMatrix {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: crosshair;
}

.hero-bottom {
  position: relative;
  z-index: 2;
  margin-top: auto;
  padding-bottom: clamp(2rem, 4vh, 3.5rem);
  background: linear-gradient(180deg, transparent, rgba(6, 8, 26, 0.7) 60%);
}

.hero-slogan {
  text-align: center;
}

/* 主句：白色大字，极简排版；整句高亮下划线 */
.hero-tag {
  font-size: clamp(1.7rem, 4.2vw, 2.9rem);
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.04em;
  line-height: 1.4;
  position: relative;
  display: inline-block;
}

/* 整句下划线：橙色渐变笔触，垫在字底 */
.hero-tag::after {
  content: "";
  position: absolute;
  left: 0.02em;
  right: -0.02em;
  bottom: 0.02em;
  height: 0.14em;
  border-radius: 99px;
  background: linear-gradient(90deg, rgba(255, 138, 92, 0.9), rgba(255, 93, 143, 0.65));
  z-index: -1;
}

/* 「壁垒」：叉掉风格，字色保持白色与主句统一 */
.ht-strike {
  position: relative;
  display: inline-block;
  padding: 0 0.08em;
}

/* 叉线：两条交叉斜线，动画划入 */
.ht-strike::before,
.ht-strike::after {
  content: "";
  position: absolute;
  top: 50%;
  left: -6%;
  width: 112%;
  height: 0.09em;
  border-radius: 99px;
  background: linear-gradient(90deg, #ff8a5c, #ff5d8f);
  opacity: 0;
  z-index: 1;
}

.ht-strike::before {
  transform: translateY(-50%) rotate(14deg);
  animation: strikeIn 0.45s var(--ease-out) 1.7s forwards;
}

.ht-strike::after {
  transform: translateY(-50%) rotate(-14deg);
  animation: strikeIn 0.45s var(--ease-out) 1.95s forwards;
}

@keyframes strikeIn {
  from { opacity: 0; clip-path: inset(0 100% 0 0); }
  to { opacity: 1; clip-path: inset(0 0 0 0); }
}

@media (prefers-reduced-motion: reduce) {
  .ht-strike::before,
  .ht-strike::after {
    animation: none;
    opacity: 1;
  }
}

/* 副句：灰白、无装饰，字距拉开呼吸感 */
.hero-sub {
  margin-top: 0.9rem;
  font-size: clamp(0.98rem, 1.9vw, 1.22rem);
  font-weight: 400;
  color: rgba(238, 240, 255, 0.74);
  letter-spacing: 0.14em;
}

.hero-actions {
  margin-top: 2.2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

/* ================= 关键词标签栏（hero 顶部 · 精致版） ================= */
.hero-kicker {
  position: absolute;
  top: calc(var(--header-h) + 1.4rem);
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 14px;
  justify-content: center;
  width: max-content; /* absolute + inline-flex 会被 shrink-to-fit 压到换行，必须由内容定宽 */
  max-width: 96vw;
  white-space: nowrap;
  /* 渐变光晕底：整组悬浮感 */
  padding: 10px 16px 10px 22px;
  border-radius: 999px;
  background: linear-gradient(120deg, rgba(129, 136, 255, 0.05), rgba(167, 139, 250, 0.02));
  box-shadow:
    0 0 0 1px rgba(129, 136, 255, 0.10),
    0 8px 32px -12px rgba(109, 114, 255, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  /* 呼吸光晕 */
  animation: hkBarGlow 6s ease-in-out infinite;
}

@keyframes hkBarGlow {
  0%, 100% {
    box-shadow:
      0 0 0 1px rgba(129, 136, 255, 0.10),
      0 8px 32px -12px rgba(109, 114, 255, 0.35),
      inset 0 1px 0 rgba(255, 255, 255, 0.10);
  }
  50% {
    box-shadow:
      0 0 0 1px rgba(167, 139, 250, 0.22),
      0 10px 44px -12px rgba(139, 123, 255, 0.5),
      inset 0 1px 0 rgba(255, 255, 255, 0.13);
  }
}

/* 心跳脉冲红点（呼应 Play Heart） */
.hk-pulse {
  position: relative;
  display: grid;
  place-items: center;
  width: 10px;
  height: 10px;
  margin-right: 2px;
}

.hk-pulse i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ff8a8a, #ff5a5a 65%);
  box-shadow:
    0 0 10px rgba(255, 90, 90, 0.8),
    0 0 22px rgba(255, 90, 90, 0.35);
}

/* 两个圆环交替扩散，错开 1.2s 形成连续脉冲 */
.hk-pulse::before,
.hk-pulse::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid rgba(255, 90, 90, 0.6);
  animation: hkPing 2.4s ease-out infinite;
}

.hk-pulse::after {
  animation-delay: 1.2s;
}

@keyframes hkPing {
  0% { transform: scale(0.5); opacity: 0; }
  25% { opacity: 0.9; }
  100% { transform: scale(2.1); opacity: 0; }
}

/* 细分隔点：菱形微光 */
.hk-dot {
  width: 5px;
  height: 5px;
  border-radius: 1.5px;
  transform: rotate(45deg);
  background: linear-gradient(135deg, rgba(196, 181, 253, 0.9), rgba(129, 136, 255, 0.5));
  box-shadow: 0 0 8px rgba(167, 139, 250, 0.55);
  animation: hkDotGlow 3.2s ease-in-out infinite;
}

.hk-dot:nth-of-type(odd) {
  animation-delay: 0.8s;
}

@keyframes hkDotGlow {
  0%, 100% { opacity: 0.45; box-shadow: 0 0 4px rgba(167, 139, 250, 0.3); }
  50% { opacity: 1; box-shadow: 0 0 10px rgba(167, 139, 250, 0.75); }
}

/* 关键词胶囊：渐变描边 + 内光泽，--i 序号错开入场与流光 */
.hk-chip {
  position: relative;
  isolation: isolate;
  padding: 5px 15px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-indent: 0.22em;
  color: var(--ink-2);
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0.06));
  opacity: 0;
  transform: translateY(14px) scale(0.92);
  animation: hkChipIn 0.7s cubic-bezier(0.22, 0.9, 0.28, 1) calc(0.15s + var(--i, 0) * 0.12s) forwards;
  transition:
    color 0.35s,
    box-shadow 0.35s,
    transform 0.35s cubic-bezier(0.22, 0.9, 0.28, 1),
    background 0.35s;
  cursor: default;
  overflow: hidden;
}

/* 渐变描边（1px 光边） */
.hk-chip::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(129, 136, 255, 0.45), rgba(167, 139, 250, 0.18) 50%, rgba(255, 138, 92, 0.25));
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  transition: background 0.35s;
  z-index: -1;
}

@keyframes hkChipIn {
  to { opacity: 1; transform: none; }
}

/* 流光扫过 */
.hk-chip::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -80%;
  width: 55%;
  background: linear-gradient(100deg, transparent, rgba(167, 139, 250, 0.28), transparent);
  transform: skewX(-18deg);
  animation: hkSheen 4.6s ease-in-out calc(1.2s + var(--i, 0) * 0.5s) infinite;
  z-index: 1;
  pointer-events: none;
}

@keyframes hkSheen {
  0%, 55% { left: -80%; }
  90%, 100% { left: 130%; }
}

/* hover：上浮 + 顶光提亮 + 内发光 */
.hk-chip:hover {
  color: #fff;
  background:
    linear-gradient(160deg, rgba(139, 123, 255, 0.16), rgba(255, 255, 255, 0.07));
  box-shadow:
    0 10px 30px -10px rgba(139, 123, 255, 0.65),
    inset 0 0 14px rgba(139, 123, 255, 0.18);
  transform: translateY(-2px);
}

.hk-chip:hover::after {
  background: linear-gradient(135deg, rgba(167, 139, 250, 0.85), rgba(255, 138, 92, 0.5));
}

@media (prefers-reduced-motion: reduce) {
  .hk-chip {
    opacity: 1;
    transform: none;
    animation: none;
  }
  .hk-chip::before,
  .hk-pulse::before,
  .hk-pulse::after,
  .hk-dot,
  .hero-kicker {
    animation: none;
  }
}

@media (max-width: 760px) {
  .hero-kicker {
    width: auto;           /* 窄屏放不下：允许换行 */
    max-width: 92vw;
    white-space: normal;
    flex-wrap: wrap;
    row-gap: 8px;
    gap: 8px;
    padding: 8px 12px 8px 18px;
  }
  .hk-chip {
    padding: 4px 10px;
    font-size: 11px;
    letter-spacing: 0.14em;
  }
  .hk-dot {
    display: none; /* 窄屏隐藏分隔点，让胶囊更紧凑 */
  }
}

/* ================= 跑马灯 ================= */
.home-marquee {
  padding: 1rem 0;
  border-block: 1px solid var(--line);
  background: var(--bg-2);
  color: var(--ink-3);
  font-size: 0.88rem;
  letter-spacing: 0.28em;
}

.home-marquee i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.7;
  flex: none;
}

/* ================= 六类服务（侧边光轨卡） ================= */
.home-services {
  padding: clamp(4.5rem, 9vw, 7rem) 0;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
}

/* 侧边光轨卡：左侧垂直光轨 + 悬停充能 */
.service-card {
  position: relative;
  display: flex;
  gap: 1.15rem;
  padding: 1.7rem 1.5rem 1.6rem 0.4rem;
  border-radius: var(--radius-m);
  background: transparent;
  border: none;
  overflow: hidden;
  cursor: default;
  transition: background 0.5s var(--ease-out);
}

/* 卡底：悬停浮现的暗色面板 */
.service-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius-m);
  background:
    linear-gradient(120deg, rgba(129, 136, 255, 0.07), rgba(167, 139, 250, 0.03) 60%);
  border: 1px solid var(--line);
  opacity: 0;
  transform: scale(0.985);
  transition:
    opacity 0.45s ease,
    transform 0.45s var(--ease-out),
    border-color 0.45s;
  pointer-events: none;
}

.service-card:hover::before {
  opacity: 1;
  transform: none;
  border-color: rgba(167, 139, 250, 0.35);
}

/* 左侧光轨：垂直渐变线，悬停充能点亮 + 顶部流光下移 */
.service-card::after {
  content: "";
  position: absolute;
  left: 0;
  top: 14%;
  bottom: 14%;
  width: 3px;
  border-radius: 3px;
  background: linear-gradient(180deg, rgba(129, 136, 255, 0.5), rgba(167, 139, 250, 0.15));
  transition: all 0.5s var(--ease-out);
}

.service-card:hover::after {
  top: 6%;
  bottom: 6%;
  background: linear-gradient(180deg, #8188ff, #a78bfa 55%, #ff8a5c);
  box-shadow: 0 0 14px rgba(129, 136, 255, 0.55);
}

/* 内容列 */
.service-body {
  position: relative;
  flex: 1;
  min-width: 0;
  padding-left: 0.9rem;
}

/* 编号徽标：轨道旁小字 */
.service-card .sc-no {
  position: absolute;
  left: -0.65rem;
  top: 1.75rem;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  color: var(--ink-3);
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transition: color 0.4s;
  pointer-events: none;
}

.service-card:hover .sc-no {
  color: var(--primary);
}

.service-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--bg-mist);
  color: var(--primary);
  margin-bottom: 1rem;
  transition: all 0.45s var(--ease-out);
}

.service-card:hover .service-icon {
  background: var(--grad-main);
  color: #fff;
  box-shadow: 0 8px 22px -8px rgba(109, 114, 255, 0.6);
}

.service-icon .icon {
  width: 20px;
  height: 20px;
}

.service-card h3 {
  font-size: 1.1rem;
}

.service-card .tagline {
  margin-top: 0.15rem;
  font-size: 0.84rem;
  color: var(--ink-3);
}

.service-card .desc {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition:
    max-height 0.55s var(--ease-out),
    opacity 0.45s ease 0.05s,
    margin 0.55s var(--ease-out);
  color: var(--ink-2);
  font-size: 0.89rem;
  line-height: 1.85;
}

.service-card:hover .desc,
.service-card:focus-within .desc {
  max-height: 8em;
  opacity: 1;
  margin-top: 0.8rem;
}

@media (max-width: 900px) {
  .service-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .service-grid {
    grid-template-columns: 1fr;
  }
  .service-card .desc {
    max-height: 8em;
    opacity: 1;
    margin-top: 0.8rem;
  }
}

/* ================= 精选案例 ================= */
.home-cases {
  padding: clamp(4.5rem, 9vw, 7rem) 0;
  background: var(--bg-2);
  border-block: 1px solid var(--line);
}

.case-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.case-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-l);
  background: var(--surface);
  border: 1px solid var(--line);
  overflow: hidden;
  transition:
    transform 0.45s var(--ease-out),
    box-shadow 0.45s var(--ease-out),
    border-color 0.45s;
}

.case-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-m);
  border-color: var(--line-strong);
}

.case-card .img-box {
  aspect-ratio: 16 / 10;
}

/* 本地实拍图：带细边框 */
.case-card .case-thumb {
  padding: 5px;
  border: 1px solid var(--line-strong);
  background: #0a0d1f;
}

.case-card .img-box img {
  transition: transform 0.7s var(--ease-out), opacity 0.7s;
  opacity: 0.85;
}

.case-card:hover .img-box img {
  transform: scale(1.07);
  opacity: 1;
}

.case-body {
  padding: 1.4rem 1.45rem 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.case-tag {
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--primary);
  background: var(--bg-mist);
  padding: 0.22rem 0.7rem;
  border-radius: 6px;
  align-self: flex-start;
}

.case-body h3 {
  margin-top: 0.85rem;
  font-size: 1.18rem;
}

.case-body p {
  margin-top: 0.6rem;
  font-size: 0.92rem;
  color: var(--ink-2);
  flex: 1;
}

.case-link {
  margin-top: 1.1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
}

.case-link .arr {
  transition: transform 0.3s var(--ease-out);
}

.case-card:hover .case-link .arr {
  transform: translateX(5px);
}

@media (max-width: 900px) {
  .case-grid {
    grid-template-columns: 1fr;
    max-width: 560px;
    margin-inline: auto;
  }
}

/* ================= 为什么是唤心 ================= */
.home-why {
  padding: clamp(4.5rem, 9vw, 7.5rem) 0;
}

.why-wrap {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: center;
}

.why-head .section-title {
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  line-height: 1.3;
}

.why-list {
  display: flex;
  flex-direction: column;
}

.why-item {
  display: flex;
  gap: 1.6rem;
  align-items: flex-start;
  padding: 1.7rem 0.4rem;
  border-bottom: 1px solid var(--line);
  border-radius: var(--radius-m);
  transition: padding-left 0.35s var(--ease-out), background 0.35s;
}

.why-item:first-child {
  border-top: 1px solid var(--line);
}

.why-item:hover {
  padding-left: 1.1rem;
  background: linear-gradient(90deg, rgba(129, 136, 255, 0.06), transparent 70%);
}

.why-item .no {
  font-size: 1.05rem;
  font-weight: 700;
  color: transparent;
  -webkit-text-stroke: 1.2px var(--primary);
  line-height: 1.5;
  flex: none;
}

.why-item h3 {
  font-size: 1.15rem;
  margin-bottom: 0.35rem;
}

.why-item p {
  color: var(--ink-2);
  font-size: 0.94rem;
}

@media (max-width: 860px) {
  .why-wrap {
    grid-template-columns: 1fr;
  }
}

/* ================= 底部 CTA ================= *//* ================= 底部 CTA ================= */
.home-cta {
  padding: 0 0 clamp(4.5rem, 8vw, 6.5rem);
}
