/* ==========================================================================
   记课 CourseRecord — 产品官网样式
   设计要点：
   1. 只有一套变量，浅色/深色都从变量取值，不在组件里写死颜色。
   2. 骨架用 grid + clamp()，不做断点堆叠，窄屏自然坍缩成一列。
   3. 所有动效都可以被 prefers-reduced-motion 关掉。
   @author yangtm
   ========================================================================== */

:root {
  /* 首屏柔光：深色下必须收着用，否则纯黑底上会糊成一团红雾 */
  --hero-glow-1: rgba(255, 59, 78, 0.2);
  --hero-glow-2: rgba(255, 138, 76, 0.14);
  --hero-glow-3: rgba(255, 59, 78, 0.07);

  --brand: #ff3b4e;
  --brand-light: #ff6a78;
  --brand-deep: #e02438;
  --brand-soft: rgba(255, 59, 78, 0.09);

  --bg: #ffffff;
  --bg-soft: #f5f5f7;
  --bg-elevated: #ffffff;
  --card: #ffffff;
  --line: rgba(0, 0, 0, 0.08);
  --line-strong: rgba(0, 0, 0, 0.14);

  --text: #1d1d1f;
  --text-2: #6e6e73;
  --text-3: #909096;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04), 0 4px 14px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 10px 34px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 30px 80px rgba(0, 0, 0, 0.12);

  --radius-sm: 12px;
  --radius: 18px;
  --radius-lg: 26px;

  --nav-h: 64px;
  --max: 1120px;
}

html[data-theme='dark'] {
  --bg: #08080a;
  --bg-soft: #131316;
  --bg-elevated: #1a1a1e;
  --card: #16161a;
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.18);

  --text: #f5f5f7;
  --text-2: #a1a1a6;
  --text-3: #77777d;

  --brand-soft: rgba(255, 59, 78, 0.16);
  --hero-glow-1: rgba(255, 59, 78, 0.07);
  --hero-glow-2: rgba(255, 138, 76, 0.04);
  --hero-glow-3: rgba(255, 59, 78, 0.035);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4), 0 4px 14px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 10px 34px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 30px 80px rgba(0, 0, 0, 0.6);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 20px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro SC', 'SF Pro Text', 'PingFang SC',
    'HarmonyOS Sans SC', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
  border: 0;
  background: none;
}

.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

/* ------------------------------------------------------------------ 导航 */

.nav {
  position: sticky;
  top: 0;
  z-index: 60;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  border-bottom: 1px solid transparent;
  transition: background 0.25s ease, border-color 0.25s ease, backdrop-filter 0.25s ease;
}

.nav.is-stuck {
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom-color: var(--line);
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.01em;
  flex-shrink: 0;
}

.brand img {
  width: 28px;
  height: 28px;
  border-radius: 8px;
}

.brand-sub {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-3);
  letter-spacing: 0;
  margin-left: 2px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 18px;
}

.nav-links a {
  padding: 7px 12px;
  border-radius: 10px;
  font-size: 14px;
  color: var(--text-2);
  transition: color 0.2s, background 0.2s;
}

.nav-links a:hover {
  color: var(--text);
  background: var(--bg-soft);
}

.nav-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* 语言切换 */
.lang {
  display: flex;
  align-items: center;
  padding: 3px;
  border-radius: 11px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
}

.lang button {
  padding: 5px 9px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-3);
  transition: color 0.18s, background 0.18s;
  white-space: nowrap;
}

.lang button:hover {
  color: var(--text);
}

