/* ==========================================================================
   LAYOUT — 顶栏、导航、页脚、移动抽屉
   ========================================================================== */

/* ---------- 顶部细条 ---------- */
.topbar {
  background: var(--ink-950);
  color: rgba(244, 239, 228, 0.7);
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  position: relative;
  z-index: 60;
}
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-5); }
.topbar__en { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar__right { display: flex; align-items: center; gap: var(--sp-5); white-space: nowrap; }
.topbar__dot { width: 6px; height: 6px; border-radius: 50%; background: var(--amber-400); display: inline-block; margin-right: 8px; box-shadow: 0 0 0 4px rgba(227, 169, 78, 0.14); }
.topbar__tel { font-variant-numeric: tabular-nums; }
@media (max-width: 640px) {
  .topbar__en { display: none; }
  .topbar .wrap { justify-content: center; }
}

/* ---------- 主导航 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: rgba(253, 251, 246, 0.94);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid var(--color-border);
  transition: box-shadow var(--dur-base) var(--ease-out);
}
.site-header.is-scrolled { box-shadow: var(--sh-2); }

.navbar {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-6);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}
.brand__logo {
  width: 58px;
  height: 58px;
  object-fit: contain;
  border-radius: 50%;
  transition: transform var(--dur-base) var(--ease-out);
}
.brand:hover .brand__logo { transform: rotate(18deg); }
.brand__text { display: flex; flex-direction: column; line-height: 1.15; }
.brand__cn {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--ink-900);
}
.brand__en {
  font-family: var(--font-latin);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  color: var(--color-text-soft);
  margin-top: 3px;
  white-space: nowrap;
}
/* 菜单放大后，中等宽度先收起品牌英文副标题，为一级菜单让出空间 */
@media (max-width: 1360px) { .brand__en { display: none; } }

.nav { display: flex; align-items: stretch; height: 100%; gap: clamp(10px, 1.6vw, 26px); }
.nav__item { position: relative; display: flex; align-items: center; height: 100%; }
.nav__link {
  position: relative;
  display: flex;
  align-items: center;          /* 序号与文字共线，不再按基线错位 */
  gap: 7px;
  padding: 0 2px;
  height: 100%;
  font-size: 1rem;              /* 由 15px 放大到 16px */
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--ink-900);
  white-space: nowrap;
  transition: color var(--dur-fast) var(--ease-out);
}
.nav__num {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--amber-500);
  letter-spacing: 0;
  line-height: 1;               /* 消除等宽字体行高造成的偏移 */
  transform: none;              /* 默认完全居中，hover 才轻微上浮 */
  transition: transform var(--dur-base) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.nav__link::after {
  content: "";
  position: absolute;
  left: 0; right: 100%; bottom: 26px;
  height: 2px;
  background: var(--amber-500);
  transition: right var(--dur-base) var(--ease-out);
}
.nav__item:hover .nav__link::after,
.nav__item.is-active .nav__link::after { right: 0; }
.nav__item:hover .nav__num { transform: translateY(-3px); color: var(--amber-600); }
.nav__item.is-active .nav__link { color: var(--amber-600); }
.nav__item--cta .nav__link {
  background: var(--ink-900);
  color: var(--paper-0);
  padding: 0 20px;
  height: 44px;                 /* 固定高度，随父级垂直居中 */
  border-radius: var(--r-sm);
  font-size: 0.875rem;
  letter-spacing: 0.1em;
}
.nav__item--cta .nav__link::after { display: none; }
.nav__item--cta:hover .nav__link { background: var(--amber-500); color: var(--ink-950); }

/* 下拉：机构式发丝线面板 */
.dropdown {
  position: absolute;
  top: calc(100% - 1px);
  left: -24px;
  min-width: 250px;
  background: var(--paper-0);
  border: 1px solid var(--color-border);
  border-top: 2px solid var(--amber-500);
  box-shadow: var(--sh-2);
  padding: var(--sp-4) 0 var(--sp-3);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out), visibility var(--dur-base);
}
.nav__item:hover .dropdown,
.nav__item:focus-within .dropdown { opacity: 1; visibility: visible; transform: none; }
.dropdown__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  padding: 11px 24px;
  font-size: var(--fs-sm);
  color: var(--ink-900);
  transition: background var(--dur-fast) var(--ease-out), padding-left var(--dur-fast) var(--ease-out);
}
.dropdown__link:hover, .dropdown__link.is-active {
  background: var(--paper-1);
  padding-left: 30px;
  color: var(--amber-600);
}
.dropdown__link span:last-child {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--color-muted);
  letter-spacing: 0.1em;
}

