/* 平台首页「全幅切换店铺」区（_shared/_home-stores.ejs · 业主 2026-09-30，取代同日的扇形版）
 * 一屏：全幅背景（每店一层，700ms 淡入淡出）+ 轻黑渐变 + 左上标语 / 右上介绍 + 底部头像列 / 店名 / 细字页脚。
 * 白字压照片，颜色固定、不读主题变量（本区变量一律 --hf-*，护栏 home-stores.test.js 钉「用到的都定义过」）。
 * 断点：640（字号 / 头像放大）· 768（标语与介绍并排；与手机图 <source> 同一条线）· 1024（标语最大号、左右留白加宽）。
 */
.hf {
  --hf-bg: #0c0c0d;
  --hf-fg: #fff;
  --hf-fg-80: rgba(255, 255, 255, .8);
  --hf-fg-70: rgba(255, 255, 255, .7);
  --hf-fg-55: rgba(255, 255, 255, .55);
  --hf-line: rgba(255, 255, 255, .2);
  --hf-thumb-bg: rgba(255, 255, 255, .12);
  --hf-go-bg: rgba(255, 255, 255, .16);
  --hf-go-line: rgba(255, 255, 255, .85);
  --hf-go-glow: rgba(255, 255, 255, .55);
  --hf-go-glow-0: rgba(255, 255, 255, 0);
  --hf-go-glint: rgba(255, 255, 255, .6);
  --hf-font: "Geist", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", sans-serif;
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100svh;
  min-height: 560px;
  overflow: hidden;
  background: var(--hf-bg);
  color: var(--hf-fg);
  font-family: var(--hf-font);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}
@keyframes hfFadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 背景：只有当前那层不透明；没轮播图的店那层是空的 = 纯深色底。
   .hf-bgs 自成一层叠放：过渡中新那层被 GSAP 抬到 z-index 2，只在这一层里比旧那层高，不会盖过上面的渐变遮罩 */
.hf-bgs { position: absolute; inset: 0; z-index: 0; }
.hf-bg { position: absolute; inset: 0; overflow: hidden; opacity: 0; transition: opacity .7s ease-out; background: var(--hf-bg); }
.hf-bg.is-active { opacity: 1; }
.hf.hf-gsap .hf-bg { transition: none; }   /* 有 GSAP 时过渡交给 home-stores.js；没有就用上面这条 CSS 淡入淡出 */
.hf-bg picture, .hf-bg img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; max-width: none; }
.hf-bg img { object-fit: cover; object-position: center; }
.hf-veil { position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(0, 0, 0, .2), rgba(0, 0, 0, .05), rgba(0, 0, 0, .25)); pointer-events: none; }

.hf-content { position: relative; z-index: 10; display: flex; height: 100%; flex-direction: column; justify-content: space-between; box-sizing: border-box; padding: 40px 24px 24px; }
@media (min-width: 640px) { .hf-content { padding: 56px 40px 32px; } }
@media (min-width: 1024px) { .hf-content { padding-left: 64px; padding-right: 64px; } }

/* 上：网站 logo + 介绍（不放标语，业主 10-01） */
.hf-top { display: flex; flex-direction: column; gap: 32px; }
@media (min-width: 768px) { .hf-top { flex-direction: row; align-items: flex-start; justify-content: space-between; gap: 64px; } }
.hf-head { min-width: 0; }
.hf-brand { margin: 0; font-size: .875rem; font-weight: 500; letter-spacing: .02em; }
.hf-brand img { display: block; height: 28px; width: auto; max-width: 200px; object-fit: contain; }
.hf-desc { max-width: 20rem; margin: 0; font-size: .875rem; font-weight: 500; line-height: 1.625; color: var(--hf-fg-80); white-space: pre-line; overflow-wrap: anywhere; }
.hf-desc:empty { display: none; }
@media (min-width: 640px) { .hf-desc { font-size: 1rem; } }
@media (min-width: 768px) { .hf-desc { flex: 0 0 auto; padding-top: 8px; } }
.hf-fade { animation: hfFadeIn .5s ease; }

/* 下：头像列 + 店名 / 进入店铺 + 细字页脚 */
.hf-bottom { display: flex; flex-direction: column; gap: 32px; min-width: 0; }
.hf-avatars { display: flex; align-items: flex-end; gap: 8px; overflow-x: auto; padding: 6px 4px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }  /* 留 6px：选中的头像放大 1.12 倍不被列裁掉 */
.hf-avatars::-webkit-scrollbar { display: none; }
@media (min-width: 640px) { .hf-avatars { gap: 12px; } }
.hf-ava { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 8px; margin: 0; padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; }
.hf-ava:focus-visible { outline: none; }
.hf-ava:focus-visible .hf-thumb { box-shadow: 0 0 0 2px var(--hf-fg); }
.hf-dot { width: 4px; height: 4px; border-radius: 999px; background: var(--hf-fg); opacity: 0; transition: opacity .3s; }
.hf-ava.is-on .hf-dot { opacity: 1; }
.hf-thumb { display: block; width: 52px; height: 52px; border-radius: 999px; overflow: hidden; background: var(--hf-thumb-bg); }  /* 手机 52px（原 40px 太小，业主 10-01） */
@media (min-width: 640px) { .hf-thumb { width: 56px; height: 56px; } }
.hf-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.hf-ico { display: flex; width: 100%; height: 100%; align-items: center; justify-content: center; color: var(--hf-fg-70); }
.hf-ico svg { width: 55%; height: 55%; }

