/* ==========================================================================
   汉方中医APP 官网样式
   设计语言：中国红（品牌主色）+ 米白宣纸底 + 鎏金点缀，传统中医韵味
   ========================================================================== */

:root {
  --red: #9a2b25;          /* 品牌主红（取自 LOGO） */
  --red-deep: #7c1f1a;     /* 深红 */
  --red-soft: #b64740;     /* 浅红 */
  --gold: #c8a15a;         /* 鎏金 */
  --gold-soft: #e6d3ab;
  --paper: #faf6ef;        /* 宣纸米白 */
  --paper-deep: #f3ecdf;
  --ink: #2f2622;          /* 墨色文字 */
  --ink-soft: #6f6259;     /* 次级文字 */
  --white: #ffffff;
  --shadow: 0 12px 32px rgba(124, 31, 26, 0.10);
  --shadow-lg: 0 24px 56px rgba(124, 31, 26, 0.16);
  --radius: 18px;
  --font-serif: "Noto Serif SC", "Source Han Serif SC", "STSong", "SimSun", serif;
  --font-sans: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

.container {
  width: min(1140px, 92%);
  margin: 0 auto;
}

/* ---------- 通用按钮 ---------- */
.btn {
  display: inline-block;
  padding: 0.72rem 1.7rem;
  border-radius: 999px;
  font-size: 0.98rem;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  border: 1.5px solid transparent;
  cursor: pointer;
}
.btn-lg { padding: 0.9rem 2.2rem; font-size: 1.05rem; }
.btn-primary {
  background: linear-gradient(135deg, var(--red-soft), var(--red-deep));
  color: var(--white);
  box-shadow: 0 8px 20px rgba(154, 43, 37, 0.32);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(154, 43, 37, 0.4); }
.btn-ghost {
  border-color: var(--red);
  color: var(--red);
  background: transparent;
}
.btn-ghost:hover { background: rgba(154, 43, 37, 0.08); transform: translateY(-2px); }
.btn-light {
  background: var(--white);
  color: var(--red-deep);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}
.btn-light:hover { transform: translateY(-2px); }

/* ---------- 焦点可见性（无障碍） ---------- */
a:focus-visible, button:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ---------- 顶部导航 ---------- */
.navbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  background: rgba(250, 246, 239, 0.86);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(154, 43, 37, 0.10);
  transition: box-shadow 0.25s ease;
}
.navbar.scrolled { box-shadow: 0 6px 24px rgba(124, 31, 26, 0.10); }
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
}
.brand img { border-radius: 10px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text strong {
  font-family: var(--font-serif);
  font-size: 1.22rem;
  color: var(--red-deep);
  letter-spacing: 0.08em;
}
.brand-text em {
  font-style: normal;
  font-size: 0.62rem;
  letter-spacing: 0.32em;
  color: var(--gold);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 1.7rem;
}
.nav-links a {
  text-decoration: none;
  color: var(--ink);
  font-size: 0.96rem;
  font-weight: 500;
  position: relative;
  padding: 0.3rem 0;
}
.nav-links a:not(.nav-cta)::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 100%; height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}
.nav-links a:not(.nav-cta):hover::after { transform: scaleX(1); }
.nav-cta { color: var(--white) !important; padding: 0.55rem 1.4rem !important; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
}
.nav-toggle span {
  width: 24px; height: 2.5px;
  background: var(--red-deep);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ---------- 首屏 Hero ---------- */
.hero {
  position: relative;
  padding: 11.5rem 0 6rem;
  background:
    radial-gradient(ellipse 60% 50% at 85% 10%, rgba(200, 161, 90, 0.14), transparent),
    radial-gradient(ellipse 50% 45% at 8% 90%, rgba(154, 43, 37, 0.08), transparent),
    var(--paper);
  overflow: hidden;
}
.hero-deco {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.deco-ring {
  position: absolute;
  top: -140px; right: -120px;
  width: 460px; height: 460px;
  border: 2px solid rgba(200, 161, 90, 0.25);
  border-radius: 50%;
}
.ring-2 {
  top: -100px; right: -80px;
  width: 340px; height: 340px;
  border-color: rgba(154, 43, 37, 0.14);
}
.deco-char {
  position: absolute;
  left: -30px; bottom: 40px;
  font-family: var(--font-serif);
  font-size: 15rem;
  color: rgba(154, 43, 37, 0.05);
  line-height: 1;
  user-select: none;
}
.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 3rem;
}
.hero-tag {
  display: inline-block;
  font-size: 0.85rem;
  letter-spacing: 0.28em;
  color: var(--red);
  border: 1px solid rgba(154, 43, 37, 0.35);
  border-radius: 999px;
  padding: 0.3rem 1.1rem;
  margin-bottom: 1.4rem;
  background: rgba(255, 255, 255, 0.6);
}
.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  line-height: 1.25;
  color: var(--ink);
  letter-spacing: 0.04em;
  margin-bottom: 1.3rem;
}
.hero-title .dot { color: var(--red); }
.hero-title { text-shadow: 0 2px 0 rgba(255,255,255,0.6); }
.hero-sub {
  max-width: 34em;
  color: var(--ink-soft);
  font-size: 1.06rem;
  margin-bottom: 2.2rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 2.6rem; }
