/* =========================================================
   雨后初晴 - Responsive Layer
   4 档断点 + prefers-reduced-motion
   ========================================================= */

/* 1280px — 桌面 */
@media (max-width: 1280px) {
  .software-grid { grid-template-columns: repeat(4, 1fr); }
  .hero-visual { width: 360px; height: 245px; right: 48px; }
  .download-grid { grid-template-columns: repeat(2, 1fr); }
}

/* 960px / 1100px — 中屏 */
@media (max-width: 1100px) {
  .software-grid { grid-template-columns: repeat(3, 1fr); }
  .hero-visual { display: none; }
  .hero-card { padding: 0 48px; }
}

/* 640px / 768px — 平板 */
@media (max-width: 768px) {
  h1 { font-size: 32px; }
  h2 { font-size: 26px; }

  .navbar-links { display: none; }
  .navbar-hamburger { display: flex; }

  .hero-card {
    height: auto;
    padding: 40px 28px;
    min-height: 260px;
    text-align: center;
  }
  .hero-content h1 { font-size: 28px; }
  .hero-content .hero-sub { font-size: 16px; }
  .hero-buttons { justify-content: center; }

  .software-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }

  /* 详情页：头部变垂直 */
  .detail-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 24px 20px;
  }
  .detail-info-top { justify-content: center; }
  .detail-meta {
    grid-template-columns: 1fr;
    gap: 8px;
    max-width: none;
  }
  .detail-meta-row {
    flex-direction: row;
    justify-content: space-between;
    gap: 12px;
  }

  /* 下载卡片单列 */
  .download-grid { grid-template-columns: 1fr; }

  .register-hero h1 { font-size: 28px; }

  .pay-methods { flex-direction: column; }

  .tutorial-step { flex-direction: column; gap: 12px; }

  .license-info .info-row { flex-direction: column; gap: 2px; }

  .regcode-text { font-size: 14px; }

  .page { padding-top: calc(var(--nav-height) + 24px); }

  .footer-inner { flex-wrap: wrap; justify-content: center; text-align: center; gap: 8px 16px; }

  .detail-callout { flex-wrap: wrap; }
  .detail-callout .callout-link { margin-left: 0; width: 100%; text-align: center; }
}

/* Mobile — 480px */
@media (max-width: 480px) {
  .software-grid { grid-template-columns: 1fr; }
  .hero-content h1 { font-size: 24px; }
  .not-found .nf-code { font-size: 80px; }
  .machine-code-input { font-size: 16px; letter-spacing: 1px; padding: 0 12px; }

  .detail-header { padding: 20px 16px; gap: 20px; }
  .detail-icon { width: 72px; height: 72px; border-radius: 18px; }
  .detail-icon-emoji { font-size: 34px; }
  .detail-info h1 { font-size: 22px; }
}

/* ============ Prefers Reduced Motion ============ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
