@import url('https://fonts.googleapis.com/css2?family=Figtree:wght@300;400;500;600;700&family=Noto+Sans:wght@300;400;500;700&display=swap');

/* ===== 变量 ===== */
:root {
  --pink:       #eb879c;
  --pink-light: #ffb6c1;
  --dark:       #26171a;
  --dark-80:    rgba(38,23,26,0.8);
  --dark-40:    rgba(38,23,26,0.4);
  --dark-10:    rgba(38,23,26,0.08);
  --white:      #fff;
  --bg:         #fff5f7;
  --bg2:        #ffedf1;
  --radius:     12px;
  --radius-sm:  8px;
  --radius-pill:999px;
  --shadow-sm:  0 2px 6px rgba(235,135,156,0.15), 0 1px 2px rgba(38,23,26,0.06);
  --shadow-md:  0 4px 16px rgba(235,135,156,0.22), 0 2px 6px rgba(38,23,26,0.08);
  --shadow-lg:  0 8px 32px rgba(235,135,156,0.28), 0 4px 12px rgba(38,23,26,0.10);
  --transition: 220ms cubic-bezier(.4,0,.2,1);
  --nav-h:      64px;
  --font-main:  'Figtree', 'Noto Sans', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

/* ===== 重置 ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}
body {
  font-family: var(--font-main);
  background: var(--bg);
  color: var(--dark);
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
}
body.home-page {
  padding-bottom: calc(var(--nav-h) + 16px);
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--pink); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible { outline: 3px solid var(--pink); outline-offset: 3px; border-radius: 4px; }
ul, menu { list-style: none; }
dl, dt, dd { margin: 0; padding: 0; }

/* ===== 页面包装 ===== */
.page-wrapper { display: flex; flex-direction: column; min-height: 100vh; }

/* ===== 底部固定导航 ===== */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(255,245,247,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1.5px solid var(--pink-light);
  box-shadow: 0 -4px 20px rgba(235,135,156,0.18);
  height: var(--nav-h);
}
.bottom-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 12px;
  height: 100%;
  gap: 8px;
}

/* 药丸按钮组 */
.nav-pill-group {
  display: flex;
  gap: 4px;
  flex-wrap: nowrap;
}
.nav-pill-group .nav-link {
  display: flex;
  align-items: center;
  padding: 8px 14px;
  min-height: 40px;
  border-radius: var(--radius-pill);
  background: var(--bg2);
  color: var(--dark);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  transition: background var(--transition), color var(--transition), box-shadow var(--transition);
  box-shadow: var(--shadow-sm);
}
.nav-pill-group .nav-link:hover {
  background: var(--pink-light);
  color: var(--dark);
  box-shadow: var(--shadow-md);
  text-decoration: none;
}
.nav-pill-group .nav-link:focus-visible {
  outline: 3px solid var(--pink);
  outline-offset: 2px;
}

/* 品牌居中 */
.nav-brand {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 56px;
  min-height: 40px;
  padding: 4px 8px;
}
.nav-brand:focus-visible { outline: 3px solid var(--pink); border-radius: var(--radius-sm); }
.brand-text {
  font-size: 15px;
  font-weight: 700;
  color: var(--pink);
  letter-spacing: .02em;
  white-space: nowrap;
}
.site-logo { height: 36px; width: auto; }

/* details/summary 汉堡（折叠在小屏出现时） */
.nav-details { position: static; }
.nav-toggle {
  display: none;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 10px 14px;
  min-height: 40px;
  border-radius: var(--radius-pill);
  background: var(--bg2);
  box-shadow: var(--shadow-sm);
  list-style: none;
  user-select: none;
}
.nav-toggle::-webkit-details-marker { display: none; }
.nav-toggle-icon { display: flex; flex-direction: column; gap: 4px; }
.nav-toggle-icon span {
  display: block; width: 18px; height: 2px;
  background: var(--dark); border-radius: 2px;
  transition: var(--transition);
}
.nav-toggle-label { font-size: 13px; font-weight: 500; color: var(--dark); }

/* 全屏覆盖菜单 */
.nav-overlay {
  position: fixed;
  bottom: var(--nav-h); left: 0; right: 0;
  background: rgba(255,237,241,0.97);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 32px 24px;
  border-top: 1.5px solid var(--pink-light);
  box-shadow: 0 -8px 40px rgba(235,135,156,0.22);
  animation: overlayIn var(--transition) ease;
}
@keyframes overlayIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.nav-overlay-menu {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.nav-overlay-menu li a.overlay-link {
  display: block;
  padding: 14px 20px;
  min-height: 48px;
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--dark);
  font-size: 16px;
  font-weight: 500;
  box-shadow: var(--shadow-sm);
  transition: background var(--transition), box-shadow var(--transition);
}
.nav-overlay-menu li a.overlay-link:hover {
  background: var(--pink-light);
  box-shadow: var(--shadow-md);
  text-decoration: none;
}

