@import url('https://fonts.googleapis.com/css2?family=Lexend+Mega:wght@100..900&family=Public+Sans:wght@100..900&display=swap');

/* ===== 基础变量 ===== */
:root {
  --clr-primary: #eb879c;
  --clr-secondary: #ffb6c1;
  --clr-dark: #26171a;
  --clr-dark-80: rgba(38,23,26,0.8);
  --clr-dark-40: rgba(38,23,26,0.4);
  --clr-dark-10: rgba(38,23,26,0.08);
  --clr-bg: #fff8f9;
  --clr-surface: #ffffff;
  --clr-surface-2: #fff0f3;
  --clr-border: rgba(235,135,156,0.25);
  --clr-text: #26171a;
  --clr-text-muted: #6b4050;
  --font-head: 'Lexend Mega', 'Public Sans', system-ui, sans-serif;
  --font-body: 'Public Sans', system-ui, sans-serif;
  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 28px;
  --radius-pill: 999px;
  --shadow-soft: 0 2px 8px rgba(235,135,156,0.10), 0 1px 3px rgba(38,23,26,0.06);
  --shadow-card: 0 4px 16px rgba(235,135,156,0.13), 0 2px 6px rgba(38,23,26,0.07);
  --shadow-hover: 0 8px 28px rgba(235,135,156,0.22), 0 3px 10px rgba(38,23,26,0.09);
  --transition: 220ms cubic-bezier(0.34,1.2,0.64,1);
  --transition-std: 200ms ease;
  --header-h: 68px;
}

/* ===== 重置 ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  font-size: 17px;
  -webkit-text-size-adjust: 100%;
}
body {
  font-family: var(--font-body);
  background: var(--clr-bg);
  color: var(--clr-text);
  line-height: 1.65;
  min-height: 100vh;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--clr-primary); text-decoration: none; }
a:hover { text-decoration: underline; }
ul, ol { list-style: none; }
dt, dd { display: block; }

/* ===== 滚动偏移（吸顶导航） ===== */
section[id] { scroll-margin-top: calc(var(--header-h) + 12px); }

/* ===== 焦点样式 ===== */
:focus-visible {
  outline: 2.5px solid var(--clr-primary);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* ===== 减少动效 ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ===== 顶部导航 ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(255,248,249,0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--clr-border);
  box-shadow: var(--shadow-soft);
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 16px;
}
.brand-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
}
.brand-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  object-fit: contain;
}
.brand-text-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--clr-primary);
  color: #fff;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: -0.5px;
}

/* 药丸胶囊导航 */
.pill-nav {
  flex: 1;
  display: flex;
  justify-content: flex-end;
}
.pill-nav-dl {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.nav-pill dt { display: block; }
.nav-pill a {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 16px;
  border-radius: var(--radius-pill);
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 600;
  color: var(--clr-dark);
  background: var(--clr-surface);
  border: 1.5px solid var(--clr-border);
  box-shadow: var(--shadow-soft);
  transition: background var(--transition-std), color var(--transition-std), box-shadow var(--transition-std), transform var(--transition);
  white-space: nowrap;
  text-decoration: none;
}
.nav-pill a:hover {
  background: var(--clr-primary);
  color: #fff;
  border-color: var(--clr-primary);
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}
.nav-pill--active a {
  background: var(--clr-primary);
  color: #fff;
  border-color: var(--clr-primary);
}

/* 汉堡按钮 */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius-sm);
  margin-left: auto;
}
.hamburger {
  display: block;
  width: 22px;
  height: 2.5px;
  background: var(--clr-dark);
  border-radius: 2px;
  transition: transform var(--transition-std), opacity var(--transition-std);
}
.nav-toggle[aria-expanded="true"] .hamburger:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .hamburger:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .hamburger:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ===== 主内容 ===== */
#main-content { outline: none; }

