@font-face {
  font-family: "AlibabaHealthFont20CN";
  src: url("assets/AlibabaHealthFont20CN-85B.TTF") format("truetype");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}

/* 繁体中文备用字体（后续繁体文章 / 页面切换 zh-Hant 时自动生效） */
@font-face {
  font-family: "FanThinkGroteskSemibold";
  src: url("assets/Semibold.otf") format("opentype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --navy: #03479c;
  --navy-2: #123a8f;
  --gold: #c9a15a;
  --gold-dark: #a97f38;
  --ink: #17203a;
  --muted: #6b7280;
  --line: #e8eaf2;
  --bg: #ffffff;
  --bg-soft: #f5f7fa;
  --shadow: 0 18px 45px rgba(11, 31, 91, .10);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  color: var(--ink);
  background: var(--bg);
  font-family: "AlibabaHealthFont20CN", "Noto Sans SC", "Microsoft YaHei", "PingFang SC", sans-serif;
  line-height: 1.65;
}
/* 繁体中文（lang="zh-Hant"，含后续动态文章）自动切换为繁体字体 */
:lang(zh-Hant) {
  font-family: "FanThinkGroteskSemibold", "Noto Sans SC", "Microsoft JhengHei", "PingFang TC", sans-serif;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; border: 0; background: transparent; cursor: pointer; }
:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; border-radius: 4px; }
section[id], footer[id] { scroll-margin-top: 96px; }
.container { width: min(1400px, calc(100% - 32px)); margin-inline: auto; }

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(14px);
  box-shadow: 0 2px 20px rgba(11, 31, 91, .06);
  transition: box-shadow .25s ease, background-color .25s ease;
}
.site-header:hover { background: #ffffff; }
.site-header.scrolled {
  background: #ffffff;
  box-shadow: 0 2px 20px rgba(11, 31, 91, .06), 0 0 5px 5px rgba(0, 0, 0, 0.03);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 82px; }
.brand img { height: 70px; width: auto; object-fit: contain; }
.main-nav { display: flex; gap: clamp(18px, 4vw, 72px); }
.main-nav a { position: relative; font-size: 18px; font-weight: 500; padding: 28px 0; color: #333333; }
.main-nav a::after {
  content: ""; position: absolute; left: 50%; bottom: 18px; width: 0; height: 2px;
  background: var(--gold); transition: width .25s, left .25s;
}
.main-nav a:hover::after { left: 0; width: 100%; }
.header-tools { display: flex; align-items: center; gap: 16px; }
.header-tools .icon-btn { margin-top: 9px; }
.icon-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.lang-select {
  appearance: none;
  -webkit-appearance: none;
  font-family: inherit;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 28px 6px 14px;
  font-size: 12px;
  color: var(--muted);
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%2303479c' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  cursor: pointer;
}
.lang-select:hover { border-color: var(--gold); }

/* 汉堡菜单按钮（仅手机端显示） */
.nav-toggle {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: var(--navy);
  transition: transform .25s ease, opacity .25s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.hero { background: var(--navy); }
.carousel { position: relative; overflow: hidden; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.slides { display: grid; }
.slide { grid-area: 1 / 1; width: 100%; aspect-ratio: 1678 / 747; object-fit: cover; opacity: 0; transition: opacity .7s ease; -webkit-user-drag: none; }
.slide.active { opacity: 1; }
.slide:not(.active) { pointer-events: none; }
.dots { display: flex; justify-content: center; gap: 10px; padding: 18px; }
.hero .dots { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; }
.dots button {
  width: 9px; height: 9px; padding: 0; border: 0; border-radius: 50%;
  background: rgba(11, 31, 91, .25); transition: background .25s, width .25s, border-radius .25s;
}
.hero .dots button { background: rgba(255, 255, 255, .45); }
.dots button.active { width: 26px; border-radius: 10px; background: var(--navy); }
.hero .dots button.active { background: #ffffff; }

.section { padding: clamp(64px, 9vw, 110px) 0; }
h2 { font-size: clamp(28px, 4vw, 42px); line-height: 1.2; margin-top: 12px; color: var(--navy); }
.section-heading { max-width: 680px; margin-inline: auto; text-align: center; }
.section-heading p { margin-top: 12px; color: var(--muted); font-size: 20px; }
.text { color: #4c5568; margin-top: 18px; font-size: 20px; }
.button {
  display: inline-flex; align-items: center; justify-content: center; min-width: 148px;
  padding: 7px 28px; border-radius: 999px; font-weight: 600; letter-spacing: .08em; transition: all .25s;
}
.button.gold {
  color: #fff; background: linear-gradient(120deg, #d6b273, var(--gold)); box-shadow: 0 12px 25px rgba(201, 161, 90, .28); }
.button.gold:hover { transform: translateY(-2px); box-shadow: 0 15px 30px rgba(201, 161, 90, .35); }

/* 品牌介绍区块配色 */
.brand-section { background: #fff; }
.brand-section h2 { color: #004798; }
.brand-section .text { color: #656565; }
/* 品牌介绍主文案 黑蓝黑 左右渐变 */
.brand-section .text-gradient {
  background: linear-gradient(90deg, #003788, #417bcf, #003788);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  font-weight: 600;
}
.brand-section .button.gold,
.gift-section .button.gold,
.science-section .button.gold {
  color: #004798;
  background: transparent;
  border: 1px solid #004798;
  box-shadow: 0 0 5px 5px rgba(0, 0, 0, 0.05);
}
.brand-section .button.gold:hover,
.gift-section .button.gold:hover,
.science-section .button.gold:hover {
  color: #fff;
  background: #004798;
  box-shadow: 0 0 5px 5px rgba(0, 0, 0, 0.05);
}

.split { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: clamp(36px, 6vw, 78px); }
.split-media { border-radius: 24px; overflow: hidden; box-shadow: var(--shadow); }
.split-media img { width: 100%; height: min(540px, 100%); object-fit: cover; }
.split-content .button { margin-top: 30px; }
.split.reverse .split-media { order: 0; }
.brand-section .split-media,
.science-section .split-media { border-radius: 0; box-shadow: none; }

.concept-section, .ingredients-section, .stories-section { background: var(--bg-soft); }
/* 告别概念抗衰：固定背景图（随页面滚动而固定，自适应屏幕不变形） */
.concept-section {
  position: relative;
  background: transparent;
}
.concept-section::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: url("assets/design-reference.jpg") no-repeat;
  background-size: 100%;
}
/* 告别概念抗衰：前景装饰点缀 */
.concept-section .decor {
  position: absolute;
  z-index: 1;
  pointer-events: none;
  object-fit: contain;
}
.concept-section .decor-bubble { bottom: 140px; right: 4%;width: clamp(70px, 8vw, 120px); }
.concept-section .decor-molecule { top: 148px; left: 8%;  width: clamp(180px, 24vw, 320px); }

.concept-section .decor-bubble1 { top: 648px; left: 6%;width: clamp(70px, 8vw, 120px); }
.concept-section .decor-molecule2 {  bottom: 500px; right: 4%; width: clamp(180px, 24vw, 320px); }

.concept-grid { display: grid; grid-template-columns: 1fr; gap: 28px; margin-top: 48px; }
.concept-card { position: relative; z-index: 2; overflow: hidden; background: #fff; border-radius: 24px; box-shadow: var(--shadow); }
.concept-media { position: relative; }
.concept-media img { width: 100%; height: auto; display: block; }
/* 产品图左上角“查看详情”按钮（沿用站内蓝色按钮样式） */
.product-detail-btn {
  position: absolute;
  top: 30px;
  left: 30px;
  z-index: 3;
  min-width: 0;
  padding: 10px 24px;
  font-size: 18px;
  color: #004798;
  background: #ffffff;
  box-shadow: 0 0 5px 5px rgba(0, 0, 0, 0.05);
}
.product-detail-btn:hover {
  color: #fff;
  background: #004798;
  box-shadow: 0 0 5px 5px rgba(0, 0, 0, 0.05);
}

.feature-list { list-style: none; margin-top: 28px; display: grid; gap: 24px; }
.feature-list li { display: flex; align-items: center; gap: 18px; padding: 5px 0; background: #fff; }
.feature-list img { width: 65px; height: 65px; flex: 0 0 auto; object-fit: contain; }
.feature-list strong { display: block; font-size: 18px; color: #333333; }
.feature-list span { display: block; margin-top: 4px; color: var(--muted); }
.science-section { background: #ffffff; }
.science-section .button { margin-top: 34px; }

.ingredients-section { background: #f7f7f7; }
.ingredient-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin-top: 52px; }
.ingredient-grid article { padding: 38px 22px; text-align: center; background: #fff; border-radius: 22px; box-shadow: 0 10px 30px rgba(11, 31, 91, .06); transition: transform .3s; }
.ingredient-grid article:hover { transform: translateY(-8px); }
.ingredient-grid img { width: 76px; height: 76px; margin: 0 auto 22px; object-fit: contain; }
.ingredient-grid h3 { color: #c4a04c; font-size: 18px; }
.ingredient-tag { font-family: "Microsoft YaHei", "PingFang SC", sans-serif; font-weight: 300; }
.ingredient-grid p { margin-top: 8px; color: var(--muted); text-align: left;font-size: 16px; }

.stories-section { background: #ffffff; }
.story-track {
  display: flex;
  overflow-x: auto;
  gap: 0;
  margin-top: 30px;
  padding-bottom: 14px;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  touch-action: pan-x;
}
.story-track.dragging { cursor: grabbing; }
.story-track img { -webkit-user-drag: none; }
/* 隐藏滚动条 */
.story-track { scrollbar-width: none; }
.story-track::-webkit-scrollbar { display: none; }
/* 每页 3 人，页与页之间整页滑动 */
.story-page {
  flex: 0 0 100%;
  display: flex;
}
/* 人物卡片：无块状背景，用竖线分割 */
.story-card {
  flex: 1;
  padding: 10px 26px;
  text-align: center;
  background: transparent;
  border-right: 1px solid var(--line);
}
.story-page .story-card:last-child { border-right: none; }
@media (max-width: 768px) {
  /* 窄屏：每屏只展示一位用户，左右滑动切换。
     .story-page 用 display:contents 抹掉分组盒，让卡片直接成为轮播项 */
  .story-page { display: contents; }
  .story-card {
    flex: 0 0 100%;
    border-right: none;
    padding: 20px 8px;
  }
  .story-card p { min-height: 0; text-align: center; }
}
.story-card img { width: 78px; height: 78px; margin: 20px auto 16px; border-radius: 50%; object-fit: cover; }
.story-card p { margin: 0 0 6px; color: #555f73; font-size: 16px; text-align: left; min-height: 100px; padding: 0 25px; }
.story-card h3 { font-size: 19px; color: #333333; }
.story-card span { color: #666666; font-size: 14px; }
.story-carousel .dots { padding-top: 28px; }

.gift-section { background: #f7f7f7; }
.gift-section .split { grid-template-columns: 1fr 1.8fr; }
.gift-section .split-media { background: transparent; border-radius: 0; box-shadow: none; }
.gift-section .split-media img { height: min(760px, 100%); padding: 0; }
.gift-section img { object-fit: contain; padding: 20px; }

.site-footer { color: #fff; background: linear-gradient(30deg, #081742, #2367bc, #081742); }
.footer-grid { display: grid; grid-template-columns: 1fr repeat(5, auto); gap: 70px; padding: 68px 0 52px; }
.footer-brand img { width: 200px; object-fit: contain; }
.footer-brand p { margin: 20px 0 24px; color: #aab4d2; }
.footer-brand strong { color: #fff; font-size: 18px; }
.site-footer h4 { font-size: 17px; margin-bottom: 20px; }
.site-footer nav a { display: block; margin-bottom: 20px; color: #aab4d2; }
.site-footer nav h4 a { display: inline; margin: 0; color: #fff; }
.site-footer nav a:hover { color: var(--gold); }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .12); padding: 22px 0; font-size: 13px; color: #909cb8; }

/* 页脚可收起栏目（手风琴）开关按钮：桌面端隐藏，仅移动端显示 */
.footer-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  margin-left: 14px;
  border-radius: 50%;
  color: #fff;
}
.footer-toggle svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.footer-toggle .footer-toggle-v {
  transition: transform .25s ease, opacity .2s ease;
}
.footer-toggle:hover { color: var(--gold); }
/* 收起状态显示“＋”（横线+竖线）；展开时竖线收起成“－” */
.footer-toggle[aria-expanded="true"] .footer-toggle-v {
  transform: scaleY(0);
  opacity: 0;
}

@media (max-width: 960px) {
  .header-inner { height: auto; padding: 14px 0; flex-wrap: wrap; }
  .nav-toggle { display: inline-flex; }
  /* 导航收起为顶部下拉面板 */
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: rgba(255, 255, 255, .98);
    backdrop-filter: blur(14px);
    box-shadow: 0 18px 30px rgba(11, 31, 91, .10);
    padding: 8px 0 12px;
  }
  .main-nav.open { display: flex; animation: navDrop .28s ease; }
  .main-nav a { display: block; padding: 14px 24px; font-size: 16px; }
  .main-nav a:hover { background: var(--bg-soft); }
  .main-nav a::after { display: none; }
  @keyframes navDrop {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: none; }
  }
  .split, .concept-grid { grid-template-columns: 1fr; }
  .split.reverse .split-media { order: 1; }
  .feature-list { grid-template-columns: 1fr; }
  .ingredient-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 560px) {
  .container { width: calc(100% - 32px); }
  .brand img { height: 40px; }
  .header-tools { margin-left: auto; }
  .ingredient-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  /* 页脚单列时，把 logo + 联系方式移到菜单下方 */
  .footer-brand { order: 99; margin-top: 22px; }
  /* 轮播图按 100% 宽度整幅显示（恢复横幅图原始比例，不再 4:3 裁切） */
  .slide { aspect-ratio: 1678 / 747; }
}

/* ---- 工具类（原内联样式迁移至此） ---- */
.btn-arrow { padding-left: 10px; font-weight: bold; }
.text-lead { padding-top: 30px; }
.text-sm { font-size: 16px; color: #666666; }
.split-gap { margin-top: 50px; }
.footer-contact { margin-top: 10px;display: flex;align-items: center;font-family: "Microsoft YaHei", "PingFang SC", sans-serif; font-weight: 300; }
.footer-contact img{height: 20px;width: 20px;margin-right: 10px;}
.split-content .button-gap-large { margin: 150px 0 80px 0; }
.split-content .button-gap { margin: 100px 0 50px 0; }

/* ---- 首次进入动效：首屏入场 ---- */
.site-header { animation: slideInDown .7s cubic-bezier(.22, .61, .36, 1) both; }
.hero .slide.active { animation: heroEnter 1.2s cubic-bezier(.22, .61, .36, 1) both; }
.hero .dots { animation: fadeIn .8s ease .45s both; }

@keyframes slideInDown {
  from { opacity: 0; transform: translateY(-26px); }
  to   { opacity: 1; transform: none; }
}
@keyframes heroEnter {
  from { opacity: 0; transform: scale(1.06); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ---- 首次进入动效：滚动到视口时显现（需 JS 在 <html> 上加 js-anim 类） ---- */
html.js-anim [data-reveal] {
  opacity: 0;
  transform: translateY(42px);
  transition: opacity .8s cubic-bezier(.22, .61, .36, 1),
              transform .8s cubic-bezier(.22, .61, .36, 1);
}
html.js-anim [data-reveal="left"]  { transform: translateX(-52px); }
html.js-anim [data-reveal="right"] { transform: translateX(52px); }
html.js-anim [data-reveal="zoom"]  { transform: scale(.93); }
html.js-anim [data-reveal].is-revealed {
  opacity: 1;
  transform: none;
}

/* 网格卡片错峰入场 */
html.js-anim .reveal-stagger > [data-reveal]:nth-child(1) { transition-delay: 0ms; }
html.js-anim .reveal-stagger > [data-reveal]:nth-child(2) { transition-delay: 110ms; }
html.js-anim .reveal-stagger > [data-reveal]:nth-child(3) { transition-delay: 220ms; }
html.js-anim .reveal-stagger > [data-reveal]:nth-child(4) { transition-delay: 330ms; }

/* 减少动态效果：尊重系统“减弱动态效果”设置 */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .slide { transition: none; }
  html.js-anim [data-reveal] { opacity: 1; transform: none; transition: none; }
  .site-header, .hero .slide.active, .hero .dots { animation: none; }
  .main-nav.open { animation: none; }
  .nav-toggle span { transition: none; }
}

/* ---- 手机端适配优化（仅小屏生效，桌面端不受影响） ---- */
@media (max-width: 960px) {
  /* 分栏媒体图高度设上限，避免小屏上图片过高 */
  .split-media img { height: min(400px, 82vw); }
  .gift-section .split-media img { height: min(340px, 65vw); }
  /* 礼盒板块小屏改为上下堆叠，避免图片被压缩、文字拥挤 */
  .gift-section .split { grid-template-columns: 1fr; }
  /* 换行后的头部更高，锚点跳转需要更大偏移 */
  section[id], footer[id] { scroll-margin-top: 116px; }

  /* 品牌介绍：小屏改为「文字在上、图片在下」 */
  .brand-section .split-content { order: 1; }
  .brand-section .split-media { order: 2; }

  /* 小屏隐藏叠在图片上的引导按钮（品牌介绍/科技与科研/奢养礼盒）
     注意：「告別概念抗衰」的「了解更多」不隐藏，改为整体缩小（见下行），
     否则手机上整块产品图没有可点的入口 */
  .brand-section .button,
  .science-section .split-content .button,
  .gift-section .split-content .button { display: none; }

  /* 「告別概念抗衰」浮在产品图上的「了解更多」：小屏保留但缩小尺寸与边距 */
  .product-detail-btn {
    top: 14px;
    left: 14px;
    padding: 7px 16px;
    font-size: 14px;
  }
  .product-detail-btn .btn-arrow { padding-left: 6px; }

  /* 用户故事轮播：恢复默认触控行为，避免横向滚动容器把小屏纵向滚动“吃掉”
     （原 pan-x 会让手指落在长卡片上时页面无法上下滑动） */
  .story-track { touch-action: auto; }

  /* 告别概念抗衰背景：原 background-size:100% 是按屏宽定图高，竖屏手机上图片
     高度只有约屏宽的 1.5 倍（不足屏高），底部会露出空白 = “图不够长”。
     小屏改为 cover，让竖版图按屏高铺满整块视口；桌面端仍保持 100% 不变。 */
  .concept-section::before {
    background-size: cover;
    background-position: top center;
  }
}

@media (max-width: 560px) {
  /* 区块上下留白收紧，减少小屏滚动长度 */
  .section { padding: 48px 0; }

  /* 导航在手机端已改为汉堡菜单（见 @media max-width: 960px） */

  /* 大留白按钮在小屏收窄 */
  .split-content .button-gap-large { margin: 56px 0 36px 0; }
  .split-content .button-gap { margin: 40px 0 20px 0; }

  /* 用户故事卡片：单屏单人展示时的内边距 */
  .story-card { padding: 18px 12px; }
  .story-card p { padding: 0 10px; }

  /* 页脚单列时收紧间距 */
  .footer-grid { gap: 40px; padding: 48px 0 40px; }

  /* 指示点加大触控区域 */
  .dots button { width: 12px; height: 12px; }
  .dots button.active { width: 28px; }

  /* 告别概念抗衰：浮动装饰在手机端全部隐藏，避免错位或遮挡内容 */
  .concept-section .decor { display: none; }

  /* 「了解更多」小按钮在窄屏再收一档，进一步让出产品图面积 */
  .product-detail-btn {
    top: 76%;
    left: 50px;
    padding: 2px 12px;
    font-size: 12px;
  }

  /* 标题字号小屏再收一档 */
  h2 { font-size: 26px; }
}

/* ---- 页脚手风琴（仅手机端生效，桌面/平板端保持现状） ---- */
@media (max-width: 560px) {
  /* 一级菜单之间用分隔横线隔开 */
  .site-footer .footer-col { border-bottom: 1px solid rgba(255, 255, 255, .14); }
  .site-footer .footer-col-collapse { padding: 4px 0 0; }
  .site-footer .footer-col-collapse h4 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0;
    padding: 10px 0;
    cursor: pointer;
  }
  .site-footer .footer-col-collapse .footer-toggle { display: inline-flex; }
  .site-footer .footer-col-collapse .footer-sub { padding-bottom: 6px; }
  /* 收起状态默认隐藏子菜单，展开时（.open）再显示 */
  .footer-col-collapse:not(.open) .footer-sub { display: none; }
}

/* ---- 抵消 Bootstrap 全局 clearfix（.container/.row 上的 ::before/::after） ----
   新皮肤大量把 .container 用作 grid/flex 容器；这些空的 display:table 伪元素
   会被浏览器当作多余子项，造成 grid 换行/错位（首页各 .split、页脚 footer-grid 等）。
   首页整页已脱离 Bootstrap 浮动布局，可安全整体禁用。 */
.container::before,
.container::after,
.container-fluid::before,
.container-fluid::after,
.row::before,
.row::after {
  display: none;
  content: none;
}
