/* 秦韵门户首页 — 以会务入口大图卡为母版 */

.page-home-qin {
  --qin-crimson: #8b1a2b;
  --qin-crimson-deep: #6b1220;
  --qin-bronze: #8b7355;
  --qin-bronze-light: #c4a574;
  --qin-ink: #1a1614;
  --qin-parchment: #ede6d9;
  --qin-parchment-dark: #e0d6c4;
  --qin-stone: #6b6560;
  --qin-radius: 16px;
  --qin-max: 1080px;
  --qin-font-serif: "Noto Serif SC", "Songti SC", "STSong", serif;
  --qin-font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;

  position: relative;
  isolation: isolate;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--qin-ink);
  font-family: var(--qin-font-sans);
  /* 与内页统一：宣纸纸纹底 */
  background-color: #f3eee4;
  background-image: url("/img/home/paper-grain.jpg");
  background-repeat: repeat;
  background-size: 380px 380px;
}

/* 左右山水 / 牌坊水墨（与名录、活动页同一套语言） */
.page-home-qin::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    url("/img/home/wm-act-mountains-left.jpg"),
    url("/img/home/wm-act-gate-right.jpg"),
    url("/img/home/wm-dir-shanshui-top.jpg");
  background-repeat: no-repeat;
  background-size:
    min(520px, 42vw) auto,
    min(560px, 44vw) auto,
    min(680px, 55vw) auto;
  background-position:
    left -6% top 12%,
    right -8% top 28%,
    right 2% top 4%;
  opacity: 0.88;
  mix-blend-mode: multiply;
}

/* 底部山水 / 水波纹 */
.page-home-qin::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: min(36vh, 380px);
  z-index: 0;
  pointer-events: none;
  background-image:
    url("/img/home/wm-act-wave.svg"),
    url("/img/home/wm-dir-shanshui-bot-strip.jpg"),
    url("/img/home/parchment-ink-wash.jpg");
  background-repeat: repeat-x, no-repeat, no-repeat;
  background-size: 480px auto, 120% auto, cover;
  background-position: center bottom 10px, center bottom, center bottom;
  opacity: 0.9;
  mix-blend-mode: multiply;
}

.page-home-qin > * {
  position: relative;
  z-index: 1;
}

.page-home-qin a {
  text-decoration: none;
}

/* ── Header ── */
.qin-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(237, 230, 217, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(26, 22, 20, 0.08);
}

.qin-header-inner {
  max-width: var(--qin-max);
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.qin-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--qin-ink);
  flex-shrink: 0;
}

.qin-seal {
  display: block;
  width: 36px;
  height: 36px;
}

.qin-brand-text {
  font-family: var(--qin-font-serif);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.qin-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.qin-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.qin-nav::-webkit-scrollbar {
  display: none;
}

.qin-nav a {
  font-size: 13px;
  color: var(--qin-stone);
  padding: 6px 10px;
  border-radius: 6px;
  white-space: nowrap;
  transition: color 0.2s ease, background 0.2s ease;
}

.qin-nav a:hover {
  color: var(--qin-crimson);
  background: rgba(139, 26, 43, 0.06);
}

.qin-nav a.active {
  color: #fff;
  background: var(--qin-crimson);
  font-weight: 600;
}

.qin-admin-link {
  font-size: 12px;
  color: var(--qin-stone);
  padding: 6px 8px;
  white-space: nowrap;
}

.qin-admin-link:hover {
  color: var(--qin-crimson);
}

/* ── Main ── */
.qin-main {
  flex: 1;
  width: 100%;
  max-width: var(--qin-max);
  margin: 0 auto;
  padding: 28px 24px 56px;
}

/* ── Hero ── */
.qin-hero {
  margin-bottom: 48px;
}

.qin-hero-card {
  position: relative;
  min-height: min(52vh, 420px);
  border-radius: var(--qin-radius);
  background-size: cover;
  background-position: center;
  overflow: hidden;
  box-shadow: 0 18px 48px rgba(26, 22, 20, 0.18);
  display: flex;
  align-items: flex-end;
}

.qin-hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    rgba(26, 22, 20, 0.88) 0%,
    rgba(26, 22, 20, 0.55) 42%,
    rgba(26, 22, 20, 0.15) 72%,
    transparent 100%
  );
}

