/* ============================================================
   blocks.css — 站头 / Hero / 页头 / 区块组件 / 页脚 / CTA
   组件级响应式覆盖必须紧跟在该组件定义之后（写在同一个文件里）
   ============================================================ */

/* ==================== 站头导航 ==================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(20, 16, 28, 0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: var(--sp-5);
  height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  color: var(--text);
}

.brand:hover { color: var(--text); }

.brand__mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border-radius: 11px;
  overflow: hidden;
  box-shadow: 0 0 0 1px var(--line-brand);
}

.brand__mark img { width: 38px; height: 38px; object-fit: cover; }

.brand__text { display: grid; gap: 1px; }

.brand__name {
  font-family: var(--font-display);
  font-size: var(--fs-md);
  font-weight: 700;
  letter-spacing: 0.01em;
}

.brand__sub {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

.nav {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin-left: auto;
}

.nav__link {
  position: relative;
  padding: 8px 14px;
  border-radius: var(--r-sm);
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.18s var(--ease), background-color 0.18s var(--ease);
}

.nav__link:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }

.nav__link[aria-current="page"] {
  color: var(--brand-soft);
  font-weight: 600;
}

.nav__link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 2px;
  height: 2px;
  border-radius: 2px;
  background: var(--brand);
}

.nav__cta { margin-left: var(--sp-3); }

/* 移动导航按钮：默认隐藏 */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  padding: 0 10px;
  border-radius: var(--r-sm);
  margin-left: auto;
}

.nav-toggle__bar {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: var(--text);
  transition: transform 0.22s var(--ease), opacity 0.22s var(--ease);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* 移动端：汉堡 + 折叠菜单 */
@media (max-width: 900px) {
  /* 站头降高，Hero 的整屏高度要跟着减 */
  :root { --header-h: 62px; }

  .site-header__inner { height: 62px; gap: var(--sp-3); }
  .nav-toggle { display: flex; }

  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: var(--sp-3) var(--sp-4) var(--sp-4);
    margin-left: 0;
    background: var(--bg-deep);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
  }

  .nav[hidden] { display: none !important; }

  .nav__link { padding: 12px 14px; }

  .nav__link[aria-current="page"]::after { display: none; }

  .nav__link[aria-current="page"] {
    background: var(--brand-surface);
  }

  .nav__cta { margin-left: 0; margin-top: var(--sp-2); }
}

/* ==================== Hero（整屏 banner） ==================== */
/* 高度 = 视口高度 - 站头高度，保证「站头 + banner」正好一屏，不出现半截 */
.hero {
  position: relative;
  overflow: hidden;
  display: grid;
  /* 必须显式单列：只写 display:grid 时轨道按 max-content 收缩，
     .container 的 1180px 会失效，右侧留一大块空白 */
  grid-template-columns: minmax(0, 1fr);
  align-content: center;
  padding-block: var(--sp-7);
  min-height: calc(100vh - var(--header-h));
  min-height: calc(100svh - var(--header-h));
}

.hero__bg {
  position: absolute;
  inset: 0;
  background-image: url("../img/hero-bedroom.webp");
  background-size: cover;
  background-position: center 30%;
  opacity: 0.5;
}

/* 压暗幕只负责把图收成统一调性；文字自己坐不透明胶囊里 */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, var(--bg) 6%, rgba(20, 16, 28, 0.78) 38%, rgba(20, 16, 28, 0.36) 100%);
  pointer-events: none;
}

.hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: var(--sp-8);
  align-items: center;
}

.hero__body { min-width: 0; }

.hero__kicker {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-bottom: var(--sp-5);
}

.hero__title {
  font-size: var(--fs-hero);
  line-height: 1.12;
  letter-spacing: -0.02em;
}

.hero__lead {
  margin-top: var(--sp-5);
  max-width: var(--w-prose);
  color: var(--text-body);
  font-size: var(--fs-md);
  line-height: 1.8;
}

.hero__lead strong { color: var(--brand-soft); }

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  margin-top: var(--sp-6);
}

.hero__alt {
  margin-top: var(--sp-4);
  font-size: var(--fs-xs);
  color: var(--text-muted);
}