/* ===== Hero ===== */
.hero-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 20px 56px;
  display: flex;
  align-items: center;
  gap: 48px;
  min-height: 70vh;
}
.hero-figure {
  flex: 1 1 42%;
  position: relative;
  border-radius: var(--radius-lg);
  overflow: visible;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-img {
  width: 100%;
  max-width: 460px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  object-fit: cover;
  aspect-ratio: 4/3;
}
.hero-badge {
  position: absolute;
  top: 18px;
  left: 18px;
  background: var(--clr-primary);
  color: #fff;
  font-family: var(--font-head);
  font-size: 12px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  box-shadow: 0 3px 10px rgba(235,135,156,0.4);
  letter-spacing: 0.03em;
}
.hero-aside {
  flex: 1 1 48%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 20px;
}
.hero-h1 {
  font-family: var(--font-head);
  font-size: clamp(1.9rem, 4.5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.18;
  color: var(--clr-dark);
  letter-spacing: -0.02em;
}
.hero-desc {
  font-size: 1.05rem;
  color: var(--clr-text-muted);
  max-width: 400px;
  line-height: 1.7;
}
.btn-capsule {
  display: inline-flex;
  align-items: center;
  height: 52px;
  padding: 0 32px;
  background: var(--clr-primary);
  color: #fff;
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 700;
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(235,135,156,0.38);
  transition: background var(--transition-std), box-shadow var(--transition-std), transform var(--transition);
  text-decoration: none;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.btn-capsule:hover {
  background: #d96680;
  box-shadow: 0 8px 28px rgba(235,135,156,0.48);
  transform: translateY(-3px);
  text-decoration: none;
  color: #fff;
}

/* ===== 内容区主体布局 ===== */
.content-body {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px 64px;
  display: flex;
  gap: 36px;
  align-items: flex-start;
}

/* ===== 侧边栏（左侧） ===== */
.content-sidebar {
  flex: 0 0 210px;
  position: sticky;
  top: calc(var(--header-h) + 16px);
}
.sidebar-card {
  background: var(--clr-surface);
  border-radius: var(--radius-md);
  padding: 24px 18px;
  box-shadow: var(--shadow-card);
  border: 1.5px solid var(--clr-border);
}
.sidebar-title {
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 700;
  color: var(--clr-primary);
  margin-bottom: 14px;
  letter-spacing: 0.04em;
}
.sidebar-title span {
  display: inline;
}
.sidebar-links { display: flex; flex-direction: column; gap: 4px; }
.sidebar-link {
  display: block;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--clr-text-muted);
  transition: background var(--transition-std), color var(--transition-std), transform var(--transition);
  line-height: 1.4;
  min-height: 40px;
  display: flex;
  align-items: center;
  text-decoration: none;
}
.sidebar-link:hover {
  background: var(--clr-surface-2);
  color: var(--clr-primary);
  transform: translateX(3px);
  text-decoration: none;
}

/* ===== 正文主容器 ===== */
.content-main {
  flex: 1 1 0;
  min-width: 0;
}

/* ===== 正文 section 通用样式 ===== */
.content-main section {
  background: var(--clr-surface);
  border-radius: var(--radius-md);
  padding: 40px 36px;
  margin-bottom: 28px;
  box-shadow: var(--shadow-card);
  border: 1.5px solid var(--clr-border);
  position: relative;
  overflow: hidden;
}
.content-main section::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--clr-primary), var(--clr-secondary));
  border-radius: 0 0 var(--radius-md) var(--radius-md);
}
.content-main section:last-child { margin-bottom: 0; }

/* section 内的 figure/aside */
.content-main section figure {
  border-radius: var(--radius-md);
  overflow: hidden;
  margin: 20px 0;
}
.content-main section aside {
  background: var(--clr-surface-2);
  border-left: 4px solid var(--clr-primary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 16px 18px;
  margin: 20px 0;
  font-size: 15px;
  color: var(--clr-text-muted);
}

/* 标题 */
.content-main h2 {
  font-family: var(--font-head);
  font-size: clamp(1.25rem, 2.8vw, 1.75rem);
  font-weight: 800;
  color: var(--clr-dark);
  margin-bottom: 16px;
  line-height: 1.25;
  letter-spacing: -0.01em;
}
.content-main h2 span {
  display: inline;
}
.content-main h3 {
  font-family: var(--font-head);
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  font-weight: 700;
  color: var(--clr-dark);
  margin: 20px 0 10px;
  line-height: 1.3;
}
.content-main h3 span {
  display: inline;
}
.content-main p {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--clr-text);
  margin-bottom: 12px;
}
.content-main ul, .content-main ol {
  list-style: disc;
  padding-left: 22px;
  margin-bottom: 12px;
}
.content-main ol { list-style: decimal; }
.content-main li { margin-bottom: 6px; line-height: 1.65; }
.content-main strong { font-weight: 700; color: var(--clr-dark); }
.content-main a { color: var(--clr-primary); font-weight: 600; }
.content-main a:hover { text-decoration: underline; }
.content-main table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 16px;
  font-size: 15px;
}
.content-main th {
  background: var(--clr-surface-2);
  color: var(--clr-dark);
  font-weight: 700;
  padding: 10px 14px;
  text-align: left;
  border-bottom: 2px solid var(--clr-border);
}
.content-main td {
  padding: 9px 14px;
  border-bottom: 1px solid var(--clr-border);
}
.content-main tr:last-child td { border-bottom: none; }

