/* ==========================================================================
   blocks.css — 全站共享的页面级区块
   站头导航 / 首页 Hero / 内页页头 / 页脚
   组件级 @media 一律紧跟定义（放 layout.css 会被后加载的同优先级规则盖掉）
   ========================================================================== */

/* ---------- 站头 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(5, 6, 12, 0.86);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-block-end: 1px solid var(--line);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-6);
  width: 100%;
  max-width: 1440px;
  height: var(--header-h);
  margin-inline: auto;
  padding-inline: clamp(20px, 4.4vw, 64px);
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex: 0 0 auto;
  text-decoration: none;
}

.brand:hover { text-decoration: none; }

.brand__logo {
  flex: 0 0 auto;
  border-radius: 9px;
}

.brand__name {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 500;
  color: var(--text);
}

.nav {
  display: flex;
  align-items: center;
  gap: 36px;
  margin-inline-start: auto;
}

.nav a {
  font-size: var(--fs-sm);
  color: rgba(255, 255, 255, 0.65);
  text-decoration: none;
  transition: color 0.18s ease;
}

.nav a:hover { color: #FFFFFF; text-decoration: none; }

.nav a[aria-current="page"] {
  color: #FFFFFF;
  font-weight: 500;
}

.site-header__end {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  flex: 0 0 auto;
}

/* 汉堡按钮：只在窄屏出现，宽屏彻底不占位 */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding-inline: 9px;
  border-radius: var(--r-sm);
  box-shadow: inset 0 0 0 1px var(--line-strong);
}

.nav-toggle__bar {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: #FFFFFF;
  transition: transform 0.2s ease, opacity 0.2s 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);
}

/* 窄屏：导航折成下拉面板。
   注意不能只写 display:none 就完事 —— 必须有 nav-toggle 作为替代入口，
   否则手机端会彻底失去站内导航 */
@media (max-width: 900px) {
  .nav {
    position: absolute;
    inset-inline: 0;
    top: var(--header-h);
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin-inline-start: 0;
    padding: var(--sp-2) var(--gutter) var(--sp-4);
    /* 不透明：面板压在页面内容上，留 2% 透光会让 Hero 的大标题透出来 */
    background: var(--bg);
    border-block-end: 1px solid var(--line);
  }

  .nav.is-open { display: flex; }

  .nav a {
    padding: 14px 2px;
    font-size: 16px;
    border-block-end: 1px solid var(--line);
  }

  .nav a:last-child { border-block-end: 0; }

  .nav-toggle { display: flex; }
}

/* ---------- 首页 Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--bg);
  padding-block-start: 96px;
}

.hero__glow {
  position: absolute;
  pointer-events: none;
}

.hero__glow--1 {
  top: -280px;
  left: 50%;
  width: 1200px;
  height: 860px;
  margin-inline-start: -600px;
  background: radial-gradient(closest-side, rgba(46, 139, 255, 0.26), rgba(46, 139, 255, 0));
}

.hero__glow--2 {
  top: -220px;
  left: -200px;
  width: 820px;
  height: 680px;
  background: radial-gradient(closest-side, rgba(115, 92, 255, 0.22), rgba(115, 92, 255, 0));
}

.hero__glow--3 {
  top: 700px;
  left: 50%;
  width: 880px;
  height: 620px;
  margin-inline-start: -440px;
  background: radial-gradient(closest-side, rgba(31, 87, 191, 0.18), rgba(31, 87, 191, 0));
}

.hero__inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero__title {
  margin-block-start: 26px;
  font-size: var(--fs-hero);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.hero__lead {
  margin-block-start: 20px;
  font-size: var(--fs-lead);
  line-height: 1.6;
  color: var(--text-body);
  max-width: var(--w-lead);
}

.hero .btn-row {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  margin-block-start: 26px;
}

/* 窄屏两个按钮上下排并拉齐宽度。
   必须写成 .hero .btn-row —— 上面那行的 align-items:center 特异度更高，
   用 components.css 里通用的 .btn-row 会被它静默盖掉，两个按钮宽度参差 */
@media (max-width: 480px) {
  .hero .btn-row { align-items: stretch; }
}

.hero__trust {
  margin-block-start: 26px;
  font-size: var(--fs-xs);
  letter-spacing: 0.02em;
  color: var(--text-mute);
}

.hero__shot {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1040px;
  max-height: 650px;
  margin-block-start: 56px;
  margin-inline: auto;
  overflow: hidden;
  border-radius: var(--r-xl) var(--r-xl) 0 0;
}

.hero__shot img {
  width: 100%;
  box-shadow: inset 0 0 0 1px var(--line-strong);
}

.hero__fade {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 160px;
  background: linear-gradient(to bottom, rgba(5, 6, 12, 0), var(--bg));
  pointer-events: none;
}

@media (max-width: 1180px) {
  .hero { padding-block-start: 72px; }
  .hero__shot { margin-block-start: 40px; max-height: 520px; }
}

@media (max-width: 700px) {
  .hero { padding-block-start: 48px; }
  .hero__glow--1 { top: -160px; width: 620px; height: 520px; margin-inline-start: -310px; }
  .hero__glow--2 { top: -120px; left: -140px; width: 420px; height: 360px; }
  .hero__glow--3 { top: 460px; width: 520px; height: 420px; margin-inline-start: -260px; }
  .hero__title { margin-block-start: 20px; }
  .hero__lead { margin-block-start: 16px; }
  .hero .btn-row { margin-block-start: 22px; }
  .hero__trust { margin-block-start: 20px; line-height: 1.9; }
  .hero__shot { margin-block-start: 28px; max-height: 230px; }
  .hero__fade { height: 88px; }
}

/* ---------- 内页页头 ---------- */
.page-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-6);
  padding-block: 96px 72px;
  text-align: center;
}

.page-hero__title {
  font-size: var(--fs-page-title);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.page-hero__lead {
  font-size: var(--fs-lead);
  line-height: 1.6;
  color: var(--text-body);
  max-width: var(--w-lead);
}

@media (max-width: 700px) {
  .page-hero { padding-block: 48px 40px; gap: var(--sp-5); }
}

/* ---------- 页脚 ---------- */
.site-footer {
  background: var(--bg-footer);
  padding-block: 48px 40px;
}

.site-footer__inner {
  display: flex;
  flex-direction: column;
  gap: var(--sp-9);
}

.site-footer__top {
  display: flex;
  justify-content: space-between;
  gap: var(--sp-9);
  flex-wrap: wrap;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.footer-brand__row {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

.footer-brand__name {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 500;
  color: var(--text);
}

.footer-brand__tagline {
  font-size: 14px;
  color: var(--text-mute);
}

.footer-brand__meta {
  font-size: var(--fs-xs);
  color: var(--text-mute);
}

.footer-links {
  display: flex;
  gap: 88px;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.footer-col__title {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--text-mute);
}

.footer-col a {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
}

.footer-col a:hover { color: #FFFFFF; text-decoration: none; }

.site-footer__divider {
  height: 1px;
  background: var(--line);
}

.site-footer__bottom {
  display: flex;
  justify-content: space-between;
  gap: var(--sp-5);
  flex-wrap: wrap;
  font-size: var(--fs-micro);
  color: var(--text-mute);
}

@media (max-width: 820px) {
  .footer-links { gap: var(--sp-9); flex-wrap: wrap; }
  .site-footer__top { gap: var(--sp-8); }
}

@media (max-width: 560px) {
  .footer-links { gap: var(--sp-8); }
  .site-footer__bottom { flex-direction: column; gap: var(--sp-2); }
}
