:root {
  --primary: #165dff;
  --primary-dark: #0e42c2;
  --primary-light: #4080ff;
  --accent: #ff7d00;
  --accent-soft: #fff7e8;
  --text: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --bg: #f8fafc;
  --bg-elevated: #ffffff;
  --border: rgba(15, 23, 42, 0.08);
  --border-strong: rgba(15, 23, 42, 0.12);
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow: 0 12px 40px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 24px 64px rgba(22, 93, 255, 0.12);
  --max: 1180px;
  --header-h: 72px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB',
    'Microsoft YaHei', 'Segoe UI', sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s var(--ease);
}

a:hover {
  color: var(--primary-dark);
}

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

.container {
  width: min(100% - 40px, var(--max));
  margin: 0 auto;
}

/* ── Header ── */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  height: var(--header-h);
  background: rgba(248, 250, 252, 0.72);
  backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.site-header.is-scrolled {
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.02em;
}

.brand-logo {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  object-fit: contain;
  box-shadow: var(--shadow-sm);
}

.nav-desktop {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-desktop a:not(.btn) {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 999px;
  transition: color 0.2s, background 0.2s;
}

.nav-desktop a:not(.btn):hover {
  color: var(--text);
  background: rgba(15, 23, 42, 0.04);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: var(--bg-elevated);
  font-size: 20px;
  cursor: pointer;
  color: var(--text);
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: 999px;
  border: 0;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s;
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
  color: #fff;
  box-shadow: 0 8px 24px rgba(22, 93, 255, 0.35);
}

.btn-primary:hover {
  color: #fff;
  box-shadow: 0 12px 32px rgba(22, 93, 255, 0.42);
}

.btn-ghost {
  background: var(--bg-elevated);
  color: var(--text);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-sm);
}

.btn-ghost:hover {
  border-color: rgba(22, 93, 255, 0.25);
  color: var(--primary);
}

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

.btn-white:hover {
  color: var(--primary-dark);
}

/* ── Hero ── */
.hero {
  position: relative;
  padding: calc(var(--header-h) + 64px) 0 80px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.hero-bg::before {
  content: '';
  position: absolute;
  width: 680px;
  height: 680px;
  top: -220px;
  right: -120px;
  background: radial-gradient(circle, rgba(22, 93, 255, 0.14) 0%, transparent 68%);
}

.hero-bg::after {
  content: '';
  position: absolute;
  width: 480px;
  height: 480px;
  bottom: -160px;
  left: -80px;
  background: radial-gradient(circle, rgba(255, 125, 0, 0.1) 0%, transparent 70%);
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px 7px 10px;
  border-radius: 999px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.hero-badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.18);
  animation: pulse 2s ease infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}

.hero h1 {
  margin: 0 0 20px;
  font-size: clamp(36px, 5.5vw, 56px);
  line-height: 1.08;
  letter-spacing: -0.035em;
  font-weight: 800;
}

.hero h1 em {
  font-style: normal;
  background: linear-gradient(135deg, var(--primary) 0%, #6366f1 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lead {
  margin: 0 0 14px;
  font-size: clamp(17px, 2.2vw, 20px);
  color: var(--text-secondary);
  max-width: 520px;
  line-height: 1.7;
}

.hero-sub {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 32px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: #b45309;
  font-size: 14px;
  font-weight: 600;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 28px;
}

.hero-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 28px;
}

.hero-trust-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hero-trust-item strong {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
}

.hero-trust-item span {
  font-size: 13px;
  color: var(--text-muted);
}

/* QR showcase */
.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
}

.hero-visual-glow {
  position: absolute;
  inset: 10% 5%;
  background: linear-gradient(135deg, rgba(22, 93, 255, 0.2), rgba(99, 102, 241, 0.15));
  filter: blur(48px);
  border-radius: 50%;
}

.qr-showcase {
  position: relative;
  width: min(100%, 380px);
  padding: 28px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(12px);
  text-align: center;
  animation: float 6s ease-in-out infinite;
}

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

.qr-showcase img {
  width: min(100%, 220px);
  margin: 0 auto 16px;
  border-radius: 16px;
}

.qr-showcase strong {
  display: block;
  font-size: 18px;
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}

.qr-showcase p {
  margin: 0;
  font-size: 14px;
  color: var(--text-secondary);
}

.qr-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}

.qr-tag {
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--bg);
  border: 1px solid var(--border);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}