.hero__wall {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

@media (max-width: 1024px) {
  .hero__inner {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--sp-6);
  }
  .hero__wall {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .hero__wall > * { flex: 1 1 260px; max-width: 100%; }
}

/* 短屏笔记本（768~820 高）：两张并排会缩成看不清的小缩略图，只留一张放大的 */
@media (min-width: 1025px) and (max-height: 820px) {
  .hero__wall > *:nth-child(2) { display: none; }
  .hero__wall > * { width: 100%; max-width: 460px; margin-inline: auto; }
}

@media (max-width: 720px) {
  .hero { padding-block: var(--sp-5); }
  .hero__kicker { margin-bottom: var(--sp-4); }
  .hero__lead { margin-top: var(--sp-4); }
  .hero__actions { margin-top: var(--sp-5); }
  .hero__alt { margin-top: var(--sp-3); }
  .hero__wall { gap: var(--sp-3); }
  /* 竖屏只留一张截图，第二张会把整屏 banner 顶出视口 */
  .hero__wall > *:nth-child(2) { display: none; }
  .hero__bg { opacity: 0.3; }
  .hero::after {
    background: linear-gradient(180deg, var(--bg) 4%, rgba(20, 16, 28, 0.86) 52%, rgba(20, 16, 28, 0.94) 100%);
  }
  .hero__actions .btn { flex: 1 1 100%; }
}

/* 矮屏（小屏手机竖屏 / 1024×768 横屏平板）：截图会把这屏顶破，退回纯文字 banner */
@media (max-width: 1024px) and (max-height: 800px) {
  .hero__wall { display: none; }
}

/* ==================== 媒体 / 图位 ==================== */
.media {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--surface-2);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
}

.media img { width: 100%; height: auto; display: block; }

.media--phone {
  border-radius: var(--r-md);
  transform: rotate(-1.2deg);
}

.media--phone:last-child { transform: rotate(1.2deg) translateY(6px); }

@media (max-width: 1024px) {
  .media--phone { transform: none; }
  .media--phone:last-child { transform: none; }
}

.media--wide { width: 100%; }

.media--panel { margin-bottom: var(--sp-5); }

.media--dream img { aspect-ratio: 16 / 10; object-fit: cover; }

.media__caption {
  padding: var(--sp-3) var(--sp-4);
  font-size: var(--fs-xs);
  color: var(--text-muted);
  background: var(--surface);
  border-top: 1px solid var(--line);
}

/* ==================== 页头 ==================== */
.page-hero {
  position: relative;
  overflow: hidden;
  padding-block: var(--sp-8) var(--sp-7);
  background: var(--bg-deep);
  border-bottom: 1px solid var(--line);
}

.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.3;
}

.page-hero--download::before { background-image: url("../img/hero-bedroom.webp"); }
.page-hero--guide::before    { background-image: url("../img/hero-dream.webp"); }
.page-hero--gallery::before  { background-image: url("../img/scene-closeup.webp"); }
.page-hero--about::before    { background-image: url("../img/scene-ui.webp"); }

.page-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(13, 10, 20, 0.55), rgba(13, 10, 20, 0.88));
}

.page-hero .container { position: relative; z-index: 1; }

.page-hero__title {
  font-size: clamp(30px, 4.6vw, 48px);
  margin-top: var(--sp-2);
}

.page-hero__lead {
  margin-top: var(--sp-4);
  max-width: var(--w-prose);
  color: var(--text-body);
  font-size: var(--fs-md);
}

@media (max-width: 720px) {
  .page-hero { padding-block: var(--sp-6) var(--sp-5); }
}

/* ==================== 下载卡 / 侧栏面板 ==================== */
.download-card__title { font-size: var(--fs-2xl); }
.download-card__lead { margin-top: var(--sp-3); color: var(--text-body); }
.download-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  margin-top: var(--sp-6);
}

@media (max-width: 560px) {
  .download-card__actions .btn { flex: 1 1 100%; }
}

.panel {
  padding: var(--sp-6);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}

.panel--tint { background: var(--brand-surface); border-color: var(--line-brand); }

.panel__head {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
}

.panel__icon {
  width: 72px;
  height: 72px;
  border-radius: var(--r-md);
  object-fit: cover;
  box-shadow: 0 0 0 1px var(--line-brand);
}

.panel__title { font-size: var(--fs-lg); }
.panel__sub { font-size: var(--fs-xs); color: var(--text-muted); margin-top: 2px; }
.panel__note {
  margin-top: var(--sp-4);
  font-size: var(--fs-xs);
  color: var(--text-muted);
  line-height: 1.7;
}

.check-list { display: grid; gap: var(--sp-3); }

.check-list li {
  position: relative;
  padding-left: var(--sp-6);
  font-size: var(--fs-sm);
  color: var(--text-body);
  line-height: 1.7;
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.42em;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--brand-surface);
  box-shadow: inset 0 0 0 1px var(--line-brand);
}

.check-list li::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 0.72em;
  width: 5px;
  height: 2.5px;
  border-left: 1.6px solid var(--brand);
  border-bottom: 1.6px solid var(--brand);
  transform: rotate(-45deg);
}

.check-list--tight { gap: var(--sp-2); }

/* ==================== 攻略：目录卡 / UI 列表 ==================== */
.guide-toc { gap: var(--sp-4); }

.toc-card {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  padding: var(--sp-5);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  color: var(--text);
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease), background-color 0.2s var(--ease);
}

.toc-card:hover {
  color: var(--text);
  border-color: var(--line-brand);
  background: var(--brand-surface);
  transform: translateY(-2px);
}

