/* ==========================================================================
   blocks.css — 站头、导航、分类条、首页各区块、页头、页脚
   ========================================================================== */

/* --------------------------------------------------------------------------
   主导航
   -------------------------------------------------------------------------- */
.header {
  position: relative;
  z-index: 30;
  background: var(--surface);
}

.header__inner {
  display: flex;
  align-items: center;
  gap: var(--sp-6);
  padding-block: 16px 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
}

.brand__logo {
  width: 46px;
  height: 46px;
  border-radius: var(--r-tile);
}

.brand__name {
  display: flex;
  flex-direction: column;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0.01em;
}

.brand__sub {
  color: var(--text-muted);
  font-size: var(--fs-tiny);
  font-weight: 400;
  letter-spacing: 0;
}

.nav {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-inline-start: auto;
}

.nav__link {
  color: var(--text-body);
  font-size: 14px;
  white-space: nowrap;
}

.nav__link:hover {
  color: var(--brand-ink);
}

.nav__link[aria-current="page"] {
  color: var(--brand-ink);
  font-weight: 500;
}

.header__cta {
  flex: none;
}

/* 汉堡：只在窄屏出现 */
.burger {
  display: none;
  flex: none;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-btn);
  box-shadow: inset 0 0 0 1px var(--line);
}

.burger span {
  position: relative;
  display: block;
  width: 16px;
  height: 1.6px;
  background: var(--text);
}

.burger span::before,
.burger span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 16px;
  height: 1.6px;
  background: var(--text);
}

.burger span::before {
  top: -5px;
}

.burger span::after {
  top: 5px;
}

/* 移动菜单 */
.mnav {
  display: none;
  border-top: 1px solid var(--line-soft);
  background: var(--surface);
}

.mnav__list {
  display: flex;
  flex-direction: column;
  padding-block: var(--sp-2);
}

.mnav__link {
  padding: 12px 0;
  color: var(--text-body);
  font-size: var(--fs-body);
}

.mnav__link[aria-current="page"] {
  color: var(--brand-ink);
  font-weight: 700;
}

.mnav__cta {
  margin: var(--sp-3) 0 var(--sp-4);
}

@media (max-width: 1180px) {
  .header__inner {
    gap: var(--sp-4);
  }
  .nav {
    gap: 18px;
  }
  .nav__link {
    font-size: var(--fs-sm);
  }
}

@media (max-width: 860px) {
  .nav,
  .header__cta {
    display: none;
  }
  .burger {
    display: flex;
    margin-inline-start: auto;
  }
  .mnav.is-open {
    display: block;
  }
}

/* --------------------------------------------------------------------------
   首屏：主推卡 + 榜单卡
   -------------------------------------------------------------------------- */
.hero__inner {
  display: grid;
  grid-template-columns: 800px minmax(0, 1fr);
  gap: var(--sp-5);
  padding-block: 40px 48px;
  align-items: stretch;
}

.pick {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  min-height: 352px;
  padding: 36px;
  border-radius: 14px;
  background: var(--brand);
  color: #fff;
}

.pick__eyebrow {
  font-size: var(--fs-tiny);
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1.6;
}

.pick__title {
  font-size: 42px;
  font-weight: 700;
  line-height: 1.32;
  letter-spacing: 0.01em;
}

.pick__lead {
  max-width: var(--w-prose);
  font-size: var(--fs-lead);
  line-height: 1.8;
}

.pick__actions {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: var(--sp-1);
}

.pick__btn {
  padding: 13px 26px;
  border-radius: var(--r-btn);
  background: #fff;
  color: var(--brand-ink);
  font-size: var(--fs-lead);
  font-weight: 700;
}

.pick__btn:hover {
  background: #ffe9ea;
}

.pick__alt {
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.pick__hot {
  margin-top: auto;
  padding-top: var(--sp-2);
  font-size: var(--fs-tiny);
  line-height: 1.8;
  letter-spacing: 0.01em;
}

.pick__hot a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

/* 榜单卡 */
.board {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 352px;
  padding: 22px;
  border-radius: 14px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
}

.board__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-3);
}

.board__title {
  font-size: 18px;
  font-weight: 700;
}

.board__shuffle {
  color: var(--brand-ink);
  font-size: var(--fs-xs);
}