.lang button.is-on {
  color: var(--text);
  background: var(--card);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.09);
}

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  transition: transform 0.18s ease, box-shadow 0.22s ease, background 0.22s ease, color 0.2s;
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.975);
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, #ff5c6d 0%, var(--brand) 45%, var(--brand-deep) 100%);
  box-shadow: 0 6px 20px rgba(255, 59, 78, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.btn-primary:hover {
  box-shadow: 0 10px 28px rgba(255, 59, 78, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.btn-ghost {
  color: var(--text);
  background: var(--bg-soft);
  border: 1px solid var(--line);
}

.btn-ghost:hover {
  background: var(--card);
  border-color: var(--line-strong);
}

.btn-sm {
  height: 38px;
  padding: 0 16px;
  font-size: 14px;
}

.nav .btn-sm {
  display: inline-flex;
}

.theme-btn {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  color: var(--text-2);
}

.theme-btn:hover {
  color: var(--text);
  border-color: var(--line-strong);
}

.theme-btn svg {
  width: 17px;
  height: 17px;
}

.nav-toggle {
  display: none;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  align-items: center;
  justify-content: center;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  color: var(--text);
}

/* ------------------------------------------------------------------ 首屏 */

.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(48px, 8vw, 96px) 0 clamp(56px, 9vw, 110px);
}

/* 柔光：主色光斑，边缘衰减时垫一层极淡主色，避免露出纯白断层 */
.hero::before {
  content: '';
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 150%;
  background:
    radial-gradient(46% 44% at 78% 8%, var(--hero-glow-1) 0%, rgba(255, 59, 78, 0) 62%),
    radial-gradient(38% 40% at 12% 0%, var(--hero-glow-2) 0%, rgba(255, 138, 76, 0) 60%),
    radial-gradient(50% 50% at 50% 100%, var(--hero-glow-3) 0%, rgba(255, 59, 78, 0) 70%);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
}

.badge .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #2ecc71;
  box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.16);
}

h1 {
  margin: 20px 0 0;
  text-wrap: balance;
  font-size: clamp(38px, 6.2vw, 66px);
  line-height: 1.06;
  letter-spacing: -0.03em;
  font-weight: 800;
}

