/* ============================================================
   AmpRack chrome.css — 站点骨架外观（header/footer/nav/modal/reveal）
   依赖 design-tokens.css 令牌；全站单一来源，禁止页面另写
   ============================================================ */

/* ---- Header ---- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(18, 20, 23, .94);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-soft);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand-name { font-family: var(--font-display); font-weight: 500; font-size: 21px; letter-spacing: -.3px; }
.brand-name b { color: var(--amber); font-weight: 700; }
.header-actions { display: flex; align-items: center; gap: 12px; }
.btn-sm { padding: 9px 18px; min-height: 42px; font-size: 14px; }
.nav-toggle { display: none; background: none; border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--ink); width: 44px; height: 44px; align-items: center; justify-content: center; cursor: pointer; }

/* ---- 主导航 ---- */
.main-nav { flex: 1; }
.nav-list { display: flex; align-items: center; justify-content: flex-end; gap: 4px; list-style: none; }
.nav-list > li { position: relative; }
.nav-list > li > a {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 10px 14px; color: var(--ink-dim); font-size: 15px; font-weight: 500;
  border-radius: var(--radius-sm); transition: color .15s ease;
}
.nav-list > li > a:hover { color: var(--ink); }
.nav-list > li.active > a { color: var(--amber); }
.nav-list > li.active > a::after { content: ''; position: absolute; left: 14px; right: 14px; bottom: 2px; height: 2px; background: var(--amber); border-radius: 1px; }
.caret { font-size: 14px; opacity: .7; transition: transform .18s ease; }
.has-drop.drop-open .caret { transform: rotate(180deg); }

/* 下拉面板 */
.drop {
  position: absolute; top: calc(100% + 8px); left: 0; min-width: 250px;
  background: var(--panel-2); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 8px;
  opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: opacity .16s ease, transform .16s ease, visibility .16s;
}
.has-drop.drop-open .drop { opacity: 1; visibility: visible; transform: translateY(0); }
.drop a { display: block; padding: 10px 12px; border-radius: var(--radius-sm); color: var(--ink-dim); }
.drop a:hover { background: var(--panel); color: var(--amber); }
.drop a b { display: block; color: var(--ink); font-size: 14px; font-weight: 600; }
.drop a span { display: block; font-size: 14px; color: var(--muted); margin-top: 2px; }
.drop a:hover b { color: var(--amber); }

/* ---- Footer ---- */
.site-footer { background: #0E1013; border-top: 1px solid var(--border-soft); padding: 60px 0 0; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr 1fr; gap: 34px; padding-bottom: 44px; }
.f-brand p { color: var(--muted); font-size: 14px; margin: 14px 0 0; max-width: 300px; }
.f-cert { font-family: var(--font-mono); font-size: 14px !important; color: var(--ink-dim) !important; letter-spacing: .06em; }
.f-contact a { font-family: var(--font-mono); font-size: 14px; }
.f-col h4 { font-family: var(--font-mono); font-size: 14px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--amber); margin-bottom: 16px; }
.f-col a { display: block; color: var(--ink-dim); font-size: 14px; padding: 5px 0; }
.f-col a:hover { color: var(--amber); }
.footer-bottom { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 18px 0; border-top: 1px solid var(--border-soft); color: var(--muted); font-size: 14px; }
.f-status { font-family: var(--font-mono); font-size: 14px; color: #3F454D; }

/* ---- Reveal ---- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---- 表单双列 ---- */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ---- 响应式 ---- */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
}
@media (max-width: 920px) {
  .nav-toggle { display: inline-flex; }
  .main-nav { position: absolute; top: 68px; left: 0; right: 0; background: var(--bg-soft); border-bottom: 1px solid var(--border); display: none; max-height: calc(100vh - 68px); overflow-y: auto; }
  .site-header.nav-open .main-nav { display: block; }
  .nav-list { flex-direction: column; align-items: stretch; gap: 0; padding: 10px 20px 20px; }
  .nav-list > li > a { width: 100%; padding: 13px 8px; font-size: 16px; border-bottom: 1px solid var(--border-soft); border-radius: 0; }
  .nav-list > li.active > a::after { display: none; }
  .drop { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: none; background: transparent; padding: 0 0 8px 14px; display: none; }
  .has-drop.drop-open .drop { display: block; }
  .header-actions .btn-sm { display: none; }
}
@media (max-width: 640px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .f-brand { grid-column: 1 / -1; }
  .form-row { grid-template-columns: 1fr; }
}

/* 移动端抽屉内 CTA（桌面隐藏，header 已有） */
.nav-cta-mobile { display: none; }
@media (max-width: 920px) {
  .nav-cta-mobile { display: block; padding: 16px 8px 4px; }
  .nav-cta-mobile .btn { width: 100%; justify-content: center; }
}
