/* blocks.css — 站头 / 首屏 / 区块标题 / 页头 / 下载卡 / 号召卡 / 页脚 */

/* ---------- 站头 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: var(--bg);
  border-bottom: 1px solid var(--hairline);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 78px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand img {
  width: 44px;
  height: 44px;
  border-radius: var(--r-sm);
}

.brand__name {
  font-family: var(--font-brand);
  font-size: 22px;
  white-space: nowrap;
}

.nav {
  display: flex;
  align-items: center;
  gap: 30px;
}

.nav__link {
  font-size: 14px;
  color: #A9A3C7;
  white-space: nowrap;
  transition: color 0.16s ease;
}

.nav__link:hover {
  color: #FFFFFF;
}

.nav__link[aria-current="page"] {
  color: #FFFFFF;
  font-weight: 700;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: var(--r-sm);
  box-shadow: inset 0 0 0 1px var(--line);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background-color: #FFFFFF;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] span:first-child {
  transform: translateY(3.5px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:last-child {
  transform: translateY(-3.5px) rotate(-45deg);
}

@media (max-width: 1040px) {
  .nav-toggle {
    display: inline-flex;
  }

  .nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 78px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 4px 20px 16px;
    background-color: var(--bg-alt);
    border-bottom: 1px solid var(--hairline);
  }

  .nav.is-open {
    display: flex;
  }

  .nav__link {
    padding: 14px 0;
    border-bottom: 1px solid var(--hairline);
    font-size: 15px;
  }

  .nav__link:last-child {
    border-bottom: 0;
  }
}

@media (max-width: 560px) {
  .site-header__inner {
    height: 66px;
  }

  .nav {
    top: 66px;
  }

  .brand img {
    width: 38px;
    height: 38px;
  }

  .brand__name {
    font-size: 19px;
  }

  .site-header .btn--sm {
    display: none;
  }
}

/* ---------- 首屏 ---------- */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  height: 620px;
  overflow: hidden;
  background-color: var(--bg);
  background-image: url("../img/hero-banner.jpg");
  background-position: right center;
  background-size: cover;
  background-repeat: no-repeat;
}

.hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: start;
  gap: 24px;
}

.hero__badge {
  padding: 8px 18px;
  border: 1px solid #4C3D86;
  border-radius: var(--r-pill);
  background-color: #1D1738;
  color: var(--brand-ink);
  font-size: var(--fs-2xs);
  font-weight: 500;
}

.hero__title {
  font-family: var(--font-display);
  font-size: var(--fs-display);
  line-height: var(--lh-display);
  background-image: var(--grad-title);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__lead {
  max-width: 36em; /* 量宽按字号走，不吃「内容宽度两档」这条规则 */
  font-size: var(--fs-lead);
  line-height: 30px;
  color: var(--text-body);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.hero__trust {
  font-size: var(--fs-xs);
  color: #A9A3C7;
}

@media (max-width: 1040px) {
  /* 窄屏时 cover 会横向裁切，加一层压暗幕保证文字对比度 */
  .hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: linear-gradient(180deg, rgba(11, 9, 22, 0.62), rgba(11, 9, 22, 0.82));
  }

  .hero {
    height: 520px;
    background-position: 68% center;
  }
}

@media (max-width: 700px) {
  .hero {
    height: auto;
    padding-block: 64px;
    background-position: 62% center;
  }

  .hero__lead {
    line-height: 28px;
  }
}

/* ---------- 区块标题 ---------- */
.section-head {
  display: grid;
  justify-items: start;
  gap: 12px;
  margin-bottom: 26px;
}

.section-title--sm {
  font-size: var(--fs-h3);
}

.section-title {
  font-size: var(--fs-h2);
  font-weight: 700;
  line-height: 1.32;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
}

.eyebrow__bar {
  flex: none;
  width: 2px;
  height: 22px;
  background-color: var(--rule);
}

.eyebrow__text {
  font-size: var(--fs-body);
  color: var(--text-muted);
}

/* ---------- 内页页头 ---------- */
.page-head {
  display: grid;
  justify-items: start;
  gap: 18px;
  padding-block: var(--page-head-y) 56px;
  background-color: var(--bg);
}

.breadcrumb {
  font-size: var(--fs-xs);
  color: var(--text-dim);
}

.breadcrumb a:hover {
  color: #FFFFFF;
}

.page-title {
  font-family: var(--font-display);
  font-size: var(--fs-page-title);
  line-height: var(--lh-page-title);
}

.page-lead {
  max-width: var(--w-prose);
  font-size: 16px;
  line-height: 28px;
  color: #A9A3C7;
}

/* ---------- 主下载卡 ---------- */
.dl-card {
  display: flex;
  gap: 48px;
  padding: 48px;
  border: 1px solid #5C47A0;
  border-radius: var(--r-xl);
  background-image: var(--grad-dl-card);
}

.dl-card__info {
  display: grid;
  flex: 1;
  min-width: 0;
  align-content: start;
  gap: 18px;
}

.dl-card__app {
  display: flex;
  align-items: center;
  gap: 18px;
}

.dl-card__logo {
  width: 96px;
  height: 96px;
  border-radius: var(--r-card);
}

.dl-card__names {
  display: grid;
  gap: 8px;
}

.dl-card__name {
  font-family: var(--font-brand);
  font-size: var(--fs-app-title);
  line-height: 1.2;
  /* 万一必须折行，均分两行，不留单字孤行 */
  text-wrap: balance;
}

.dl-card__loc {
  font-size: var(--fs-sm);
  color: #C9BBE9;
}

.dl-card__spec {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  font-size: var(--fs-sm);
  font-weight: 500;
  color: #D6C9F5;
}

.dl-card__spec span {
  white-space: nowrap;
}

.dl-card__spec span + span::before {
  content: "·";
  margin-inline: 10px;
}

.dl-card__desc {
  font-size: var(--fs-body);
  line-height: 26px;
  color: #C9BBE9;
}

.dl-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

@media (max-width: 900px) {
  .dl-card {
    flex-direction: column;
    gap: 32px;
    padding: 32px;
  }

  .dl-card__logo {
    width: 76px;
    height: 76px;
  }
}

@media (max-width: 560px) {
  .dl-card {
    padding: 24px;
  }

  /* 窄屏图标与名称改为上下排，名称拿到整行宽度，不再出现「版」「番」单字掉行 */
  .dl-card__app {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  /* 窄屏去掉分隔点，分项自己折行，行首不会挂一个「·」 */
  .dl-card__spec {
    column-gap: 14px;
    row-gap: 2px;
  }

  .dl-card__spec span + span::before {
    content: none;
  }

  .dl-card__desc {
    line-height: 24px;
  }
}

/* ---------- 专页入口卡 ---------- */
.entry-card {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 26px 28px;
  background-color: var(--card-hl);
  border: 1px solid var(--line-hl);
  border-radius: var(--r-card);
}

.entry-card__title {
  font-size: var(--fs-card-title);
  font-weight: 700;
}

.entry-card__text {
  font-size: var(--fs-sm);
  line-height: 24px;
  color: var(--text-body);
}

.entry-card__link {
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--pink-ink);
}

.entry-card__link--violet {
  color: var(--brand);
}

.entry-card__link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.entry-row {
  margin-top: 20px;
}

/* ---------- 番剧详情预览 ---------- */
.detail-card {
  display: flex;
  gap: 36px;
  padding: 32px;
  background-color: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}

.detail-card__cover {
  flex: none;
  width: 240px;
  height: 340px;
  border-radius: var(--r-md);
  object-fit: cover;
}

.detail-card__info {
  display: grid;
  align-content: start;
  gap: 14px;
}

.detail-card__name {
  font-size: var(--fs-h3);
  font-weight: 700;
  line-height: 1.3;
}

.detail-card__alias {
  font-size: var(--fs-xs);
  color: var(--text-dim);
}

.detail-card__tags {
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--brand);
  line-height: 24px;
}