/* ===== 页脚 ===== */
.site-footer {
  background: var(--clr-dark);
  color: rgba(255,248,249,0.85);
  padding: 56px 20px 0;
  margin-top: 32px;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
}
.footer-nav {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,182,193,0.15);
}
.footer-dl { display: block; }
.footer-dl-title {
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 700;
  color: var(--clr-primary);
  letter-spacing: 0.06em;
  margin-bottom: 14px;
  display: block;
}
.footer-dl-desc {
  font-size: 14px;
  line-height: 1.65;
  color: rgba(255,248,249,0.65);
  margin-bottom: 10px;
  display: block;
}
.footer-dl-contact { display: block; margin-top: 6px; }
.footer-dl dd {
  margin-bottom: 8px;
  display: block;
}
.footer-dl dd a {
  font-size: 14px;
  color: rgba(255,248,249,0.72);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 4px 0;
  transition: color var(--transition-std);
  line-height: 1.5;
}
.footer-dl dd a:hover { color: var(--clr-primary); text-decoration: none; }
.contact-link {
  color: var(--clr-secondary) !important;
  font-size: 14px;
}
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
  font-size: 13px;
  color: rgba(255,248,249,0.45);
  flex-wrap: wrap;
  gap: 8px;
}
.footer-copy { }
.footer-tagline { font-style: italic; }

/* ===== 卡片（正文内） ===== */
.card {
  background: var(--clr-surface);
  border-radius: var(--radius-md);
  padding: 24px 24px 28px;
  box-shadow: var(--shadow-card);
  border: 1.5px solid var(--clr-border);
  position: relative;
  overflow: hidden;
  transition: box-shadow var(--transition-std), transform var(--transition);
}
.card::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--clr-primary), var(--clr-secondary));
  border-radius: 0 0 var(--radius-md) var(--radius-md);
}
.card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px);
}

/* ===== 交错列表动效 ===== */
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
.content-main section {
  animation: fadeSlideUp 280ms ease both;
}
.content-main section:nth-child(1) { animation-delay: 0ms; }
.content-main section:nth-child(2) { animation-delay: 60ms; }
.content-main section:nth-child(3) { animation-delay: 120ms; }
.content-main section:nth-child(4) { animation-delay: 180ms; }
.content-main section:nth-child(5) { animation-delay: 240ms; }
.content-main section:nth-child(6) { animation-delay: 300ms; }
.content-main section:nth-child(7) { animation-delay: 360ms; }

/* ===== 移动端响应 ===== */
@media (max-width: 900px) {
  .hero-section {
    flex-direction: column;
    min-height: auto;
    padding: 32px 16px 40px;
    gap: 28px;
    text-align: center;
  }
  .hero-figure { flex: none; width: 100%; max-width: 440px; margin: 0 auto; }
  .hero-aside { align-items: center; }
  .content-body { flex-direction: column; gap: 24px; }
  .content-sidebar {
    position: static;
    flex: none;
    width: 100%;
  }
  .sidebar-card { padding: 18px 14px; }
  .sidebar-links { flex-direction: row; flex-wrap: wrap; gap: 6px; }
  .sidebar-link { padding: 8px 12px; min-height: 40px; }
  .footer-nav { grid-template-columns: 1fr 1fr; gap: 28px; }
  .footer-dl--brand { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  :root { --header-h: 60px; }
  .pill-nav { display: none; }
  .pill-nav.is-open {
    display: flex;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--clr-surface);
    border-bottom: 1px solid var(--clr-border);
    box-shadow: var(--shadow-card);
    padding: 16px 16px 20px;
    z-index: 99;
  }
  .pill-nav.is-open .pill-nav-dl {
    flex-direction: column;
    gap: 8px;
    width: 100%;
  }
  .pill-nav.is-open .nav-pill { width: 100%; }
  .pill-nav.is-open .nav-pill a {
    width: 100%;
    justify-content: center;
    height: 48px;
    font-size: 15px;
  }
  .nav-toggle { display: flex; }
  .content-main section { padding: 24px 16px 28px; }
  .hero-h1 { font-size: 1.75rem; }
  .footer-nav { grid-template-columns: 1fr; gap: 24px; }
  .footer-dl--brand { grid-column: auto; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 4px; }
  .header-inner { padding: 0 14px; }
}

@media (max-width: 375px) {
  .hero-h1 { font-size: 1.55rem; }
  .btn-capsule { padding: 0 22px; font-size: 14px; }
}