/* ── Section common ── */
.section {
  padding: 88px 0;
}

.section-label {
  display: inline-block;
  margin-bottom: 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
}

.section-title {
  margin: 0 0 14px;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.15;
  letter-spacing: -0.03em;
  font-weight: 800;
}

.section-desc {
  margin: 0 0 48px;
  max-width: 600px;
  color: var(--text-secondary);
  font-size: 17px;
}

.section-head-center {
  text-align: center;
}

.section-head-center .section-desc {
  margin-left: auto;
  margin-right: auto;
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Pain cards ── */
.pain-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.pain-card {
  position: relative;
  padding: 28px 24px 24px;
  border-radius: var(--radius);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.pain-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.pain-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  font-size: 22px;
  margin-bottom: 18px;
}

.pain-icon--blue { background: #eff6ff; }
.pain-icon--orange { background: var(--accent-soft); }
.pain-icon--violet { background: #f5f3ff; }

.pain-card h3 {
  margin: 0 0 10px;
  font-size: 18px;
  letter-spacing: -0.02em;
}

.pain-card p {
  margin: 0;
  font-size: 15px;
  color: var(--text-secondary);
}

/* ── Bento features ── */
.bento {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
}

.bento-item {
  padding: 26px;
  border-radius: var(--radius);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s var(--ease), border-color 0.3s;
}

.bento-item:hover {
  transform: translateY(-3px);
  border-color: rgba(22, 93, 255, 0.18);
}

.bento-item h3 {
  margin: 0 0 8px;
  font-size: 17px;
  letter-spacing: -0.02em;
}

.bento-item p {
  margin: 0;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.65;
}

.bento-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  font-size: 18px;
  margin-bottom: 16px;
}

.bento-item--hero {
  grid-column: span 7;
  background: linear-gradient(145deg, #0f172a 0%, #1e3a5f 100%);
  color: #fff;
  border: none;
  min-height: 220px;
}

.bento-item--hero h3 {
  font-size: 22px;
  color: #fff;
}

.bento-item--hero p {
  color: rgba(255, 255, 255, 0.78);
  max-width: 420px;
}

.bento-item--hero .bento-icon {
  background: rgba(255, 255, 255, 0.12);
}

.bento-item--wide { grid-column: span 5; }
.bento-item--md { grid-column: span 4; }
.bento-item--sm { grid-column: span 3; }

/* ── Scenes ── */
.scenes-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.scene-card {
  position: relative;
  overflow: hidden;
  padding: 32px 26px 26px;
  border-radius: var(--radius-lg);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.scene-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
}

.scene-card:nth-child(2)::before {
  background: linear-gradient(90deg, #f97316, #fb923c);
}

.scene-card:nth-child(3)::before {
  background: linear-gradient(90deg, #8b5cf6, #a78bfa);
}

.scene-card h3 {
  margin: 0 0 10px;
  font-size: 20px;
}

.scene-card p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 15px;
}

/* ── Apply ── */
.apply-section {
  background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
  color: #fff;
}

.apply-section .section-label {
  color: #93c5fd;
}

.apply-section .section-title {
  color: #fff;
}

.apply-section .section-desc,
.apply-side p,
.apply-side li {
  color: rgba(255, 255, 255, 0.72);
}

.apply-grid {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 48px;
  align-items: start;
}

.apply-checklist {
  list-style: none;
  padding: 0;
  margin: 24px 0;
}

.apply-checklist li {
  position: relative;
  padding-left: 28px;
  margin-bottom: 14px;
  font-size: 15px;
}

.apply-checklist li::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.2);
  color: #4ade80;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.apply-form {
  background: var(--bg-elevated);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.28);
}

.apply-form-title {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}

.apply-form-sub {
  margin: 0 0 24px;
  font-size: 14px;
  color: var(--text-muted);
}

.form-row {
  margin-bottom: 18px;
}

.form-row label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-row label .req {
  color: #ef4444;
}

.form-row input,
.form-row select {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-family: inherit;
  background: var(--bg);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-row input:focus,
.form-row select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(22, 93, 255, 0.12);
  background: #fff;
}

.form-msg {
  margin-top: 14px;
  font-size: 14px;
  min-height: 20px;
}

.form-msg.ok { color: #16a34a; }
.form-msg.err { color: #ef4444; }

.miniprogram-inline {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  margin-top: 28px;
  padding: 16px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.miniprogram-inline img {
  width: 88px;
  border-radius: 12px;
}

.miniprogram-inline div {
  font-size: 14px;
  line-height: 1.5;
}

.miniprogram-inline strong {
  display: block;
  color: #fff;
  margin-bottom: 4px;
}

/* ── CTA band ── */
.cta-band {
  position: relative;
  overflow: hidden;
  padding: 64px 40px;
  border-radius: var(--radius-lg);
  text-align: center;
  background: linear-gradient(135deg, var(--primary) 0%, #4f46e5 100%);
  color: #fff;
  box-shadow: var(--shadow-lg);
}

.cta-band::before {
  content: '';
  position: absolute;
  width: 300px;
  height: 300px;
  top: -100px;
  right: -60px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 50%;
}

.cta-band h2 {
  position: relative;
  margin: 0 0 12px;
  font-size: clamp(26px, 4vw, 36px);
  letter-spacing: -0.03em;
}

.cta-band p {
  position: relative;
  margin: 0 0 28px;
  font-size: 17px;
  opacity: 0.9;
}

/* ── Footer ── */
.site-footer {
  background: #0b1120;
  color: rgba(255, 255, 255, 0.72);
  padding: 64px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 40px;
}

.footer-grid h4 {
  margin: 0 0 14px;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.02em;
}

.footer-grid p,
.footer-grid a {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.58);
  line-height: 1.8;
}

.footer-grid a:hover {
  color: #fff;
}

.footer-brand .brand {
  color: #fff;
  margin-bottom: 12px;
}

.footer-qrcode img {
  width: 96px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-qrcode span {
  display: block;
  margin-top: 8px;
  font-size: 12px;
}

.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 13px;
  color: rgba(255, 255, 255, 0.45);
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  justify-content: space-between;
}

.footer-bottom a {
  color: rgba(255, 255, 255, 0.45);
}

.footer-bottom a:hover {
  color: rgba(255, 255, 255, 0.8);
}

/* ── Sub pages ── */
.page-main {
  padding: calc(var(--header-h) + 48px) 0 80px;
}

.page-hero-mini {
  padding: 32px 0 40px;
  text-align: center;
}

.page-hero-mini h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 38px);
  letter-spacing: -0.03em;
}

.doc-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-sm);
}

