/* =========================================================
   昶莱（上海）科技有限公司 - 布局组件 layout.css
   导航、抽屉、Hero、内页Banner、页脚、返回顶部
   ========================================================= */

/* ================= 顶部导航 ================= */
.site-header {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 500;
  background: transparent;
  transition: all var(--transition-base);
}
.site-header.is-fixed {
  position: fixed;
  top: 0; left: 0; right: 0;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 4px 20px rgba(15, 61, 125, 0.10);
}
.site-header.is-fixed .header-inner {
  padding: 10px 0;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
  transition: padding var(--transition-base);
}

/* Logo / Brand */
.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  line-height: 1.15;
  color: var(--color-white);
  transition: color var(--transition-base);
}
.brand-logo__mark {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: var(--color-accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-white);
  font-weight: 900;
  font-size: 18px;
  letter-spacing: -1px;
  box-shadow: 0 6px 16px rgba(255, 138, 0, 0.32);
  flex-shrink: 0;
  overflow: hidden;
}
.brand-logo__img {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  display: block;
}
.brand-logo__text-cn {
  font-size: 20px;
  display: block;
}
.brand-logo__text-en {
  font-size: 11px;
  letter-spacing: 2px;
  opacity: .85;
  text-transform: uppercase;
  font-weight: 500;
}
/* 固定态/内页时 logo 反色 */
.site-header.is-fixed .brand-logo,
body:not(.is-home) .site-header .brand-logo {
  color: var(--color-primary-dark);
}
body:not(.is-home) .site-header {
  position: relative;
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border-soft);
}

/* 导航菜单 */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
  margin: 0; padding: 0;
}
.nav-menu__link {
  display: inline-flex;
  align-items: center;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  color: var(--color-white);
  position: relative;
  transition: all var(--transition-base);
}
.nav-menu__link::after {
  content: "";
  position: absolute;
  left: 50%; bottom: 2px;
  transform: translateX(-50%);
  width: 0; height: 2px;
  background: var(--color-accent);
  border-radius: 2px;
  transition: width var(--transition-base);
}
.nav-menu__link:hover { color: var(--color-accent-light); }
.nav-menu__link:hover::after { width: 28px; }
.nav-menu__link.is-active { color: var(--color-white); }
.nav-menu__link.is-active::after { width: 28px; background: var(--color-accent-gradient); }

.site-header.is-fixed .nav-menu__link,
body:not(.is-home) .site-header .nav-menu__link {
  color: var(--color-text);
}
.site-header.is-fixed .nav-menu__link:hover,
body:not(.is-home) .site-header .nav-menu__link:hover {
  color: var(--color-primary);
}
.site-header.is-fixed .nav-menu__link.is-active,
body:not(.is-home) .site-header .nav-menu__link.is-active {
  color: var(--color-primary);
  background: rgba(15, 61, 125, 0.06);
}

/* 汉堡按钮（桌面隐藏） */
.hamburger {
  display: none;
  width: 42px; height: 42px;
  border-radius: 10px;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  line-height: 1;
  color: var(--color-white);
  background: rgba(255, 255, 255, 0.1);
  transition: all var(--transition-base);
}
.site-header.is-fixed .hamburger,
body:not(.is-home) .site-header .hamburger {
  color: var(--color-primary-dark);
  background: rgba(15, 61, 125, 0.07);
}
.hamburger:hover { background: rgba(255, 255, 255, 0.22); }
.site-header.is-fixed .hamburger:hover,
body:not(.is-home) .site-header .hamburger:hover {
  background: rgba(15, 61, 125, 0.14);
}

/* 移动端抽屉遮罩 */
.mobile-drawer-mask {
  position: fixed;
  inset: 0;
  background: rgba(10, 20, 40, 0.55);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
}
.mobile-drawer-mask.is-show { opacity: 1; visibility: visible; }

