/* ============================================================
   首页 · 单屏 Hero（2026-10-19 改版）
   仅 index.html 引用，不影响 products / about / contact / en 页面
   ============================================================ */

/* 首屏标题行书字体：Zhi Mang Xing（志莽行书），SIL Open Font License 1.1
   —— 按标题用字子集化后自托管（assets/fonts/stune-xingkai.woff2，约 6KB），
   保证所有访客都能看到行书，不依赖对方电脑是否安装华文行楷。
   许可证全文：assets/fonts/OFL-ZhiMangXing.txt */
@font-face {
  font-family: "StuneXingkai";
  src: url("../fonts/stune-xingkai.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

.home-hero { background: #071320; }

/* ---------- 顶部导航：透明叠加在背景图上 ---------- */
.home-hero .header {
  position: absolute; top: 0; left: 0; right: 0;
  background: transparent;
  border-bottom: 0;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.home-hero .nav { height: 88px; }

.home-hero .logo {
  color: #fff; font-size: 22px; font-weight: 800; gap: 11px;
}
.home-hero .logo:hover { color: #fff; }
.home-hero .logo-mark {
  width: 40px; height: 40px; border-radius: 8px;
  background: #fff; padding: 3px; object-fit: contain;
}
.home-hero .logo-sub {
  color: rgba(255, 255, 255, .55);
  font-size: 10px; letter-spacing: .18em; margin-top: 2px;
}

.home-hero .nav-menu { gap: 4px; margin-left: auto; }
.home-hero .nav-actions { margin-left: 26px; }
.home-hero .nav-link {
  background: transparent;
  color: rgba(255, 255, 255, .78);
  font-weight: 500; font-size: 15px;
  padding: 9px 18px; border-radius: 0;
  letter-spacing: .05em;
}
.home-hero .nav-link:hover,
.home-hero .nav-link.is-active {
  background: transparent; color: #fff; box-shadow: none;
}
.home-hero .nav-link::after {
  display: block; left: 50%; bottom: 2px; width: 0; height: 1.5px;
  margin-left: 0; background: #fff; transition: width .25s ease, margin-left .25s ease;
}
.home-hero .nav-link:hover::after { width: 22px; margin-left: -11px; }
.home-hero .nav-link.is-active::after { width: 22px; margin-left: -11px; }

.home-hero .lang-switch {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, .30);
  color: #fff; padding: 7px 15px; border-radius: 999px;
}
.home-hero .lang-switch:hover {
  background: rgba(255, 255, 255, .14);
  border-color: rgba(255, 255, 255, .5);
  color: #fff; box-shadow: none;
}
.home-hero .nav-toggle span { background: #fff; }

/* ---------- Hero 主体 ---------- */
.hero-full {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  min-height: 100vh;
  min-height: 100svh;
  background: #071320;
}

/* 背景轮播：厂房外观 ↔ 无尘车间，每 6 秒淡入淡出切换（12 秒一轮，无缝循环） */
.hero-full__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 50%;
  background-repeat: no-repeat;
  filter: brightness(1.12) saturate(1.04);
  opacity: 0;
  animation-duration: 12s;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
  will-change: opacity;
}
.hero-full__bg--a {
  background-image: url('../img/company/building-hero.jpg');
  animation-name: heroFadeA;
}
.hero-full__bg--b {
  background-image: url('../img/company/hero-2.jpg');
  animation-name: heroFadeB;
}
@keyframes heroFadeA {
  0%   { opacity: 1; }
  45%  { opacity: 1; }
  55%  { opacity: 0; }
  95%  { opacity: 0; }
  100% { opacity: 1; }
}
@keyframes heroFadeB {
  0%   { opacity: 0; }
  45%  { opacity: 0; }
  55%  { opacity: 1; }
  95%  { opacity: 1; }
  100% { opacity: 0; }
}
/* 减少动画模式：固定显示第一张，避免背景全透明 */
@media (prefers-reduced-motion: reduce) {
  .hero-full__bg { opacity: 0 !important; }
  .hero-full__bg--a { opacity: 1 !important; }
}
@keyframes heroZoom {
  from { transform: scale(1.06); }
  to   { transform: scale(1); }
}

.hero-full__shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg,
      rgba(3, 12, 22, .62) 0%,
      rgba(3, 12, 22, .50) 30%,
      rgba(3, 12, 22, .20) 60%,
      rgba(3, 12, 22, .05) 100%),
    linear-gradient(180deg,
      rgba(3, 12, 22, .28) 0%,
      rgba(3, 12, 22, 0) 22%,
      rgba(3, 12, 22, 0) 74%,
      rgba(3, 12, 22, .28) 100%);
}

.hero-full__inner {
  position: relative;
  z-index: 2;
  padding-top: 88px;
}

.hero-full__title {
  margin: 0;
  color: #fff;
  /* 行书：自托管子集优先，其次本机华文行楷，最后退到楷体 */
  font-family: "StuneXingkai", "STXingkai", "华文行楷", "Xingkai SC",
               "STCaiyun", "华文彩云", "KaiTi", "楷体", cursive;
  font-size: clamp(34px, 5.9vw, 78px);
  font-weight: 400;          /* 行书无粗体，避免浏览器合成伪粗笔画 */
  line-height: 1.34;
  letter-spacing: .03em;
  text-shadow: 0 10px 38px rgba(0, 0, 0, .55);
  max-width: 17em;
}

.hero-full__tagline {
  margin: 24px 0 0;
  color: rgba(255, 255, 255, .90);
  font-size: clamp(15px, 1.85vw, 24px);
  font-weight: 400;
  line-height: 1.7;
  letter-spacing: .12em;
}

.hero-full__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 46px;
}

.hf-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 150px;
  padding: 15px 34px;
  /* 正楷体：调用本机楷体（Windows 楷体 / 华文楷体 / macOS 楷体-简） */
  font-family: "STKaiti", "华文楷体", "KaiTi", "楷体", "Kaiti SC", serif;
  font-size: 16px;
  font-weight: 400;
  letter-spacing: .1em;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: background .22s ease, color .22s ease, transform .22s ease, box-shadow .22s ease;
}
.hf-btn--primary {
  background: #0b5cd5; color: #fff;
  box-shadow: 0 10px 26px rgba(11, 92, 213, .35);
}
.hf-btn--primary:hover {
  background: #0a4fb8; color: #fff; transform: translateY(-2px);
}
.hf-btn--ghost {
  background: rgba(255, 255, 255, .10);
  border-color: rgba(255, 255, 255, .42); color: #fff;
}
.hf-btn--ghost:hover {
  background: rgba(255, 255, 255, .18); color: #fff; transform: translateY(-2px);
}

