/* ═══════════════════════════════════════════════
   RackForge chrome.css — header / nav / footer / modal
   单一模板来源，全站共用；禁止页面内另写导航页脚样式
   ═══════════════════════════════════════════════ */

/* ── site header ── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(247,248,248,.92);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 28px; height: var(--nav-h); }
.brand { display: flex; align-items: center; gap: 11px; margin-right: auto; }
.brand-mark { width: 32px; height: 32px; display: block; }
.brand-name { font-family: var(--font-display); font-size: 19px; font-weight: 600; letter-spacing: -.01em; color: var(--ink); }
.brand-name b { font-weight: 400; color: var(--steel-c); font-style: italic; }

.main-nav ul.nav-list { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-list > li { position: relative; }
.nav-list > li > a {
  display: flex; align-items: center; gap: 5px;
  padding: 10px 13px; border-radius: var(--r-pill);
  font-size: 14px; font-weight: 500; color: var(--ink);
  transition: background var(--t-fast);
  min-height: 44px;
}
.nav-list > li > a:hover { background: var(--paper-2); }
.nav-list > li.active > a { background: var(--ink); color: var(--white); }
.nav-list .caret { font-size: 14px; color: var(--steel-b); transition: transform var(--t-med); }
.nav-list li.active .caret { color: var(--steel-a); }

/* dropdown（hover 展开） */
.drop {
  position: absolute; top: calc(100% + 10px); left: 50%; transform: translate(-50%, 6px);
  min-width: 300px; background: var(--white); border: 1px solid var(--line);
  border-radius: var(--r-md); box-shadow: var(--shadow-win);
  padding: 10px; opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity var(--t-med), transform var(--t-med), visibility var(--t-med);
}
.has-drop::after { content: ''; position: absolute; left: 0; right: 0; top: 100%; height: 12px; }
.has-drop:hover .caret { transform: rotate(180deg); }
.has-drop:hover .drop, .drop:hover { opacity: 1; visibility: visible; pointer-events: auto; transform: translate(-50%, 0); }
.drop a {
  display: block; padding: 10px 14px; border-radius: var(--r-sm);
  transition: background var(--t-fast); min-height: 44px;
}
.drop a:hover { background: var(--paper-2); }
.drop a b { display: block; font-size: 14px; font-weight: 600; color: var(--ink); }
.drop a span { display: block; font-size: 14px; color: var(--mut); margin-top: 2px; }
.drop .drop-head { padding: 8px 14px 10px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.drop .drop-head b { font-family: var(--font-mono); font-size: 14px; letter-spacing: .14em; text-transform: uppercase; color: var(--steel-c); font-weight: 500; }

.nav-cta { margin-left: 6px; }
.nav-cta .btn { padding: 10px 20px; min-height: 42px; font-size: 14px; }

.nav-toggle { display: none; width: 44px; height: 44px; border: 1px solid var(--line-2); background: var(--white); border-radius: var(--r-sm); cursor: pointer; padding: 0; align-items: center; justify-content: center; }
.nav-toggle svg { width: 20px; height: 20px; stroke: var(--ink); }
.nav-toggle .i-close { display: none; }
body.nav-open .nav-toggle .i-open { display: none; }
body.nav-open .nav-toggle .i-close { display: block; }

@media (max-width: 1080px) {
  .nav-toggle { display: flex; }
  .main-nav {
    position: fixed; top: var(--nav-h); left: 0; right: 0; bottom: 0;
    background: var(--paper); border-top: 1px solid var(--line);
    padding: var(--sp-3); overflow-y: auto;
    transform: translateX(-100%); transition: transform var(--t-med);
  }
  body.nav-open .main-nav { transform: none; }
  .main-nav ul.nav-list { flex-direction: column; align-items: stretch; gap: 2px; }
  .nav-list > li > a { padding: 14px 16px; border-radius: var(--r-sm); font-size: 15px; justify-content: space-between; }
  .drop {
    position: static; transform: none; min-width: 0; box-shadow: none; border: 0;
    opacity: 1; visibility: visible; pointer-events: auto;
    display: none; padding: 0 0 8px 14px;
  }
  body.nav-open .has-drop.open .drop { display: block; }
  .has-drop::after { display: none; }
  .nav-cta { margin: 14px 0 0; }
  .nav-cta .btn { width: 100%; justify-content: center; }
}

/* ── footer ── */
.site-footer { background: var(--ink); color: var(--on-dark); margin-top: 0; }
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr 1.2fr; gap: var(--sp-4); padding: 64px 0 48px; }
.footer-brand .brand-name { color: var(--white); }
.footer-brand p { font-size: 14px; color: var(--on-dark-mut); line-height: 1.7; margin-top: 14px; max-width: 30ch; }
.footer-col h3 { font-family: var(--font-mono); font-size: 14px; letter-spacing: .16em; text-transform: uppercase; color: var(--on-dark-mut); font-weight: 500; margin-bottom: 18px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 10px; }
.footer-col a { display: inline-block; min-height: 24px; font-size: 14px; color: var(--on-dark); opacity: .85; transition: opacity var(--t-fast); }
.footer-col a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 3px; }
.footer-contact a.fmail { font-family: var(--font-mono); font-size: 14px; }
.footer-contact .fbtn { margin-top: 16px; }
.footer-cert { padding: 22px 0; border-top: 1px solid var(--on-dark-line); display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.footer-cert span.cap { font-family: var(--font-mono); font-size: 14px; letter-spacing: .14em; color: var(--on-dark-mut); text-transform: uppercase; margin-right: 6px; }
.footer-cert i.pill { font-style: normal; font-family: var(--font-mono); font-size: 14px; color: var(--on-dark); border: 1px solid var(--on-dark-line); border-radius: var(--r-pill); padding: 5px 14px; }
.footer-bottom { padding: 20px 0 26px; border-top: 1px solid var(--on-dark-line); display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; font-size: 14px; color: var(--on-dark-mut); }
.footer-bottom a { color: var(--on-dark-mut); text-decoration: underline; text-underline-offset: 3px; display: inline-block; padding: 13px 0; min-height: 44px; }
@media (max-width: 980px) { .footer-top { grid-template-columns: 1fr 1fr; padding: 48px 0 36px; } }
@media (max-width: 560px) { .footer-top { grid-template-columns: 1fr; gap: var(--sp-3); } }

/* ── inquiry modal（左图右表双栏，硬约束 22） ── */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 90; background: rgba(16,18,20,.55);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  display: none; align-items: center; justify-content: center; padding: 20px;
}
.modal-backdrop.open { display: flex; }
.modal-dialog {
  display: grid; grid-template-columns: 1fr 1fr; max-width: 780px; width: 100%;
  background: var(--paper); border-radius: var(--r-lg); overflow: hidden;
  box-shadow: 0 30px 80px rgba(16,18,20,.35); max-height: 92vh;
}
.modal-image-panel { position: relative; min-height: 380px; background: var(--ink); }
.modal-image-panel img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .82; }
.modal-image-panel .m-copy { position: absolute; left: 0; right: 0; bottom: 0; padding: 28px; background: linear-gradient(180deg, transparent, rgba(16,18,20,.85)); color: var(--white); }
.modal-image-panel .m-copy b { font-family: var(--font-display); font-size: 21px; font-weight: 600; display: block; margin-bottom: 6px; letter-spacing: -.01em; }
.modal-image-panel .m-copy span { font-size: 14px; color: rgba(255,255,255,.75); }
.modal-form-panel { padding: 36px 32px; overflow-y: auto; }
.modal-form-panel .m-close {
  position: absolute; top: 14px; right: 14px; width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--line-2); background: var(--white); cursor: pointer;
  display: flex; align-items: center; justify-content: center; padding: 0;
}
.modal-form-panel .m-close svg { width: 15px; height: 15px; stroke: var(--ink); }
.modal-form-panel { position: relative; }
.modal-form-panel h3 { font-size: 23px; margin-bottom: 6px; }
.modal-form-panel .m-sub { font-size: 14px; color: var(--mut); margin-bottom: 20px; }
.form-grid { display: grid; gap: 12px; }
.form-grid .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-grid label { display: block; font-size: 14px; font-weight: 500; color: var(--ink-2); margin-bottom: 5px; }
.form-grid input, .form-grid select, .form-grid textarea {
  width: 100%; padding: 11px 13px; border: 1px solid var(--line-2); border-radius: var(--r-sm);
  font-family: var(--font-body); font-size: 14px; color: var(--ink); background: var(--white);
  transition: border-color var(--t-fast); min-height: 44px;
}
.form-grid textarea { min-height: 88px; resize: vertical; }
.form-grid input:focus, .form-grid select:focus, .form-grid textarea:focus { outline: none; border-color: var(--steel-b); }
.form-grid .btn { width: 100%; justify-content: center; margin-top: 4px; }
.form-note { font-size: 14px; color: var(--mut); text-align: center; margin: 10px 0 0; }
.form-status { font-size: 14px; margin-top: 10px; text-align: center; display: none; }
.form-status.ok { display: block; color: #1B7A46; }
.form-status.err { display: block; color: #B3362A; }
@media (max-width: 760px) {
  .modal-dialog { grid-template-columns: 1fr; max-height: 94vh; overflow-y: auto; }
  .modal-image-panel { min-height: 170px; }
  .modal-form-panel { padding: 26px 20px; }
  .form-grid .row2 { grid-template-columns: 1fr; }
}

/* ── back to top ── */
.to-top {
  position: fixed; right: 22px; bottom: 22px; z-index: 40;
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--ink); color: var(--white); border: 0; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transform: translateY(8px);
  transition: opacity var(--t-med), transform var(--t-med);
}
.to-top.show { opacity: 1; pointer-events: auto; transform: none; }
.to-top svg { width: 17px; height: 17px; stroke: var(--white); }
.form-note a { text-decoration: underline; text-underline-offset: 3px; }

/* nav CTA: keep white text over ink pill (override .nav-list > li > a ink) */
.nav-list > li.nav-cta > a { color: var(--white); }
.nav-list > li.nav-cta > a:hover { background: var(--ink-2); color: var(--white); }