/* 移动端抽屉 */
.mobile-drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: 82%;
  max-width: 340px;
  background: var(--color-white);
  z-index: 999;
  transform: translateX(100%);
  transition: transform .3s cubic-bezier(.4,0,.2,1);
  display: flex;
  flex-direction: column;
  padding: 20px;
  box-shadow: -12px 0 40px rgba(10, 20, 40, 0.18);
}
.mobile-drawer.is-open { transform: translateX(0); }
.mobile-drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0 18px;
  border-bottom: 1px solid var(--color-border-soft);
  margin-bottom: 10px;
}
.mobile-drawer__close {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  background: var(--color-bg-alt);
  color: var(--color-primary-dark);
  transition: all var(--transition-base);
}
.mobile-drawer__close:hover { background: rgba(15, 61, 125, 0.1); }
.mobile-drawer__menu {
  list-style: none;
  padding: 0; margin: 0;
  flex: 1;
  overflow-y: auto;
}
.mobile-drawer__menu li { border-bottom: 1px solid var(--color-border-soft); }
.mobile-drawer__menu a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 4px;
  font-size: 16px;
  font-weight: 500;
  color: var(--color-text);
}
.mobile-drawer__menu a::after { content: "›"; color: var(--color-text-light); font-size: 20px; line-height: 1; }
.mobile-drawer__menu a.is-active { color: var(--color-primary); }
.mobile-drawer__menu a.is-active::after { color: var(--color-accent); }
.mobile-drawer__cta {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--color-border-soft);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.mobile-drawer__phone {
  font-size: 14px;
  color: var(--color-text-soft);
  text-align: center;
  padding: 10px 0;
}
.mobile-drawer__phone b {
  display: block;
  color: var(--color-accent);
  font-size: 20px;
  font-weight: 800;
  margin-top: 4px;
  letter-spacing: .5px;
}

/* ================= Hero Banner ================= */
.hero {
  position: relative;
  height: 100vh;
  min-height: 560px;
  max-height: 820px;
  overflow: hidden;
  display: flex;
  align-items: center;
  color: var(--color-white);
  background: var(--color-primary-dark);
}
.hero__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1s ease;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.hero__slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(10, 28, 60, 0.82) 0%, rgba(10, 28, 60, 0.45) 50%, rgba(10, 28, 60, 0.2) 100%);
}
.hero__slide.is-active { opacity: 1; z-index: 1; }
.hero__content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 720px;
  padding-top: 40px;
}
.hero__tag {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(6px);
  font-size: 13px;
  letter-spacing: 2px;
  color: #ffe9cc;
  margin-bottom: 22px;
  border: 1px solid rgba(255, 138, 0, 0.5);
}
.hero__title {
  font-size: 54px;
  font-weight: 800;
  line-height: 1.2;
  color: var(--color-white);
  margin: 0 0 20px;
  letter-spacing: 1px;
}
.hero__title em {
  font-style: normal;
  background: linear-gradient(90deg, #ffae33 0%, #ffdd99 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero__subtitle {
  font-size: 17px;
  line-height: 1.9;
  color: rgba(255, 255, 255, 0.88);
  margin: 0 0 38px;
  max-width: 600px;
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
.hero__dots {
  position: absolute;
  left: 50%; bottom: 36px;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  gap: 10px;
}
.hero__dot {
  width: 10px; height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.4);
  transition: all var(--transition-base);
  cursor: pointer;
}
.hero__dot.is-active { width: 28px; background: var(--color-accent-gradient); }
.hero__scroll-hint {
  position: absolute;
  right: 36px; bottom: 32px;
  z-index: 3;
  color: rgba(255, 255, 255, 0.7);
  font-size: 12px;
  letter-spacing: 2px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  writing-mode: vertical-rl;
  text-orientation: mixed;
}
.hero__scroll-hint::after {
  content: "";
  width: 1px; height: 48px;
  background: linear-gradient(180deg, rgba(255,255,255,.7), transparent);
  animation: scrollLine 1.8s ease-in-out infinite;
}
@keyframes scrollLine {
  0%, 100% { transform: scaleY(.6); transform-origin: top; opacity: .5; }
  50% { transform: scaleY(1); opacity: 1; }
}

/* ================= 内页 Banner ================= */
.page-banner {
  position: relative;
  padding: 120px 0 80px;
  background:
    linear-gradient(135deg, rgba(10, 45, 93, 0.92) 0%, rgba(15, 61, 125, 0.82) 100%),
    center/cover no-repeat;
  background-color: var(--color-primary-dark);
  color: var(--color-white);
  overflow: hidden;
}
.page-banner::before, .page-banner::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  filter: blur(50px);
  opacity: .45;
}
.page-banner::before {
  width: 380px; height: 380px;
  background: #1e5aa5;
  right: -80px; top: -100px;
}
.page-banner::after {
  width: 260px; height: 260px;
  background: var(--color-accent);
  left: -60px; bottom: -80px;
}
.page-banner__inner {
  position: relative;
  z-index: 1;
}
.page-banner__crumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  margin-bottom: 18px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.82);
}
.page-banner__crumb a { color: rgba(255, 255, 255, 0.82); }
.page-banner__crumb a:hover { color: var(--color-accent-light); }
.page-banner__crumb .sep { opacity: .6; }
.page-banner__crumb .current { color: var(--color-accent-light); }
.page-banner__title {
  font-size: 42px;
  color: var(--color-white);
  margin: 0 0 12px;
  font-weight: 800;
  letter-spacing: 2px;
}
.page-banner__en {
  font-size: 14px;
  letter-spacing: 4px;
  color: rgba(255, 255, 255, 0.75);
  text-transform: uppercase;
  margin-bottom: 0;
}

