/* 纸助理落地页响应式修复与视觉精修（加载顺序 4/4） */

/* ==========================================================================
   审查修复：锚点、移动首屏、移动菜单与可访问性
   ========================================================================== */

html {
  scroll-padding-top: 92px;
}

:where(#why, #features, #roles, #workflow, #demo, #calculator, #analysis, #security) {
  scroll-margin-top: 92px;
}

.nav-mobile-action {
  display: none;
}

.menu-btn {
  min-width: 44px;
  min-height: 44px;
  border-radius: 10px;
  place-items: center;
}

.menu-btn:focus-visible,
.btn:focus-visible,
.role-tab:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.36);
  outline-offset: 3px;
}

@media (max-width: 768px) {
  html {
    scroll-padding-top: 84px;
  }

  .menu-btn {
    display: grid;
  }

  :where(#why, #features, #roles, #workflow, #demo, #analysis, #security) {
    scroll-margin-top: 84px;
  }

  .nav-links {
    height: calc(100dvh - 80px);
    overflow-y: auto;
    align-items: stretch;
    padding: 36px 32px 32px;
  }

  .nav-links a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .nav-mobile-action {
    display: block;
    width: 100%;
    margin-top: 8px;
  }

  .nav-mobile-action .btn {
    display: inline-flex;
    width: 100%;
    color: #ffffff;
  }
}

@media (max-width: 760px) {
  .review-section {
    margin-top: -4px;
  }

  .role-tab-list {
    display: grid;
    grid-template-columns: 1fr;
    overflow: visible;
    padding-bottom: 0;
    gap: 10px;
  }

  .role-tab {
    min-height: 48px;
    text-align: center;
    white-space: normal;
    transform: none;
  }

  .role-tab:hover,
  .role-tab.active {
    transform: none;
  }
}

/* 移动端防止样机、抽屉菜单或横向动效把页面撑出视口。 */
html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
}

@supports not (overflow-x: clip) {
  html,
  body {
    overflow-x: hidden;
  }
}