.qin-hero-content {
  position: relative;
  z-index: 1;
  padding: 40px 40px 44px;
  max-width: 520px;
}

.qin-hero-seal {
  width: 40px;
  height: 40px;
  margin-bottom: 14px;
  filter: brightness(0) invert(1) opacity(0.9);
}

.qin-hero-content h1 {
  font-family: var(--qin-font-serif);
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  color: #f7f2ea;
  letter-spacing: 0.06em;
  line-height: 1.25;
  margin-bottom: 10px;
}

.qin-hero-tagline {
  font-size: 15px;
  color: var(--qin-bronze-light);
  letter-spacing: 0.12em;
  margin-bottom: 22px;
}

.qin-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.qin-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 22px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  transition: transform 0.15s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.qin-btn:active {
  transform: scale(0.98);
}

.qin-btn-primary {
  background: var(--qin-crimson);
  color: #fff;
  border: 1px solid var(--qin-crimson);
}

.qin-btn-primary:hover {
  background: var(--qin-crimson-deep);
  border-color: var(--qin-crimson-deep);
  color: #fff;
}

.qin-btn-ghost {
  background: transparent;
  color: #f7f2ea;
  border: 1px solid rgba(196, 165, 116, 0.65);
}

.qin-btn-ghost:hover {
  border-color: var(--qin-bronze-light);
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

/* ── Portal section head ── */
.qin-section-head {
  text-align: center;
  margin-bottom: 28px;
}

.qin-section-seal {
  width: 44px;
  height: 44px;
  margin: 0 auto 12px;
  display: block;
}

.qin-section-head h2 {
  font-family: var(--qin-font-serif);
  font-size: clamp(28px, 3.5vw, 36px);
  font-weight: 700;
  color: var(--qin-crimson);
  letter-spacing: 0.12em;
  position: relative;
  display: inline-block;
  padding: 0 36px;
}

.qin-section-head h2::before,
.qin-section-head h2::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 28px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--qin-bronze));
}

.qin-section-head h2::before {
  left: 0;
  transform: translateY(-50%);
  background: linear-gradient(90deg, transparent, var(--qin-bronze));
}

.qin-section-head h2::after {
  right: 0;
  transform: translateY(-50%);
  background: linear-gradient(90deg, var(--qin-bronze), transparent);
}

.qin-section-sub {
  margin-top: 10px;
  font-size: 13px;
  color: var(--qin-stone);
  letter-spacing: 0.18em;
}

/* ── Bento portal ── */
.qin-bento {
  display: grid;
  grid-template-columns: 1.15fr 1.15fr 1.4fr;
  grid-template-rows: 1fr 1fr;
  gap: 18px;
  min-height: 520px;
}

.qin-tile {
  position: relative;
  display: block;
  border-radius: var(--qin-radius);
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(26, 22, 20, 0.12);
  min-height: 220px;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease;
}

.qin-tile:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(26, 22, 20, 0.18);
}

.qin-tile-tall {
  grid-row: span 2;
  min-height: 520px;
}

.qin-tile-wide {
  min-height: 0;
}

.qin-tile-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.qin-tile:hover .qin-tile-bg {
  transform: scale(1.04);
}

.qin-tile-fade {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(26, 22, 20, 0.72) 0%,
    rgba(26, 22, 20, 0.25) 42%,
    rgba(26, 22, 20, 0.55) 100%
  );
}

.qin-tile-fade-light {
  background: linear-gradient(
    180deg,
    rgba(237, 230, 217, 0.55) 0%,
    rgba(237, 230, 217, 0.15) 40%,
    rgba(26, 22, 20, 0.35) 100%
  );
}

.qin-tile-leadership .qin-tile-fade {
  background: linear-gradient(
    90deg,
    rgba(107, 18, 32, 0.78) 0%,
    rgba(26, 22, 20, 0.35) 55%,
    transparent 100%
  );
}

.qin-tile-body {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 22px 24px;
  height: 100%;
}

.qin-tile-title {
  font-family: var(--qin-font-serif);
  font-size: 22px;
  font-weight: 700;
  color: #f7f2ea;
  letter-spacing: 0.08em;
  display: inline-block;
  width: fit-content;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--qin-crimson);
}