/* ================= 页脚 ================= */
.site-footer {
  background: #0a1e3e;
  color: rgba(255, 255, 255, 0.78);
  padding-top: 72px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.2fr 1.2fr;
  gap: 42px;
  padding-bottom: 44px;
}
.footer-col__title {
  color: var(--color-white);
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 22px;
  padding-bottom: 14px;
  position: relative;
}
.footer-col__title::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 32px; height: 2.5px;
  background: var(--color-accent-gradient);
  border-radius: 3px;
}
.footer-col ul {
  list-style: none;
  padding: 0; margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-col ul a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  transition: all var(--transition-base);
  display: inline-block;
  position: relative;
  padding-left: 0;
}
.footer-col ul a::before {
  content: "›";
  margin-right: 6px;
  color: var(--color-accent);
  transition: margin var(--transition-base);
  display: inline-block;
}
.footer-col ul a:hover {
  color: var(--color-accent-light);
  padding-left: 4px;
}
.footer-brand .brand-logo { margin-bottom: 18px; }
.footer-brand .tagline {
  font-size: 14px;
  line-height: 1.9;
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: 20px;
}
.footer-contact__item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 9px 0;
  font-size: 14px;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.7);
}
.footer-contact__item .ic {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--color-accent-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
  margin-top: 2px;
}
.footer-contact__item b { color: var(--color-white); font-weight: 600; }

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 20px 0;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
}
.footer-bottom .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-bottom a { color: rgba(255, 255, 255, 0.55); }
.footer-bottom a:hover { color: var(--color-accent-light); }

/* ================= 返回顶部 ================= */
.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 32px;
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--color-primary-gradient);
  color: var(--color-white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  line-height: 1;
  box-shadow: 0 10px 28px rgba(15, 61, 125, 0.35);
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px);
  transition: all var(--transition-base);
  z-index: 400;
}
.back-to-top:hover {
  background: var(--color-accent-gradient);
  color: var(--color-white);
  transform: translateY(-4px);
}
.back-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* ================= 响应式：导航与抽屉 ================= */
@media (max-width: 991px) {
  .hero__title { font-size: 42px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .page-banner { padding: 80px 0 56px; }
  .page-banner__title { font-size: 34px; }
}
@media (max-width: 767px) {
  .nav-menu { display: none; }
  .hamburger { display: inline-flex; }
  .header-inner { padding: 16px 0; }
  .site-header.is-fixed .header-inner { padding: 10px 0; }

  .brand-logo__text-cn { font-size: 17px; }
  .brand-logo__text-en { display: none; }
  .brand-logo__mark { width: 34px; height: 34px; font-size: 16px; }
  .brand-logo__img { width: 36px; height: 36px; }

  .hero {
    min-height: 520px;
    max-height: none;
    height: auto;
    padding: 140px 0 100px;
  }
  .hero__title { font-size: 30px; letter-spacing: .5px; }
  .hero__subtitle { font-size: 15px; margin-bottom: 26px; }
  .hero__actions { flex-direction: column; align-items: flex-start; }
  .hero__actions .btn { width: 100%; max-width: 300px; }
  .hero__scroll-hint { display: none; }
  .hero__dots { bottom: 24px; }

  .page-banner { padding: 60px 0 42px; }
  .page-banner__title { font-size: 26px; letter-spacing: 1px; }
  .page-banner__en { font-size: 12px; letter-spacing: 3px; }
  .page-banner__crumb { font-size: 13px; }

  .site-footer { padding-top: 48px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; padding-bottom: 28px; }
  .footer-bottom .container { flex-direction: column; text-align: center; }

  .back-to-top { right: 14px; bottom: 18px; width: 42px; height: 42px; font-size: 18px; }
}

/* ================= 响应式：小高度屏幕下的 Hero 紧凑 ================= */
@media (max-height: 640px) {
  .hero { min-height: 480px; padding: 120px 0 80px; }
  .hero__title { font-size: 36px; }
  .hero__scroll-hint { display: none; }
}
