@charset "UTF-8";
/* ==========================================================================
   宏鼎五金 · 布局层  layout.css
   --------------------------------------------------------------------------
   负责：顶栏 / 主导航 / 页面区块骨架 / 页脚 / 移动端抽屉
   依赖：base.css
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. 顶部信息条
   -------------------------------------------------------------------------- */
.topbar {
  background: var(--c-950);
  color: var(--on-invert-mute);
  font-size: var(--fs-xs);
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}
.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-6);
  min-height: 38px;
  flex-wrap: wrap;
}
.topbar__list {
  display: flex;
  align-items: center;
  gap: var(--sp-6);
  flex-wrap: wrap;
}
.topbar__list li { display: flex; align-items: center; gap: 7px; }
.topbar svg { width: 13px; height: 13px; flex: none; opacity: .72; }
.topbar a { transition: color var(--t-fast); }
.topbar a:hover { color: var(--on-invert-strong); }
.topbar__hot { color: var(--on-invert-strong); }
.topbar__hot .tech { color: var(--temper-bright); font-size: var(--fs-sm); }

.lang { display: flex; align-items: center; gap: var(--sp-2); }
.lang__sep { opacity: .3; }
.lang [aria-current="true"] { color: var(--on-invert-strong); }
/* 注意：这里必须写成 .topbar__list .xxx。
   基础样式里的 `.topbar__list li`（0,1,1）特异性高于单个类（0,1,0），
   否则 display:none 会被它的 display:flex 覆盖掉，窄屏下列表项不会隐藏。 */
@media (max-width: 860px) {
  .topbar__list .topbar__hours { display: none; }
}
@media (max-width: 560px) {
  .topbar__list .topbar__mails { display: none; }
}

/* --------------------------------------------------------------------------
   2. 主导航
   -------------------------------------------------------------------------- */
.masthead {
  position: sticky;
  top: 0;
  z-index: 90;
  border-bottom: 1px solid var(--line);
  transition: box-shadow var(--t-base) var(--ease-out-quart);
}
/* ⚠️ 毛玻璃必须画在伪元素上，不能直接写在 .masthead 上。
   backdrop-filter（以及 filter / transform / perspective / will-change）
   会为 position: fixed 的后代创建包含块 —— 一旦写在 .masthead 上，
   移动端抽屉导航就会以头部为包含块，被锁死在大约 130px 的高度里，
   既铺不满屏幕、链接还要在内部滚动。挂在 ::before 上效果完全一致，
   但 ::before 不是 .nav 的祖先，不会污染其包含块。 */
.masthead::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(160%) blur(14px);
  transition: background var(--t-base);
}
.masthead.is-stuck {
  box-shadow: 0 10px 30px -18px rgba(15, 18, 22, .35);
}
.masthead.is-stuck::before { background: rgba(255, 255, 255, .97); }
.masthead__inner {
  display: flex;
  align-items: center;
  gap: var(--sp-6);
  min-height: 68px;
  transition: min-height var(--t-base) var(--ease-out-quart);
}
.masthead.is-stuck .masthead__inner { min-height: 60px; }

/* 标识：直接使用品牌图形标，按内容比例缩放 */
.brand { display: flex; align-items: center; gap: 13px; flex: none; }
.brand__mark {
  height: 48px;
  flex: none;
  display: block;
  transition: height var(--t-base) var(--ease-out-quart);
}
.masthead.is-stuck .brand__mark { height: 40px; }
.brand__mark img {
  height: 100%;
  width: auto;
  display: block;
}
.brand__text { display: flex; flex-direction: column; line-height: 1.18; }
.brand__cn {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: .1em;
  color: var(--ink-strong);
}
.brand__en {
  font-family: var(--font-tech);
  font-size: .625rem;
  letter-spacing: .22em;
  color: var(--ink-mute);
  text-transform: uppercase;
}

/* 导航链接 */
.nav { margin-left: auto; }
.nav__list { display: flex; align-items: center; gap: 2px; }
.nav__link {
  position: relative;
  display: block;
  padding: 10px 13px;
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--ink);
  transition: color var(--t-fast);
  white-space: nowrap;
}
.nav__link::after {
  content: "";
  position: absolute;
  left: 13px; right: 13px; bottom: 2px;
  height: 2px;
  background: var(--temper);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--t-base) var(--ease-out-quart);
}
.nav__link:hover { color: var(--ink-strong); }
.nav__link:hover::after,
.nav__link[aria-current="page"]::after { transform: scaleX(1); }
.nav__link[aria-current="page"] { color: var(--ink-strong); font-weight: 600; }