h1 .accent {
  display: block;
  background: linear-gradient(100deg, var(--brand-light) 0%, var(--brand) 50%, var(--brand-deep) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-desc {
  margin: 22px 0 0;
  max-width: 34em;
  font-size: clamp(15px, 1.5vw, 17.5px);
  line-height: 1.72;
  color: var(--text-2);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.hero-note {
  margin: 16px 0 0;
  font-size: 13px;
  color: var(--text-3);
  display: flex;
  align-items: center;
  gap: 7px;
}

.hero-note svg {
  width: 15px;
  height: 15px;
  color: #2ecc71;
  flex-shrink: 0;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px 28px;
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.hero-stat b {
  display: block;
  font-size: 24px;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.hero-stat span {
  font-size: 12.5px;
  color: var(--text-3);
}

/* ------------------------------------------------------------ 手机样机 */

.phone-stage {
  position: relative;
  display: flex;
  justify-content: center;
  /* 上下留出浮卡的位置，浮卡放在留白里就不会压住手机内容 */
  padding: 54px 0 64px;
  perspective: 1400px;
}

.phone {
  position: relative;
  width: min(278px, 74%);
  aspect-ratio: 292 / 600;
  border-radius: 46px;
  padding: 9px;
  background: linear-gradient(160deg, #2b2b30, #101013 60%);
  box-shadow: var(--shadow-lg), inset 0 0 0 1px rgba(255, 255, 255, 0.12);
  transform: rotateY(-9deg) rotateX(4deg) rotate(1deg);
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.phone:hover {
  transform: rotateY(-3deg) rotateX(1deg) rotate(0deg);
}

.phone-screen {
  position: relative;
  height: 100%;
  border-radius: 38px;
  overflow: hidden;
  background: var(--bg-soft);
  display: flex;
  flex-direction: column;
}

.phone-notch {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 78px;
  height: 22px;
  border-radius: 999px;
  background: #0a0a0c;
  z-index: 2;
}

.phone-bar {
  padding: 16px 18px 4px;
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 600;
  color: var(--text);
  opacity: 0.75;
}

.phone-body {
  flex: 1;
  padding: 4px 14px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
}

.phone-h {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 6px 4px 2px;
  color: var(--text);
}

.phone-sub {
  font-size: 11.5px;
  color: var(--text-3);
  margin: 0 4px 6px;
}

/* 深色下手机屏幕要自己提亮一层，否则卡片和屏幕糊成一片 */
html[data-theme='dark'] .phone-screen {
  background: #0d0d10;
}

html[data-theme='dark'] .pcard {
  background: #1f1f24;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

html[data-theme='dark'] .pprog {
  background: #2c2c33;
}

html[data-theme='dark'] .phone-tabs {
  background: rgba(16, 16, 20, 0.92);
}

.pcard {
  background: var(--card);
  border-radius: 16px;
  padding: 12px 13px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05), 0 6px 16px rgba(0, 0, 0, 0.05);
}

.pcard-row {
  display: flex;
  align-items: center;
  gap: 9px;
}

/* 中间文字块必须能收缩，否则英文长文案会把右侧胶囊顶出卡片 */
.pcard-row > div:not(.pavatar):not(.ppill) {
  min-width: 0;
  flex: 1;
}

.pcard-row .pname,
.pcard-row .pmeta {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pavatar {
  width: 32px;
  height: 32px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.pname {
  font-size: 13px;
  font-weight: 650;
  color: var(--text);
  letter-spacing: -0.01em;
}

.pmeta {
  font-size: 11px;
  color: var(--text-3);
  margin-top: 1px;
}

.ppill {
  margin-left: auto;
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 650;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  white-space: nowrap;
}

.ppill.done {
  background: rgba(46, 204, 113, 0.13);
  color: #23a35b;
}

.pprog {
  height: 5px;
  border-radius: 999px;
  background: var(--bg-soft);
  margin-top: 11px;
  overflow: hidden;
}

.pprog i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand-light), var(--brand));
}

.pmini {
  display: flex;
  justify-content: space-between;
  font-size: 10.5px;
  color: var(--text-3);
  margin-top: 7px;
}

.phone-tabs {
  margin-top: auto;
  display: flex;
  justify-content: space-around;
  padding: 9px 6px calc(9px + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--card) 88%, transparent);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  font-size: 9.5px;
  color: var(--text-3);
}

.phone-tabs div {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

.phone-tabs .on {
  color: var(--brand);
  font-weight: 700;
}

.phone-tabs svg {
  width: 17px;
  height: 17px;
}

/* 悬浮小卡：给样机一点层次 */
.float-card {
  position: absolute;
  z-index: 3;
  background: color-mix(in srgb, var(--card) 92%, transparent);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 11px 14px;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: floaty 6s ease-in-out infinite;
}

.float-card.a {
  left: 4%;
  top: 0;
}

.float-card.b {
  right: 4%;
  bottom: -4px;
  animation-delay: -3s;
}

.float-card .ico {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.float-card .ico svg {
  width: 16px;
  height: 16px;
}

.float-card .t {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.float-card .d {
  font-size: 10.5px;
  color: var(--text-3);
  white-space: nowrap;
}

@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}

/* ------------------------------------------------------------------ 通用区块 */

section {
  padding: clamp(56px, 8vw, 104px) 0;
}

.sec-head {
  max-width: 620px;
  margin: 0 auto clamp(32px, 4vw, 56px);
  text-align: center;
}

.kicker {
  display: inline-block;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 12px;
}

h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
  letter-spacing: -0.025em;
  font-weight: 780;
}

.sec-desc {
  margin: 14px 0 0;
  font-size: 15.5px;
  line-height: 1.7;
  color: var(--text-2);
}

/* ------------------------------------------------------------------ 功能 */

.features {
  background: var(--bg-soft);
}

.fgrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(268px, 1fr));
  gap: 16px;
}

.fcard {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 26px 24px 28px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s, border-color 0.3s;
}

.fcard:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: color-mix(in srgb, var(--brand) 28%, var(--line));
}

.fico {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--brand-soft);
  color: var(--brand);
  margin-bottom: 18px;
}

.fico svg {
  width: 21px;
  height: 21px;
}

.fcard h3 {
  margin: 0 0 8px;
  font-size: 16.5px;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.fcard p {
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-2);
}

/* ------------------------------------------------------------------ 流程 */

.flow-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  counter-reset: step;
}

.step {
  position: relative;
  padding: 30px 26px;
  border-radius: var(--radius-lg);
  background: var(--card);
  border: 1px solid var(--line);
}

.step-no {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 750;
  color: #fff;
  background: linear-gradient(135deg, var(--brand-light), var(--brand-deep));
  box-shadow: 0 4px 14px rgba(255, 59, 78, 0.28);
}

.step h3 {
  margin: 16px 0 7px;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.step p {
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-2);
}

/* ------------------------------------------------------------------ FAQ */

.faq-list {
  max-width: 780px;
  margin: 0 auto;
  display: grid;
  gap: 10px;
}

details.qa {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 22px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.25s;
}

details.qa[open] {
  border-color: color-mix(in srgb, var(--brand) 30%, var(--line));
}

details.qa summary {
  list-style: none;
  cursor: pointer;
  padding: 19px 0;
  font-size: 15.5px;
  font-weight: 650;
  letter-spacing: -0.012em;
  display: flex;
  align-items: center;
  gap: 14px;
}

details.qa summary::-webkit-details-marker {
  display: none;
}

details.qa summary .chev {
  margin-left: auto;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--text-3);
  transition: transform 0.25s ease;
}

