/* ============================================================
   首页首屏：轻量 3D 展厅钩子
   继承旧站「推门进展厅」的构思，但重做为：
   - 纯 CSS 3D，零 WebGL、零模型文件、零外部依赖
   - 首屏 1.6 秒内可见，3D 部分懒加载
   - 手机端自动降级为静态横幅（3D 在手机上得不偿失）
   - prefers-reduced-motion 时完全静止
   ============================================================ */

.hero {
  position: relative;
  min-height: 560px;
  background: var(--c-ink);
  overflow: hidden;
  display: flex;
  align-items: center;
  isolation: isolate;
}

.hero-bg {
  position: absolute; inset: 0; z-index: -2;
  background:
    radial-gradient(ellipse 70% 55% at 50% 12%, rgba(13,122,140,.30), transparent 68%),
    linear-gradient(180deg, #0d1f27 0%, #14303c 46%, #1b3d4a 100%);
}

/* 地面网格 */
.hero-floor {
  position: absolute; left: -80%; right: -80%; bottom: -10%; height: 80%;
  z-index: -1; transform-origin: top center;
  transform: perspective(700px) rotateX(72deg);
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,.05) 0 1px, transparent 1px 90px),
    repeating-linear-gradient(0deg, rgba(255,255,255,.045) 0 1px, transparent 1px 90px),
    linear-gradient(180deg, rgba(30,70,84,.5), rgba(10,25,32,.9));
  animation: floorDrift 24s linear infinite;
}
@keyframes floorDrift {
  from { background-position: 0 0, 0 0, 0 0; }
  to   { background-position: 90px 0, 0 90px, 0 0; }
}

/* 顶部光晕 */
.hero-glow {
  position: absolute; top: -10%; left: 50%; transform: translateX(-50%);
  width: 70%; height: 46%; z-index: -1;
  background: radial-gradient(ellipse at center, rgba(120,205,220,.20), transparent 70%);
  pointer-events: none;
}

.hero-inner {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: 1.1fr .9fr;
  gap: var(--sp-8); align-items: center;
  padding: var(--sp-9) 0;
}

.hero-eyebrow {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  font-size: var(--fs-xs); font-weight: 600; letter-spacing: .14em;
  text-transform: uppercase; color: #7fc4d0; margin-bottom: var(--sp-5);
}
.hero-eyebrow::before {
  content: ''; width: 24px; height: 1px; background: #7fc4d0;
}

.hero-title {
  font-size: var(--fs-4xl); color: #fff; line-height: 1.12;
  margin-bottom: var(--sp-5); letter-spacing: -.02em; max-width: 15ch;
}
.hero-title em {
  font-style: normal; color: #7fc4d0;
}
.hero-lead {
  font-size: var(--fs-lg); color: #a8bec7; line-height: 1.7;
  max-width: 52ch; margin-bottom: var(--sp-6);
}
.hero-actions { display: flex; gap: var(--sp-3); flex-wrap: wrap; margin-bottom: var(--sp-7); }

.hero-stats {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-5); padding-top: var(--sp-5);
  border-top: 1px solid rgba(255,255,255,.13);
}
.hero-stat-num {
  font-size: var(--fs-2xl); font-weight: 700; color: #fff;
  font-family: var(--f-mono); line-height: 1;
}
.hero-stat-label { font-size: var(--fs-xs); color: #7e97a1; margin-top: 6px; }

/* ---------- 3D 展厅预览 ---------- */
.showroom {
  position: relative;
  aspect-ratio: 4 / 3;
  perspective: 1100px;
  perspective-origin: 50% 45%;
  transform-style: preserve-3d;
  cursor: pointer;
}
.showroom-scene {
  position: absolute; inset: 0;
  transform-style: preserve-3d;
  transition: transform .9s cubic-bezier(.22,.68,.32,1);
  transform: rotateY(-11deg) rotateX(6deg) translateZ(-30px);
}
.showroom:hover .showroom-scene { transform: rotateY(-4deg) rotateX(3deg) translateZ(0); }

/* 门框 */
.showroom-frame {
  position: absolute; inset: 8% 12%;
  border: 2px solid rgba(127,196,208,.4);
  border-bottom-width: 4px;
  border-radius: var(--r-sm);
  box-shadow: 0 0 60px rgba(13,122,140,.35), inset 0 0 40px rgba(127,196,208,.12);
  transform: translateZ(40px);
}
.showroom-floor {
  position: absolute; left: -50%; right: -50%; bottom: -46%; height: 70%;
  transform-origin: top center; transform: rotateX(74deg);
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,.06) 0 1px, transparent 1px 60px),
    repeating-linear-gradient(0deg, rgba(255,255,255,.05) 0 1px, transparent 1px 60px),
    linear-gradient(180deg, rgba(40,90,105,.55), rgba(12,28,35,.92));
}

