/* 页头、菜单、滚动进度条和页脚 */

body.menu-open { overflow: hidden; }

.page-progress {
  position: fixed;
  inset: 0 0 auto;
  z-index: 110;
  height: 3px;
  pointer-events: none;
}

.page-progress span {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: left;
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 90;
  height: var(--header-height);
  transition: background .25s ease, box-shadow .25s ease, backdrop-filter .25s ease;
}

.site-header.is-scrolled {
  background: rgba(255,255,255,.94);
  box-shadow: 0 1px 0 rgba(15,18,25,.07);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.brand strong {
  font-size: clamp(17px, .84vw, 22px);
  letter-spacing: -.03em;
}

.site-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(32px, 2.55vw, 64px);
}

.site-nav a {
  position: relative;
  padding: 25px 0;
  color: rgba(17,19,23,.76);
  font-size: clamp(14px, .65vw, 18px);
  font-weight: 650;
}

.site-nav a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 17px;
  left: 0;
  height: 2px;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .25s ease;
}

.site-nav a:hover::after, .site-nav a.is-active::after {
  transform: scaleX(1);
  transform-origin: left;
}

.site-nav a.is-active { color: var(--ink); }

.menu-button {
  display: none;
  width: 44px;
  height: 44px;
  padding: 10px 7px;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.menu-button > span:not(.sr-only) {
  display: block;
  height: 2px;
  margin: 6px 0;
  background: var(--ink);
  transition: transform .2s ease, opacity .2s ease;
}

.site-footer {
  color: #fff;
  background: #17191e;
  border-top: 1px solid rgba(237,28,43,.78);
}

.footer-shell { position: relative; }

.footer-main {
  min-height: 126px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 56px;
}

.footer-brand {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.footer-brand img {
  width: 46px;
  height: 46px;
  object-fit: contain;
}

.footer-brand span {
  display: grid;
  gap: 4px;
}

.footer-brand strong {
  font-size: 21px;
  line-height: 1;
  letter-spacing: -.025em;
}

.footer-brand small {
  color: #8f949d;
  font-size: 11px;
  letter-spacing: .05em;
}

.footer-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(24px, 2.4vw, 50px);
}

.footer-nav a {
  position: relative;
  padding: 12px 0;
  color: #aeb2ba;
  font-size: 13px;
  white-space: nowrap;
  transition: color .2s ease;
}

.footer-nav a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 5px;
  left: 0;
  height: 1px;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .22s ease;
}

.footer-nav a:hover, .footer-nav a.is-active { color: #fff; }

.footer-nav a:hover::after, .footer-nav a.is-active::after {
  transform: scaleX(1);
  transform-origin: left;
}

.footer-bottom {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  color: #777d86;
  font-size: 11px;
  border-top: 1px solid rgba(255,255,255,.09);
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 0;
}

.footer-record {
  position: relative;
  margin-left: 18px;
  padding-left: 19px;
  color: #aeb2ba;
}

.footer-record::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 3px;
  height: 3px;
  background: var(--red);
  border-radius: 50%;
  transform: translateY(-50%);
}

.footer-backtop {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #aeb2ba;
  white-space: nowrap;
  transition: color .2s ease;
}

.footer-backtop span {
  color: var(--red);
  font-size: 14px;
  transition: transform .2s ease;
}

.footer-bottom a:hover { color: #fff; }

.footer-backtop:hover span { transform: translateY(-2px); }

@media (max-width: 1180px) {
  .footer-main { gap: 36px; }

  .footer-nav { gap: 24px; }
}

@media (max-width: 820px) {
  .site-header { height: 70px; }

  .header-inner { height: 70px; }

  .brand img {
    width: 40px;
    height: 40px;
  }

  .brand strong { font-size: 17px; }

  .menu-button {
    position: relative;
    z-index: 3;
    display: block;
  }

  .menu-button[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }

  .menu-button[aria-expanded="true"] span:nth-child(2) { opacity: 0; }

  .menu-button[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

  .menu-button { margin-left: auto; }

  body.menu-open .site-header {
    height: 100svh;
    height: 100dvh;
    background: #fff;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .site-nav {
    position: absolute;
    inset: 70px 0 0;
    z-index: 1;
    margin-left: 0;
    padding: 26px 24px max(28px, env(safe-area-inset-bottom));
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: #fff;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-12px);
    transition: opacity .22s ease, transform .28s cubic-bezier(.22,1,.36,1), visibility 0s linear .28s;
  }

  .site-nav.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
    transition-delay: 0s;
  }

  .site-nav a {
    display: flex;
    min-height: 66px;
    padding: 0 4px;
    align-items: center;
    justify-content: space-between;
    color: #282c33;
    font-size: 22px;
    line-height: 1.2;
    border-bottom: 1px solid var(--line);
  }

  .site-nav a:first-child { border-top: 1px solid var(--line); }

  .site-nav a::after { display: none; }

  .site-nav a.is-active { color: var(--red); }

  .footer-main {
    min-height: 0;
    padding: 32px 0 26px;
    align-items: flex-start;
    flex-direction: column;
    gap: 22px;
  }

  .footer-nav {
    width: 100%;
    margin-left: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0 20px;
  }

  .footer-nav a {
    padding: 10px 0;
    border-bottom: 1px solid rgba(255,255,255,.075);
  }
}

@media (max-width: 560px) {
  .site-footer { padding-bottom: env(safe-area-inset-bottom); }

  .footer-main {
    padding: 28px 0 24px;
    gap: 20px;
  }

  .footer-brand { gap: 10px; }

  .footer-brand img {
    width: 42px;
    height: 42px;
  }

  .footer-brand strong { font-size: 19px; }

  .footer-brand small { font-size: 10px; }

  .footer-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 2px 20px;
  }

  .footer-nav a {
    min-height: 32px;
    padding: 6px 0;
    display: flex;
    align-items: center;
    font-size: 12px;
    border-bottom: 0;
  }

  .footer-nav a::after { bottom: 2px; }

  .footer-bottom {
    min-height: 0;
    padding: 16px 0 calc(18px + env(safe-area-inset-bottom));
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 10px 20px;
    line-height: 1.65;
  }

  .footer-legal {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .footer-backtop {
    grid-column: 2;
    grid-row: 1;
  }

  .footer-record {
    margin-left: 0;
    padding-left: 0;
  }

  .footer-record::before { display: none; }
}
