/* ============================================================
   平台首页「推荐店铺」扇形区（_shared/_home-stores.ejs · 业主 2026-09-30）
   15 套主题共用：配色一律读主题自己的变量，读不到才落到下一个 ——
     主色  --rose-deep（atelier / vitrine 两个家族）→ --apple-blue（apple）→ --wm-wine（default）
     字色  --ink → --apple-dark → --wm-dark；次要字 --muted → --apple-gray → --wm-gray
     卡片  --card → --apple-white；线色 --line → --apple-border → --wm-border
   ⚠️ 变量名写错整条声明静默失效（gotcha #68）；新增主题若换了变量名，在这条链上补一环。
   atelier / vitrine 有深色模式：上面这些变量在深色下会被主题改写，本区自动跟着变。
   改本文件要 bump _home-stores.ejs 里的 ?v=（service worker 对 /public/ 是先读缓存）。
   多博主平台首页只有本区（主题顶栏 / 页脚不出），所以本区至少撑满一屏。
   ============================================================ */
.hf {
  --hf-accent: var(--rose-deep, var(--apple-blue, var(--wm-wine, #9A2948)));
  --hf-ink: var(--ink, var(--apple-dark, var(--wm-dark, #1B1B1F)));
  --hf-muted: var(--muted, var(--apple-gray, var(--wm-gray, #6B6B70)));
  --hf-card: var(--card, var(--apple-white, #FFFFFF));
  --hf-line: var(--line, var(--apple-border, var(--wm-border, #EBE3DA)));
  position: relative; overflow: hidden; padding: 72px 0 44px; min-height: 100vh; min-height: 100svh; color: var(--hf-ink);
  background: transparent;   /* 旧内核不认 color-mix 时退回透明（没有光晕，不影响阅读） */
  background:
    radial-gradient(640px 420px at 28% 18%, color-mix(in srgb, var(--hf-accent) 14%, transparent), transparent 70%),
    radial-gradient(560px 380px at 78% 88%, color-mix(in srgb, var(--hf-accent) 10%, transparent), transparent 70%);
}
.hf-wrap { max-width: 1280px; margin: 0 auto; padding: 0 24px; }

/* 标题区：网站 logo（没有才是名称）+ 标语 */
.hf-head { text-align: center; margin-bottom: 72px; }
.hf-brand { margin: 0 0 16px; font-size: 15px; font-weight: 700; letter-spacing: .08em; color: var(--hf-accent); }
.hf-brand img { height: 44px; width: auto; display: inline-block; vertical-align: middle; }
.hf-title { margin: 0 auto; max-width: 980px; font-size: clamp(30px, 5vw, 60px); line-height: 1.08; font-weight: 800; letter-spacing: -.03em; color: var(--hf-ink); text-wrap: balance; }

/* 桌面：一次 3 家排扇形；不在当前这一组的卡不显示 */
.hf-stage { position: relative; }
.hf-cards { display: flex; justify-content: center; align-items: flex-start; gap: clamp(20px, 3vw, 44px); perspective: 1600px; }
.hf-card { position: relative; flex: 0 1 440px; min-width: 0; background: var(--hf-card); border-radius: 30px; padding: 18px 18px 26px; text-align: left;
  box-shadow: 0 30px 60px -24px rgba(60, 40, 20, .22), 0 0 0 1px rgba(0, 0, 0, .04);
  transition: transform 1s cubic-bezier(.2, .8, .2, 1), opacity .7s ease, box-shadow .4s; }
.hf-card:not(.is-left):not(.is-mid):not(.is-right) { display: none; }
.hf-card.is-left { order: 1; transform: translateY(28px) rotateY(8deg) rotateZ(-6deg); }
.hf-card.is-mid { order: 2; z-index: 2; transform: translateY(-24px); }
.hf-card.is-right { order: 3; transform: translateY(28px) rotateY(-8deg) rotateZ(6deg); }
/* 脚本在（hf-armed）才先藏、进视口（in）再展开；脚本没跑直接就是上面的扇形 */
.hf.hf-armed:not(.in) .hf-card { opacity: 0; transform: translateY(40px); }
.hf.in .hf-card.is-left { transition-delay: .12s; }
.hf.in .hf-card.is-right { transition-delay: .24s; }
@media (hover: hover) {
  .hf.in .hf-card:hover { transform: translateY(-32px) rotate(0); z-index: 3; transition-delay: 0s;
    box-shadow: 0 40px 70px -24px rgba(60, 40, 20, .3), 0 0 0 1px rgba(0, 0, 0, .04); }
}
.hf-cards.hf-leaving .hf-card { opacity: 0; transform: translateY(24px); transition: opacity .28s, transform .28s; }

/* 照片整块可点 → 进入店铺 */
.hf-photo { position: relative; display: block; border-radius: 22px; overflow: hidden; aspect-ratio: 48 / 51; background: var(--hf-line); }
.hf-photo picture { display: block; width: 100%; height: 100%; }
.hf-photo .hf-img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s cubic-bezier(.2, .8, .2, 1); }
.hf-photo:hover .hf-img { transform: scale(1.04); }

.hf-meta { padding: 22px 8px 0; }
.hf-name { display: flex; align-items: center; gap: 14px; margin: 0 0 10px; font-size: 24px; line-height: 1.2; font-weight: 700; letter-spacing: -.02em; color: var(--hf-ink); }
.hf-ico { flex: 0 0 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--hf-accent);
  background: rgba(0, 0, 0, .05); background: color-mix(in srgb, var(--hf-accent) 14%, var(--hf-card)); }
.hf-ico svg { width: 18px; height: 18px; }
/* 博主头像（bloggers.logo）：圆形裁切，与小图标同尺寸 */
.hf-ava { flex: 0 0 40px; width: 40px; height: 40px; border-radius: 50%; overflow: hidden; background: var(--hf-line); }
.hf-ava picture, .hf-ava .hf-ava-img { display: block; width: 100%; height: 100%; object-fit: cover; }
/* 博主介绍：原样显示、换行照留，太长只露 3 行 */
.hf-sub { margin: 0 0 16px 54px; font-size: 16px; line-height: 1.5; color: var(--hf-muted); white-space: pre-line;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.hf-more { margin-left: 54px; display: inline-flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 700; color: var(--hf-ink); text-decoration: none; }
.hf-more:hover { color: var(--hf-accent); }
.hf-more svg { width: 16px; height: 16px; color: var(--hf-accent); transition: transform .2s; }
.hf-more:hover svg { transform: translateX(3px); }

/* 翻组：两侧箭头 + 下方圆点（多于 3 家才有） */
.hf-nav { position: absolute; top: 300px; z-index: 5; width: 52px; height: 52px; border-radius: 50%; border: 1px solid var(--hf-line); background: var(--hf-card); color: var(--hf-ink);
  display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 10px 24px -12px rgba(0, 0, 0, .25); transition: color .2s, border-color .2s; }
.hf-nav:hover { color: var(--hf-accent); border-color: var(--hf-accent); }
.hf-nav svg { width: 20px; height: 20px; }
.hf-prev { left: -8px; }
.hf-next { right: -8px; }
.hf-dots { display: flex; justify-content: center; gap: 8px; margin-top: 44px; }
.hf-dot { width: 8px; height: 8px; border-radius: 999px; border: 0; padding: 0; background: var(--hf-line); cursor: pointer; transition: width .3s, background .3s; }
.hf-dot[aria-current="true"] { width: 26px; background: var(--hf-accent); }

.hf-cta-row { text-align: center; margin-top: 64px; }
.hf-cta { display: inline-flex; align-items: center; gap: 18px; padding: 10px 10px 10px 32px; border-radius: 999px; background: var(--hf-ink); color: var(--hf-card); text-decoration: none; font-size: 18px; font-weight: 700; transition: transform .2s; }
.hf-cta:hover { color: var(--hf-card); transform: translateY(-2px); }
.hf-cta i { width: 48px; height: 48px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--hf-ink);
  background: var(--hf-card); background: color-mix(in srgb, var(--hf-accent) 22%, var(--hf-card)); }
.hf-cta svg { width: 20px; height: 20px; }

/* 底部：联络小图标 + 版权（不放 logo：标题区已经有了） */
.hf-foot { padding-top: 56px; text-align: center; }
.hf-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.hf-links a { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--hf-line); color: var(--hf-muted); display: flex; align-items: center; justify-content: center;
  background: transparent; background: color-mix(in srgb, var(--hf-card) 55%, transparent); transition: color .2s, border-color .2s, background .2s; }
.hf-links a:hover { color: #fff; background: var(--hf-accent); border-color: var(--hf-accent); }
.hf-links svg { width: 17px; height: 17px; }
.hf-copy { font-size: 13px; color: var(--hf-muted); }
.hf-copy a { color: inherit; }

/* 手机 / 窄屏：全部店铺排成一条左右滑，一次一张、两边露出上一张 / 下一张 */
@media (max-width: 899.98px) {
  .hf { padding: 48px 0 36px; }
  .hf-head { margin-bottom: 40px; }
  .hf-foot { padding-top: 44px; }
  /* 横滑容器会把卡片阴影切出一道横线：底部多留 64px 给阴影，再用负外距收回，版面间距不变 */
  .hf-cards { justify-content: flex-start; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 8px 24px 64px; margin: 0 -24px -40px;
    scrollbar-width: none; -webkit-overflow-scrolling: touch; perspective: none; }
  .hf-cards::-webkit-scrollbar { display: none; }
  .hf-card, .hf-card:not(.is-left):not(.is-mid):not(.is-right) { display: block; flex: 0 0 82%; max-width: 380px; scroll-snap-align: center; order: 0; }
  /* 桌面扇形的左 / 中 / 右排位（order）在这里要撤：横排按博主顺序，第一家排最前 */
  .hf-card.is-left, .hf-card.is-mid, .hf-card.is-right, .hf.hf-armed:not(.in) .hf-card { transform: none; opacity: 1; order: 0; }
  .hf-nav, .hf-dots { display: none; }
  .hf-cta-row { margin-top: 40px; }
}
@media (prefers-reduced-motion: reduce) {
  .hf-card, .hf-dot, .hf-photo .hf-img { transition: none !important; }
}