.detail-card__meta {
  font-size: var(--fs-sm);
  line-height: 28px;
  color: var(--text-body);
  white-space: pre-line;
}

.detail-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 2px;
}

.btn--solid {
  padding: 12px 28px;
  font-size: var(--fs-sm);
  background-color: var(--violet);
  color: #FFFFFF;
}

.btn--outline {
  padding: 12px 28px;
  font-size: var(--fs-sm);
  font-weight: 500;
  background-color: #1E1940;
  box-shadow: inset 0 0 0 1px #4A3F7A;
  color: #D6D0F0;
}

@media (max-width: 760px) {
  .detail-card {
    flex-direction: column;
    gap: 24px;
    padding: 24px;
  }

  .detail-card__cover {
    width: 100%;
    height: auto;
    aspect-ratio: 240 / 340;
  }

  .detail-card__meta {
    line-height: 26px;
  }
}

/* ---------- 号召卡 ---------- */
.cta-section {
  padding-block: var(--section-y);
  background-color: var(--bg);
}

.cta-card {
  display: grid;
  justify-items: center;
  gap: 20px;
  padding: 72px 60px;
  border: 1px solid #6B4AA8;
  border-radius: var(--r-xl);
  background-image: var(--grad-cta-card);
  text-align: center;
}

.cta-card__title {
  font-family: var(--font-display);
  font-size: var(--fs-cta-title);
  line-height: 1.3;
}

.cta-card__text {
  font-size: 16px;
  color: #E1D9F7;
}

@media (max-width: 700px) {
  .cta-card {
    padding: 48px 24px;
  }
}

/* ---------- 页脚 ---------- */
.site-footer {
  padding-block: 64px 32px;
  background-color: var(--bg-foot);
}

.site-footer__inner {
  display: grid;
  gap: 40px;
}

.footer-main {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 48px;
}

.footer-brand {
  display: grid;
  width: 320px;
  align-content: start;
  gap: 14px;
}

.footer-brand__logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-brand__logo img {
  width: 36px;
  height: 36px;
  border-radius: 10px;
}

.footer-brand__name {
  font-family: var(--font-brand);
  font-size: 20px;
}

.footer-brand__desc {
  font-size: var(--fs-xs);
  line-height: 22px;
  color: var(--text-dim);
}

.footer-col {
  display: grid;
  width: 150px;
  align-content: start;
  gap: 12px;
}

.footer-col__title {
  font-size: var(--fs-sm);
  font-weight: 700;
}

.footer-col__list {
  display: grid;
  font-size: var(--fs-sm);
  line-height: 30px;
  color: var(--text-dim);
}

.footer-col__list a:hover {
  color: #FFFFFF;
}

.footer-rule {
  height: 1px;
  background-color: var(--hairline);
}

.footer-copy {
  font-size: var(--fs-2xs);
  color: var(--text-dim);
}

@media (max-width: 1100px) {
  .footer-brand {
    width: 100%;
  }

  .footer-col {
    width: calc(50% - 24px);
  }
}

/* ---------- 正文段 ---------- */
.prose {
  max-width: var(--w-prose);
  font-size: var(--fs-sm);
  line-height: 26px;
  color: var(--text-dim);
}