.hero-stats {
  display: flex;
  list-style: none;
  gap: 2.6rem;
}
.hero-stats li { display: flex; flex-direction: column; }
.hero-stats strong {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: var(--red-deep);
}
.hero-stats span { font-size: 0.85rem; color: var(--ink-soft); }

/* 手机样机 */
.hero-visual { display: flex; justify-content: center; }
.phone-mock {
  width: 280px;
  background: linear-gradient(160deg, #fff, var(--paper-deep));
  border: 1px solid rgba(154, 43, 37, 0.15);
  border-radius: 38px;
  padding: 14px;
  box-shadow: var(--shadow-lg);
  transform: rotate(2.5deg);
  animation: float 6s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: rotate(2.5deg) translateY(0); }
  50% { transform: rotate(2.5deg) translateY(-12px); }
}
.phone-notch {
  width: 90px; height: 8px;
  background: rgba(47, 38, 34, 0.15);
  border-radius: 999px;
  margin: 4px auto 12px;
}
.phone-screen {
  background: var(--white);
  border-radius: 26px;
  padding: 18px 16px;
  border: 1px solid rgba(154, 43, 37, 0.08);
}
.app-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 14px;
  border-bottom: 1px dashed rgba(154, 43, 37, 0.2);
}
.app-head img { border-radius: 8px; }
.app-head strong {
  display: block;
  font-family: var(--font-serif);
  color: var(--red-deep);
  font-size: 0.98rem;
}
.app-head span { font-size: 0.62rem; color: var(--gold); letter-spacing: 0.1em; }
.app-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin: 14px 0;
}
.app-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 0.6rem;
  color: var(--ink-soft);
}
.app-cell i {
  font-style: normal;
  width: 34px; height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--red-soft), var(--red-deep));
  color: #fff;
  font-family: var(--font-serif);
  font-size: 0.82rem;
}
.app-card {
  background: var(--paper);
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 8px;
  border: 1px solid rgba(154, 43, 37, 0.08);
}
.app-card.gold { background: #fdf8ee; border-color: rgba(200, 161, 90, 0.35); }
.pill-line {
  display: block;
  height: 7px;
  border-radius: 999px;
  background: rgba(154, 43, 37, 0.18);
  margin-bottom: 6px;
}
.pill-line.short { width: 60%; background: rgba(200, 161, 90, 0.4); margin-bottom: 8px; }
.app-card-foot {
  font-size: 0.6rem;
  color: var(--red);
  border-top: 1px dashed rgba(154, 43, 37, 0.18);
  padding-top: 6px;
}

/* ---------- 通用 Section ---------- */
.section { padding: 5.5rem 0; }
.section-head { text-align: center; margin-bottom: 3.2rem; }
.section-eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.4em;
  color: var(--gold);
  margin-bottom: 0.6rem;
  font-weight: 600;
}
.section-title {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 3.4vw, 2.5rem);
  color: var(--ink);
  letter-spacing: 0.08em;
}
.section-title::after {
  content: "";
  display: block;
  width: 52px; height: 3px;
  background: linear-gradient(90deg, var(--red), var(--gold));
  margin: 0.9rem auto 0;
  border-radius: 2px;
}
.section-desc {
  margin-top: 1.1rem;
  color: var(--ink-soft);
  max-width: 40em;
  margin-left: auto;
  margin-right: auto;
}

