/* ==========================================================================
   blocks.css — 站头 / 页脚 / 首页 Hero / 内页页头
   组件级断点紧跟组件定义，不放到 layout.css（否则会被后加载的同名规则盖掉）。
   ========================================================================== */

/* --------------------------------------------------------------------------
   站头
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(8, 8, 11, 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;
  justify-content: space-between;
  gap: var(--sp-6);
  width: 100%;
  max-width: var(--w-container);
  min-height: 76px;
  margin-inline: auto;
  padding-inline: var(--pad-x);
}

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

.brand__mark {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  display: block;
  object-fit: cover;
  border-radius: 29%;       /* 与原 logo 的 11px 圆角等比，缩到 32px 也不走形 */
  /* 图标本身压着大片黑（发色 + 底部 AGE.TV 黑条），深色站头上会糊成一块，
     加一圈 1px 描边把轮廓勾出来，不改原图 */
  box-shadow: 0 0 0 1px var(--line-strong);
}

.brand__name {
  font-size: 21px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}

.nav__list {
  display: flex;
  align-items: center;
  gap: 34px;
}

.nav__link {
  position: relative;
  font-size: var(--fs-md);
  color: var(--text-body);
  padding-block: 6px;
  transition: color var(--dur) var(--ease);
}

.nav__link:hover {
  color: var(--text);
}

.nav__link[aria-current="page"] {
  color: var(--text);
  font-weight: 500;
}

.nav__link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  border-radius: 2px;
  background: var(--brand-bright);
}

.site-header__actions {
  display: flex;
  align-items: center;
  gap: 22px;
  flex: 0 0 auto;
}

.site-header__web {
  font-size: var(--fs-md);
  color: var(--text-body);
  transition: color var(--dur) var(--ease);
}

.site-header__web:hover {
  color: var(--text);
}

.site-header__cta {
  padding: 10px 20px;
  font-size: var(--fs-md);
  border-radius: var(--r-pill);
  gap: 8px;
}

/* 汉堡：独立按钮，不依附于 CTA —— CTA 被删掉时手机端仍有入口 */
.site-header__toggle {
  display: none;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: var(--r-md);
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--line-strong);
}

.site-header__toggle svg {
  width: 20px;
  height: 20px;
}

.site-header__toggle .icon-close {
  display: none;
}

.site-header[data-nav-open="true"] .icon-menu {
  display: none;
}

.site-header[data-nav-open="true"] .icon-close {
  display: block;
}

/* --------------------------------------------------------------------------
   首页 Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(60% 70% at 8% 0%, rgba(139, 92, 246, 0.2), transparent 62%),
    linear-gradient(160deg, #140A1E 0%, var(--bg) 62%);
}

.hero__inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--sp-8);
  padding-block: var(--sp-9) var(--sp-11);
}

.hero__copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--sp-6);
  flex: 1 1 auto;
  min-width: 0;
  max-width: 600px;
}

.hero__title {
  font-size: var(--fs-h1);
  line-height: var(--lh-tight);
  font-weight: 900;
  color: var(--text);
  text-shadow: 0 0 40px rgba(255, 255, 255, 0.12);
}

.hero__lead {
  font-size: var(--fs-lg);
  line-height: 1.85;
  color: var(--text-body);
  max-width: 548px;
}

.hero__cta,
.btn-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.hero__visual {
  position: relative;
  flex: 0 0 auto;
  width: 640px;
  height: 620px;
}

/* 光晕 */
.hero__halo {
  position: absolute;
  pointer-events: none;
  border-radius: 50%;
}

.hero__halo--violet {
  width: 460px;
  height: 460px;
  left: 96px;
  top: 40px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.42), transparent 68%);
  filter: blur(40px);
}

/* --------------------------------------------------------------------------
   手机模型
   -------------------------------------------------------------------------- */
.device {
  position: absolute;
  left: 172px;
  top: 6px;
  width: 296px;
  height: 600px;
  padding: 8px;
  border-radius: 46px;
  background: #0A0A10;
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.14),
    0 30px 70px -10px rgba(0, 0, 0, 0.7),
    0 0 90px 10px rgba(245, 44, 140, 0.18);
}

.device__screen {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 38px;
  background: #0B0B12;
}

.device__cover {
  position: absolute;
  inset: 0 0 auto;
  height: 340px;
}

.device__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.device__scrim {
  position: absolute;
  left: 0;
  right: 0;
  top: 140px;
  height: 200px;
  background: linear-gradient(180deg, rgba(11, 11, 18, 0) 0%, #0B0B12 100%);
}

.device__badge {
  position: absolute;
  left: 14px;
  top: 16px;
  padding: 5px 10px;
  border-radius: var(--r-pill);
  background: rgba(0, 0, 0, 0.7);
  font-size: 11px;
  font-weight: 500;
  color: var(--text);
}

.device__play {
  position: absolute;
  left: 50%;
  top: 170px;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  box-shadow: 0 0 40px 6px rgba(245, 44, 140, 0.5);
}

/* 手机屏内信息：单列容器自动排布，避免固定 top 在窄屏互相压住 */
.device__info {
  position: absolute;
  left: 16px;
  right: 16px;
  top: 350px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.device__title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
}

.device__sub {
  font-size: 11px;
  color: var(--text-muted);
}

.device__track {
  position: relative;
  height: 4px;
  margin-top: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.12);
}

.device__track::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 41%;
  height: 100%;
  border-radius: 2px;
  background: var(--brand-bright);
}