@media (max-width: 768px) {
  .navbar,
  .section,
  .cta-section,
  footer {
    max-width: 100vw;
  }

  .nav-links {
    width: 100vw;
    max-width: 100vw;
    overflow-x: hidden;
  }

  .demo-container,
  .scene-banner,
  .charts-visual,
  .security-info-card,
  .cta-box {
    max-width: 100%;
  }

  .charts-visual {
    padding: 20px 16px;
  }

  .charts-header-preview {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .chart-bar-fill {
    width: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  .feature-card:hover,
  .workflow-card:hover {
    transform: none !important;
  }
}

@media print {
  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* 2026-07 落地页转化与移动端回归修复 */
:where(#why, #features, #roles, #workflow, #demo, #analysis, #security) {
  scroll-margin-top: 0;
}

.trust-strip {
  position: relative;
  z-index: 4;
  padding: 0 5%;
  background: #f8fafc;
}

.trust-strip-inner {
  width: min(1200px, 100%);
  margin: -34px auto 0;
  padding: 20px 24px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(191, 219, 254, 0.78);
  border-radius: 18px;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
}

.trust-item {
  min-width: 0;
  padding: 4px 16px;
  border-left: 1px solid var(--border-color);
}

.trust-item:first-child { border-left: 0; }
.trust-item strong,
.trust-item span { display: block; }
.trust-item strong { color: var(--text-main); font-size: 15px; margin-bottom: 5px; }
.trust-item span { color: var(--text-muted); font-size: 12.5px; line-height: 1.55; }

@media (max-width: 768px) {
  header.navbar {
    padding-inline: 16px;
    gap: 12px;
  }

  .nav-brand {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
  }

  .brand-wordmark {
    width: min(136px, 100%);
    flex: 0 1 auto;
  }

  .menu-btn {
    flex: 0 0 44px;
    margin-left: auto;
  }

  .section-header,
  .section-title,
  .section-desc {
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .trust-strip { padding-inline: 20px; }

  .trust-strip-inner {
    margin-top: -18px;
    grid-template-columns: 1fr 1fr;
    padding: 16px;
    gap: 0;
  }

  .trust-item {
    padding: 12px;
    border-left: 0;
    border-top: 1px solid var(--border-color);
  }

  .trust-item:nth-child(-n + 2) { border-top: 0; }
}

@media (max-width: 420px) {
  header.navbar { padding-inline: 12px; }
  .brand-wordmark { width: 124px; }
  .trust-strip { padding-inline: 16px; }
  .trust-strip-inner { grid-template-columns: 1fr; }
  .trust-item:nth-child(2) { border-top: 1px solid var(--border-color); }
}

/* 手机端核算器：减少多层容器留白，优先使用整屏宽度。 */
@media (max-width: 760px) {
  .demo-section {
    padding-inline: 12px !important;
  }

  .demo-container {
    width: 100%;
    max-width: none;
    gap: 28px;
    padding: 20px 0 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .demo-info {
    padding-inline: 8px;
  }

  .demo-calculator {
    width: 100%;
    max-width: none;
    padding: 22px 18px 20px;
    border-radius: 20px;
    box-shadow: 0 14px 36px rgba(15, 23, 42, 0.08);
  }

  .calc-title {
    margin-bottom: 22px;
    font-size: 18px;
  }

  .calc-group {
    margin-bottom: 22px;
  }

  .calc-label {
    margin-bottom: 12px;
    font-size: 14px;
  }

  .calc-input {
    height: 8px;
  }

  .calc-input::-webkit-slider-thumb {
    width: 24px;
    height: 24px;
  }

  .custom-select-trigger {
    min-height: 48px;
    padding: 12px 14px;
    font-size: 15px;
  }

  .calc-results {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 24px;
    padding-top: 20px;
  }

  .result-card {
    min-width: 0;
    padding: 16px 8px;
  }

  .result-val {
    font-size: clamp(17px, 5vw, 21px);
    overflow-wrap: anywhere;
  }

  .result-lbl {
    font-size: 10.5px;
    line-height: 1.45;
  }
}

@media (max-width: 360px) {
  .demo-section { padding-inline: 8px !important; }
  .demo-calculator { padding-inline: 14px; }
  .calc-results { gap: 8px; }
  .result-val { font-size: 16px; }
}

/* 手机端统一内容宽度：与核算器保持同一条 8–12px 外边距基线。 */
@media (max-width: 760px) {
  .section,
  .review-section,
  .banner-section,
  .features-section,
  .roles-section,
  .workflow-section,
  .demo-section,
  .charts-section,
  .security-section,
  .cta-section {
    width: 100%;
    max-width: none;
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  .trust-strip {
    padding-left: 12px;
    padding-right: 12px;
  }

  .section-header,
  .review-grid,
  .features-grid,
  .role-layout,
  .role-panel,
  .workflow-grid,
  .demo-container,
  .charts-visual,
  .security-grid,
  .security-info-card,
  .scene-banner,
  .cta-box,
  .trust-strip-inner {
    width: 100%;
    max-width: none;
  }

  .charts-section {
    gap: 28px;
  }

  .charts-visual {
    padding-left: 14px;
    padding-right: 14px;
    border-radius: 20px;
  }

  .role-panel,
  .security-info-card,
  .cta-box {
    border-radius: 20px;
  }
}

@media (max-width: 360px) {
  .section,
  .review-section,
  .banner-section,
  .features-section,
  .roles-section,
  .workflow-section,
  .demo-section,
  .charts-section,
  .security-section,
  .cta-section {
    padding-left: 8px !important;
    padding-right: 8px !important;
  }

  .trust-strip {
    padding-left: 8px;
    padding-right: 8px;
  }
}

/* ==========================================================================
   Hero V16 精修：紧凑 SaaS 首屏、克制行业背景与稳定设备组合
   ========================================================================== */

header.navbar {
  height: 80px;
  padding-inline: max(24px, calc((100vw - 1440px) / 2));
  background: rgba(248, 250, 252, 0.7);
  border-bottom-color: rgba(203, 213, 225, 0.62);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

header.navbar.scrolled {
  height: 72px;
  background: rgba(255, 255, 255, 0.85);
  border-bottom-color: rgba(203, 213, 225, 0.78);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.045);
}

.brand-wordmark {
  width: auto;
  max-width: 160px;
  height: 42px;
  object-fit: contain;
}

.nav-links {
  gap: clamp(22px, 2vw, 34px);
}

.nav-links a {
  color: #475569;
  font-size: 14px;
}

.nav-actions .btn {
  min-height: 46px;
  padding: 0 22px;
  border-radius: 12px;
}

.hero-section {
  position: relative;
  display: grid;
  isolation: isolate;
  width: 100%;
  max-width: none;
  min-height: calc(100svh - 60px);
  margin: 0;
  padding: clamp(126px, 18svh, 190px) max(24px, calc((100vw - 1440px) / 2)) 76px;
  grid-template-columns: minmax(0, 0.46fr) minmax(0, 0.54fr);
  gap: clamp(40px, 4vw, 64px);
  align-items: start;
  overflow: clip;
}

.hero-section::before,
.hero-section::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-section::before {
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(248, 250, 252, 1) 0%, rgba(248, 250, 252, 1) 42%, rgba(248, 250, 252, 0.88) 58%, rgba(248, 250, 252, 0.15) 82%),
    linear-gradient(180deg, rgba(248, 250, 252, 0.35) 0%, rgba(248, 250, 252, 0.12) 58%, #f8fafc 100%),
    url("/assets/hero-baling-yard.webp?v=1") right top / cover no-repeat;
}

.hero-section::after {
  z-index: -1;
  background:
    radial-gradient(circle at 14% 24%, rgba(37, 99, 235, 0.13), transparent 27%),
    radial-gradient(circle at 72% 14%, rgba(14, 165, 233, 0.12), transparent 22%),
    linear-gradient(180deg, transparent 0%, transparent 82%, #f8fafc 100%);
}

.hero-content {
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  max-width: 650px;
  align-self: start;
  transform: translateY(-8px);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  margin-bottom: 28px;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 9999px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 8px 22px rgba(37, 99, 235, 0.07);
  animation: none;
}

.hero-badge .dot {
  width: 6px;
  height: 6px;
  background: var(--primary);
  border-radius: 50%;
  animation: none;
}

.hero-title {
  margin-bottom: 24px;
  color: var(--text-main);
  font-size: clamp(56px, 3.7vw, 62px);
  font-weight: 540;
  line-height: 1.14;
  letter-spacing: -0.045em;
  text-wrap: nowrap;
}

.hero-title span.gradient-text {
  color: var(--primary);
  background: none;
  -webkit-background-clip: initial;
  -webkit-text-fill-color: currentColor;
  animation: none;
}

.hero-desc {
  max-width: 620px;
  margin-bottom: 32px;
  color: #334155;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.78;
  letter-spacing: 0;
}

.hero-btns {
  display: flex;
  gap: 14px;
  margin-bottom: 48px;
}

.hero-btns .btn {
  min-width: 154px;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 12px;
  font-size: 15px;
  line-height: 1;
}

.hero-btns .btn-primary {
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.22);
}

.hero-btns .btn-secondary {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(148, 163, 184, 0.34);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.055);
}

.hero-btns .btn:hover {
  transform: translateY(-2px);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  width: 100%;
  padding-top: 22px;
  border-top: 1px solid rgba(203, 213, 225, 0.72);
}

.stat-item {
  min-width: 0;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  padding: 0 18px;
}

.stat-item:first-child {
  padding-left: 0;
}

.stat-item + .stat-item {
  border-left: 1px solid rgba(203, 213, 225, 0.66);
}

.stat-icon {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  color: var(--primary);
  background: #eff6ff;
  border: 1px solid rgba(147, 197, 253, 0.42);
  border-radius: 9px;
}

.stat-icon svg {
  width: 17px;
  height: 17px;
}

.stat-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.stat-value {
  color: #1e293b;
  font-size: 15px;
  font-weight: 720;
  font-family: var(--font-sans);
  font-variant-numeric: tabular-nums;
  line-height: 1.25;
  white-space: nowrap;
}

.stat-label {
  color: #64748b;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.55;
}

.hero-visual {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 560px;
  align-items: center;
  justify-content: flex-end;
  overflow: visible;
}

.hero-visual::before {
  content: "";
  position: absolute;
  width: 78%;
  aspect-ratio: 1;
  right: 5%;
  top: 48%;
  transform: translateY(-50%);
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(219, 234, 254, 0.44), rgba(219, 234, 254, 0) 68%);
  pointer-events: none;
}

.hero-showcase {
  position: relative;
  width: min(720px, 100%);
  margin: 0;
  transform: translateX(2%);
  filter: drop-shadow(0 28px 44px rgba(51, 65, 85, 0.15));
  animation: showcaseFloatV16 8s ease-in-out infinite;
}

@keyframes showcaseFloatV16 {
  0%, 100% { transform: translateX(2%) translateY(0); }
  50% { transform: translateX(2%) translateY(-5px); }
}

.desktop-mockup {
  width: 84%;
  min-width: 0;
  transform: rotate(0.45deg);
  transform-origin: center center;
  box-shadow:
    inset 0 0 0 1px rgba(15, 23, 42, 0.07),
    0 26px 58px rgba(51, 65, 85, 0.17);
}

.phone-mockup {
  width: clamp(180px, 26%, 188px);
  height: auto;
  aspect-ratio: 174 / 360;
  right: 1.5%;
  bottom: -48px;
  transform: rotate(-1.25deg);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    -10px 22px 42px rgba(51, 65, 85, 0.24);
}

.scroll-indicator {
  position: absolute;
  bottom: 14px;
  left: 50%;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  transform: translateX(-50%);
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  color: var(--text-light);
  box-shadow: 0 4px 12px rgba(28, 45, 72, 0.04);
  opacity: 0.65;
  transition: opacity var(--transition-fast), color var(--transition-fast);
  animation: none;
}

.scroll-indicator:hover {
  border-color: rgba(37, 99, 235, 0.2);
  background: #ffffff;
  color: var(--primary);
  box-shadow: var(--shadow-md);
  opacity: 1;
}

.scroll-indicator svg {
  display: block;
  width: 18px;
  height: 18px;
}

@media (min-width: 1440px) {
  .hero-title {
    font-size: clamp(58px, 3.45vw, 62px);
  }
}

@media (max-width: 1366px) and (min-width: 901px) {
  header.navbar {
    padding-inline: 24px;
  }

  .hero-section {
    padding-inline: 24px;
    grid-template-columns: minmax(0, 0.465fr) minmax(0, 0.535fr);
    gap: 34px;
  }

  .hero-title {
    font-size: clamp(50px, 3.85vw, 54px);
  }

  .hero-desc {
    font-size: 15px;
  }

  .hero-visual {
    min-height: 520px;
  }

  .hero-showcase {
    width: min(680px, 100%);
  }

  .phone-mockup {
    width: clamp(164px, 26%, 180px);
  }
}

/* 保留 901px 临界点以下的居中语义，再由桌面窄屏规则覆盖。 */
@media (max-width: 1024px) {
  .hero-content {
    align-items: center;
  }
}

@media (max-width: 1120px) and (min-width: 901px) {
  .nav-links {
    gap: 18px;
  }

  .nav-links a {
    font-size: 13px;
  }

  .hero-section {
    min-height: 720px;
    padding-top: 116px;
    padding-bottom: 62px;
    grid-template-columns: minmax(0, 0.47fr) minmax(0, 0.53fr);
    gap: 28px;
    text-align: left;
  }

  .hero-content {
    max-width: none;
    margin: 0;
    align-items: flex-start;
  }

  .hero-title {
    font-size: clamp(42px, 4.35vw, 49px);
  }

  .hero-desc {
    margin: 0 0 28px;
    font-size: 14px;
    line-height: 1.7;
  }

  .hero-btns {
    justify-content: flex-start;
    margin-bottom: 36px;
  }

  .hero-btns .btn {
    min-width: 0;
    padding-inline: 18px;
    font-size: 14px;
  }

  .hero-stats {
    padding-top: 18px;
  }

  .stat-item {
    grid-template-columns: 26px minmax(0, 1fr);
    gap: 8px;
    padding-inline: 10px;
  }

  .stat-icon {
    width: 26px;
    height: 26px;
    border-radius: 8px;
  }

  .stat-value {
    font-size: 13px;
  }

  .stat-label {
    font-size: 10px;
  }

  .hero-visual {
    min-height: 440px;
    justify-content: flex-end;
  }

  .hero-showcase {
    width: 100%;
  }

  .desktop-screen {
    grid-template-columns: 112px minmax(0, 1fr);
    min-height: 360px;
  }

  .phone-mockup {
    width: clamp(146px, 29%, 166px);
    bottom: -38px;
  }
}

@media (max-width: 1120px) {
  .scroll-indicator {
    display: none;
  }
}

@media (max-width: 900px) {
  header.navbar {
    padding-inline: 20px;
  }

  .hero-section {
    min-height: auto;
    padding: 112px 24px 64px;
    grid-template-columns: minmax(0, 1fr);
    gap: 42px;
    text-align: center;
  }

  .hero-content {
    max-width: 720px;
    margin: 0 auto;
    align-items: center;
    transform: none;
  }

  .hero-title {
    font-size: clamp(44px, 7vw, 56px);
  }

  .hero-desc {
    max-width: 660px;
    margin-inline: auto;
  }

  .hero-btns {
    justify-content: center;
  }

  .hero-stats {
    max-width: 680px;
  }

  .hero-visual {
    width: 100%;
    max-width: 760px;
    min-height: 480px;
    margin: 0 auto;
    justify-content: center;
    overflow: visible;
  }

  .hero-showcase {
    width: min(690px, 94%);
    transform: none;
  }

  @keyframes showcaseFloatV16 {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
  }

  .desktop-mockup {
    width: 86%;
  }

  .phone-mockup {
    width: 27%;
    min-width: 166px;
    max-width: 184px;
    right: 1%;
  }

  .scroll-indicator {
    display: none;
  }
}

@media (max-width: 768px) {
  .hero-btns {
    display: grid;
  }

  .hero-content,
  .hero-desc,
  .hero-btns,
  .hero-stats {
    min-width: 0;
    width: 100%;
  }

  .hero-title {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .gradient-text {
    white-space: normal;
  }

  .hero-btns .btn {
    width: 100%;
    margin: 0;
  }

  .hero-showcase,
  .desktop-mockup {
    max-width: 100%;
  }
}

@media (max-width: 769px) {
  header.navbar {
    height: 76px;
    padding-inline: 16px;
  }

  .brand-wordmark {
    width: min(142px, 100%);
    height: auto;
  }

  .hero-section {
    padding: 104px 20px 48px;
    gap: 34px;
  }

  .hero-section::before {
    background:
      linear-gradient(180deg,
        rgba(255, 255, 255, 0.99) 0%,
        rgba(255, 255, 255, 0.97) 48%,
        rgba(248, 250, 252, 0.9) 72%,
        rgba(248, 250, 252, 0.78) 100%),
      url("/assets/hero-baling-yard.webp?v=1") 70% center / auto 74% no-repeat;
  }

  .hero-section::after {
    background:
      radial-gradient(circle at 50% 76%, rgba(219, 234, 254, 0.26), transparent 34%),
      linear-gradient(180deg, transparent 82%, #f8fafc 100%);
  }

  .hero-badge {
    margin-bottom: 24px;
  }

  .hero-title {
    margin-bottom: 22px;
    font-size: clamp(38px, 6.5vw, 46px);
    line-height: 1.16;
    letter-spacing: -0.04em;
    text-wrap: nowrap;
  }

  .hero-desc {
    margin-bottom: 28px;
    font-size: 16px;
    line-height: 1.7;
  }

  .hero-btns {
    width: 100%;
    max-width: 520px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 38px;
  }

  .hero-btns .btn {
    min-height: 48px;
    padding-inline: 16px;
  }

  .hero-stats {
    max-width: 560px;
    grid-template-columns: 1fr;
    padding-top: 8px;
  }

  .stat-item,
  .stat-item:first-child {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 12px;
    padding: 14px 4px;
    text-align: left;
  }

  .stat-item + .stat-item {
    border-left: 0;
    border-top: 1px solid rgba(203, 213, 225, 0.58);
  }

  .stat-icon {
    width: 34px;
    height: 34px;
  }

  .stat-value {
    font-size: 15px;
  }

  .stat-label {
    font-size: 12px;
  }

  .hero-visual {
    min-height: 400px;
    overflow: hidden;
  }

  .hero-showcase {
    width: min(660px, 100%);
  }

  .desktop-screen {
    grid-template-columns: 104px minmax(0, 1fr);
    min-height: 340px;
  }

  .phone-mockup {
    width: 27%;
    min-width: 150px;
    max-width: 174px;
    right: 0;
    bottom: -32px;
  }
}

@media (max-width: 760px) and (min-width: 521px) {
  .hero-visual {
    margin-top: -8px;
  }
}

@media (max-width: 520px) {
  .hero-section {
    padding: 98px 12px 40px;
    gap: 26px;
  }

  .hero-badge {
    min-height: 32px;
    margin-bottom: 20px;
    padding-inline: 12px;
    font-size: 12px;
  }

  .hero-title {
    font-size: clamp(34px, 9.75vw, 42px);
    line-height: 1.17;
    letter-spacing: -0.047em;
    text-wrap: wrap;
  }

  .hero-desc {
    max-width: 370px;
    margin-bottom: 26px;
    font-size: 15.5px;
    line-height: 1.72;
  }

  .hero-btns {
    max-width: 370px;
    grid-template-columns: 1fr;
    margin-bottom: 32px;
  }

  .hero-stats {
    max-width: 370px;
  }

  .hero-visual {
    min-height: 254px;
    margin-top: 0;
  }

  .hero-showcase {
    width: 100%;
    animation: none;
  }

  .desktop-mockup {
    width: 90%;
    height: 58vw;
    min-height: 214px;
    max-height: 232px;
    transform: none;
  }

  .desktop-screen {
    grid-template-columns: 58px minmax(0, 1fr);
    height: 100%;
    min-height: 0;
  }

  .phone-mockup {
    width: 112px;
    min-width: 112px;
    max-width: 112px;
    right: 0;
    bottom: -18px;
    transform: rotate(-1deg);
  }
}

@media (max-width: 390px) {
  .hero-title {
    font-size: clamp(34px, 9.75vw, 38px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-showcase,
  .hero-badge,
  .hero-badge .dot,
  .hero-title span.gradient-text {
    animation: none !important;
  }
}

/* ==========================================================================
   动感升级：首屏入场 / 滚动驱动 / 高级微交互
   ========================================================================== */

/* 1. 首屏逐层入场动画（stagger fade-up） */
@keyframes heroRise {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-badge,
.hero-title,
.hero-desc,
.hero-btns,
.hero-stats {
  animation: heroRise 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hero-badge { animation-delay: 0.05s; }
.hero-title { animation-delay: 0.14s; }
.hero-desc  { animation-delay: 0.24s; }
.hero-btns  { animation-delay: 0.34s; }
.hero-stats { animation-delay: 0.46s; }

/* 2. 恢复标题渐变字 + 流光 */
.hero-title span.gradient-text {
  color: var(--primary);
  background: linear-gradient(135deg, var(--primary) 0%, #4f46e5 45%, var(--accent) 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: textShine 6s linear infinite;
}

/* 3. Hero 背景缓慢 Ken Burns 推近 */
.hero-section::before {
  will-change: transform;
  animation: heroBgKenBurns 18s ease-in-out infinite alternate;
}

@keyframes heroBgKenBurns {
  from { transform: scale(1); }
  to   { transform: scale(1.08); }
}

/* 4. Hero 样机鼠标 3D 视差（JS 驱动，CSS 仅声明基线） */
.hero-visual {
  transform-style: preserve-3d;
  will-change: transform;
}

/* 4.1 视差分层：桌面样机与手机样机按 --px/--py 以不同速率平移（JS 写入），
        限制在 521px 以上，避免覆盖窄屏下刻意移除的样机旋转 */
@media (min-width: 521px) {
  .desktop-mockup {
    transform: rotate(0.45deg) translate3d(var(--px, 0px), var(--py, 0px), 0px);
  }

  .phone-mockup {
    transform: rotate(-1.25deg) translate3d(calc(var(--px, 0px) * -1.7), calc(var(--py, 0px) * -1.2), 0px);
  }
}

/* 5. 导航 Scroll-spy 高亮 */
.nav-links a.active {
  color: var(--primary);
}

.nav-links a.active::after {
  width: 100%;
}

/* 6. 主 CTA 按钮流光扫过 */
.btn-primary {
  position: relative;
  overflow: hidden;
}

.btn-primary::after {
  content: "";
  position: absolute;
  top: 0;
  left: -130%;
  width: 55%;
  height: 100%;
  background: linear-gradient(100deg, transparent 0%, rgba(255, 255, 255, 0.55) 50%, transparent 100%);
  transform: skewX(-22deg);
  pointer-events: none;
  transition: left 0.65s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-primary:hover::after {
  left: 130%;
}

/* 8. CTA 渐变流动 */
.cta-box {
  background-size: 200% 200%;
  animation: ctaFlow 10s ease-in-out infinite;
}

@keyframes ctaFlow {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}

/* 9. 功能卡鼠标聚光 spotlight（JS 写入 --spot-x/--spot-y） */
.feature-card {
  --spot-x: 50%;
  --spot-y: 50%;
}

.feature-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(560px circle at var(--spot-x) var(--spot-y),
    color-mix(in srgb, var(--card-theme, #2563eb) 11%, transparent), transparent 46%);
  opacity: 0;
  transition: opacity 0.35s ease;
}

.feature-card:hover::after {
  opacity: 1;
}

/* 首页样机：与工作台保持双栏分析结构，设备内使用等比例紧凑排版。 */
.hero-showcase {
  /* 装饰性设备预览保持排版比例，不跟随移动浏览器的文字自动放大。 */
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
}
.hero-showcase .phone-toolbar em { display: grid; place-items: center; border: 0; border-radius: 50%; background: #dbeafe; color: #2858b8; box-shadow: none; }
.hero-showcase .phone-toolbar em svg { display: block; width: 48%; height: 48%; }
.hero-showcase .phone-toolbar span { white-space: nowrap; }
.hero-showcase .desktop-mockup { padding: 5px; background: linear-gradient(135deg,#e7edf4,#9daabd); box-shadow: 0 24px 48px -16px #152a4659, inset 0 0 0 1px #ffffffb3; }
.hero-showcase .mock-panel-row { display: grid; grid-template-columns: minmax(0,1.35fr) minmax(0,1fr); gap: 8px; }
.hero-showcase .mock-chart-card { min-height: 148px !important; }
.hero-showcase .mock-line-chart { height: 108px !important; padding-left: 20px; margin: 0 8px 8px; background-position: 20px 15px; background-size: calc(100% - 20px) 22px; }
.hero-showcase .mock-chart-dates { left: 20px; font-size: 5px; }
.hero-showcase .mock-chart-legend { font-size: 5px; top: 6px; gap: 5px; }
.hero-showcase .mock-line-blue,.hero-showcase .mock-line-green { stroke-width: 1.8; }
.hero-showcase .mock-points-blue circle,.hero-showcase .mock-points-green circle { r: 2; stroke-width: 1.8; }
.mock-rank-card,.mock-donut-card { min-width: 0; border: 1px solid #e5ebf3; border-radius: 10px; background: #fff; overflow: hidden; }
.mock-rank-list { padding: 7px 10px; }
.mock-rank-list > div { position: relative; display: flex; justify-content: space-between; gap: 4px; padding: 4px 0 10px; margin-bottom: 3px; font-size: 6px; color: #64748b; }
.mock-rank-list b { color: #334155; font-variant-numeric: tabular-nums; }
.mock-rank-list i { position: absolute; bottom: 3px; left: 0; height: 3px; width: 100%; border-radius: 3px; background: #5184ee; }
.mock-rank-list > div:nth-child(2) i { width: 85%; background: #73a0f3; }
.mock-rank-list > div:nth-child(3) i { width: 68%; background: #91b4f6; }
.mock-rank-list > div:nth-child(4) i { width: 49%; background: #b1ccf9; }
.mock-donut-body { display: flex; align-items: center; gap: 12px; padding: 10px; font-size: 6px; line-height: 2.2; color: #64748b; }
.mock-donut-body b { color: #334155; margin-left: 6px; }
.mock-donut { display: block; flex: 0 0 52px; height: 52px; border-radius: 50%; background: conic-gradient(#4b80ed 0 52%,#61bdb1 52% 82%,#e3ebf7 82%); position: relative; }
.mock-donut::after { content: ''; position: absolute; inset: 10px; background: white; border-radius: 50%; }
.mock-donut.profit { background: conic-gradient(#4b80ed 0 68%,#8ca9f3 68% 90%,#e3ebf7 90%); }
.hero-showcase .phone-mockup { box-shadow: 0 22px 36px -12px #0f172a66, inset 0 0 0 1px #ffffff66; }
.hero-showcase .phone-kpi-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 5px; }
.hero-showcase .phone-card { min-width: 0; min-height: 59px; padding: 8px 6px; margin: 0; border-radius: 8px; }
.hero-showcase .phone-card strong { font-size: 9px; }
.hero-showcase .phone-card small { font-size: 5px; }
.phone-trend { margin-top: 8px; padding: 10px 7px; border: 1px solid #e5ebf3; border-radius: 9px; background: #fff; }
.phone-screen .phone-trend b { display: block; font-size: 7px; color: #253247; }
.phone-trend small { color: #8793a5; font-size: 5px; font-weight: 400; }
.phone-trend svg { display: block; width: 100%; margin: 8px 0 4px; }
.phone-trend path { fill: none; stroke-width: 1.8; stroke-linejoin: round; }
.phone-trend .phone-grid { stroke: #edf1f7; stroke-width: 1; }
.phone-trend-line { stroke: #3979ec; }
.phone-net-line { stroke: #19a67b; }
.phone-trend > span { font-size: 4px; color: #8793a5; white-space: nowrap; }
.mock-preview-note { position: absolute; left: 4px; bottom: -24px; font-size: 10px; letter-spacing: .5px; color: #63758a; }
@media (max-width: 900px) {
  .hero-showcase .mock-panel-head { padding: 0 7px; }
  .hero-showcase .mock-panel-head b { font-size: 6px; }
  .hero-showcase .mock-panel-head span { font-size: 5px; }
}
@media (max-width: 520px) {
  .hero-section .hero-visual { overflow: visible; min-height: 280px; padding-bottom: 26px; }
  .hero-showcase .mock-kpis { grid-template-columns: repeat(4,minmax(0,1fr)); gap: 3px; padding: 0 6px; margin-bottom: 6px; }
  .hero-showcase .mock-kpis div { min-height: 38px; padding: 5px 3px; border-radius: 5px; }
  .hero-showcase .mock-kpis span,.hero-showcase .mock-kpis small { font-size: 3.5px; margin: 0 0 3px; }
  .hero-showcase .mock-kpis strong { font-size: 5.5px; }
  .hero-showcase .mock-kpis strong em { font-size: 3px; }
  .hero-showcase .mock-nav-item { font-size: 4px; justify-content: flex-start; gap: 4px; height: 17px; }
  .hero-showcase .mock-nav-item svg { width: 7px; height: 7px; }
  .hero-showcase .mock-heading { padding: 4px; }
  .hero-showcase .mock-app-topbar { height: 24px; }
  .hero-showcase .phone-mockup { bottom: -12px; height: 250px; }
  .hero-showcase .mock-panel-row { gap: 4px; }
  .hero-showcase .mock-chart-card { min-height: 76px !important; }
  .hero-showcase .mock-line-chart { height: 51px !important; }
  .hero-showcase .mock-panel-head { height: 20px; }
  .hero-showcase .mock-panel-head b { font-size: 4px; }
  .hero-showcase .mock-panel-head span,.hero-showcase .mock-chart-legend { display: none; }
  .mock-rank-list { padding: 2px 5px; }
  .mock-rank-list > div { font-size: 3.5px; padding: 2px 0 6px; margin: 0; }
  .mock-rank-list i { height: 2px; bottom: 1px; }
  .mock-donut-body { padding: 5px; gap: 5px; font-size: 3px; }
  .mock-donut { flex-basis: 24px; height: 24px; }
  .mock-donut::after { inset: 5px; }
  .hero-showcase .phone-card { min-height: 39px; padding: 5px 3px; }
  .hero-showcase .phone-card strong { font-size: 6px; }
  .hero-showcase .phone-card strong em { font-size: 3px; }
  .hero-showcase .phone-tabs { min-height: 0; height: 12px; }
  .hero-showcase .phone-tabs b { margin: 0; }
  .hero-showcase .phone-card span,.hero-showcase .phone-card small { font-size: 3.5px; }
  .phone-trend { padding: 5px; margin-top: 5px; }
  .phone-trend svg { height: 34px; margin: 4px 0 2px; }
  .phone-trend > span { display: block; font-size: 3px; line-height: 1.3; }
  .phone-screen .phone-trend b { font-size: 5px; }
  .phone-trend small { font-size: 3px; }
  .mock-preview-note { font-size: 7px; bottom: -18px; }
}
