/* layout.css — 容器、页眉、导航、页脚、区块骨架 */

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 16px;
}

@media (min-width: 768px) {
  .container {
    padding: 0 24px;
  }
}

/* 区块 */
.section {
  padding: 56px 0;
}

@media (min-width: 768px) {
  .section {
    padding: 72px 0;
  }
}

@media (min-width: 1200px) {
  .section {
    padding: 88px 0;
  }
}

.section--soft {
  background: var(--bg-soft);
}

.section--dark {
  background: var(--bg-dark);
  color: #fff;
}

.section--dark h2,
.section--dark h3,
.section--dark h4 {
  color: #fff;
}

.section--tight {
  padding: 40px 0;
}

/* 去掉区块上边距（替代 HTML 里的 style="padding-top:0"） */
.section--flush {
  padding-top: 0;
}

.section--flush-sm {
  padding-top: 8px;
}

/* ============ 页眉 ============ */
.site-header {
  /* 用局部变量承载当前高度，滚动收缩时导航定位能自动跟随 */
  --header-h-current: var(--header-h);
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h-current);
  background: rgba(255, 255, 255, 0.94);
  -webkit-backdrop-filter: saturate(180%) blur(8px);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--line);
  transition:
    height var(--dur) var(--ease),
    box-shadow var(--dur) var(--ease),
    border-color var(--dur) var(--ease);
}

/* 滚动后页眉轻微收缩，把纵向空间还给内容 */
.site-header.is-scrolled {
  --header-h-current: var(--header-h-sm);
  box-shadow: var(--shadow-sm);
}

.header__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  color: var(--text-1);
}

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

.brand__mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--brand-600);
  color: #fff;
  font-size: 18px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.brand__text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: 0.02em;
}

.brand__text small {
  font-size: 11px;
  font-weight: 400;
  color: var(--text-3);
  letter-spacing: 0.08em;
}

/* 导航 */
.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--text-1);
  border-radius: 2px;
  transition:
    transform var(--dur) var(--ease-out),
    opacity var(--dur-fast) var(--ease);
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-left: auto;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 26px;
}

.nav-list > li > a {
  display: block;
  padding: 8px 0;
  font-size: 15px;
  color: var(--text-2);
  position: relative;
}

.nav-list > li > a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--brand-600);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur) var(--ease-out);
}

.nav-list > li > a:hover,
.nav-list > li > a[aria-current="page"] {
  color: var(--brand-700);
}

.nav-list > li > a:hover::after,
.nav-list > li > a[aria-current="page"]::after {
  transform: scaleX(1);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.nav-phone {
  font-size: 15px;
  color: var(--text-2);
  white-space: nowrap;
}

.nav-phone strong {
  color: var(--brand-700);
  font-weight: 500;
}

@media (max-width: 1199px) {
  .nav-toggle {
    display: flex;
  }

  .site-nav {
    position: fixed;
    left: 0;
    right: 0;
    top: var(--header-h-current);
    bottom: 0;
    display: block;
    margin: 0;
    padding: 20px 16px 40px;
    background: #fff;
    border-top: 1px solid var(--line);
    overflow-y: auto;
    /* 位移由 -8px 加大到 -16px，抽屉感更明确 */
    transform: translateY(-16px);
    opacity: 0;
    visibility: hidden;
    transition:
      transform var(--dur) var(--ease-out),
      opacity var(--dur) var(--ease),
      visibility var(--dur) var(--ease);
  }

  .site-nav.is-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav-list {
    display: block;
  }

  .nav-list > li {
    border-bottom: 1px solid var(--line);
  }

  .nav-list > li > a {
    padding: 15px 4px;
    font-size: 16px;
  }

  .nav-list > li > a::after {
    display: none;
  }

  .nav-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    margin-top: 24px;
  }

  .nav-phone {
    text-align: center;
    font-size: 16px;
  }

  .nav-actions .btn {
    width: 100%;
  }
}

@media (min-width: 1200px) {
  .nav-list > li > a[aria-current="page"] {
    color: var(--brand-600);
  }
}

/* ============ 页脚 ============ */
/* ★ 页脚比深色区块再深一档（--bg-darker），两者相邻时不再糊成一片蓝 */
.site-footer {
  background: var(--bg-darker);
  color: var(--on-dark-2);
  padding: 56px 0 0;
  font-size: var(--fs-base);
}

.footer__top {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  padding-bottom: 40px;
}

@media (min-width: 768px) {
  .footer__top {
    grid-template-columns: repeat(2, 1fr);
    gap: 36px;
  }
}

@media (min-width: 1200px) {
  .footer__top {
    grid-template-columns: 1.5fr 1fr 1fr 1fr 1.3fr;
    gap: 40px;
  }
}

.footer__brand .brand {
  color: #fff;
  margin-bottom: 14px;
}

.footer__brand .brand__mark {
  background: var(--brand-500);
}

.footer__brand .brand__text small {
  color: var(--on-dark-3);
}

.footer__brand p {
  font-size: var(--fs-base);
  line-height: var(--lh-loose);
  color: var(--on-dark-3);
  max-width: 34ch;
}

.footer__col h3 {
  font-size: var(--fs-base);
  color: #fff;
  margin: 0 0 14px;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.footer__col li {
  margin-bottom: 10px;
}

.footer__col a {
  color: var(--on-dark-2);
}

.footer__col a:hover {
  color: #fff;
}

.footer__contact li {
  display: flex;
  gap: 8px;
  line-height: 1.6;
}

.footer__contact .k {
  color: var(--on-dark-3);
  flex: 0 0 auto;
}

/* ★ 版权行原为 50% 透明度（对比度临界），提亮到 60% 并统一字号 */
.footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 20px 16px 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  justify-content: space-between;
  font-size: var(--fs-xs);
  color: var(--on-dark-3);
}

@media (min-width: 768px) {
  .footer__bottom {
    padding-left: 24px;
    padding-right: 24px;
  }
}

.footer__bottom a {
  color: var(--on-dark-2);
}

.footer__bottom a:hover {
  color: #fff;
}

/* 页脚联系区在移动端置顶 */
@media (max-width: 767px) {
  .footer__contact {
    order: -1;
  }
}

/* 返回顶部
   过渡与显隐位移由 motion.css 统一管理（含 spring 回弹）；
   尺寸由 44 → 48px，触控目标更从容。 */
.to-top {
  position: fixed;
  right: 16px;
  bottom: 20px;
  z-index: 90;
  width: 48px;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  box-shadow: var(--shadow-md);
  color: var(--brand-600);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
}

.to-top.is-visible {
  opacity: 1;
  visibility: visible;
}

/* 品牌 LOGO（透明底图片，页头页脚共用） */
.brand__logo {
  display: block;
  width: auto;
  height: 34px;
}

.footer__brand .brand__logo {
  height: 36px;
}