.device__time {
  font-family: var(--font-num);
  font-size: 10px;
  color: var(--text-muted);
}

.device__eps-label {
  margin-top: 8px;
  font-size: 10px;
  color: var(--text-muted);
}

.device__eps-row {
  display: flex;
  gap: 12px;
  font-family: var(--font-num);
  font-size: var(--fs-xs);
  font-weight: 500;
  color: var(--text-body);
}

.device__tabbar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 88px;
  display: flex;
  align-items: flex-start;
  justify-content: space-around;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: #0C0C14;
  color: #5C5C70;
}

.device__tabbar .is-active {
  color: var(--brand-bright);
}

/* --------------------------------------------------------------------------
   浮动信息卡
   -------------------------------------------------------------------------- */
.float-card {
  position: absolute;
  padding: 14px;
  border-radius: 18px;
  background: var(--surface-raised);
  box-shadow:
    inset 0 0 0 1px var(--line),
    0 14px 34px -6px rgba(0, 0, 0, 0.55);
}

.float-card--reminder {
  left: 0;
  top: 96px;
  width: 174px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.float-card__head {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-muted);
}

.float-card__value {
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--text);
}

.float-card__sub {
  font-size: 11px;
  color: var(--text-muted);
}

.float-card--quality {
  left: 470px;
  top: 268px;
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 11px 16px;
  border-radius: var(--r-pill);
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--text);
  box-shadow:
    inset 0 0 0 1px var(--brand-line),
    0 12px 30px -6px rgba(0, 0, 0, 0.55);
}

.float-card--update {
  left: 24px;
  top: 470px;
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 16px;
  border-radius: var(--r-lg);
}

.float-card__num {
  font-family: var(--font-num);
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

/* --------------------------------------------------------------------------
   内页页头
   -------------------------------------------------------------------------- */
.page-hero {
  padding-block: var(--sp-10) var(--sp-8);
  background:
    radial-gradient(70% 100% at 10% 0%, rgba(139, 92, 246, 0.16), transparent 60%),
    linear-gradient(160deg, #120A1C 0%, var(--bg) 70%);
}

.page-hero__inner {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  max-width: var(--w-prose);
}

.page-hero__title {
  font-size: var(--fs-page);
  line-height: 1.28;
  color: var(--text);
}

.page-hero__lead {
  font-size: var(--fs-md);
  line-height: 1.75;
  color: var(--text-body);
}

/* 区块小标题（内页分节用） */
.sub-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  flex-wrap: wrap;
}

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

.sub-head__title {
  font-size: var(--fs-2xl);
  color: var(--text);
}

.chip {
  padding: 5px 12px;
  border-radius: var(--r-sm);
  font-family: var(--font-num);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.04em;
}

.chip--ios {
  background: var(--brand-soft);
  color: var(--brand-ink);
}

.chip--android {
  background: rgba(61, 220, 132, 0.12);
  color: var(--green);
}

/* --------------------------------------------------------------------------
   站头 / Hero 的组件级断点
   -------------------------------------------------------------------------- */
@media (max-width: 1180px) {
  .hero__inner {
    flex-direction: column;
    align-items: center;
    gap: var(--sp-9);
  }

  .hero__copy {
    align-items: center;
    text-align: center;
    max-width: 640px;
  }

  .hero__lead {
    max-width: 100%;
  }

  .hero__cta {
    justify-content: center;
  }

  .hero__visual {
    width: 100%;
    max-width: 420px;
    height: auto;
    min-height: 560px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
  }

  .device {
    position: relative;
    left: auto;
    top: auto;
  }

  .float-card--reminder {
    left: 0;
  }

  .float-card--quality {
    left: auto;
    right: 0;
    top: 220px;
  }
}

@media (max-width: 1024px) {
  .nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    display: none;
    padding: var(--sp-5) var(--pad-x) var(--sp-6);
    background: #0A0A11;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.9);
  }

  .site-header[data-nav-open="true"] .nav {
    display: block;
  }

  .nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .nav__link {
    display: block;
    padding-block: 14px;
    font-size: var(--fs-lg);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }

  .nav__link[aria-current="page"] {
    color: var(--brand-ink);
  }

  .nav__link[aria-current="page"]::after {
    display: none;
  }

  .site-header__toggle {
    display: grid;
  }

  .site-header__web {
    display: none;
  }

  /* 移动端：品牌靠左，按钮紧邻汉堡靠右，不散在中间 */
  .site-header__inner {
    position: relative;
    justify-content: flex-start;
    gap: var(--sp-3);
    min-height: 64px;
  }

  .site-header__actions {
    margin-inline-start: auto;
    gap: 10px;
  }

  .brand__mark {
    width: 32px;
    height: 32px;
  }

  .brand__name {
    font-size: 18px;
  }

  .hero__inner {
    padding-block: var(--sp-8) var(--sp-9);
  }

  .page-hero {
    padding-block: var(--sp-8) var(--sp-7);
  }
}

@media (max-width: 640px) {
  .float-card {
    display: none;
  }

  .hero__visual {
    min-height: 0;
  }

  .device {
    width: 268px;
    height: 550px;
    border-radius: 42px;
  }

  .device__cover {
    height: 290px;
  }

  .device__scrim {
    top: 120px;
    height: 175px;
  }

  .device__info {
    top: 300px;
  }

  .device__title {
    font-size: 15px;
  }

  .device__tabbar {
    height: 68px;
    padding-top: 12px;
  }

  .hero__cta {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .hero__cta .btn {
    width: 100%;
  }
}