.hf-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-top: 20px; border-top: 1px solid var(--hf-line); font-size: .875rem; font-weight: 500; }
.hf-name { position: relative; min-width: 0; overflow-wrap: anywhere; }
/* 店名逐字进场（home-stores.js 拆字）：外框裁掉上下，字从框外滑进来；读屏读 .hf-sr 那份整名 */
.hf-chars { display: inline-flex; flex-wrap: wrap; overflow: hidden; padding-bottom: 2px; vertical-align: bottom; }
.hf-ch { display: inline-block; white-space: pre; }
.hf-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* 「进入店铺」按钮（业主 10-01）：玻璃胶囊 + 箭头；悬停时白色由左向右铺满、字变深、箭头往前推；按下微缩 */
.hf .hf-go {
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 14px 10px 20px; border: 1px solid var(--hf-go-line); border-radius: 999px;
  background: var(--hf-go-bg); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  color: var(--hf-fg); font-size: .875rem; font-weight: 500; line-height: 1.2; text-decoration: none; white-space: nowrap;
  transition: color .35s ease, border-color .35s ease, transform .15s ease;
  animation: hfGoPulse 2.2s ease-out infinite;   /* 外圈呼吸光（业主 10-01：要闪、要显眼；手机没有悬停，平时就得看得见） */
}
/* 扫光：一道斜白光每 2.8 秒从左扫到右；悬停铺白时收起（白上扫白看不见，也免得抢字） */
.hf .hf-go::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 40%; z-index: 1; pointer-events: none;
  background: linear-gradient(100deg, transparent, var(--hf-go-glint), transparent);
  transform: translateX(-150%) skewX(-20deg); animation: hfGoGlint 2.8s ease-in-out infinite;
}
.hf .hf-go:hover::after, .hf .hf-go:focus-visible::after { opacity: 0; }
@keyframes hfGoPulse {
  0% { box-shadow: 0 0 0 0 var(--hf-go-glow); }
  70%, 100% { box-shadow: 0 0 0 12px var(--hf-go-glow-0); }
}
@keyframes hfGoGlint {
  0% { transform: translateX(-150%) skewX(-20deg); }
  45%, 100% { transform: translateX(300%) skewX(-20deg); }
}
.hf .hf-go::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: var(--hf-fg);
  transform: scaleX(0); transform-origin: left center; transition: transform .45s cubic-bezier(.22, .61, .36, 1);
}
.hf-go-arr { width: 18px; height: 18px; flex: 0 0 auto; transition: transform .45s cubic-bezier(.22, .61, .36, 1); }
.hf .hf-go:hover, .hf .hf-go:focus-visible { color: var(--hf-bg); border-color: var(--hf-fg); }
.hf .hf-go:hover::before, .hf .hf-go:focus-visible::before { transform: scaleX(1); }
.hf .hf-go:hover .hf-go-arr, .hf .hf-go:focus-visible .hf-go-arr { transform: translateX(4px); }
.hf .hf-go:active { transform: scale(.96); }
.hf .hf-go:focus-visible { outline: 2px solid var(--hf-fg); outline-offset: 3px; }
@media (max-width: 639.98px) { .hf .hf-go { padding: 8px 12px 8px 16px; } .hf-go-arr { width: 16px; height: 16px; } }

.hf-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-top: -12px; font-size: .75rem; color: var(--hf-fg-55); }
.hf-links { display: flex; align-items: center; gap: 14px; }
.hf .hf-links a { display: inline-flex; width: 16px; height: 16px; color: inherit; }
.hf .hf-links a:hover { color: var(--hf-fg); }
.hf-links svg { width: 100%; height: 100%; }
.hf .hf-cta { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.hf .hf-cta:hover { color: var(--hf-fg); }
.hf-copy { min-width: 0; }
.hf .hf-copy a { color: inherit; }

/* 竖图背景（.is-portrait，业主 2026-10-01）：电脑横屏上「完整显示 + 模糊铺底」——
   主图整张放中间（contain，不裁、不放大），两侧用同一张图模糊调暗铺满；手机 / 竖着的平板照旧铺满（媒体查询不命中）。
   是不是竖图由服务端读图片宽高比判断（utils/image-ratio.js），首屏直接出对，不靠脚本、不会先裁再跳。 */
.hf-bg .hf-blur { display: none; }   /* 写成 .hf-bg .hf-blur：要压过上面 .hf-bg img 的 display: block */
@media (min-width: 768px) and (min-aspect-ratio: 5/4) {
  .hf-bg.is-portrait .hf-blur { display: block; object-fit: cover; filter: blur(36px) brightness(.55) saturate(1.1); transform: scale(1.15); }
  .hf-bg.is-portrait picture img { object-fit: contain; }
}

/* 进店过场「推近变暗」的黑幕（home-stores.js 点「进入店铺」时建，fixed 盖满整屏；平时不存在） */
.hf-black { position: fixed; inset: 0; z-index: 100; background: var(--hf-bg); opacity: 0; pointer-events: none; }

@media (prefers-reduced-motion: reduce) {
  .hf-bg, .hf-dot, .hf .hf-go, .hf .hf-go::before, .hf-go-arr { transition: none; }
  .hf-fade, .hf .hf-go { animation: none; }
  .hf .hf-go::after { display: none; }
}