.qin-tile-title-dark {
  color: var(--qin-crimson);
}

.qin-tile-desc {
  font-size: 13px;
  line-height: 1.6;
  color: rgba(247, 242, 234, 0.82);
  max-width: 16em;
}

.qin-tile-desc-dark {
  color: rgba(26, 22, 20, 0.72);
}

/* ── CTA ── */
.qin-cta {
  margin-top: 48px;
}

.qin-cta-card {
  position: relative;
  border-radius: var(--qin-radius);
  overflow: hidden;
  min-height: 220px;
  background-size: cover;
  background-position: center;
  box-shadow: 0 14px 36px rgba(26, 22, 20, 0.14);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.qin-cta-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(107, 18, 32, 0.72),
    rgba(26, 22, 20, 0.78)
  );
}

.qin-cta-content {
  position: relative;
  z-index: 1;
  padding: 40px 28px;
  max-width: 520px;
}

.qin-cta-content h2 {
  font-family: var(--qin-font-serif);
  font-size: clamp(24px, 3vw, 32px);
  color: #f7f2ea;
  letter-spacing: 0.1em;
  margin-bottom: 10px;
}

.qin-cta-content p {
  font-size: 14px;
  color: rgba(247, 242, 234, 0.78);
  margin-bottom: 20px;
  line-height: 1.7;
}

/* ── Footer：浅宣纸页脚，与内页统一，露出底部山水 ── */
.qin-footer {
  background: transparent;
  border-top: 1px solid rgba(26, 22, 20, 0.08);
  margin-top: auto;
  padding-bottom: 28px;
}

.qin-footer-inner {
  max-width: var(--qin-max);
  margin: 0 auto;
  padding: 28px 24px 8px;
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
}

.qin-footer-brand {
  display: none;
}

.qin-footer-brand img {
  width: 28px;
  height: 28px;
}

.qin-footer-brand p {
  margin: 0;
  font-family: var(--qin-font-serif);
  color: var(--qin-ink);
}

.qin-footer-muted {
  margin: 0;
  font-size: 12px;
  color: rgba(26, 22, 20, 0.45);
  letter-spacing: 0.04em;
}

.qin-footer-classic {
  font-size: 12px;
  color: var(--qin-crimson);
}

.qin-footer-classic:hover {
  text-decoration: underline;
}

/* 首页也用团结交流印章行（若 HTML 有） */
.page-home-qin .qin-footer-motto {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--qin-font-serif);
  font-size: 15px;
  letter-spacing: 0.28em;
  color: var(--qin-ink);
}

.page-home-qin .qin-footer-motto img {
  width: 28px;
  height: 28px;
}

/* ── Motion ── */
@media (prefers-reduced-motion: no-preference) {
  .qin-hero-content,
  .qin-section-head,
  .qin-bento .qin-tile {
    animation: qin-rise 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
  }

  .qin-section-head {
    animation-delay: 0.08s;
  }

  .qin-bento .qin-tile:nth-child(1) { animation-delay: 0.12s; }
  .qin-bento .qin-tile:nth-child(2) { animation-delay: 0.18s; }
  .qin-bento .qin-tile:nth-child(3) { animation-delay: 0.24s; }
  .qin-bento .qin-tile:nth-child(4) { animation-delay: 0.3s; }

  .qin-cta {
    animation: qin-rise 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.35s both;
  }
}

@keyframes qin-rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Responsive ── */
@media (max-width: 960px) {
  .qin-bento {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
    min-height: 0;
  }

  .qin-tile-tall {
    grid-row: span 1;
    min-height: 280px;
  }

  .qin-tile-posts,
  .qin-tile-leadership {
    grid-column: span 1;
  }
}

@media (max-width: 720px) {
  .qin-header-inner {
    height: auto;
    padding: 12px 16px;
    flex-direction: column;
    align-items: flex-start;
  }

  .qin-header-right {
    width: 100%;
    justify-content: space-between;
  }

  .qin-main {
    padding: 20px 16px 40px;
  }

  .qin-hero-content {
    padding: 28px 22px 32px;
  }

  .qin-bento {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .qin-tile-tall,
  .qin-tile-wide {
    min-height: 240px;
  }

}
