/* 合唱帮 · 老师指南 — restrained, type-led, mobile first */
:root {
  --bg: #ffffff;
  --bg-alt: #f5f5f7;
  --ink: #1d1d1f;
  --ink-2: #6e6e73;
  --ink-3: #86868b;
  --line: rgba(0, 0, 0, .08);
  --brand: #1f5546;
  --brand-soft: rgba(31, 85, 70, .08);
  --ease: cubic-bezier(.22, .7, .2, 1);
  --nav-h: 52px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.5 -apple-system, BlinkMacSystemFont, "SF Pro SC", "SF Pro Text", "PingFang SC", "Helvetica Neue", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
  letter-spacing: .01em;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
.wrap { width: min(1080px, 100% - 44px); margin: 0 auto; }
.wrap.narrow { width: min(720px, 100% - 44px); }

/* ---------- nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 50; height: var(--nav-h);
  background: rgba(255, 255, 255, .72);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  transition: box-shadow .3s;
}
.nav.is-scrolled { box-shadow: 0 1px 0 var(--line); }
.nav-in { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 600; font-size: 16px; }
.brand img { width: 28px; height: 28px; object-fit: contain; }
.brand span { color: var(--ink-3); font-weight: 400; font-size: 13px; margin-left: 2px; }
.nav-links { display: none; gap: 26px; font-size: 13px; }
.nav-links a { color: var(--ink-2); transition: color .2s; }
.nav-links a:hover, .nav-links a.is-active { color: var(--ink); }
.progress { position: absolute; left: 0; bottom: 0; height: 1px; width: 0; background: var(--brand); opacity: .6; }
@media (min-width: 820px) { .nav-links { display: flex; } }

/* ---------- type ---------- */
.kicker { font-size: 14px; font-weight: 600; color: var(--brand); letter-spacing: .04em; margin-bottom: 14px; }
h1 { font-size: clamp(40px, 8.4vw, 84px); line-height: 1.08; font-weight: 700; letter-spacing: -.02em; }
h1 span { color: var(--ink-3); }
h2 { font-size: clamp(32px, 6vw, 56px); line-height: 1.12; font-weight: 700; letter-spacing: -.015em; }
h3 { font-size: clamp(24px, 3.4vw, 34px); line-height: 1.2; font-weight: 700; letter-spacing: -.01em; }
.sub { margin-top: 14px; font-size: clamp(17px, 2.1vw, 21px); line-height: 1.5; color: var(--ink-2); }

/* ---------- phone ---------- */
.phone {
  position: relative; width: 248px; padding: 8px; border-radius: 42px;
  background: #000000;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .14), inset 0 0 0 1px rgba(255, 255, 255, .1), 0 30px 60px -28px rgba(0, 0, 0, .38);
}
.screen { position: relative; overflow: hidden; border-radius: 34px; aspect-ratio: 375 / 809; background: #000000; }
.screen::after { content: ""; position: absolute; inset: -1px; border-radius: inherit; box-shadow: inset 0 0 0 2px #000000; pointer-events: none; z-index: 2; }
.screen img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 0%; transition: opacity .35s ease; }
.screen img.is-leaving { opacity: 0; }

/* ---------- hero ---------- */
.hero { padding: calc(var(--nav-h) + clamp(56px, 10vw, 112px)) 0 0; text-align: center; overflow: hidden; }
.hero .sub { margin-top: 18px; }
.hero-phones {
  margin-top: clamp(48px, 8vw, 80px);
  display: flex; justify-content: center; align-items: flex-end; gap: clamp(16px, 3vw, 36px);
  height: clamp(360px, 62vw, 600px); overflow: hidden;
  -webkit-mask-image: linear-gradient(#000 78%, transparent); mask-image: linear-gradient(#000 78%, transparent);
}
.hero-phones .phone { flex: none; align-self: flex-start; }
.hero-phones .main { width: clamp(220px, 30vw, 300px); }
.hero-phones .side { width: clamp(180px, 25vw, 252px); margin-top: clamp(40px, 7vw, 72px); }
@media (max-width: 640px) { .hero-phones .side { display: none; } }

/* ---------- flow ---------- */
.flow { padding: clamp(48px, 8vw, 96px) 0 clamp(64px, 10vw, 120px); border-bottom: 1px solid var(--line); }
.flow-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; text-align: center; }
.flow-list a { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 4px; border-radius: 18px; transition: background .25s; }
.flow-list a:hover { background: var(--bg-alt); }
.flow-list b { font-size: clamp(36px, 6vw, 56px); line-height: 1; font-weight: 200; color: var(--brand); font-variant-numeric: tabular-nums; }
.flow-list strong { font-size: clamp(17px, 2.2vw, 22px); font-weight: 600; margin-top: 6px; }
.flow-list span { font-size: clamp(13px, 1.6vw, 15px); color: var(--ink-2); }

/* ---------- chapter ---------- */
.chapter { padding: clamp(80px, 13vw, 150px) 0; }
.chapter.alt { background: var(--bg-alt); }
.head { max-width: 720px; margin: 0 auto clamp(40px, 6vw, 72px); text-align: center; }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 22px; }
.chips span { display: inline-flex; align-items: baseline; gap: 8px; padding: 9px 16px; border-radius: 999px; background: var(--bg-alt); font-size: 15px; color: var(--ink-2); }
.chips b { color: var(--ink); font-weight: 600; }
.alt .chips span { background: #fff; }

/* ---------- step demo ---------- */
.demo { display: grid; gap: 28px; justify-items: center; }
.demo .phone { width: min(232px, 62vw); }
.steps { list-style: none; margin: 0; padding: 0; width: 100%; max-width: 440px; counter-reset: s; }
.steps li {
  position: relative; counter-increment: s; cursor: pointer;
  display: grid; grid-template-columns: 28px 1fr; column-gap: 14px; align-items: baseline;
  padding: 14px 0; border-top: 1px solid var(--line);
  font-size: 17px; line-height: 1.45; color: var(--ink-3);
  transition: color .3s;
  -webkit-tap-highlight-color: transparent;
}
.steps li:last-child { border-bottom: 1px solid var(--line); }
.steps li::before {
  content: counter(s); grid-row: span 2;
  width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  font-size: 13px; font-weight: 600; color: var(--ink-3); box-shadow: inset 0 0 0 1px currentColor;
  transform: translateY(-1px); transition: all .3s;
}
.steps li small { grid-column: 2; display: block; font-size: 14px; color: var(--ink-3); margin-top: 2px; }
.steps li.is-active { color: var(--ink); font-weight: 500; }
.steps li.is-active::before { background: var(--brand); color: #fff; box-shadow: none; }
.steps li:focus-visible { outline: 2px solid var(--brand); outline-offset: 4px; border-radius: 6px; }
.steps li::after {
  content: ""; position: absolute; left: 0; bottom: -1px; height: 1px; width: 0; background: var(--brand);
}
.demo.is-playing .steps li.is-active::after { animation: tick var(--tick, 4.2s) linear forwards; }
@keyframes tick { to { width: 100%; } }

@media (min-width: 820px) {
  .demo { grid-template-columns: auto minmax(0, 440px); justify-content: center; align-items: center; column-gap: clamp(56px, 9vw, 120px); }
  .demo .phone { width: 300px; }
  .steps li { padding: 18px 0; font-size: 19px; }
  .steps li:hover { color: var(--ink-2); }
  .steps li.is-active:hover { color: var(--ink); }
}

/* hotspot + highlight on screen */
.screen .dot, .screen .box { position: absolute; pointer-events: none; transition: opacity .3s, left .45s var(--ease), top .45s var(--ease), width .45s var(--ease), height .45s var(--ease); }
.screen .dot {
  width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%;
  background: rgba(31, 85, 70, .22); box-shadow: 0 0 0 2px rgba(255, 255, 255, .9), 0 0 0 4px rgba(31, 85, 70, .55);
}
.screen .dot::after { content: ""; position: absolute; inset: -2px; border-radius: 50%; border: 2px solid var(--brand); animation: ping 1.8s var(--ease) infinite; }
@keyframes ping { 0% { transform: scale(1); opacity: .8; } 100% { transform: scale(2.1); opacity: 0; } }
.screen .box { border-radius: 12px; box-shadow: 0 0 0 2px var(--brand), 0 0 0 999px rgba(0, 0, 0, .18); }
.is-hidden { opacity: 0 !important; }

/* ---------- student gallery ---------- */
.gallery {
  display: grid; grid-auto-flow: column; grid-auto-columns: 172px; gap: 18px;
  overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 22px 24px; margin: 0 -22px;
  scrollbar-width: none;
}
.gallery::-webkit-scrollbar { display: none; }
.gallery figure { margin: 0; scroll-snap-align: center; }
.gallery .phone { width: 100%; padding: 6px; border-radius: 30px; }
.gallery .screen { border-radius: 25px; }
.gallery figcaption { margin-top: 16px; text-align: center; font-size: 15px; font-weight: 500; color: var(--ink-2); }
@media (min-width: 820px) {
  .gallery { grid-auto-flow: row; grid-template-columns: repeat(4, 1fr); overflow: visible; margin: 0; padding: 0; gap: clamp(20px, 3vw, 40px); }
  .gallery .phone { max-width: 220px; margin: 0 auto; }
}

.feature {
  margin-top: clamp(72px, 12vw, 140px);
  display: grid; gap: 40px; justify-items: center; text-align: center;
}
.feature .phone { width: 264px; }
.feature ul { list-style: none; margin: 32px 0 0; padding: 0; display: grid; gap: 0; text-align: left; }
.feature li { display: grid; gap: 2px; padding: 16px 0; border-top: 1px solid var(--line); }
.feature li b { font-weight: 600; font-size: 17px; }
.feature li span { color: var(--ink-2); font-size: 15px; }
@media (min-width: 820px) {
  .feature { grid-template-columns: auto minmax(0, 420px); justify-content: center; align-items: center; column-gap: clamp(56px, 9vw, 120px); text-align: left; }
  .feature .phone { width: 300px; }
}

/* ---------- tips ---------- */
.tips { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.tip { padding: 26px 22px; border-radius: 22px; background: var(--bg-alt); }
.tip svg { width: 28px; height: 28px; fill: none; stroke: var(--brand); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.tip h3 { margin-top: 18px; font-size: 17px; letter-spacing: 0; }
.tip p { margin-top: 6px; font-size: 14px; color: var(--ink-2); }
@media (min-width: 820px) { .tips { grid-template-columns: repeat(4, 1fr); gap: 20px; } .tip { padding: 32px 28px; } .tip h3 { font-size: 19px; } .tip p { font-size: 15px; } }

/* ---------- faq ---------- */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 20px 0; font-size: 17px; font-weight: 500;
  -webkit-tap-highlight-color: transparent;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 10px; height: 10px; margin-right: 4px;
  border-right: 1.6px solid var(--ink-3); border-bottom: 1.6px solid var(--ink-3);
  transform: rotate(45deg) translateY(-3px); transition: transform .3s var(--ease);
}
.faq details[open] summary::after { transform: rotate(-135deg) translateY(-1px); }
.faq details p { padding: 0 32px 22px 0; color: var(--ink-2); font-size: 16px; }

/* ---------- cheat sheet ---------- */
.sheet { display: grid; gap: 40px; justify-items: center; text-align: center; }
.sheet img { width: min(300px, 80%); border-radius: 18px; box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .3), 0 0 0 1px var(--line); }
.btn {
  display: inline-flex; align-items: center; margin-top: 28px; padding: 12px 24px; border-radius: 999px;
  background: var(--brand); color: #fff; font-size: 16px; font-weight: 500; transition: opacity .2s;
}
.btn:hover { opacity: .88; }
@media (min-width: 820px) { .sheet { grid-template-columns: auto auto; justify-content: center; align-items: center; column-gap: 96px; text-align: left; } }

/* ---------- launch qr ---------- */
.launch { display: flex; flex-direction: column; align-items: center; text-align: center; }
.qr-card {
  margin-top: clamp(32px, 5vw, 44px); padding: 18px; border-radius: 28px; background: #fff;
  box-shadow: 0 24px 48px -28px rgba(0, 0, 0, .18), 0 0 0 1px var(--line);
}
.qr-card img { width: 188px; height: 188px; border-radius: 14px; }
.launch .sub { margin-top: 22px; font-size: 15px; }

/* ---------- footer ---------- */
.footer { padding: 32px 0 calc(32px + env(safe-area-inset-bottom)); background: var(--bg); border-top: 1px solid var(--line); text-align: center; }
.footer p { font-size: 12px; color: var(--ink-3); line-height: 1.8; }

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .screen .dot::after, .demo.is-playing .steps li.is-active::after { animation: none; }
}