/* ---------- 标题书写动画：逐字由左至右“写”出来 ---------- */
.hero-full__title .ch {
  display: inline-block;
  opacity: 0;
  animation: chWrite .6s cubic-bezier(.25, .85, .3, 1) forwards;
  animation-delay: var(--d, 0s);
  will-change: opacity, transform, filter, clip-path;
}
@keyframes chWrite {
  0% {
    opacity: 0;
    clip-path: inset(0 100% 0 0);
    transform: translateY(12px) scale(1.04);
    filter: blur(5px);
  }
  40%  { opacity: 1; }
  100% {
    opacity: 1;
    clip-path: inset(0 -4% 0 0);
    transform: none;
    filter: blur(0);
  }
}
/* 行书里的「、」是全角字，笔迹只占左下角，后面会留出很大空白，
   收紧右间距，让整句读起来是一整行，而不是三段。
   -0.24em：既收掉多余空白，又不与后一个字挤在一起。 */
.hero-full__title .ch--punct { margin-right: -.24em; }

/* 兜底：动画被跳过/中断时，标题必须完整可见 */
.hero-full__title.ch-done .ch {
  animation: none;
  opacity: 1;
  clip-path: none;
  transform: none;
  filter: none;
}
/* 减少动态效果偏好：直接显示，不做逐字动画 */
@media (prefers-reduced-motion: reduce) {
  .hero-full__title .ch {
    animation: none;
    opacity: 1;
    clip-path: none;
    transform: none;
    filter: none;
  }
}

/* ---------- 中等屏幕：完整公司名自适应 ---------- */
@media (max-width: 1180px) {
  .home-hero .logo { font-size: 18px; gap: 9px; }
  .home-hero .nav-link { padding: 9px 12px; font-size: 14px; }
  .home-hero .lang-switch { padding: 7px 12px; }
}
@media (max-width: 980px) {
  .home-hero .logo { font-size: 16px; }
  .home-hero .logo-sub { display: none; }
}

/* ---------- 移动端 ---------- */
@media (max-width: 780px) {
  .home-hero .nav { height: 68px; }
  .home-hero .logo { font-size: 15px; gap: 8px; }
  .home-hero .logo-mark { width: 30px; height: 30px; }
  .home-hero .logo-sub { display: none; }
  .home-hero .lang-switch { padding: 6px 10px; font-size: 12px; }
  .home-hero .lang-switch svg { width: 12px; height: 12px; }

  .home-hero .nav-menu {
    background: #0a1728;
    border-bottom: 1px solid rgba(255, 255, 255, .12);
  }
  .home-hero .nav-menu .nav-link {
    color: rgba(255, 255, 255, .88);
    border-bottom: 1px solid rgba(255, 255, 255, .12);
    padding: 14px 18px; border-radius: 0;
  }
  .home-hero .nav-menu .nav-link:hover,
  .home-hero .nav-menu .nav-link.is-active { color: #fff; }
  .home-hero .nav-link::after,
  .home-hero .nav-link:hover::after,
  .home-hero .nav-link.is-active::after { display: none; }

  .hero-full { min-height: 92vh; min-height: 92svh; align-items: center; }
  .hero-full__bg { background-position: center center; }
  .hero-full__shade {
    background:
      linear-gradient(180deg,
        rgba(3, 12, 22, .66) 0%,
        rgba(3, 12, 22, .46) 46%,
        rgba(3, 12, 22, .62) 100%);
  }
  .hero-full__inner { padding-top: 68px; }
  .hero-full__title {
    /* 行书 14 字全角，按 14.5 字宽留余量，保证单行不溢出 */
    font-size: clamp(17px, calc((100vw - 48px) / 14.5), 28px);
    letter-spacing: .02em; line-height: 1.36;
    white-space: nowrap;
  }
  .hero-full__tagline {
    margin-top: 18px;
    font-size: 14px; letter-spacing: .10em; line-height: 1.8;
  }
  .hero-full__actions { margin-top: 32px; gap: 12px; }
  .hf-btn { flex: 1 1 140px; min-width: 0; padding: 13px 20px; font-size: 15px; letter-spacing: .06em; }
}

/* ---------- 超窄屏 ---------- */
@media (max-width: 400px) {
  .home-hero .logo { font-size: 14px; }
  .home-hero .lang-switch svg { display: none; }
}
@media (max-width: 340px) {
  .home-hero .logo { font-size: 13px; }
  .home-hero .lang-switch { display: none; }
}

/* ---------- 首屏以下的内容板块：白底深字 ---------- */
.home-hero .section { background: #fff; }
.home-hero #team { background: var(--bg-soft); }
