/* ============================================
   浏览器兼容层（browser-compat.css）
   作用：为国产浏览器老内核（QQ/360/2345）提供 fallback
   原则：不修改原文件，只做降级兜底
   ============================================ */

/* 1. 100svh/dvh/lvh → 100vh 兜底（老内核不认识 svh 单位）
   现代浏览器用 svh，老内核回退到 vh */
@supports not (min-height: 100svh) {
  .hero, .hero-section, [class*="hero"] {
    min-height: 100vh;
  }
}

/* 2. 补齐 backdrop-filter 的 -webkit- 前缀（部分老内核需要）
   原文件部分地方只写了标准写法 */
@supports (-webkit-backdrop-filter: blur(1px)) {
  #nav {
    -webkit-backdrop-filter: blur(30px);
  }
}

/* 3. backdrop-filter 完全不支持时，降级为纯色背景（避免透明导致内容重叠） */
@supports not (backdrop-filter: blur(1px)) and not (-webkit-backdrop-filter: blur(1px)) {
  #nav {
    background: rgba(0, 0, 0, 0.92);
  }
  .nav-dropdown-menu {
    background: rgba(12, 12, 14, 0.98);
  }
}

/* 4. gap 完全不支持时（极老内核），用 margin 兜底关键导航间距 */
@supports not (gap: 1px) {
  .nav-items > * + * { margin-left: 44px; }
  .footer-left > * + * { margin-left: 16px; }
  .hero-actions > * + * { margin-left: 16px; }
}

/* 5. aspect-ratio 不支持时，图片容器用 padding 撑比例 */
@supports not (aspect-ratio: 1) {
  .page-cell picture { display: block; }
}

/* 6. scroll-behavior 不支持时（老内核），去掉平滑滚动（瞬时跳转，可接受） */
@supports not (scroll-behavior: smooth) {
  html { scroll-behavior: auto; }
}