.board__shuffle:hover {
  text-decoration: underline;
}

.board__note {
  margin-top: -8px;
  color: var(--text-muted);
  font-size: var(--fs-xs);
}

.board__list {
  display: flex;
  flex-direction: column;
}

.board__row {
  display: flex;
  align-items: baseline;
  gap: var(--sp-3);
  padding: 10px 0;
}

.board__row + .board__row {
  border-top: 1px solid var(--line-soft);
}

.board__idx {
  flex: none;
  width: 22px;
  color: var(--brand-ink);
  font-family: var(--font-num);
  font-size: 16px;
  font-weight: 700;
}

.board__row:nth-child(n + 4) .board__idx {
  color: var(--text-muted);
}

.board__q {
  min-width: 0;
  font-size: var(--fs-sm);
  font-weight: 500;
}

.board__row:nth-child(n + 4) .board__q {
  font-weight: 400;
  color: var(--text-body);
}

.board__to {
  margin-inline-start: auto;
  padding-inline-start: var(--sp-2);
  color: var(--text-muted);
  font-size: var(--fs-xs);
  white-space: nowrap;
}

.board__row:hover .board__q {
  color: var(--brand-ink);
}

@media (max-width: 1180px) {
  .hero__inner {
    grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
  }
}

@media (max-width: 900px) {
  .hero__inner {
    grid-template-columns: minmax(0, 1fr);
    padding-block: 20px 34px;
  }
  .pick {
    min-height: 0;
    padding: 28px 24px;
  }
  .pick__title {
    font-size: 30px;
  }
}

@media (max-width: 640px) {
  .pick__title {
    font-size: 26px;
    line-height: 1.4;
  }
  .pick__actions {
    flex-wrap: wrap;
    gap: 14px;
  }
  .board {
    min-height: 0;
  }
}

/* --------------------------------------------------------------------------
   问题分流卡
   -------------------------------------------------------------------------- */
.entry {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px;
  border-radius: var(--r-card);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.entry:hover {
  box-shadow: inset 0 0 0 1px #f3c3c7;
}

.entry__title {
  font-size: var(--fs-h4);
  font-weight: 700;
  line-height: 1.45;
}

.entry__desc {
  color: var(--text-muted);
  font-size: var(--fs-xs);
  line-height: 1.7;
}

.entry__desc span {
  color: var(--brand-ink);
  font-weight: 500;
}

/* --------------------------------------------------------------------------
   题材封面卡（首页 8 列 / 题材页 4 列共用）
   -------------------------------------------------------------------------- */
.gcard {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--sp-3);
  min-height: 262px;
  padding: 18px 16px;
  border-radius: var(--r-tile);
  background-color: #2b2f3a;
  background-size: cover;
  background-position: center;
  color: #fff;
  overflow: hidden;
  transition: transform 0.2s ease;
}

/* 封面亮度不可控，压一层渐变保底：亮图上的白字也要读得清 */
.gcard::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(8, 9, 12, 0.42) 0%,
    rgba(8, 9, 12, 0.16) 46%,
    rgba(8, 9, 12, 0) 78%
  );
  pointer-events: none;
}

.gcard__no,
.gcard__body {
  position: relative;
  z-index: 1;
}

.gcard:hover {
  transform: translateY(-2px);
}

.gcard__no {
  font-size: var(--fs-mini);
  font-weight: 500;
  letter-spacing: 0.1em;
  line-height: 1.6;
}

.gcard__body {
  display: block;
}

.gcard__name {
  display: block;
  font-size: 23px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0.01em;
}

.gcard__desc {
  display: block;
  margin-top: 6px;
  font-size: 11px;
  line-height: 1.75;
}

/* 封面图：路径写死在 CSS 里，避免 var() 里的 url() 按样式表目录解析出错 */
.gcard--01 { background-image: url("../img/cover-01.webp"); }
.gcard--02 { background-image: url("../img/cover-02.webp"); }
.gcard--03 { background-image: url("../img/cover-03.webp"); }
.gcard--04 { background-image: url("../img/cover-04.webp"); }
.gcard--05 { background-image: url("../img/cover-05.webp"); }
.gcard--06 { background-image: url("../img/cover-06.webp"); }
.gcard--07 { background-image: url("../img/cover-07.webp"); }
.gcard--08 { background-image: url("../img/cover-08.webp"); }

