/* 校小伴官网。颜色与 App 的 uni.scss 一致：森林绿主色、天空浅蓝、深蓝文字。 */
:root {
  --ink: #101f3c;
  --muted: #52688c;
  --faint: #8a9ab5;
  --green: #078037;
  --green-hover: #066a2e;
  --green-deep: #00582a;
  --green-fresh: #3ce376;
  --green-tint: #eaf9ee;
  --sky: #e3f4fe;
  --page: #ffffff;
  --gray: #f4f7fb;
  --line: rgba(16, 31, 60, 0.1);
  --night: #062a17;
  --radius: 28px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC", "MiSans", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3, .hero__lead, .section-head p, .rider__lead, .download__lead { text-wrap: balance; }
.wrap { width: min(1120px, 100% - 48px); margin: 0 auto; }

/* ---- 顶部导航 ---- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 56px;
  background: rgba(255, 255, 255, 0.78);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}
.nav.is-scrolled { border-bottom-color: var(--line); }
.nav__inner { height: 100%; display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 18px; letter-spacing: 0.02em; }
.brand img { width: 32px; height: 32px; border-radius: 50%; background: var(--green-tint); }
.nav__links { margin-left: auto; display: flex; gap: 28px; font-size: 14px; color: var(--muted); }
.nav__links a:hover { color: var(--ink); }
.nav__cta { font-size: 14px; }

/* ---- 按钮 ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  padding: 0 26px;
  border-radius: 999px;
  font-size: 17px;
  font-weight: 600;
  border: 0;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s var(--ease), opacity 0.2s;
}
.btn:active { transform: scale(0.97); }
.btn--primary { background: var(--green); color: #fff; }
.btn--primary:hover { background: var(--green-hover); }
.btn--light { background: #fff; color: var(--green-deep); }
.btn--ghost { background: var(--green-tint); color: var(--green); }
.btn--small { height: 34px; padding: 0 16px; font-size: 14px; }
.btn[aria-disabled="true"] { background: var(--gray); color: var(--faint); cursor: default; }
.btn--light[aria-disabled="true"] { background: rgba(255, 255, 255, 0.14); color: rgba(255, 255, 255, 0.7); }
.more { color: var(--green); font-size: 17px; font-weight: 500; }
.more:hover { text-decoration: underline; }

/* ---- 手机外框 ---- */
.phone {
  position: relative;
  width: 300px;
  padding: 9px;
  border-radius: 50px;
  background: #0e1116;
  box-shadow: 0 0 0 1.5px #3a3f48 inset, 0 40px 80px -30px rgba(16, 31, 60, 0.45), 0 18px 36px -18px rgba(16, 31, 60, 0.3);
}
.phone::after {
  content: "";
  position: absolute;
  top: 17px;
  left: 50%;
  width: 29%;
  height: 22px;
  border-radius: 12px;
  background: #0e1116;
  transform: translateX(-50%);
}
.phone__screen { position: relative; aspect-ratio: 750 / 1624; border-radius: 41px; overflow: hidden; background: var(--sky); }
.phone__screen img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ---- 首屏 ---- */
.hero { position: relative; padding: 72px 0 0; text-align: center; overflow: hidden; background: linear-gradient(180deg, var(--sky) 0%, #f3f9ff 38%, #fff 78%); }
.hero__eyebrow { font-size: 19px; font-weight: 600; color: var(--green); }
.hero__title { margin-top: 10px; font-size: clamp(44px, 7.4vw, 88px); line-height: 1.08; font-weight: 700; letter-spacing: -0.01em; }
.hero__title span { display: inline-block; }
.hero__lead { margin: 22px auto 0; max-width: 620px; font-size: clamp(18px, 2vw, 22px); color: var(--muted); }
.hero__ctas { margin-top: 32px; display: flex; gap: 22px; justify-content: center; align-items: center; flex-wrap: wrap; }
.hero__stage { position: relative; height: 760px; margin-top: 64px; }
.hero__phone { position: absolute; left: 50%; top: 0; will-change: transform; }
.hero__phone--center { z-index: 3; transform: translate3d(-50%, calc(var(--p, 0) * -40px), 0) scale(calc(1 + var(--p, 0) * 0.04)); }
.hero__phone--left, .hero__phone--right { z-index: 2; width: 262px; top: 64px; opacity: 0.96; }
.hero__phone--left { transform: translate3d(calc(-50% - 250px - var(--p, 0) * 70px), calc(var(--p, 0) * 10px), 0) rotate(calc(-4deg - var(--p, 0) * 3deg)); }
.hero__phone--right { transform: translate3d(calc(-50% + 250px + var(--p, 0) * 70px), calc(var(--p, 0) * 10px), 0) rotate(calc(4deg + var(--p, 0) * 3deg)); }

/* 首屏进场：不依赖脚本，页面一打开就播放 */
@keyframes rise { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
@keyframes rise-phone { from { opacity: 0; translate: 0 90px; } to { opacity: 1; translate: 0 0; } }
.hero__eyebrow, .hero__title span, .hero__lead, .hero__ctas { animation: rise 0.9s var(--ease) both; }
.hero__title span:nth-child(1) { animation-delay: 0.08s; }
.hero__title span:nth-child(2) { animation-delay: 0.18s; }
.hero__lead { animation-delay: 0.3s; }
.hero__ctas { animation-delay: 0.4s; }
.hero__phone { animation: rise-phone 1.2s var(--ease) both; }
.hero__phone--center { animation-delay: 0.45s; }
.hero__phone--left, .hero__phone--right { animation-delay: 0.62s; }

/* ---- 文字逐字点亮 ---- */
.statement { padding: 150px 0 160px; }
.statement__text { max-width: 900px; font-size: clamp(30px, 4.4vw, 54px); line-height: 1.32; font-weight: 700; letter-spacing: 0.01em; }
.statement__text .ch { color: #d3dbe7; transition: color 0.35s; }
.statement__text .ch.is-lit { color: var(--ink); }
.statement__text .ch.is-lit.is-key { color: var(--green); }

/* ---- 功能：左边文字滚动，右边手机跟随切换 ---- */
.features { background: var(--gray); padding: 120px 0 40px; }
.section-head { text-align: center; }
.section-head .kicker { font-size: 19px; font-weight: 600; color: var(--green); }
.section-head h2 { margin-top: 8px; font-size: clamp(36px, 5.2vw, 64px); line-height: 1.12; font-weight: 700; }
.section-head p { margin: 18px auto 0; max-width: 600px; color: var(--muted); font-size: 19px; }
.features__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; margin-top: 40px; }
.chapter { min-height: 86vh; display: flex; flex-direction: column; justify-content: center; max-width: 440px; opacity: 0.22; transition: opacity 0.6s var(--ease); }
.chapter.is-active { opacity: 1; }
.chapter__tag { display: inline-flex; align-self: flex-start; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; background: var(--green-tint); color: var(--green); font-size: 15px; font-weight: 600; }
.chapter__tag svg { width: 18px; height: 18px; }
.chapter h3 { margin-top: 18px; font-size: clamp(32px, 3.6vw, 46px); line-height: 1.18; font-weight: 700; }
.chapter p { margin-top: 18px; font-size: 19px; color: var(--muted); }
.chapter .phone { display: none; }
.features__sticky { position: sticky; top: 0; height: 100vh; display: flex; align-items: center; justify-content: center; }
.features__sticky .phone { width: min(310px, calc((100vh - 150px) * 0.45)); }
.screens img { opacity: 0; transform: scale(1.04); transition: opacity 0.7s var(--ease), transform 0.9s var(--ease); }
.screens img.is-active { opacity: 1; transform: none; }
.dots { position: absolute; right: -36px; top: 50%; display: flex; flex-direction: column; gap: 10px; transform: translateY(-50%); }
.dots i { width: 6px; height: 6px; border-radius: 3px; background: #c4cfdd; transition: height 0.4s var(--ease), background 0.4s; }
.dots i.is-active { height: 26px; background: var(--green); }

/* ---- 放心用 ---- */
.trust { padding: 140px 0; }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 56px; }
.card { padding: 36px 32px 40px; border-radius: var(--radius); background: var(--gray); }
.card__icon { width: 52px; height: 52px; border-radius: 16px; display: flex; align-items: center; justify-content: center; background: #fff; color: var(--green); }
.card__icon svg { width: 28px; height: 28px; }
.card h3 { margin-top: 22px; font-size: 24px; line-height: 1.3; font-weight: 700; }
.card p { margin-top: 10px; color: var(--muted); font-size: 17px; }

/* ---- 骑手 ---- */
.rider { background: var(--night); color: #fff; padding: 140px 0; overflow: hidden; }
.rider__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; align-items: center; }
.rider .kicker { color: var(--green-fresh); font-size: 19px; font-weight: 600; }
.rider h2 { margin-top: 10px; font-size: clamp(38px, 5.2vw, 64px); line-height: 1.12; font-weight: 700; }
.rider__lead { margin-top: 22px; font-size: 19px; color: rgba(255, 255, 255, 0.74); max-width: 470px; }
.rider__points { list-style: none; padding: 0; margin: 30px 0 0; display: grid; gap: 14px; }
.rider__points li { display: flex; gap: 12px; align-items: flex-start; font-size: 17px; color: rgba(255, 255, 255, 0.9); }
.rider__points svg { flex: none; width: 22px; height: 22px; margin-top: 2px; color: var(--green-fresh); }
.rider__cta { margin-top: 36px; display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.rider__note { font-size: 14px; color: rgba(255, 255, 255, 0.55); }
.rider__visual { position: relative; width: 100%; max-width: 440px; justify-self: center; }
.rider__shot { border-radius: 32px; overflow: hidden; padding-top: 22px; background: #f2f9fd; box-shadow: 0 50px 90px -40px rgba(0, 0, 0, 0.7); }
.ping {
  position: absolute;
  left: -36px;
  top: -74px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px 14px 14px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--ink);
  box-shadow: 0 24px 48px -20px rgba(0, 0, 0, 0.6);
  animation: ping 4.8s var(--ease) infinite;
}
.ping__bell { width: 40px; height: 40px; border-radius: 12px; background: var(--green); color: #fff; display: flex; align-items: center; justify-content: center; }
.ping__bell svg { width: 22px; height: 22px; animation: wiggle 4.8s ease-in-out infinite; transform-origin: 50% 10%; }
.ping b { display: block; font-size: 15px; }
.ping span { font-size: 13px; color: var(--muted); }
@keyframes ping {
  0%, 8% { opacity: 0; transform: translateY(-14px) scale(0.96); }
  16%, 78% { opacity: 1; transform: none; }
  90%, 100% { opacity: 0; transform: translateY(-8px) scale(0.98); }
}
@keyframes wiggle {
  16% { transform: rotate(0); }
  20% { transform: rotate(16deg); }
  24% { transform: rotate(-14deg); }
  28% { transform: rotate(10deg); }
  32% { transform: rotate(-6deg); }
  36%, 100% { transform: rotate(0); }
}

/* ---- 下载 ---- */
.download { padding: 140px 0 120px; text-align: center; }
.download__mascot { width: 120px; height: 120px; margin: 0 auto; animation: bob 3.6s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-10px) rotate(-3deg); } }
.download h2 { margin-top: 18px; font-size: clamp(38px, 5.2vw, 64px); line-height: 1.12; font-weight: 700; }
.download__lead { margin-top: 16px; color: var(--muted); font-size: 19px; }
.options { display: flex; justify-content: center; gap: 20px; margin-top: 56px; flex-wrap: wrap; }
.option { flex: 1 1 280px; max-width: 340px; padding: 36px 28px 32px; border-radius: var(--radius); background: var(--gray); display: flex; flex-direction: column; align-items: center; gap: 12px; }
.option__icon { width: 56px; height: 56px; color: var(--ink); }
.option h3 { font-size: 22px; font-weight: 700; }
.option__meta { font-size: 15px; color: var(--muted); min-height: 24px; }
.option__meta.is-soon { color: var(--green); font-weight: 600; }
.option .btn { margin-top: 8px; width: 100%; }
.option__qr { width: 156px; height: 156px; border-radius: 16px; background: #fff; padding: 10px; object-fit: contain; }
.download__tip { margin: 28px auto 0; max-width: 620px; font-size: 14px; color: var(--faint); text-wrap: balance; }

/* ---- 页脚 ---- */
.footer { background: var(--gray); color: var(--muted); font-size: 13px; padding: 36px 0 44px; }
.footer__row { display: flex; flex-wrap: wrap; gap: 10px 26px; align-items: center; }
.footer__row + .footer__row { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.footer a:hover { color: var(--ink); text-decoration: underline; }
.footer__brand { display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--ink); font-size: 15px; }
.footer__brand img { width: 24px; height: 24px; border-radius: 50%; }
.footer__right { margin-left: auto; }

/* ---- 微信内打开提示 ---- */
.wx-mask { position: fixed; inset: 0; z-index: 100; background: rgba(6, 20, 12, 0.82); color: #fff; display: none; padding: 24px; }
.wx-mask.is-open { display: block; }
.wx-mask__arrow { position: absolute; right: 22px; top: 8px; width: 90px; height: 90px; color: #fff; }
.wx-mask__text { margin-top: 110px; font-size: 22px; font-weight: 600; line-height: 1.5; text-align: right; padding-right: 10px; }
.wx-mask__text small { display: block; margin-top: 10px; font-size: 15px; font-weight: 400; color: rgba(255, 255, 255, 0.75); }

/* ---- 协议页 ---- */
.doc { padding: 72px 0 120px; }
.doc__inner { max-width: 760px; margin: 0 auto; }
.doc h1 { font-size: clamp(32px, 4.4vw, 46px); line-height: 1.2; font-weight: 700; }
.doc__meta { margin-top: 12px; color: var(--muted); font-size: 15px; }
.doc__switch { margin-top: 22px; display: flex; gap: 10px; }
.doc__switch a { padding: 6px 16px; border-radius: 999px; background: var(--gray); font-size: 14px; color: var(--muted); }
.doc__switch a.is-current { background: var(--green-tint); color: var(--green); font-weight: 600; }
.doc__body { margin-top: 40px; font-size: 16px; line-height: 1.85; color: #2b3a55; }
.doc__body h2 { margin: 36px 0 12px; font-size: 22px; line-height: 1.4; color: var(--ink); }
.doc__body h3 { margin: 26px 0 8px; font-size: 18px; color: var(--ink); }
.doc__body p { margin: 0 0 12px; }
.doc__body ul { margin: 0 0 12px; padding-left: 1.4em; }
.doc__state { margin-top: 40px; color: var(--muted); }

/* ---- 滚动出现（只在脚本生效后隐藏，避免打不开脚本时一片空白） ---- */
.motion .reveal { opacity: 0; transform: translateY(36px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); transition-delay: var(--d, 0s); }
.motion .reveal.is-in { opacity: 1; transform: none; }
.reveal.d1 { --d: 0.1s; }
.reveal.d2 { --d: 0.2s; }

/* ---- 平板和手机 ---- */
@media (max-width: 960px) {
  .nav__links { display: none; }
  .nav__cta { margin-left: auto; }
  .hero__stage { height: 610px; margin-top: 48px; }
  .hero .hero__phone--center { width: 236px; }
  .hero .hero__phone--left, .hero .hero__phone--right { width: 200px; top: 52px; }
  .hero__phone--left { transform: translate3d(calc(-50% - 190px - var(--p, 0) * 40px), 0, 0) rotate(-5deg); }
  .hero__phone--right { transform: translate3d(calc(-50% + 190px + var(--p, 0) * 40px), 0, 0) rotate(5deg); }
  .features__grid { grid-template-columns: minmax(0, 1fr); }
  .features__sticky { display: none; }
  .chapter { min-height: 0; max-width: none; opacity: 1; padding: 56px 0 8px; align-items: flex-start; }
  .chapter .phone { display: block; width: min(280px, 72vw); margin: 40px auto 0; }
  .cards { grid-template-columns: minmax(0, 1fr); }
  .rider__grid { grid-template-columns: minmax(0, 1fr); gap: 72px; }
  .rider__visual { max-width: 460px; margin: 0 auto; width: 100%; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .wrap { width: calc(100% - 32px); }
  .hero { padding-top: 48px; }
  .hero__ctas { gap: 16px; }
  .hero__stage { height: 500px; }
  .hero .phone { padding: 7px; border-radius: 34px; }
  .hero .phone__screen { border-radius: 28px; }
  .hero .phone::after { top: 13px; height: 15px; }
  .hero .hero__phone--center { width: 196px; }
  .hero .hero__phone--left, .hero .hero__phone--right { width: 160px; top: 46px; }
  .hero__phone--left { transform: translate3d(calc(-50% - 132px), 0, 0) rotate(-6deg); }
  .hero__phone--right { transform: translate3d(calc(-50% + 132px), 0, 0) rotate(6deg); }
  .statement { padding: 96px 0 104px; }
  .features, .trust, .rider, .download { padding-top: 96px; padding-bottom: 96px; }
  .chapter p, .section-head p, .rider__lead, .download__lead { font-size: 17px; }
  .card { padding: 28px 24px 30px; }
  .ping { left: 8px; top: -66px; }
  .footer__right { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .motion .reveal { opacity: 1; transform: none; }
  .statement__text .ch { color: var(--ink); }
  .hero__phone { --p: 0 !important; }
}