/* 汉堡按钮 */
.burger {
  display: none;
  width: 44px; height: 44px;
  align-items: center; justify-content: center;
  flex-direction: column;
  gap: 6px;
  border: 1px solid var(--color-border-strong);
  background: transparent;
  border-radius: var(--r-sm);
}
.burger span { width: 20px; height: 1.5px; background: var(--ink-900); transition: transform var(--dur-base) var(--ease-out), opacity var(--dur-fast); }
.burger.is-open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.burger.is-open span:nth-child(2) { opacity: 0; }
.burger.is-open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* 移动抽屉 */
.drawer {
  position: fixed;
  inset: 0;
  z-index: 45;
  background: var(--ink-950);
  color: var(--color-text-invert);
  padding: calc(var(--header-h) + var(--topbar-h) + 24px) var(--gutter) 40px;
  overflow-y: auto;
  transform: translateY(-101%);
  visibility: hidden;
  transition: transform var(--dur-slow) var(--ease-out), visibility var(--dur-slow);
}
.drawer.is-open { transform: none; visibility: visible; }
.drawer__group { border-top: 1px solid var(--color-border-invert); padding: 18px 0; }
.drawer__top {
  display: flex; align-items: baseline; gap: 14px;
  font-family: var(--font-display); font-size: 1.5rem; font-weight: 600;
}
.drawer__top i { font-family: var(--font-mono); font-size: 0.65rem; font-style: normal; color: var(--amber-400); }
.drawer__subs { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 12px; padding-left: 2px; }
.drawer__subs a { font-size: var(--fs-sm); color: rgba(244,239,228,0.66); }
.drawer__subs a:hover, .drawer__subs a.is-active { color: var(--amber-300); }
.drawer__foot { margin-top: 36px; font-family: var(--font-latin); font-style: italic; font-size: 1.25rem; color: rgba(244,239,228,0.4); }

@media (max-width: 1180px) {
  .nav { display: none; }
  .burger { display: flex; }
  .nav__item--cta { display: none; }
}

/* ---------- 页脚 ---------- */
.site-footer {
  background: var(--ink-950);
  color: var(--color-text-invert);
  padding-top: var(--sp-9);
  position: relative;
  overflow: hidden;
}
.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(50rem 30rem at 88% 0%, rgba(63,143,201,0.12), transparent 62%),
    radial-gradient(40rem 26rem at 6% 100%, rgba(207,139,44,0.09), transparent 60%);
}
.footer__main { position: relative; display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.2fr; gap: var(--sp-7); padding-bottom: var(--sp-8); }
.footer__brand .brand__cn { color: var(--paper-0); }
.footer__brand .brand__logo { width: 64px; height: 64px; }
.footer__slogan {
  font-family: var(--font-display);
  font-size: 1.35rem;
  line-height: 1.6;
  margin-top: var(--sp-5);
  max-width: 20ch;
  color: rgba(244,239,228,0.88);
}
.footer__col h4 {
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--amber-400);
  margin-bottom: var(--sp-5);
  font-weight: 500;
}
.footer__col li { margin-bottom: 10px; font-size: var(--fs-sm); color: rgba(244,239,228,0.7); }
.footer__col a:hover { color: var(--amber-300); }
.footer__contact-line { display: flex; gap: 10px; font-size: var(--fs-sm); line-height: 1.55; margin-bottom: 14px; color: rgba(244,239,228,0.72); }
.footer__contact-line b { color: var(--amber-400); font-family: var(--font-mono); font-size: 0.65rem; font-weight: 400; letter-spacing: 0.1em; padding-top: 4px; flex-shrink: 0; }
.footer__bottom {
  position: relative;
  border-top: 1px solid var(--color-border-invert);
  padding-block: var(--sp-5);
  display: flex; justify-content: space-between; gap: var(--sp-4);
  font-family: var(--font-mono); font-size: var(--fs-2xs);
  letter-spacing: 0.08em; color: rgba(244,239,228,0.45);
  flex-wrap: wrap;
}
@media (max-width: 900px) {
  .footer__main { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .footer__main { grid-template-columns: 1fr; gap: var(--sp-6); }
  .footer__brand { margin-bottom: var(--sp-2); }
}
