/* ==========================================================================
   Nanobytech 模板结构性移植层（2026-11-28 全站 UI 复刻）
   在 style.css 之后加载：导航栏 / 首屏图片轮播 / 计数器带 / 卡片 / 内页头 / 页脚纹理 / CTA 动画
   ========================================================================== */

/* ---------- 跨页跳转平滑过渡：消除导航点击时的白屏闪动 ---------- */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .18s; }
@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}
/* 预渲染底层色与页面深色顶部一致，避免不支持 View Transitions 的浏览器出现白闪 */
html { background: #0a0a0a; }

/* ---------- 导航栏：深色 Banner 上透明，滚动后固定白底 ---------- */
.site-header.on-hero {
  position: absolute; top: 0; left: 0; right: 0; z-index: 60;
  background: transparent; border-bottom: 1px solid rgba(255, 255, 255, .12);
  backdrop-filter: none; box-shadow: none;
}
.site-header.on-hero .nav-links a { color: rgba(255, 255, 255, .82); }
.site-header.on-hero .nav-links a:hover,
.site-header.on-hero .nav-links a.active { color: #fff; background: rgba(255, 255, 255, .12); }
.site-header.on-hero .brand-text b { color: #fff; }
.site-header.on-hero .brand-text span { color: rgba(255, 255, 255, .55); }
.site-header.on-hero .nav-toggle { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .25); color: #fff; }
.site-header.on-hero .btn-ghost { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .3); color: #fff; }
.site-header.on-hero .btn-ghost:hover { background: rgba(255, 255, 255, .2); border-color: rgba(255, 255, 255, .45); color: #fff; }
.site-header.on-hero .user-btn { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .3); }
.site-header.on-hero .user-btn:hover { background: rgba(255, 255, 255, .2); }
.site-header.on-hero .user-name { color: rgba(255, 255, 255, .85); }

.site-header.fix {
  position: fixed; top: 0; left: 0; right: 0;
  background: rgba(255, 255, 255, .96) !important;
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 10px 30px -18px rgba(2, 21, 51, .35);
  animation: nanoSlideDown .3s ease;
}
@keyframes nanoSlideDown { from { transform: translateY(-100%); } to { transform: translateY(0); } }
.site-header.fix .nav-links a { color: var(--slate-600); }
.site-header.fix .nav-links a:hover, .site-header.fix .nav-links a.active { color: var(--blue-600); background: var(--blue-50); }
.site-header.fix .brand-text b { color: var(--ink); }
.site-header.fix .brand-text span { color: var(--muted); }
.site-header.fix .nav-toggle { background: #fff; border-color: var(--line); color: var(--slate-700); }
.site-header.fix .btn-ghost { background: #fff; border-color: var(--line-strong); color: var(--slate-700); }
.site-header.fix .user-btn { background: #fff; border-color: var(--line-strong); }
.site-header.fix .user-name { color: var(--slate-700); }

/* ---------- 首屏：图片轮播 Banner（模板 slide-1/2/3 + 暗遮罩 + 形状装饰） ---------- */
.hero { padding: 0; }
/* 首屏仅保留文案：单列布局，留出背景图视野 */
.hero .hero-grid { grid-template-columns: 1fr; padding: 128px 0 84px; }
.hero .hero-copy { max-width: 660px; }
.hero-slides { position: absolute; inset: 0; overflow: hidden; }
.hero-slide {
  position: absolute; inset: 0;
  background: center top / cover no-repeat;
  opacity: 0; transform: scale(1.04);
  transition: opacity 1.1s ease, transform 6.5s ease-out;
}
.hero-slide.active { opacity: 1; transform: scale(1); }
.hero-slide::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(170deg, rgba(10, 10, 10, .52) 0%, rgba(2, 21, 51, .36) 55%, rgba(10, 10, 10, .26) 100%);
}
.hero .wrap { position: relative; z-index: 2; }
.hero::after { display: none; } /* 网格纹理让位给真实图片 */

/* ---------- OPC 名录：模板 FEATURES CASE（居中标题 + 横向滚动条带） ---------- */
.nano-team { background: var(--bg); }
/* 居中标题 + 蓝色渐变下划线（模板 case-study 头） */
.section-head.center { flex-direction: column; align-items: center; text-align: center; margin-bottom: 30px; }
.section-head.center h2 { position: relative; padding-bottom: 14px; }
.section-head.center h2::after {
  content: ''; position: absolute; left: 50%; bottom: 0; transform: translateX(-50%);
  width: 150px; height: 3px; border-radius: 2px;
  background: linear-gradient(90deg, rgba(58, 112, 200, 0), var(--blue-600), rgba(58, 112, 200, 0));
}
/* 横向自动轮播：宽度与内容区一致（.wrap），一屏 4 卡；双份内容无缝循环，悬停暂停 */
.team-scroll {
  overflow: hidden;
  padding: 6px 0 18px;
}
.team-track {
  display: flex; gap: 20px; width: max-content;
  animation: teamMarquee 42s linear infinite;
}
.team-scroll:hover .team-track { animation-play-state: paused; }
@keyframes teamMarquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .team-track { animation: none; }
}
/* 4×268 + 3×20 间距 = 1132 = .wrap 内宽，恰好露出 4 张 */
.team-scroll .team-card { flex: 0 0 268px; scroll-snap-align: start; }
/* 固定尺寸：卡片高度恒定，内容溢出隐藏（2026-12-03） */
.team-card { padding: 0 !important; overflow: hidden; height: 420px; display: flex; flex-direction: column; }
.team-photo {
  height: 250px; overflow: hidden; background: var(--blue-50); flex: none;
}
.team-photo img {
  width: 100%; height: 100%; object-fit: cover; object-position: center top;
  transition: transform .5s ease; display: block;
}
.team-card:hover .team-photo img { transform: scale(1.04); }
.team-info { padding: 16px 18px 0; text-align: center; min-width: 0; }
.team-info b { display: block; font-size: 16.5px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.team-info span { display: block; margin-top: 3px; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.team-card .chips { justify-content: center; padding: 10px 18px 0; flex: 1; overflow: hidden; align-content: flex-start; }
.team-meta {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  margin-top: auto; padding: 12px 18px 16px; border-top: 1px dashed var(--line);
  font-size: 12px; color: var(--muted); flex: none;
}

/* ---------- Banner 底部压卡：白卡 + 蓝色异形圆弧图标（模板 about-card-section） ---------- */
.nano-cards { position: relative; z-index: 3; }
.nano-cards-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
  margin-top: -28px;
}
.nano-card {
  background: #fff; border: 1px solid var(--line); border-radius: 16px;
  padding: 30px 20px 26px; text-align: center;
  box-shadow: 0 24px 56px -32px rgba(2, 21, 51, .45);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.nano-card:hover {
  transform: translate(-3px, -3px);
  border-color: var(--blue-600);
  box-shadow: 6px 6px 20px rgba(2, 21, 51, .16);
}
/* 模板标志性的异形圆弧（blob）图标底 */
.nano-blob {
  width: 92px; height: 92px; margin: 0 auto 16px;
  display: grid; place-items: center;
  background: var(--blue-600);
  border-radius: 22% 78% 70% 30% / 29% 59% 41% 71%;
  color: #fff;
  box-shadow: 0 14px 30px -14px rgba(29, 71, 207, .65);
}
.nano-blob svg { width: 38px; height: 38px; }
.nano-card b { display: block; font-size: 34px; line-height: 1.15; color: var(--ink); letter-spacing: -.02em; }
.nano-card b em { font-style: normal; font-size: 20px; color: var(--blue-600); margin-left: 2px; }
.nano-card > span:last-child { display: block; margin-top: 6px; font-size: 13.5px; color: var(--muted); }

/* ---------- 卡片：模板 process-card 悬停位移语言 ---------- */
.card:hover {
  transform: translate(-3px, -3px);
  border-color: var(--blue-600);
  box-shadow: 6px 6px 20px rgba(2, 21, 51, .16);
}
.step:hover {
  transform: translate(-3px, -3px);
  border-color: var(--blue-600);
  box-shadow: 6px 6px 20px rgba(2, 21, 51, .16);
}

/* 任务卡：需求发布不带图片，保持纯信息卡（不做图片头带） */

/* OPC 卡：头像圆底强调 */
.opc-card .avatar { border-radius: 50%; }

/* 八步流程：process 图标底图 */
.step .ic img { object-fit: contain; }

/* ---------- 首页板块分隔线：通栏细线 + 品牌蓝菱形 ---------- */
.nano-divider {
  max-width: var(--max); margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center;
}
.nano-divider em { flex: 1; height: 1px; background: #dce6f0; }
.nano-divider i {
  width: 6px; height: 6px; background: var(--blue-600, #3a70c8);
  transform: rotate(45deg); margin: 0 10px; flex: none;
}

/* ---------- 内页头：深色图片 Banner + 白字（模板内页语言） ---------- */
.page-head {
  position: relative; overflow: hidden;
  background:
    linear-gradient(170deg, rgba(10, 10, 10, .88) 0%, rgba(2, 21, 51, .8) 100%),
    url("../assets/nano/map-1.webp") center / cover no-repeat;
  padding: 92px 0 34px;
  /* 统一内页头高度：描述文字行数不同不再造成横幅高度不一 */
  min-height: 230px;
  display: flex; align-items: flex-end;
}
.page-head > .wrap { flex: 1 1 auto; width: 100%; }
.page-head h1 { color: #fff; }
/* 标题下描述固定一行显示，保证各内页横幅文字高度一致；过长以省略号截断 */
.page-head p {
  color: rgba(255, 255, 255, .74);
  max-width: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.page-head .head-row > div { min-width: 0; flex: 1 1 auto; }
.page-head .tag, .page-head .eyebrow { color: #9dc3f5 !important; background: rgba(255, 255, 255, .08) !important; border-color: rgba(255, 255, 255, .22) !important; }
.page-head .head-row { position: relative; z-index: 1; }

/* 移动端展开菜单：透明导航下菜单面板必须回到白底深字 */
.site-header.on-hero .nav-links.open a { color: var(--slate-600); background: transparent; }
.site-header.on-hero .nav-links.open a:hover, .site-header.on-hero .nav-links.open a.active { color: var(--blue-600); background: var(--blue-50); }

/* ---------- CTA：动画渐变（模板 animated-gradient） ---------- */
.cta-band {
  background: linear-gradient(270deg, #3a70c8, #5f9cff, #1d47cf);
  background-size: 300% 300%;
  animation: nanoGradientMove 6s ease infinite;
}
@keyframes nanoGradientMove {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ---------- 页脚：深蓝夜幕 + 地图纹理（模板 footer-section） ---------- */
.site-footer {
  background:
    linear-gradient(to top, rgba(17, 26, 58, .96), rgba(17, 26, 58, .96)),
    url("../assets/nano/map-1.webp") no-repeat center / cover;
}

/* ---------- 响应式 ---------- */
@media (max-width: 860px) {
  .nano-cards-grid { grid-template-columns: repeat(2, 1fr); margin-top: -20px; }
  .nano-card b { font-size: 28px; }
  .team-scroll .team-card { flex-basis: 236px; }
  .team-photo { height: 210px; }
  /* 窄屏下横幅描述恢复换行，避免省略号截断过多内容 */
  .page-head p { white-space: normal; }
}
@media (max-width: 640px) {
  .page-head { padding: 84px 0 26px; }
  .nano-cards-grid { grid-template-columns: 1fr; margin-top: -16px; }
  .team-scroll { padding: 6px 0 14px; gap: 14px; }
  .team-scroll .team-card { flex-basis: 224px; }
}