details.qa[open] summary .chev {
  transform: rotate(180deg);
  color: var(--brand);
}

details.qa .ans {
  margin: 0;
  padding: 0 0 21px;
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--text-2);
}

/* ------------------------------------------------------------------ 行动区 */

.cta {
  padding: clamp(48px, 7vw, 88px) 0;
}

.cta-box {
  position: relative;
  overflow: hidden;
  border-radius: 32px;
  padding: clamp(36px, 6vw, 68px) clamp(24px, 5vw, 60px);
  background: linear-gradient(135deg, #ff5c6d 0%, var(--brand) 46%, #c8122a 100%);
  color: #fff;
  text-align: center;
  box-shadow: 0 24px 60px rgba(255, 59, 78, 0.28);
}

.cta-box::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(40% 60% at 82% 10%, rgba(255, 255, 255, 0.24), transparent 70%),
    radial-gradient(45% 60% at 12% 92%, rgba(255, 255, 255, 0.16), transparent 70%);
  pointer-events: none;
}

.cta-box > * {
  position: relative;
}

.cta-box h2 {
  color: #fff;
  font-size: clamp(26px, 3.6vw, 38px);
}

.cta-box p {
  margin: 14px auto 0;
  max-width: 34em;
  font-size: 15px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.86);
}

.cta-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.btn-white {
  color: var(--brand-deep);
  background: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);
}

.btn-outline-white {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.1);
}

.btn-outline-white:hover {
  background: rgba(255, 255, 255, 0.18);
}

/* ------------------------------------------------------------------ 页脚 */

footer {
  border-top: 1px solid var(--line);
  padding: 52px 0 40px;
  background: var(--bg);
}

.foot-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 0.8fr));
  gap: 32px;
}

.foot-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 16px;
}

.foot-brand img {
  width: 26px;
  height: 26px;
  border-radius: 8px;
}

.foot-slogan {
  margin: 12px 0 0;
  font-size: 13.5px;
  color: var(--text-3);
  max-width: 22em;
  line-height: 1.7;
}

.foot-h {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-3);
  letter-spacing: 0.02em;
  margin-bottom: 12px;
}

.foot-col a,
.foot-col span {
  display: block;
  font-size: 13.5px;
  color: var(--text-2);
  padding: 5px 0;
  transition: color 0.2s;
  word-break: break-all;
}

.foot-col a:hover {
  color: var(--brand);
}

.foot-bottom {
  margin-top: 40px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  justify-content: space-between;
  font-size: 12.5px;
  color: var(--text-3);
}

/* ------------------------------------------------------------------ 扫码弹层 */

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.22s ease, visibility 0.22s;
}

.modal.is-open {
  opacity: 1;
  visibility: visible;
}

