/* ==========================================================================
   blocks.css — 站头 / 页脚 / 首页首屏 / 内页页头（全站共用）
   ========================================================================== */

/* ---- 站头 ---------------------------------------------------------------- */
.hd {
  position: sticky;
  inset-block-start: 0;
  z-index: var(--z-header);
  height: 84px;
  background: var(--surface);
  box-shadow: inset 0 -1px 0 var(--line);
}
.hd__inner {
  display: flex;
  align-items: center;
  height: 100%;
}
.hd__left {
  display: flex;
  align-items: center;
  gap: 44px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}
.brand:hover { text-decoration: none; }
.brand__mark {
  width: 42px;
  height: 42px;
  border-radius: var(--r-sm);
  object-fit: cover;
}
.brand__name {
  font-family: var(--font-en);
  font-size: 23px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.01em;
}

.nav {
  display: flex;
  align-items: center;
  gap: 30px;
}
.nav__link {
  font-size: var(--fs-base);
  font-weight: 500;
  color: #4a4038;
  white-space: nowrap;
}
.nav__link:hover { color: var(--brand-ink); text-decoration: none; }
.nav__link[aria-current="page"] {
  color: var(--brand-ink);
  font-weight: 700;
}

.hd__cta { margin-inline-start: auto; }

.hd__burger {
  display: none;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-inline-start: var(--sp-3);
  border-radius: var(--r-sm);
  box-shadow: inset 0 0 0 1px var(--line);
}
.hd__burger span {
  display: block;
  width: 18px;
  height: 2px;
  margin-block: 2.5px;
  border-radius: 2px;
  background: var(--text);
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.hd__burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hd__burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.hd__burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---- 页脚 ---------------------------------------------------------------- */
.ft {
  padding-block: var(--sp-7) var(--sp-5);
  background: var(--ink-deep);
  color: var(--text-invert-mute);
}
.ft__top {
  display: flex;
  justify-content: space-between;
  gap: var(--sp-7);
  padding-block-end: 44px;
}
/* 页脚品牌列：宽度由 flex-basis 定，不参与「内容宽度两档」考核 */
.ft__brand { flex: 0 0 400px; }
.ft__brandrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-block-end: 14px;
}
.ft__mark {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  object-fit: cover;
}
.ft__name {
  font-family: var(--font-en);
  font-size: 21px;
  font-weight: 800;
  color: var(--text-invert);
}
.ft__desc {
  font-size: var(--fs-sm);
  line-height: 1.8;
  color: var(--text-invert-mute);
}
.ft__cols {
  display: flex;
  gap: 72px;
}
.ft__col {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.ft__col h3 {
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--text-invert);
}
.ft__col a {
  font-size: var(--fs-sm);
  color: var(--text-invert-mute);
}
.ft__col a:hover { color: var(--text-invert); }
.ft__div {
  height: 1px;
  border: 0;
  background: var(--line-invert);
}
.ft__bot {
  display: flex;
  justify-content: space-between;
  gap: var(--sp-3);
  padding-block-start: 28px;
  font-size: var(--fs-xs);
  color: var(--text-invert-mute);
}

/* ---- 首页首屏 ------------------------------------------------------------ */
/* 背景插画一律写成 CSS 里的 url()：经 var() 传入的 url() 会按「声明 var 的
   那张样式表」的目录解析，内联 style 里写相对路径必然 404。 */
.hero {
  position: relative;
  overflow: hidden;
  min-height: 800px;
  background-color: var(--brand-surface-2);
  background-size: cover;
  background-position: center;
}
.hero--home { background-image: url("../img/hero-home.webp"); }
/* 顶部柔光罩：文字区压在「深棕窗框 + 橙黄天空」两种底上，靠它统一可读性 */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(255, 253, 248, 0.88) 0%,
    rgba(255, 253, 248, 0.82) 22%,
    rgba(255, 253, 248, 0.42) 52%,
    rgba(255, 253, 248, 0) 80%
  );
}
.hero__inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-4);
  padding-block-start: 84px;
  text-align: center;
}
.hero__title {
  font-size: var(--fs-display);
  line-height: 1.2;
}
.hero__lead {
  max-width: var(--w-prose);
  font-size: var(--fs-lg);
  line-height: 1.8;
  font-weight: 500;
  color: #6b4a18;
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}
.hero__meta {
  font-size: var(--fs-xs);
  font-weight: 500;
  color: #5c4520;
}