.masthead__actions {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex: none;
}

/* 搜索 */
.searchbox { position: relative; }
.searchbox__input {
  width: 178px;
  height: 38px;
  padding: 0 34px 0 12px;
  border: 1px solid var(--line-strong);
  background: var(--c-0);
  font-size: var(--fs-sm);
  transition: width var(--t-base) var(--ease-out-quart),
              border-color var(--t-fast), box-shadow var(--t-fast);
}
.searchbox__input::placeholder { color: var(--ink-mute); }
.searchbox__input:focus {
  width: 232px;
  outline: none;
  border-color: var(--c-600);
  box-shadow: 0 0 0 3px rgba(91, 99, 109, .1);
}
.searchbox__btn {
  position: absolute; right: 0; top: 0;
  width: 36px; height: 38px;
  display: grid; place-items: center;
  color: var(--ink-mute);
  transition: color var(--t-fast);
}
.searchbox__btn:hover { color: var(--ink-strong); }
.searchbox svg { width: 15px; height: 15px; }

/* 汉堡按钮 */
.burger {
  display: none;
  width: 42px; height: 42px;
  place-items: center;
  border: 1px solid var(--line-strong);
  color: var(--ink-strong);
}
.burger svg { width: 19px; height: 19px; }
.burger__close { display: none; }
.is-open .burger__open { display: none; }
.is-open .burger__close { display: block; }

@media (max-width: 1120px) {
  .searchbox { display: none; }
}
@media (max-width: 960px) {
  .burger { display: grid; }
  .nav {
    position: fixed;
    inset: 0 0 0 auto;
    width: min(360px, 86vw);
    margin: 0;
    padding: 96px 24px 40px;
    background: var(--c-0);
    border-left: 1px solid var(--line);
    box-shadow: -24px 0 48px -30px rgba(15, 18, 22, .4);
    transform: translateX(100%);
    /* 只靠 translateX 移出屏幕是不够的：元素仍在可访问性树里，
       键盘用户 Tab 会停在看不见的导航链接上。用 visibility 把它真正摘出焦点链，
       并把 visibility 的切换延迟到滑动动画结束后，保证关合动画看得见。 */
    visibility: hidden;
    transition:
      transform var(--t-base) var(--ease-out-expo),
      visibility 0s linear var(--t-base);
    overflow-y: auto;
    z-index: 95;
  }
  .is-open .nav {
    transform: none;
    visibility: visible;
    transition:
      transform var(--t-base) var(--ease-out-expo),
      visibility 0s linear 0s;
  }
  /* ⚠️ 抽屉导航是 .masthead 的子元素，而 .masthead 的 z-index(90) 低于遮罩(92)，
     .nav 自己的 z-index:95 只在头部这个层叠上下文内部有效 —— 结果整个抽屉
     被遮罩压住：链接被压暗，而且点击全被遮罩接走，菜单等于打不开。
     打开时把头部整体提到遮罩之上即可。 */
  .is-open .masthead { z-index: 96; }
  .nav__list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav__link {
    padding: 15px 4px;
    font-size: 1rem;
    border-bottom: 1px solid var(--line-soft);
  }
  .nav__link::after { left: 4px; right: auto; width: 22px; bottom: 8px; }
  .masthead__actions .btn { display: none; }
}
.nav-scrim {
  position: fixed; inset: 0;
  background: rgba(15, 18, 22, .45);
  opacity: 0; visibility: hidden;
  transition: opacity var(--t-base), visibility var(--t-base);
  z-index: 92;
}
.is-open .nav-scrim { opacity: 1; visibility: visible; }

/* --------------------------------------------------------------------------
   3. 内页首屏（面包屑 + 页面标题）
   -------------------------------------------------------------------------- */
.pagehead {
  background: var(--c-850);
  color: var(--on-invert);
  position: relative;
  overflow: hidden;
  padding-block: clamp(38px, 4.6vw, 68px);
}
/* 内页页头：用大尺度渐变制造金属光泽，避免细纹理在大面积上产生摩尔纹 */
.pagehead::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(120% 90% at 12% 0%, rgba(255,255,255,.1), transparent 62%),
    linear-gradient(102deg, rgba(255,255,255,.06) 0%, rgba(255,255,255,0) 44%);
  pointer-events: none;
}
.pagehead > * { position: relative; }
.pagehead h1 {
  color: #fff;
  font-size: clamp(1.7rem, 1.2rem + 1.7vw, 2.5rem);
}
.pagehead p {
  margin-top: var(--sp-3);
  max-width: 66ch;
  color: var(--on-invert);
}
.pagehead__ruler { margin-top: clamp(22px, 2.6vw, 34px); }

