/* =========================================================
   hero-park.css —— 首页 Banner 3D 园区大屏
   与 base.css 的 .hero-banner 配合：场景铺满整幅，左侧压暗保证标题可读
   ========================================================= */

.park-hero {
  background: linear-gradient(180deg, #f2fbfb 0%, #e7f3f5 46%, #dcebee 100%);
  min-height: 100vh;
  align-items: center;
  padding-top: var(--nav-h);
}

/* 3D 画布容器：铺满 banner，不接管任何指针事件 */
.park-scene {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.2s ease;
}
.park-scene canvas { display: block; width: 100% !important; height: 100% !important; }
.park-hero.is-ready .park-scene { opacity: 1; }

/* 左侧压暗 + 底部压暗：白色标题在亮场景上也能读 */
.park-hero::before {
  content: "";
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(2,22,28,.58) 0%, rgba(2,22,28,.24) 62px, rgba(2,22,28,0) 150px),
    linear-gradient(90deg, rgba(2,22,28,.74) 0%, rgba(2,22,28,.48) 24%, rgba(2,22,28,.14) 42%, rgba(2,22,28,0) 56%),
    linear-gradient(0deg, rgba(2,22,28,.26) 0%, rgba(2,22,28,0) 24%);
}
/* 四周暗角：把视线收拢到园区（base.css 里 ::after 带固定宽高，这里必须覆盖） */
.park-hero::after {
  content: "";
  position: absolute; left: 0; top: 0; right: 0; bottom: 0;
  width: auto; height: auto; z-index: 1; pointer-events: none;
  background: radial-gradient(115% 92% at 62% 50%, rgba(255,255,255,0) 42%, rgba(120,158,168,.16) 82%, rgba(96,132,144,.26) 100%);
}

/* 文字层抬高，避开压暗层 */
.park-hero .hero-inner { z-index: 3; }

/* ---------- 右下角落款 / 右上角状态 ---------- */
.park-hud {
  position: absolute; z-index: 3; top: calc(var(--nav-h) + 26px); right: 26px;
  display: flex; flex-direction: column; align-items: flex-end; gap: 10px;
  pointer-events: none; text-align: right;
}
.park-live {
  display: inline-flex; align-items: center; gap: 8px;
  font: 600 11px/1 "SF Mono", ui-monospace, Menlo, Consolas, monospace;
  letter-spacing: .18em; color: #0a2a33;
  background: rgba(255,255,255,.72); border: 1px solid rgba(10,42,51,.14);
  border-radius: 999px; padding: 7px 13px; backdrop-filter: blur(8px);
}
.park-live i {
  width: 6px; height: 6px; border-radius: 50%; background: #00aabb;
  box-shadow: 0 0 0 0 rgba(0,170,187,.6); animation: park-live 2.2s ease-out infinite;
}
@keyframes park-live {
  0% { box-shadow: 0 0 0 0 rgba(0,170,187,.55); }
  70% { box-shadow: 0 0 0 9px rgba(0,170,187,0); }
  100% { box-shadow: 0 0 0 0 rgba(0,170,187,0); }
}
.park-coord {
  font: 500 10px/1.6 "SF Mono", ui-monospace, Menlo, Consolas, monospace;
  letter-spacing: .16em; color: rgba(10,42,51,.55);
}