.hero__phones {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: var(--sp-4);
  width: 100%;
}
/* 中间那台更高更靠上，两侧各下沉 30 —— 对应设计稿 400/360 两种机身 */
.hero__phones .phone {
  flex: 0 0 auto;
  width: 208px;
  margin-block-start: 30px;
}
.hero__phones .phone__screen { height: 344px; }
.hero__phones .phone--mid { margin-block-start: 0; }
.hero__phones .phone--mid .phone__screen { height: 384px; }

/* ---- 内页页头（通栏 480，背景插画 + 左侧白幕） ---------------------------- */
.page-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  min-height: 480px;
  background-color: var(--brand-surface-2);
  background-size: cover;
  background-position: center right;
}
/* 各页页头插画 */
.page-hero--features   { background-image: url("../img/bg-02.webp"); }
.page-hero--categories { background-image: url("../img/bg-03.webp"); }
.page-hero--screens    { background-image: url("../img/bg-04.webp"); }
.page-hero--about      { background-image: url("../img/bg-05.webp"); }
.page-hero--faq        { background-image: url("../img/bg-06.webp"); }
.page-hero--privacy    { background-image: url("../img/bg-07.webp"); }
.page-hero--download   { background-image: url("../img/bg-08.webp"); }
/* 新增两页复用既有插画：攻略页取「界面预览」图，离线页取「功能亮点」图 */
.page-hero--guide      { background-image: url("../img/bg-04.webp"); }
.page-hero--offline    { background-image: url("../img/bg-02.webp"); }
.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(255, 253, 248, 0.96) 0%,
    rgba(255, 253, 248, 0.86) 40%,
    rgba(255, 253, 248, 0) 80%
  );
}
.page-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(255, 253, 248, 0) 0%,
    rgba(255, 253, 248, 0) 78%,
    rgba(255, 253, 248, 0.9) 100%
  );
}
.page-hero__inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--sp-3);
}
.page-hero__title { font-size: var(--fs-h1); }
.page-hero__lead {
  max-width: var(--w-prose);
  font-size: var(--fs-lg);
  line-height: 1.85;
  color: #4d453f;
}
.page-hero__meta {
  font-size: var(--fs-xs);
  font-weight: 500;
  color: #5c4520;
}

/* ==========================================================================
   组件级断点
   ========================================================================== */

@media (max-width: 900px) {
  .hd__burger { display: grid; }
  .hd__left { gap: 0; }

  .nav {
    position: fixed;
    inset: 84px 0 auto 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: var(--sp-2) var(--sp-5) var(--sp-5);
    background: var(--surface);
    box-shadow: 0 14px 34px rgba(31, 26, 23, 0.14);
    max-height: calc(100vh - 84px);
    overflow-y: auto;
  }
  .nav.is-open { display: flex; }
  .nav__link {
    padding-block: 15px;
    font-size: 16px;
    box-shadow: inset 0 -1px 0 var(--line);
  }
}

@media (max-width: 900px) {
  .ft__top { flex-direction: column; gap: var(--sp-5); }
  .ft__brand { flex: 0 0 auto; }
  .ft__cols { gap: var(--sp-5); }
}

@media (max-width: 768px) {
  .hero { min-height: 0; padding-block-end: var(--sp-5); }
  .hero__inner { padding-block-start: 56px; gap: var(--sp-4); }
  .hero__phones .phone { margin-block-start: 0; }
  .page-hero { min-height: 380px; }
  .page-hero::before {
    background: linear-gradient(
      180deg,
      rgba(255, 253, 248, 0.95) 0%,
      rgba(255, 253, 248, 0.9) 55%,
      rgba(255, 253, 248, 0.35) 100%
    );
  }
  .page-hero::after { display: none; }
}

@media (max-width: 620px) {
  .hero__phones { gap: var(--sp-2); }
  .hero__phones .phone { width: 108px; padding: 5px; border-radius: var(--r-md); }
  .hero__phones .phone__screen { height: 196px; padding: 5px; border-radius: 14px; gap: 4px; }
  .hero__phones .phone--mid .phone__screen { height: 214px; }
  /* 缩到这个小尺寸时屏内细节反而显脏，只留图形骨架 */
  .hero__phones .s-bar,
  .hero__phones .s-tab,
  .hero__phones .s-chips { display: none; }
  .hero__phones .s-banner { height: 44px; }
  .hero__phones .s-label { height: 5px; }

  .ft__cols { flex-wrap: wrap; gap: var(--sp-4) var(--sp-5); }
  .ft__col { flex: 1 1 120px; }
  .ft__bot { flex-direction: column; gap: var(--sp-2); }
}