.doc-card h1 { margin-top: 0; }
.doc-card h2 {
  margin-top: 32px;
  font-size: 18px;
  color: var(--text);
}

.doc-card p,
.doc-card li {
  color: var(--text-secondary);
}

.miniprogram-card--compact {
  display: inline-block;
  padding: 20px;
  margin-top: 20px;
  border-radius: var(--radius);
  background: var(--bg);
  border: 1px solid var(--border);
  text-align: center;
}

.miniprogram-card--compact img {
  width: 140px;
  margin: 0 auto 10px;
  border-radius: 12px;
}

/* ── Mobile nav ── */
.mobile-nav {
  display: none;
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  z-index: 199;
  padding: 16px;
  background: rgba(248, 250, 252, 0.96);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.mobile-nav.open {
  display: block;
}

.mobile-nav a:not(.btn) {
  display: block;
  padding: 12px 14px;
  color: var(--text-secondary);
  font-weight: 500;
  border-radius: var(--radius-sm);
}

.mobile-nav a:not(.btn):hover {
  background: rgba(15, 23, 42, 0.04);
}

.mobile-nav .btn {
  width: 100%;
  margin-top: 8px;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .bento-item--hero,
  .bento-item--wide,
  .bento-item--md,
  .bento-item--sm {
    grid-column: span 6;
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .hero-grid,
  .apply-grid,
  .pain-grid,
  .scenes-grid {
    grid-template-columns: 1fr;
  }

  .bento-item--hero,
  .bento-item--wide,
  .bento-item--md,
  .bento-item--sm {
    grid-column: span 12;
  }

  .nav-desktop {
    display: none;
  }

  .nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .hero {
    padding-bottom: 56px;
  }

  .hero-visual {
    order: -1;
  }

  .qr-showcase {
    animation: none;
    width: 100%;
  }

  .section {
    padding: 64px 0;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .cta-band {
    padding: 48px 24px;
  }

  .apply-form {
    padding: 24px;
  }

  .doc-card {
    padding: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal,
  .qr-showcase,
  .hero-badge-dot {
    animation: none;
    transition: none;
    opacity: 1;
    transform: none;
  }
}