/* ---------- 建筑标注（由脚本投影定位） ---------- */
.park-labels { position: absolute; inset: 0; z-index: 2; pointer-events: none; overflow: hidden; }
.p3d-tag {
  position: absolute; left: 0; top: 0;
  display: flex; align-items: center; gap: 7px;
  transform: translate(-50%, -50%);
  opacity: 0; will-change: transform, opacity;
  transition: opacity .7s ease;
}
.p3d-tag.on { opacity: 1; }
.p3d-tag .dot {
  position: relative; flex: none;
  width: 7px; height: 7px; border-radius: 50%;
  background: #00aabb;
  box-shadow: 0 0 10px rgba(0,170,187,.85), 0 0 0 2px rgba(255,255,255,.85);
}
.p3d-tag .dot::after {
  content: ""; position: absolute; left: 50%; top: 50%;
  width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px; border-radius: 50%;
  border: 1.5px solid rgba(0,170,187,.75);
  animation: p3d-ping 2.6s ease-out infinite;
}
@keyframes p3d-ping {
  0% { transform: scale(.9); opacity: .9; }
  70% { transform: scale(3.4); opacity: 0; }
  100% { transform: scale(3.4); opacity: 0; }
}
.p3d-tag .txt {
  font: 600 11px/1 var(--font, "PingFang SC", "Microsoft YaHei", sans-serif);
  letter-spacing: .04em; color: #0a2a33; white-space: nowrap;
  background: rgba(255,255,255,.9);
  border: 1px solid rgba(10,42,51,.10);
  border-radius: 4px; padding: 5px 8px;
  box-shadow: 0 4px 14px rgba(1,35,44,.16);
  backdrop-filter: blur(6px);
}
.p3d-tag.minor .txt { font-weight: 500; font-size: 10px; color: #3d5162; background: rgba(255,255,255,.78); }

/* ---------- 右下角图例 ---------- */
.park-legend {
  position: absolute; z-index: 3; right: 92px; bottom: 26px;
  display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px;
  pointer-events: none; max-width: 46%;
}
.park-legend span {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; color: #22434d; letter-spacing: .04em;
  background: rgba(255,255,255,.76); border: 1px solid rgba(34,67,77,.10);
  border-radius: 999px; padding: 5px 11px; backdrop-filter: blur(8px);
}
.park-legend span i { width: 7px; height: 7px; border-radius: 2px; display: inline-block; }

/* ---------- 载入占位 ---------- */
.park-boot {
  position: absolute; z-index: 4; inset: 0; display: flex;
  flex-direction: column; align-items: center; justify-content: center; gap: 16px;
  background: linear-gradient(160deg, #e8f6f6, #d8e9ec);
  transition: opacity .7s ease;
}
.park-hero.is-ready .park-boot { opacity: 0; visibility: hidden; }
.park-boot .b1 {
  font-size: 12px; letter-spacing: .34em; color: #3b5b66; text-transform: uppercase;
}
.park-boot .b2 { font-size: 13px; color: #6b8d97; }
.park-boot .track { width: 180px; height: 2px; background: rgba(0,170,187,.16); overflow: hidden; border-radius: 2px; }
.park-boot .bar { width: 40%; height: 100%; background: #00aabb; border-radius: 2px; animation: park-load 1.4s ease-in-out infinite; }
@keyframes park-load {
  0% { transform: translateX(-110%); }
  100% { transform: translateX(360%); }
}

/* 载入失败提示 */
.park-hero.no-webgl .park-boot .b2 { color: #b45309; }

/* ---------- 响应式 ---------- */
@media (max-width: 1100px) {
  .park-hud { top: 82px; right: 18px; }
  .park-legend { right: 18px; bottom: 18px; }
}
@media (max-width: 860px) {
  .park-hero { min-height: 640px; padding-top: calc(var(--nav-h) + 10px); }
  .park-hero::before {
    background:
      linear-gradient(180deg, rgba(2,22,28,.55) 0%, rgba(2,22,28,.18) 58px, rgba(2,22,28,0) 130px),
      linear-gradient(180deg, rgba(2,22,28,0) 0%, rgba(2,22,28,.20) 30%, rgba(2,22,28,.84) 64%, rgba(2,22,28,.92) 100%);
  }
  .park-hero .hero-inner { align-self: flex-end; padding-bottom: 56px; }
  .park-hud { top: 74px; right: 12px; gap: 6px; }
  .park-coord { display: none; }
  .park-live { font-size: 10px; letter-spacing: .14em; padding: 5px 9px; }
  .park-legend { display: none; }
  .p3d-tag .txt { font-size: 10px; padding: 4px 6px; }
  .p3d-tag.minor { display: none; }
}
