/* ==========================================================================
   伴伴健康官网样式
   ========================================================================== */

/* ---------- 变量与基础 ---------- */
:root {
  --accent: #29D49E;
  --accent-hover: #1CB98A;
  --link: #17B26A;
  --link-hover: #0E9355;
  --text: #1E2B33;
  --text-muted: #4A5A63;
  --bg: #F5F8F6;
  --dark: #101820;
  --nav-h: 68px;
}

* {
  -webkit-box-sizing: border-box;
          box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0;
  min-width: 320px;
  background: #F5F8F6;
  background: var(--bg);
  color: #1E2B33;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Noto Sans SC", "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
}

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

a {
  color: #17B26A;
  color: var(--link);
  text-decoration: none;
  -webkit-transition: color 0.2s, background-color 0.2s, border-color 0.2s, -webkit-box-shadow 0.2s;
          transition: color 0.2s, background-color 0.2s, border-color 0.2s, box-shadow 0.2s;
}

a:hover {
  color: #0E9355;
  color: var(--link-hover);
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

/* 锚点定位时避开固定导航 */
section[id],
footer[id],
header[id] {
  scroll-margin-top: 76px;
}

/* ---------- 按钮 ---------- */
.btn {
  display: -webkit-inline-box;
  display: -ms-inline-flexbox;
  display: inline-flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  gap: 8px;
  padding: 15px 32px;
  border-radius: 999px;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
}

.btn--primary {
  background: #29D49E;
  background: var(--accent);
  color: #fff;
  -webkit-box-shadow: 0 8px 24px rgba(23, 178, 106, 0.3);
          box-shadow: 0 8px 24px rgba(23, 178, 106, 0.3);
}

.btn--primary:hover {
  background: #1CB98A;
  background: var(--accent-hover);
  color: #fff;
}

.btn--ghost {
  background: #fff;
  color: #1E2B33;
  color: var(--text);
  border: 1px solid rgba(30, 43, 51, 0.1);
}

.btn--ghost:hover {
  border-color: #29D49E;
  border-color: var(--accent);
  color: #29D49E;
  color: var(--accent);
}

.btn--dark {
  background: #101820;
  background: var(--dark);
  color: #fff;
  border-radius: 14px;
  font-size: 16px;
  padding: 14px 30px;
}

.btn--dark:hover {
  background: #000;
  color: #fff;
}

.btn--light {
  background: #fff;
  color: #101820;
  color: var(--dark);
  border-radius: 14px;
  font-size: 16px;
  padding: 14px 30px;
}

.btn--light:hover {
  background: #E8F7EF;
  color: #101820;
  color: var(--dark);
}

/* ---------- 导航 ---------- */
.nav {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(245, 248, 246, 0.96);
  border-bottom: 1px solid rgba(30, 43, 51, 0.06);
}

/* 支持毛玻璃的浏览器启用半透明模糊 */
@supports ((-webkit-backdrop-filter: blur(12px)) or (backdrop-filter: blur(12px))) {
  .nav {
    background: rgba(245, 248, 246, 0.92);
    -webkit-backdrop-filter: blur(12px);
            backdrop-filter: blur(12px);
  }
}

.nav__inner {
  height: 68px;
  height: var(--nav-h);
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  -webkit-box-pack: justify;
      -ms-flex-pack: justify;
          justify-content: space-between;
}

.nav__brand {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  gap: 10px;
}

.nav__logo {
  width: 36px;
  height: 36px;
  border-radius: 11px;
}

.nav__name {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 1px;
  color: #1E2B33;
  color: var(--text);
}

.nav__menu {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  gap: 32px;
  font-size: 15px;
  font-weight: 500;
}

.nav__link {
  color: #4A5A63;
  color: var(--text-muted);
}

.nav__link:hover {
  color: #29D49E;
  color: var(--accent);
}

.nav__link--cta {
  background: #29D49E;
  background: var(--accent);
  color: #fff;
  padding: 9px 20px;
  border-radius: 999px;
  font-weight: 700;
}

.nav__link--cta:hover {
  background: #1CB98A;
  background: var(--accent-hover);
  color: #fff;
}

/* 移动端汉堡按钮 */
.nav__toggle {
  display: none;
  background: none;
  border: 0;
  padding: 8px;
  cursor: pointer;
}

.nav__toggle-bar {
  display: block;
  width: 22px;
  height: 2px;
  background: #1E2B33;
  background: var(--text);
  margin: 5px 0;
  border-radius: 2px;
  -webkit-transition: -webkit-transform 0.25s, opacity 0.25s;
          transition: transform 0.25s, opacity 0.25s;
}

.nav__toggle.is-open .nav__toggle-bar:nth-child(1) {
  -webkit-transform: translateY(7px) rotate(45deg);
          transform: translateY(7px) rotate(45deg);
}

.nav__toggle.is-open .nav__toggle-bar:nth-child(2) {
  opacity: 0;
}

.nav__toggle.is-open .nav__toggle-bar:nth-child(3) {
  -webkit-transform: translateY(-7px) rotate(-45deg);
          transform: translateY(-7px) rotate(-45deg);
}

/* ---------- 首屏 ---------- */
.hero {
  background: #E8F7EF;
  background: -webkit-linear-gradient(290deg, #E8F7EF 0%, #F5F8F6 55%, #EAF4F8 100%);
  background: linear-gradient(160deg, #E8F7EF 0%, #F5F8F6 55%, #EAF4F8 100%);
  overflow: hidden;
}

.hero__inner {
  padding-top: 72px;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -ms-flex-wrap: wrap;
      flex-wrap: wrap;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  -webkit-box-pack: justify;
      -ms-flex-pack: justify;
          justify-content: space-between;
  gap: 48px;
}

.hero__text {
  -webkit-box-flex: 1;
      -ms-flex: 1 1 440px;
          flex: 1 1 440px;
  min-width: 280px;
  padding-bottom: 72px;
}

.hero__badge {
  display: -webkit-inline-box;
  display: -ms-inline-flexbox;
  display: inline-flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid rgba(23, 178, 106, 0.25);
  color: #29D49E;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 24px;
}

.hero__title {
  margin: 0 0 20px;
  font-size: 52px;
  line-height: 1.2;
  font-weight: 900;
  letter-spacing: 1px;
}

.hero__desc {
  margin: 0 0 36px;
  font-size: 18px;
  line-height: 1.9;
  color: #4A5A63;
  color: var(--text-muted);
  max-width: 460px;
}

.hero__actions {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  gap: 16px;
  -ms-flex-wrap: wrap;
      flex-wrap: wrap;
}

.hero__phone {
  -webkit-box-flex: 0;
      -ms-flex: 0 0 320px;
          flex: 0 0 320px;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
      -ms-flex-pack: center;
          justify-content: center;
}

/* ---------- 手机壳 ---------- */
.phone {
  width: 240px;
  border-radius: 32px;
  background: #fff;
  padding: 4px;
  border: 1px solid rgba(30, 43, 51, 0.08);
  -webkit-box-shadow: 0 16px 40px rgba(16, 40, 32, 0.12);
          box-shadow: 0 16px 40px rgba(16, 40, 32, 0.12);
}

.phone img {
  width: 100%;
  height: 492px;
  -o-object-fit: cover;
     object-fit: cover;
  -o-object-position: top;
     object-position: top;
  border-radius: 28px;
  background: #fff;
}

.phone--hero {
  width: 300px;
  border-radius: 40px 40px 0 0;
  padding: 5px 5px 0;
  -webkit-box-shadow: 0 24px 64px rgba(16, 40, 32, 0.18);
          box-shadow: 0 24px 64px rgba(16, 40, 32, 0.18);
}

.phone--hero img {
  height: 515px;
  border-radius: 35px 35px 0 0;
}

/* ---------- 通用 Section ---------- */
.section {
  padding: 96px 0 32px;
}

#screens.section {
  padding-top: 64px;
}

.section__head {
  text-align: center;
  margin-bottom: 56px;
}

.section__title {
  margin: 0 0 14px;
  font-size: 36px;
  font-weight: 900;
}

.section__sub {
  margin: 0;
  color: #4A5A63;
  color: var(--text-muted);
  font-size: 17px;
}

/* ---------- 功能特色 ---------- */
.features {
  display: -ms-grid;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.feature {
  background: #fff;
  border-radius: 24px;
  padding: 32px 28px;
  -webkit-box-shadow: 0 2px 12px rgba(16, 40, 32, 0.05);
          box-shadow: 0 2px 12px rgba(16, 40, 32, 0.05);
}

.feature__icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  -webkit-box-pack: center;
      -ms-flex-pack: center;
          justify-content: center;
  font-size: 24px;
  color: #fff;
  font-weight: 900;
  margin-bottom: 20px;
}

.feature__icon--red    { background: #F2665E; }
.feature__icon--blue   { background: #5B8DEF; }
.feature__icon--green  { background: #17B26A; }
.feature__icon--orange { background: #F5A623; }

.feature__title {
  margin: 0 0 10px;
  font-size: 19px;
  font-weight: 700;
}

.feature__desc {
  margin: 0;
  font-size: 15px;
  line-height: 1.8;
  color: #4A5A63;
  color: var(--text-muted);
}

/* ---------- 应用界面 ---------- */
.screens {
  display: -ms-grid;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 32px;
  justify-items: center;
}

.screen {
  margin: 0;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
      -ms-flex-direction: column;
          flex-direction: column;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  gap: 16px;
}

.screen figcaption {
  text-align: center;
}

.screen__label {
  display: block;
  font-size: 17px;
  font-weight: 700;
}

.screen__sub {
  display: block;
  font-size: 13.5px;
  color: #4A5A63;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ---------- 下载 ---------- */
.section--download {
  padding: 48px 0 96px;
}

.download {
  background: #29D49E;
  background: -webkit-linear-gradient(315deg, #29D49E 0%, #0FA37F 100%);
  background: linear-gradient(135deg, #29D49E 0%, #0FA37F 100%);
  border-radius: 32px;
  padding: 64px 48px;
  text-align: center;
  color: #fff;
}

.download__title {
  margin: 0 0 14px;
  font-size: 34px;
  font-weight: 900;
  color: #fff;
}

.download__sub {
  margin: 0 0 36px;
  font-size: 17px;
  color: rgba(255, 255, 255, 0.85);
}

.download__actions {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  gap: 16px;
  -webkit-box-pack: center;
      -ms-flex-pack: center;
          justify-content: center;
  -ms-flex-wrap: wrap;
      flex-wrap: wrap;
}

.download__note {
  margin: 28px 0 0;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
}

/* ---------- 页脚 ---------- */
.footer {
  background: #101820;
  background: var(--dark);
  color: #9AACB5;
}

.footer .container {
  padding-top: 56px;
  padding-bottom: 32px;
}

.footer__main {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -ms-flex-wrap: wrap;
      flex-wrap: wrap;
  gap: 48px;
  -webkit-box-pack: justify;
      -ms-flex-pack: justify;
          justify-content: space-between;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer__about {
  max-width: 340px;
}

.footer__brand {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.footer__logo {
  width: 32px;
  height: 32px;
  border-radius: 9px;
}

.footer__name {
  font-size: 18px;
  font-weight: 900;
  color: #fff;
}

.footer__desc {
  margin: 0;
  font-size: 14px;
  line-height: 1.9;
}

.footer__cols {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  gap: 64px;
  -ms-flex-wrap: wrap;
      flex-wrap: wrap;
}

.footer__col {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
      -ms-flex-direction: column;
          flex-direction: column;
  gap: 10px;
  font-size: 14px;
}

.footer__col-title {
  margin: 0 0 6px;
  color: #fff;
  font-weight: 700;
  font-size: 15px;
}

.footer__link {
  color: #9AACB5;
}

.footer__link:hover {
  color: #fff;
}

.footer__text {
  color: #9AACB5;
}

.footer__bottom {
  padding-top: 24px;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -ms-flex-wrap: wrap;
      flex-wrap: wrap;
  gap: 12px;
  -webkit-box-pack: justify;
      -ms-flex-pack: justify;
          justify-content: space-between;
  font-size: 13px;
  color: #6B7C86;
}

.footer__bottom .footer__link {
  color: #6B7C86;
}

.footer__bottom .footer__link:hover {
  color: #fff;
}

/* ---------- 滚动入场动画 ---------- */
.reveal {
  opacity: 0;
  -webkit-transform: translateY(24px);
          transform: translateY(24px);
  -webkit-transition: opacity 0.6s ease, -webkit-transform 0.6s ease;
          transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
  opacity: 1;
  -webkit-transform: none;
          transform: none;
}

/* 无 JS 或不支持 IntersectionObserver 时由 JS 补 is-visible；
   若 JS 完全未加载，保底显示 */
.no-js .reveal {
  opacity: 1;
  -webkit-transform: none;
          transform: none;
}

/* 用户偏好减少动效 */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .reveal {
    -webkit-transition: none;
            transition: none;
    opacity: 1;
    -webkit-transform: none;
            transform: none;
  }
}

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .hero__title {
    font-size: 42px;
  }
}

@media (max-width: 768px) {
  .nav__toggle {
    display: block;
  }

  .nav__menu {
    position: absolute;
    top: 68px;
    top: var(--nav-h);
    left: 0;
    right: 0;
    background: #F5F8F6;
    background: var(--bg);
    border-bottom: 1px solid rgba(30, 43, 51, 0.08);
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
        -ms-flex-direction: column;
            flex-direction: column;
    -webkit-box-align: stretch;
        -ms-flex-align: stretch;
            align-items: stretch;
    gap: 0;
    padding: 8px 0 16px;
    display: none;
  }

  .nav__menu.is-open {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
  }

  .nav__link {
    padding: 12px 24px;
  }

  .nav__link--cta {
    margin: 8px 24px 0;
    text-align: center;
    border-radius: 12px;
  }

  .hero__inner {
    padding-top: 48px;
    -webkit-box-pack: center;
        -ms-flex-pack: center;
            justify-content: center;
  }

  .hero__text {
    padding-bottom: 0;
    text-align: center;
  }

  .hero__desc {
    margin-left: auto;
    margin-right: auto;
  }

  .hero__actions {
    -webkit-box-pack: center;
        -ms-flex-pack: center;
            justify-content: center;
  }

  .hero__phone {
    -webkit-box-flex: 1;
        -ms-flex: 1 1 100%;
            flex: 1 1 100%;
  }

  .hero__title {
    font-size: 34px;
  }

  .section {
    padding: 64px 0 24px;
  }

  .section__title {
    font-size: 28px;
  }

  .download {
    padding: 48px 24px;
  }

  .download__title {
    font-size: 26px;
  }
}

@media (max-width: 480px) {
  .container {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero__title {
    font-size: 30px;
  }

  .hero__desc {
    font-size: 16px;
  }

  .btn {
    padding: 13px 24px;
    font-size: 15px;
  }

  .phone--hero {
    width: 260px;
  }

  .phone--hero img {
    height: 446px;
  }
}