/* ===== 英雄区 ===== */
.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: linear-gradient(135deg, var(--bg) 0%, var(--bg2) 100%);
  scroll-margin-top: 0;
}
.hero-deco-text {
  position: absolute;
  top: 50%; left: -2%;
  transform: translateY(-50%);
  font-size: clamp(80px, 18vw, 220px);
  font-weight: 700;
  letter-spacing: .15em;
  color: rgba(235,135,156,0.08);
  pointer-events: none;
  white-space: nowrap;
  user-select: none;
  z-index: 0;
}
.hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 48px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 40px 100px;
  width: 100%;
}
.hero-media {
  flex: 1 1 45%;
  position: relative;
  max-width: 520px;
}
.hero-img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  position: relative;
  z-index: 2;
}
.hero-shape {
  position: absolute;
  width: 80%;
  height: 80%;
  bottom: -24px;
  right: -24px;
  background: var(--pink-light);
  border-radius: var(--radius);
  z-index: 1;
  opacity: .55;
}
.hero-copy {
  flex: 1 1 50%;
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 20px;
}
.hero-eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--pink);
  background: rgba(235,135,156,0.12);
  padding: 6px 16px;
  border-radius: var(--radius-pill);
}
.hero-h1 {
  font-size: clamp(28px, 5vw, 56px);
  font-weight: 700;
  line-height: 1.2;
  color: var(--dark);
  letter-spacing: -.01em;
}
.hero-lead {
  font-size: 17px;
  color: var(--dark-80);
  max-width: 420px;
  line-height: 1.7;
}
.hero-cta {
  display: inline-flex;
  align-items: center;
  padding: 14px 32px;
  min-height: 48px;
  border-radius: var(--radius-pill);
  background: var(--pink);
  color: var(--white);
  font-size: 16px;
  font-weight: 600;
  box-shadow: var(--shadow-md);
  transition: background var(--transition), box-shadow var(--transition), transform var(--transition);
}
.hero-cta:hover {
  background: #d96e88;
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
  text-decoration: none;
  color: var(--white);
}
.hero-cta:focus-visible {
  outline: 3px solid var(--pink);
  outline-offset: 3px;
}

/* ===== 主体内容区 ===== */
.main-content {
  flex: 1;
  padding: 64px 0 40px;
}
.wrap {
  display: flex;
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  align-items: flex-start;
}

/* ===== 侧边栏（左） ===== */
.content-aside {
  flex: 0 0 220px;
  position: sticky;
  top: 24px;
}
.aside-inner {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 24px 20px;
}
.aside-eyebrow {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .12em;
  color: var(--pink);
  text-transform: uppercase;
  margin-bottom: 6px;
}
/* small 紧邻 h2 前面（同级） */
.aside-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--pink-light);
}
.aside-list { display: flex; flex-direction: column; gap: 6px; }
.aside-list li a {
  display: block;
  padding: 8px 12px;
  min-height: 40px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  color: var(--dark);
  background: var(--bg);
  transition: background var(--transition), color var(--transition), box-shadow var(--transition);
  line-height: 1.4;
  display: flex;
  align-items: center;
}
.aside-list li a:hover {
  background: var(--pink-light);
  color: var(--dark);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
}

/* ===== 正文容器 ===== */
.content-section {
  flex: 1 1 0;
  min-width: 0;
}
.content-article {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 40px 44px;
  line-height: 1.8;
  font-size: 16px;
  color: var(--dark);
}

/* 正文内部样式 */
.content-article h2,
.content-article h3,
.content-article h4 {
  color: var(--dark);
  line-height: 1.3;
  margin-top: 2em;
  margin-bottom: .6em;
}
.content-article h2 { font-size: 1.45em; font-weight: 700; }
.content-article h3 { font-size: 1.2em; font-weight: 600; }
.content-article h4 { font-size: 1.05em; font-weight: 600; }
.content-article p { margin-bottom: 1.1em; }
.content-article ul,
.content-article ol {
  padding-left: 1.6em;
  margin-bottom: 1.1em;
}
.content-article li { margin-bottom: .4em; }
.content-article strong { color: var(--pink); font-weight: 600; }
.content-article blockquote {
  border-left: 4px solid var(--pink);
  background: var(--bg2);
  margin: 1.5em 0;
  padding: 16px 20px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--dark-80);
  font-style: italic;
}
.content-article a { color: var(--pink); }
.content-article a:hover { text-decoration: underline; }
.content-article img {
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  margin: 1.5em 0;
}
.content-article table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5em 0;
  font-size: 15px;
}
.content-article th {
  background: var(--pink);
  color: var(--white);
  padding: 10px 14px;
  text-align: left;
}
.content-article td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--pink-light);
}
.content-article tr:nth-child(even) td { background: var(--bg2); }