.crumbs {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--fs-xs);
  color: var(--on-invert-mute);
  margin-bottom: var(--sp-4);
  flex-wrap: wrap;
}
.crumbs a { transition: color var(--t-fast); }
.crumbs a:hover { color: #fff; }
.crumbs__sep { opacity: .45; }
.crumbs [aria-current="page"] { color: var(--on-invert-strong); }

/* --------------------------------------------------------------------------
   4. 页脚
   -------------------------------------------------------------------------- */
.sitefoot {
  background: var(--c-950);
  color: var(--on-invert-mute);
  font-size: var(--fs-sm);
}
.sitefoot__top {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, minmax(0, 1fr));
  gap: clamp(28px, 4vw, 64px);
  padding-block: clamp(46px, 5vw, 76px);
}
.sitefoot__brand .brand__cn { color: #fff; }
.sitefoot__brand .brand__en { color: var(--on-invert-mute); }
.sitefoot__brand .brand__mark { height: 56px; }
.sitefoot__desc {
  margin-top: var(--sp-5);
  max-width: 40ch;
  line-height: 1.75;
}
.sitefoot__contact { margin-top: var(--sp-6); display: grid; gap: 10px; }
.sitefoot__contact li { display: flex; gap: 10px; align-items: flex-start; }
.sitefoot__contact svg { width: 15px; height: 15px; flex: none; margin-top: 3px; opacity: .6; }
.sitefoot__tel {
  font-family: var(--font-tech);
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: .01em;
}

.sitefoot__col h2 {
  font-size: var(--fs-sm);
  color: #fff;
  font-weight: 600;
  letter-spacing: .04em;
  margin-bottom: var(--sp-5);
  padding-bottom: var(--sp-3);
  border-bottom: 1px solid var(--line-invert);
}
.sitefoot__col li + li { margin-top: 11px; }
.sitefoot__col a { transition: color var(--t-fast), padding-left var(--t-fast); }
.sitefoot__col a:hover { color: #fff; padding-left: 4px; }

.sitefoot__bottom {
  border-top: 1px solid var(--line-invert);
  padding-block: var(--sp-6);
  display: flex;
  justify-content: space-between;
  gap: var(--sp-5);
  flex-wrap: wrap;
  font-size: var(--fs-xs);
}
.sitefoot__meta { display: flex; gap: var(--sp-5); flex-wrap: wrap; }
.sitefoot__bottom a:hover { color: #fff; }

@media (max-width: 1024px) {
  .sitefoot__top { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sitefoot__brand { grid-column: 1 / -1; }
}
@media (max-width: 620px) {
  .sitefoot__top { grid-template-columns: minmax(0, 1fr); }
}

/* --------------------------------------------------------------------------
   5. 侧边固定联系（B2B 惯例：随时可拨）
   -------------------------------------------------------------------------- */
.side-rail {
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 80;
  display: grid;
  gap: 1px;
  background: var(--line-invert);
  border: 1px solid var(--line-invert);
  box-shadow: var(--shadow-md);
}
.side-rail__item {
  width: 58px;
  padding: 13px 6px;
  background: var(--c-800);
  color: var(--on-invert);
  display: grid;
  justify-items: center;
  gap: 6px;
  font-size: var(--fs-2xs);
  text-align: center;
  transition: background var(--t-fast), color var(--t-fast);
}
.side-rail__item:hover { background: var(--temper); color: #fff; }
.side-rail__item svg { width: 19px; height: 19px; }
.side-rail__item--top { background: var(--c-700); }
.side-rail__item--top svg { transition: transform var(--t-base) var(--ease-out-quart); }
.side-rail__item--top:hover svg { transform: translateY(-3px); }
@media (max-width: 1100px) { .side-rail { display: none; } }

/* 返回顶部按钮 */
.to-top {
  position: fixed;
  right: 22px; bottom: 22px;
  width: 44px; height: 44px;
  display: grid; place-items: center;
  background: var(--c-900);
  color: #fff;
  box-shadow: var(--shadow-md);
  opacity: 0; visibility: hidden;
  transform: translateY(8px);
  transition: opacity var(--t-base), visibility var(--t-base),
              transform var(--t-base) var(--ease-out-quart), background var(--t-fast);
  z-index: 85;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--temper); }
.to-top svg { width: 17px; height: 17px; }
@media (max-width: 1100px) { .to-top { right: 16px; bottom: 16px; } }