.modal-card {
  width: 100%;
  max-width: 342px;
  background: var(--bg-elevated);
  border-radius: 26px;
  padding: 28px 24px 24px;
  text-align: center;
  box-shadow: var(--shadow-lg);
  transform: translateY(12px) scale(0.97);
  transition: transform 0.26s cubic-bezier(0.22, 1, 0.36, 1);
}

.modal.is-open .modal-card {
  transform: none;
}

.modal-card h3 {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.modal-card p {
  margin: 0;
  font-size: 13px;
  color: var(--text-3);
  line-height: 1.65;
}

.qr-box {
  margin: 20px auto 16px;
  width: 208px;
  height: 208px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  /* 不放内边距：图片本身带静区白边，再叠 padding 会让码变小、变得不好扫 */
  padding: 0;
}

.qr-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.qr-box .qr-fallback {
  font-size: 11.5px;
  line-height: 1.6;
  color: #86868b;
  padding: 10px;
  word-break: break-all;
}

/* ------------------------------------------------------------------ 协议页 */

.legal-wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(36px, 6vw, 64px) 24px 72px;
}

.legal-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  color: var(--text-3);
  margin-bottom: 26px;
  transition: color 0.2s;
}

.legal-back:hover {
  color: var(--brand);
}

.legal-back svg {
  width: 15px;
  height: 15px;
}

.legal-wrap h1 {
  font-size: clamp(28px, 4.4vw, 38px);
  margin: 0;
}

.legal-updated {
  margin: 10px 0 0;
  font-size: 13px;
  color: var(--text-3);
}

.legal-body {
  margin-top: 34px;
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

.legal-sec {
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.legal-sec h2 {
  font-size: 16.5px;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin: 0 0 9px;
}

.legal-sec p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.8;
  color: var(--text-2);
}

.legal-foot {
  margin-top: 34px;
  font-size: 13px;
  color: var(--text-3);
  line-height: 1.8;
}

.legal-foot a {
  color: var(--brand);
}

/* ------------------------------------------------------------------ 进场动画 */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

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

/* ------------------------------------------------------------------ 响应式 */

@media (max-width: 960px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 44px;
  }

  .hero-grid .phone-stage {
    order: 2;
  }

  .phone {
    transform: none;
    width: min(280px, 72%);
  }

  .float-card.a {
    left: 2%;
  }

  .float-card.b {
    right: 0;
  }

  .foot-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 26px;
  }

  .foot-brand-col {
    grid-column: 1 / -1;
  }
}

@media (max-width: 780px) {
  .nav-links {
    display: none;
  }

  .nav .btn-sm {
    display: none;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .nav.is-open .nav-links {
    display: flex;
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    margin: 0;
    padding: 10px 16px 16px;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
  }

  .nav.is-open .nav-links a {
    padding: 12px;
    font-size: 15px;
  }

  .hero {
    padding-top: 32px;
  }

  .hero-stats {
    gap: 14px 26px;
  }

  .hero-stat b {
    font-size: 21px;
  }

  .brand-sub {
    display: none;
  }

  .cta-box {
    border-radius: 24px;
  }

  .foot-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 420px) {
  .lang button {
    padding: 5px 7px;
    font-size: 12px;
  }

  .float-card {
    padding: 9px 11px;
  }

  .float-card .ico {
    width: 26px;
    height: 26px;
  }
}

/* ------------------------------------------------------------------ 细节补充 */

/* 标题两行：第一行普通、第二行渐变，必须各自独占一行 */
h1 > span {
  display: block;
}

/* 主题按钮：默认显示太阳，深色显示月亮 */
.theme-btn svg {
  display: none;
}

html[data-theme='dark'] .theme-btn .ico-moon,
html:not([data-theme='dark']) .theme-btn .ico-sun {
  display: block;
}

/* 首屏标题在极窄屏收紧字距，避免折行后显得散 */
@media (max-width: 380px) {
  h1 {
    letter-spacing: -0.035em;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .float-card,
  .phone {
    animation: none;
    transition: none;
    transform: none;
  }
}
