/**
 * 首页分屏：右半区为活动邀约卡片群（对齐 guru.crcrl.com 首页右半区）。
 * 桌面 ≥992px：左侧原首页，右侧固定邀约面板。
 * 手机 / 平板：邀约面板作为首页第二屏，上下整屏吸附。
 */
.home-flock {
  --hf-paper: #f2eee8;
  --hf-paper-deep: #f5f7fd;
  --hf-ink: #1e1b18;
  --hf-pink: #ea3a87;
  --hf-blue: #3a66e3;
  --hf-green: #34b65c;
  --hf-yellow: #f5be41;
  --hf-orange: #ff5d00;
  --hf-aqua: #8eced7;
  --hf-violet: #921cc4;
  --hf-radius: 14px;

  position: relative;
  z-index: 3;
  overflow: hidden;
  background: var(--hf-paper-deep);
  font-family: Poppins, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.45;
  color: var(--hf-ink);
  -webkit-font-smoothing: antialiased;
  touch-action: pan-y;
}

.home-flock__stage {
  position: absolute;
  inset: 0;
}

.hf-card {
  position: absolute;
  top: 0;
  left: 0;
  width: var(--w, 220px);
  min-height: var(--h, 210px);
  display: flex;
  flex-direction: column;
  padding: 18px 18px 16px;
  border-radius: var(--hf-radius);
  background: var(--c, var(--hf-yellow));
  color: var(--hf-ink);
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  will-change: transform;
  opacity: 0;
  transform: translate(0px, 0px) scale(0.6);
  transition: opacity 500ms ease, box-shadow 220ms ease;
}
.hf-card.in { opacity: 1; }
.hf-card[hidden] { display: none; }
.hf-card.held {
  cursor: grabbing;
  box-shadow: 0 24px 50px -18px rgba(30, 27, 24, 0.45);
  z-index: 3;
}
.hf-card:focus-visible {
  outline: 3px solid var(--hf-blue);
  outline-offset: 3px;
}
.hf-card.dark { color: var(--hf-paper); }
.hf-card.dark .hf-card__meta { color: rgba(242, 238, 232, 0.78); }

.hf-card__title {
  display: block;
  font-size: 21px;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.hf-card__meta {
  display: block;
  margin-top: 6px;
  font-size: 12.5px;
  line-height: 1.4;
  color: rgba(30, 27, 24, 0.68);
}
.hf-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 24px;
  font-size: 12px;
  font-weight: 600;
}
.hf-avatars { display: flex; }
.hf-avatar {
  width: 28px;
  height: 28px;
  margin-left: -8px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 9.5px;
  letter-spacing: 0;
  font-weight: 600;
  background: var(--hf-paper);
  color: var(--hf-ink);
  box-shadow: 0 0 0 2px var(--c, var(--hf-yellow));
}
.hf-avatar:first-child { margin-left: 0; }
.hf-card.dark .hf-avatar { background: var(--hf-ink); color: var(--hf-paper); }

/* ---------- 桌面：左右分屏 ---------- */
@media screen and (min-width: 992px) {
  .home-flock {
    position: absolute;
    top: 0;
    right: 0;
    width: 38.2vw;
    height: 100vh;
    height: 100svh;
  }

  #hero-container.section-2 {
    width: 61.8vw !important;
    max-width: 61.8vw !important;
  }

  #hero-container .header-wrap {
    padding-left: 3.5vw !important;
    padding-right: 3.5vw !important;
  }

  #hero-container .c-container-2 {
    width: 54.8vw !important;
    max-width: 54.8vw !important;
    margin-left: 3.5vw !important;
    margin-right: 3.5vw !important;
  }

  #hero-container .tagline-1,
  #hero-container .tagline-2 {
    font-size: clamp(14px, 1.3vw, 26px) !important;
  }

  #hero-container .text-span-5 {
    font-size: clamp(30px, 3.6vw, 72px) !important;
  }

  #hero-container .button-wrapper {
    flex-wrap: wrap !important;
    gap: 0.6rem !important;
  }

  #hero-container .button-wrapper .btn___large {
    flex: 1 1 calc(33.333% - 0.6rem) !important;
    min-width: 150px !important;
    width: auto !important;
    height: auto !important;
    min-height: 56px !important;
    margin: 0 !important;
    padding: 0.9rem 1rem !important;
    justify-content: center !important;
    gap: 0.5rem;
  }

  #hero-container .button-wrapper .display2 {
    white-space: nowrap;
  }

  #hero-container .w-slide .w-richtext {
    flex: 1 1 auto !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: 78% !important;
  }

  #hero-container .w-slide .h2 {
    width: auto !important;
    max-width: 100% !important;
    font-size: clamp(16px, 1.3vw, 26px) !important;
  }

  #hero-container .w-slide img {
    max-width: 22% !important;
    height: auto !important;
  }

  #hero-container .footer-wrap-2 {
    width: 61.8vw !important;
    right: auto !important;
  }
}

/* ---------- 手机 / 平板：第二屏 ---------- */
@media screen and (max-width: 991px) {
  html.has-home-flock {
    scroll-snap-type: y mandatory;
  }

  html.has-home-flock #hero-container.section-2,
  .home-flock {
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }

  .home-flock {
    width: 100%;
    height: 100vh;
    height: 100svh;
  }

  .hf-card__title { font-size: 17.5px; }
}

@media (prefers-reduced-motion: reduce) {
  html.has-home-flock { scroll-snap-type: none; }
}