/* 货架（3D 立体排布） */
.showroom-shelf {
  position: absolute; top: 24%; width: 34%; height: 42%;
  background: linear-gradient(180deg, rgba(20,50,62,.92), rgba(12,30,38,.96));
  border: 1px solid rgba(127,196,208,.28);
  border-radius: var(--r-sm);
  transform-style: preserve-3d;
}
.showroom-shelf.s1 { left: 6%;  transform: translate3d(0,0,30px) rotateY(22deg); }
.showroom-shelf.s2 { left: 33%; transform: translate3d(0,0,0) rotateY(0deg); z-index: 2; }
.showroom-shelf.s3 { left: 60%; transform: translate3d(0,0,30px) rotateY(-22deg); }

/* 货架上的"杯子"剪影 */
.showroom-shelf::before {
  content: ''; position: absolute; inset: 14% 12% 46%;
  background:
    radial-gradient(ellipse 18% 46% at 18% 60%, rgba(190,225,232,.5), transparent 70%),
    radial-gradient(ellipse 18% 52% at 42% 55%, rgba(190,225,232,.42), transparent 70%),
    radial-gradient(ellipse 18% 44% at 68% 62%, rgba(190,225,232,.48), transparent 70%),
    radial-gradient(ellipse 18% 50% at 90% 58%, rgba(190,225,232,.38), transparent 70%);
}
.showroom-shelf::after {
  content: ''; position: absolute; left: 10%; right: 10%; top: 52%; height: 2px;
  background: rgba(127,196,208,.4);
}

/* 门内暖光 */
.showroom-light {
  position: absolute; left: 50%; top: 30%; transform: translate(-50%,-50%);
  width: 60%; height: 44%;
  background: radial-gradient(ellipse at center, rgba(255,205,130,.30), transparent 68%);
  filter: blur(6px);
}
.showroom-door {
  position: absolute; inset: 0;
  border: 1px dashed rgba(127,196,208,.35);
  border-radius: var(--r-sm);
  display: grid; place-items: center;
  background: rgba(10,25,32,.55);
  backdrop-filter: blur(1.5px);
  transition: background .3s ease;
}
.showroom:hover .showroom-door { background: rgba(10,25,32,.32); }
.showroom-door span {
  font-size: var(--fs-xs); letter-spacing: .12em; text-transform: uppercase;
  color: #a8bec7; border: 1px solid rgba(127,196,208,.4);
  padding: 8px 16px; border-radius: var(--r-full);
  background: rgba(13,122,140,.2);
}

/* 悬浮信息卡 */
.showroom-badge {
  position: absolute; right: 2%; bottom: 4%; z-index: 5;
  background: rgba(255,255,255,.96);
  border-radius: var(--r-md); padding: var(--sp-3) var(--sp-4);
  box-shadow: var(--sh-lg);
  min-width: 168px;
}
.showroom-badge-num {
  font-size: var(--fs-xl); font-weight: 700; color: var(--c-accent);
  font-family: var(--f-mono); line-height: 1.1;
}
.showroom-badge-label { font-size: var(--fs-xs); color: var(--c-text-muted); }

/* ---------- 手机端降级 ---------- */
@media (max-width: 900px) {
  .hero { min-height: 0; }
  .hero-inner { grid-template-columns: 1fr; gap: var(--sp-6); padding: var(--sp-7) 0; }
  .hero-title { font-size: var(--fs-3xl); max-width: none; }
  .showroom { display: none; }
  .hero-stats { grid-template-columns: repeat(3, 1fr); gap: var(--sp-3); }
  .hero-stat-num { font-size: var(--fs-xl); }
}

/* ---------- 无障碍：尊重减弱动效偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
  .hero-floor { animation: none; }
  .showroom-scene { transition: none; }
  .showroom:hover .showroom-scene { transform: rotateY(-11deg) rotateX(6deg) translateZ(-30px); }
  * { scroll-behavior: auto !important; }
}
