/* ==========================================================================
   RATO 锂电池  v1.0.1
   首页 index.html 使用。
   字体：fonts/ 下阿里巴巴普惠体 3.0（Regular 400 / Bold 700）
   ========================================================================== */

/* --- 字体（勿引用完整字库包 AlibabaPuHuiTi-3/，仅部署 fonts/ 内文件） --- */
@font-face {
  font-family: "Alibaba PuHuiTi";
  src:
    url("fonts/AlibabaPuHuiTi-Regular.woff2?v=1.0.1") format("woff2"),
    url("fonts/AlibabaPuHuiTi-Regular.woff?v=1.0.1") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Alibaba PuHuiTi";
  src:
    url("fonts/AlibabaPuHuiTi-Bold.woff2?v=1.0.1") format("woff2"),
    url("fonts/AlibabaPuHuiTi-Bold.woff?v=1.0.1") format("woff");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* --- 变量 --- */
:root {
  --red: #e30613;
  --navy: #1b3a8c;
  --ink: #16181d;
  --muted: rgba(255, 255, 255, 0.72);
  --line: rgba(255, 255, 255, 0.16);
  --paper: #12161f;
  --card: #ffffff;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-x: max(env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px));
}

/* --- 基础 --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  color: #fff;
  background: var(--paper);
  font-family: "Alibaba PuHuiTi", "阿里巴巴普惠体 3.0", "阿里巴巴普惠体",
    "PingFang SC", "Microsoft YaHei", sans-serif;
  font-weight: 400;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: rgba(227, 6, 19, 0.12);
}

img {
  display: block;
  max-width: 100%;
  height: auto;
  -webkit-touch-callout: default;
}

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

/* --- 微信分享兜底图：移出视口但保留真实尺寸，供爬虫读取 --- */
.wx-share-img {
  position: absolute;
  left: -9999px;
  top: 0;
  width: 500px;
  height: 500px;
}

/* --- 全屏背景板 --- */
.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(14px);
  transform: scale(1.12);
}

.bg-mask {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(8, 12, 22, 0.42) 0%, rgba(8, 12, 22, 0.62) 48%, rgba(8, 12, 22, 0.78) 100%);
}

/* --- 页面骨架 --- */
.page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  max-width: 880px;
  margin: 0 auto;
  padding:
    calc(28px + var(--safe-t))
    calc(22px + var(--safe-x))
    calc(18px + var(--safe-b));
}

/* --- 品牌区 --- */
.brand {
  text-align: center;
}

.logo {
  width: min(196px, 56vw);
  height: auto;
  margin: 0 auto 20px;
}

.eyebrow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #fff;
  font-size: 20px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-weight: 700;
}

.eyebrow [lang="en"] {
  letter-spacing: 0.22em;
}

.mark {
  width: 8px;
  height: 8px;
  background: var(--red);
  border-radius: 1px;
  flex-shrink: 0;
}

.dot {
  color: rgba(255, 255, 255, 0.55);
  letter-spacing: 0;
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 28px 0 20px;
}

h1 {
  text-align: center;
  color: #fff;
  font-size: clamp(36px, 7.2vw, 56px);
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1.2;
}

.lead {
  margin: 12px auto 0;
  max-width: 28em;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  letter-spacing: 0.08em;
}

/* --- 二维码 --- */
.codes {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 32px;
}

.card {
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  padding: 22px 18px 20px;
  text-align: center;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
}

.card h2 {
  color: var(--ink);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.sub {
  margin-top: 4px;
  color: #6b717c;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

figure {
  margin-top: 18px;
}

.card img {
  width: min(220px, 68vw);
  height: auto;
  margin: 0 auto;
  user-select: none;
  -webkit-user-select: none;
}

.qr-sun {
  width: min(236px, 72vw);
}

figcaption {
  margin-top: 10px;
  color: #6b717c;
  font-size: 12px;
  letter-spacing: 0.12em;
}

/* --- 电话 --- */
.phone {
  margin-top: 36px;
  text-align: center;
}

.phone-label {
  color: #fff;
  font-size: 20px;
  letter-spacing: 0.28em;
  font-weight: 700;
}

.phone-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin-top: 4px;
  color: #fff;
  font-size: clamp(28px, 7vw, 40px);
  font-weight: 700;
  letter-spacing: 0.1em;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(255, 255, 255, 0.18);
}

/* --- 备案 --- */
footer {
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.beian {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 10px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 12px;
  letter-spacing: 0.04em;
  line-height: 1.6;
}

.beian a {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
}

.beian a:hover,
.beian a:focus-visible {
  color: #fff;
}

.sep {
  color: rgba(255, 255, 255, 0.32);
}

/* --- 桌面 --- */
@media (min-width: 720px) {
  .page {
    padding: calc(36px + var(--safe-t)) 32px calc(24px + var(--safe-b));
  }

  .logo {
    width: 220px;
    margin-bottom: 24px;
  }

  main {
    padding: 36px 0 28px;
  }

  .codes {
    grid-template-columns: 1fr 1fr;
    gap: 22px;
    margin-top: 40px;
  }

  .card {
    padding: 28px 24px 26px;
    border-radius: 20px;
  }

  .card img,
  .qr-sun {
    width: 228px;
  }

  .phone {
    margin-top: 42px;
  }
}

/* 矮屏桌面：压缩纵向留白，尽量一屏展示 */
@media (max-height: 900px) and (min-width: 720px) {
  .page {
    padding-top: calc(22px + var(--safe-t));
    padding-bottom: calc(16px + var(--safe-b));
  }

  .logo {
    width: 188px;
    margin-bottom: 12px;
  }

  main {
    padding: 18px 0 14px;
  }

  .codes {
    margin-top: 24px;
  }

  .phone {
    margin-top: 28px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }

  .bg img {
    filter: blur(8px);
  }
}