/* ---------- 核心功能 ---------- */
.features { background: var(--white); }
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.6rem;
}
.feature-card {
  background: var(--paper);
  border: 1px solid rgba(154, 43, 37, 0.08);
  border-radius: var(--radius);
  padding: 2rem 1.7rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(200, 161, 90, 0.5);
}
.feature-icon {
  width: 56px; height: 56px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(154, 43, 37, 0.12), rgba(200, 161, 90, 0.16));
  color: var(--red);
  margin-bottom: 1.2rem;
}
.feature-icon svg { width: 30px; height: 30px; }
.feature-card h3 {
  font-family: var(--font-serif);
  font-size: 1.22rem;
  color: var(--red-deep);
  margin-bottom: 0.55rem;
  letter-spacing: 0.06em;
}
.feature-card p { color: var(--ink-soft); font-size: 0.94rem; }

/* ---------- 服务流程 ---------- */
.process {
  background:
    radial-gradient(ellipse 70% 60% at 50% 0%, rgba(200, 161, 90, 0.10), transparent),
    var(--paper);
}
.process-flow {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.2rem;
  counter-reset: step;
}
.step {
  position: relative;
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.7rem 1.3rem;
  border: 1px solid rgba(154, 43, 37, 0.08);
  box-shadow: var(--shadow);
  transition: transform 0.25s ease;
}
.step:hover { transform: translateY(-5px); }
.step:not(:last-child)::after {
  content: "→";
  position: absolute;
  top: 50%; right: -1.05rem;
  transform: translateY(-50%);
  color: var(--gold);
  font-size: 1.1rem;
  z-index: 1;
}
.step-num {
  font-family: var(--font-serif);
  font-size: 1.9rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--red), var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.step h3 {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: var(--ink);
  margin: 0.4rem 0 0.45rem;
}
.step p { font-size: 0.86rem; color: var(--ink-soft); }

/* ---------- 双端介绍 ---------- */
.duo { background: var(--white); }
.duo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.8rem;
}
.duo-panel {
  border-radius: var(--radius);
  padding: 2.6rem 2.3rem;
  color: var(--white);
  position: relative;
  overflow: hidden;
}
.duo-panel::before {
  content: "";
  position: absolute;
  top: -60px; right: -60px;
  width: 200px; height: 200px;
  border: 2px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
}
.doctor { background: linear-gradient(150deg, var(--red-soft), var(--red-deep)); }
.patient { background: linear-gradient(150deg, #4b5d52, #2f4038); }
.duo-eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.35em;
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: 0.7rem;
}
.duo-panel h2 {
  font-family: var(--font-serif);
  font-size: 1.55rem;
  margin-bottom: 1rem;
  letter-spacing: 0.04em;
}
.duo-desc { font-size: 0.96rem; color: rgba(255, 255, 255, 0.85); margin-bottom: 1.4rem; }
.duo-list {
  list-style: none;
  display: grid;
  gap: 0.7rem;
}
.duo-list li {
  padding-left: 1.5rem;
  position: relative;
  font-size: 0.93rem;
  color: rgba(255, 255, 255, 0.92);
}
.duo-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.62em;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--gold);
}

/* ---------- 关于我们 ---------- */
.about { background: var(--paper); }
.about-inner { text-align: center; }
.about-logo {
  margin: 0 auto 1.6rem;
  border-radius: 22px;
  box-shadow: var(--shadow);
}
.about-text {
  max-width: 42em;
  margin: 1.4rem auto 2.6rem;
  color: var(--ink-soft);
}
.about-values {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 260px));
  justify-content: center;
  gap: 1.4rem;
}
.value {
  background: var(--white);
  border: 1px solid rgba(154, 43, 37, 0.10);
  border-radius: var(--radius);
  padding: 1.5rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  box-shadow: var(--shadow);
}
.value strong {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  color: var(--red-deep);
  letter-spacing: 0.2em;
}
.value span { font-size: 0.88rem; color: var(--ink-soft); }