/* 正文内 article 分隔 */
.content-article article {
  padding-top: 32px;
  margin-top: 8px;
  border-top: 1.5px solid var(--bg2);
  scroll-margin-top: calc(var(--nav-h) + 24px);
}
.content-article article:first-child {
  border-top: none;
  padding-top: 0;
}

/* article scroll margin（顶部导航时） */
article[id] {
  scroll-margin-top: calc(var(--nav-h) + 16px);
}

/* ===== 页脚 ===== */
.site-footer {
  background: var(--dark);
  color: rgba(255,255,255,0.7);
  padding: 24px 0;
  margin-bottom: var(--nav-h);
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  gap: 32px;
  align-items: flex-start;
  justify-content: space-between;
}
.footer-dl {
  flex: 1;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 12px;
  align-items: center;
}
.footer-dl dt {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--pink-light);
  white-space: nowrap;
}
.footer-dl dd {
  font-size: 13px;
  color: rgba(255,255,255,0.65);
}

/* ===== 小 eyebrow 契约（small 紧邻 h2 前） ===== */
small + h2,
small + h3 {
  margin-top: .3em;
}
small.aside-eyebrow + .aside-title { margin-top: .25em; }

/* ===== 动效 ===== */
@media (prefers-reduced-motion: no-preference) {
  /* Stagger list */
  .aside-list li {
    opacity: 0;
    transform: translateX(-12px);
    animation: staggerIn 300ms ease forwards;
  }
  .aside-list li:nth-child(1) { animation-delay: 80ms; }
  .aside-list li:nth-child(2) { animation-delay: 140ms; }
  .aside-list li:nth-child(3) { animation-delay: 200ms; }
  .aside-list li:nth-child(4) { animation-delay: 260ms; }
  .aside-list li:nth-child(5) { animation-delay: 320ms; }
  .aside-list li:nth-child(6) { animation-delay: 380ms; }

  @keyframes staggerIn {
    to { opacity: 1; transform: translateX(0); }
  }

  /* Hero 入场 */
  .hero-copy > * {
    opacity: 0;
    transform: translateY(16px);
    animation: fadeUp 350ms ease forwards;
  }
  .hero-eyebrow  { animation-delay: 100ms; }
  .hero-h1       { animation-delay: 200ms; }
  .hero-lead     { animation-delay: 290ms; }
  .hero-cta      { animation-delay: 380ms; }

  @keyframes fadeUp {
    to { opacity: 1; transform: translateY(0); }
  }

  /* Parallax deco */
  .hero-deco-text {
    will-change: transform;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}

/* ===== 响应式 ===== */

/* 平板 */
@media (max-width: 1024px) {
  .hero-inner { gap: 32px; padding: 60px 24px 90px; }
  .content-aside { flex: 0 0 180px; }
  .content-article { padding: 28px 28px; }
}

/* 小屏 */
@media (max-width: 768px) {
  :root { --nav-h: 60px; }

  /* 汉堡展开，隐藏桌面药丸 */
  .nav-pill-group { display: none; }
  .nav-toggle { display: flex; }

  .bottom-nav-inner {
    justify-content: space-between;
    padding: 0 16px;
  }

  /* Hero 竖排 */
  .hero-inner {
    flex-direction: column-reverse;
    text-align: right;
    padding: 48px 20px 80px;
    gap: 24px;
  }
  .hero-copy {
    align-items: flex-end;
    width: 100%;
  }
  .hero-media { max-width: 100%; width: 100%; }
  .hero-deco-text { font-size: 22vw; top: 10%; }

  /* 主内容竖排 */
  .wrap {
    flex-direction: column;
    padding: 0 16px;
    gap: 24px;
  }
  .content-aside {
    position: static;
    flex: none;
    width: 100%;
  }
  .content-article { padding: 20px 18px; }

  /* 页脚 */
  .footer-inner {
    flex-direction: column;
    gap: 20px;
  }
  .footer-dl { flex: none; width: 100%; }
}

/* 极小屏 */
@media (max-width: 400px) {
  .hero-h1 { font-size: 26px; }
  .hero-lead { font-size: 15px; }
  .brand-text { font-size: 13px; }
  .nav-pill-group .nav-link { padding: 8px 10px; font-size: 12px; }
}

button[aria-expanded]{min-width:44px;min-height:44px}