.toc-card__num {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  color: var(--brand);
  line-height: 1;
  flex: 0 0 auto;
}

.toc-card__body { display: grid; gap: 3px; min-width: 0; }
.toc-card__title { font-family: var(--font-display); font-size: var(--fs-md); }
.toc-card__text { font-size: var(--fs-xs); color: var(--text-muted); }

.ui-list { display: grid; gap: var(--sp-5); }

.ui-item {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: var(--sp-4);
  align-items: start;
}

.ui-item__tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  background: var(--brand-surface);
  color: var(--brand-soft);
  font-size: var(--fs-xs);
  font-weight: 600;
  text-align: center;
  box-shadow: inset 0 0 0 1px var(--line-brand);
}

.ui-item__title { font-size: var(--fs-md); margin-bottom: var(--sp-2); }
.ui-item__text { color: var(--text-body); font-size: var(--fs-sm); line-height: 1.72; }
.ui-item__text strong { color: var(--brand-soft); }

@media (max-width: 560px) {
  .ui-item { grid-template-columns: minmax(0, 1fr); gap: var(--sp-2); }
  .ui-item__tag { justify-self: start; }
}

/* ==================== 卡片扩展件 ==================== */
.card--pitfall { border-color: rgba(255, 143, 184, 0.22); }

.card__index {
  font-family: var(--font-display);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--brand);
}

.card__note {
  margin-top: auto;
  padding-top: var(--sp-3);
  border-top: 1px dashed var(--line-strong);
  font-size: var(--fs-xs);
  color: var(--text-muted);
  line-height: 1.65;
}

.source-card { gap: var(--sp-2); }
.source-card .card__meta { font-size: var(--fs-xs); color: var(--text-muted); }

.card__link {
  margin-top: auto;
  padding-top: var(--sp-3);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--brand-ink-deep);
}

.source-note {
  margin-top: var(--sp-6);
  font-size: var(--fs-sm);
  color: var(--text-muted);
  line-height: 1.75;
}

/* ==================== 画廊 ==================== */
.gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sp-5);
}

@media (max-width: 720px) {
  .gallery { grid-template-columns: minmax(0, 1fr); }
}

.media--gallery { margin: 0; }

.gallery__btn {
  display: block;
  width: 100%;
  padding: 0;
  border: none;
  background: none;
  cursor: zoom-in;
  position: relative;
}

.gallery__btn img {
  width: 100%;
  height: auto;
  transition: transform 0.35s var(--ease), filter 0.35s var(--ease);
}

.gallery__btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(13, 10, 20, 0.5));
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}

.gallery__btn:hover img { transform: scale(1.035); filter: brightness(1.06); }
.gallery__btn:hover::after { opacity: 1; }

/* ==================== CTA 带 ==================== */
.cta-band {
  padding-block: var(--sp-8);
  background: var(--bg-deep);
  border-top: 1px solid var(--line);
}

.cta-band--dream {
  background:
    linear-gradient(180deg, rgba(13, 10, 20, 0.82), rgba(13, 10, 20, 0.95)),
    url("../img/hero-dream.webp") center / cover;
}

.cta-band__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-6);
  flex-wrap: wrap;
}

.cta-band__title { font-size: var(--fs-xl); }
.cta-band__text { margin-top: var(--sp-2); color: var(--text-muted); }

@media (max-width: 720px) {
  .cta-band__inner { flex-direction: column; align-items: flex-start; }
  .cta-band__inner .btn { width: 100%; }
}

/* ==================== 页脚 ==================== */
.site-footer {
  padding-top: var(--sp-8);
  background: var(--bg-deep);
  border-top: 1px solid var(--line);
}

.site-footer__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 2fr);
  gap: var(--sp-7);
  padding-bottom: var(--sp-7);
}

.site-footer__desc {
  margin-top: var(--sp-4);
  max-width: var(--w-prose);
  font-size: var(--fs-sm);
  color: var(--text-muted);
  line-height: 1.75;
}

.site-footer__nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--sp-5);
}

.site-footer__col { display: grid; gap: var(--sp-2); align-content: start; }

.site-footer__h {
  font-size: var(--fs-sm);
  color: var(--text);
  margin-bottom: var(--sp-2);
}

.site-footer__col a {
  font-size: var(--fs-sm);
  color: var(--text-muted);
}

.site-footer__col a:hover { color: var(--brand-soft); }

.site-footer__base {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2) var(--sp-5);
  padding-block: var(--sp-5);
  border-top: 1px solid var(--line);
}

.site-footer__copy {
  font-size: var(--fs-xs);
  color: var(--text-muted);
}

@media (max-width: 900px) {
  .site-footer__inner { grid-template-columns: minmax(0, 1fr); gap: var(--sp-6); }
}

@media (max-width: 560px) {
  .site-footer__nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