/* ---------- 下载 CTA ---------- */
.download {
  background: linear-gradient(150deg, var(--red-soft), var(--red-deep) 70%);
  color: var(--white);
}
.download-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 3rem;
}
.download-copy h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.9rem, 3.6vw, 2.6rem);
  margin-bottom: 0.9rem;
  letter-spacing: 0.06em;
}
.download-copy p { color: rgba(255, 255, 255, 0.85); margin-bottom: 1.8rem; }
.download-note { font-size: 0.82rem !important; color: rgba(255, 255, 255, 0.6) !important; margin: 1.1rem 0 0 !important; }
.qrcode-card {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius);
  padding: 1.6rem;
  text-align: center;
  backdrop-filter: blur(6px);
}
.qr-img {
  display: block;
  width: 148px;
  height: 148px;
  margin: 0 auto 0.9rem;
  background: var(--white);
  border-radius: 14px;
}
.qrcode-card p { font-size: 0.78rem; color: rgba(255, 255, 255, 0.75); line-height: 1.6; }

/* ---------- 页脚 ---------- */
.footer {
  background: #26120f;
  color: rgba(255, 255, 255, 0.7);
  padding: 3.2rem 0 2rem;
}
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
  text-align: center;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}
.footer-brand img { border-radius: 10px; }
.footer-brand strong {
  display: block;
  font-family: var(--font-serif);
  color: var(--white);
  letter-spacing: 0.1em;
}
.footer-brand p { font-size: 0.82rem; color: var(--gold-soft); }
.footer-nav { display: flex; flex-wrap: wrap; gap: 1.6rem; }
.footer-nav a {
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s ease;
}
.footer-nav a:hover { color: var(--gold-soft); }
.footer-tip { font-size: 0.76rem; color: rgba(255, 255, 255, 0.45); max-width: 46em; }
.copyright { font-size: 0.78rem; color: rgba(255, 255, 255, 0.4); }
.copyright a {text-decoration: none;   color: inherit; outline: none; }

/* ---------- 滚动进场动画 ---------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.feature-card.reveal:nth-child(2), .step.reveal:nth-child(2) { transition-delay: 0.08s; }
.feature-card.reveal:nth-child(3), .step.reveal:nth-child(3) { transition-delay: 0.16s; }
.feature-card.reveal:nth-child(4), .step.reveal:nth-child(4) { transition-delay: 0.24s; }
.feature-card.reveal:nth-child(5), .step.reveal:nth-child(5) { transition-delay: 0.32s; }
.feature-card.reveal:nth-child(6), .step.reveal:nth-child(6) { transition-delay: 0.4s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .phone-mock { animation: none; }
}

/* ---------- 响应式 ---------- */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-sub { margin-left: auto; margin-right: auto; }
  .hero-actions, .hero-stats { justify-content: center; }
  .hero-visual { margin-top: 1rem; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .process-flow { grid-template-columns: repeat(2, 1fr); }
  .step:not(:last-child)::after { display: none; }
  .duo-grid { grid-template-columns: 1fr; }
  .download-inner { grid-template-columns: 1fr; justify-items: center; text-align: center; }
}

@media (max-width: 640px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: absolute;
    top: 72px; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--paper);
    border-bottom: 1px solid rgba(154, 43, 37, 0.12);
    box-shadow: var(--shadow);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }
  .nav-links.open { max-height: 420px; }
  .nav-links a { padding: 0.95rem 6%; border-top: 1px solid rgba(154, 43, 37, 0.07); }
  .nav-cta { margin: 0.8rem 6% 1rem; text-align: center; }
  .feature-grid { grid-template-columns: 1fr; }
  .process-flow { grid-template-columns: 1fr; }
  .about-values { grid-template-columns: 1fr; }
  .hero { padding-top: 9rem; }
  .deco-char { font-size: 9rem; }
}