/* 题材页用的是更宽更矮的卡 */
.gcard--wide {
  min-height: 250px;
  padding: 20px;
  border-radius: var(--r-card);
}

.gcard--wide .gcard__name {
  font-size: 28px;
}

.gcard--wide .gcard__desc {
  font-size: var(--fs-xs);
  line-height: 1.75;
}

@media (max-width: 1180px) {
  .gcard {
    min-height: 230px;
  }
  .gcard__name {
    font-size: 20px;
  }
}

@media (max-width: 640px) {
  .gcard {
    min-height: 190px;
    padding: 16px 14px;
  }
  .gcard__name {
    font-size: 18px;
  }
  .gcard__desc {
    display: none;
  }
  .gcard--wide .gcard__name {
    font-size: 22px;
  }
  .gcard--wide .gcard__desc {
    display: block;
    font-size: var(--fs-xs);
  }
  .gcard--wide {
    min-height: 200px;
  }
}

/* --------------------------------------------------------------------------
   功能特点卡
   -------------------------------------------------------------------------- */
.feature {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  min-height: 138px;
  padding: 18px;
  border-radius: var(--r-tile);
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--line-soft);
}

.feature__name {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.5;
}

.feature__desc {
  color: var(--text-muted);
  font-size: var(--fs-xs);
  line-height: 1.7;
}

.feature__go {
  margin-top: auto;
  padding-top: var(--sp-1);
  color: var(--brand-ink);
  font-size: var(--fs-tiny);
  font-weight: 500;
}

.feature:hover .feature__go {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* --------------------------------------------------------------------------
   界面导览：图 + 图注
   -------------------------------------------------------------------------- */
.shot__cap {
  margin-top: 10px;
  color: var(--text-muted);
  font-size: var(--fs-xs);
  line-height: 1.7;
}

/* --------------------------------------------------------------------------
   页头（内页）
   -------------------------------------------------------------------------- */
.pagehead {
  padding-block: 34px 0;
}

.pagehead__title {
  margin-top: 14px;
  font-size: var(--fs-h1);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0.01em;
}

.pagehead__lead {
  margin-top: 14px;
  max-width: var(--w-prose);
  color: var(--text-body);
  font-size: var(--fs-lead);
  line-height: 1.75;
}

.pagehead__stat {
  margin-top: 12px;
  color: var(--text-muted);
  font-size: var(--fs-sm);
}

@media (max-width: 640px) {
  .pagehead {
    padding-block: 24px 0;
  }
}

/* --------------------------------------------------------------------------
   页脚
   -------------------------------------------------------------------------- */
.footer {
  margin-top: var(--sp-9);
  padding-block: 40px 24px;
  background: var(--footer);
  color: var(--text-invert-body);
}

.footer__top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--sp-8);
}

.footer__brand {
  max-width: 420px;
}

.footer__name {
  color: var(--text-invert);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.4;
}

.footer__desc {
  margin-top: 10px;
  color: var(--text-invert-mute);
  font-size: var(--fs-xs);
  line-height: 1.8;
}

.footer__cols {
  display: flex;
  gap: 56px;
}

.footer__col {
  min-width: 150px;
}

.footer__col-title {
  color: var(--brand-on-dark);
  font-size: var(--fs-sm);
  font-weight: 700;
  line-height: 1.8;
}

.footer__col ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 6px;
}

.footer__col a {
  color: var(--text-invert-body);
  font-size: var(--fs-xs);
}

.footer__col a:hover {
  color: var(--text-invert);
}

.footer__rule {
  height: 1px;
  margin-block: var(--sp-6) var(--sp-5);
  background: var(--line-invert);
}

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  color: var(--text-invert-mute);
  font-size: var(--fs-xs);
}

.footer__bottom a:hover {
  color: var(--text-invert);
}

@media (max-width: 860px) {
  .footer__top {
    gap: var(--sp-7);
  }
  .footer__cols {
    gap: 32px;
    flex-wrap: wrap;
  }
}

@media (max-width: 480px) {
  .footer__cols {
    gap: 24px;
  }
  .footer__col {
    min-width: 120px;
  }
}
