:root {
  --ink: #06144d;
  --brand-blue: #0967fe;
  --icon-blue: #0b4db7;
  --text-muted: #333333;
  --glass: rgba(255, 255, 255, 0.5);
  --glass-border: #ffffff;
  --page-max: 1920px;
  --btn-size: 160px;
  --btn-gap: 36px;
  --side-pad: clamp(24px, 20.3vw, 390px);
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: "Noto Sans SC", "PingFang SC", "Noto Sans", sans-serif;
  color: var(--ink);
  background: #e8f4ff;
}

.page {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  background:
    url("../img/bj.png") center center / cover no-repeat,
    linear-gradient(180deg, #d8efff 0%, #f5fbff 50%, #e8f6ff 100%);
}

.hero {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: var(--page-max);
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  /* Figma 1920×1080：顶部约 277px */
  padding-top: max(clamp(72px, 25.6vh, 277px), env(safe-area-inset-top));
  padding-bottom: max(clamp(40px, 7vh, 86px), env(safe-area-inset-bottom));
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

.hero-copy {
  display: flex;
  flex-direction: column;
  /* align-items: flex-start; */
  align-items: center;
  justify-content: center;
  /* width: fit-content; */
  /* max-width: min(560px, calc(100% - var(--side-pad) * 2)); */
  /* margin-left: var(--side-pad); */
  /* padding-right: 24px; */
}

.logo {
  display: block;
  width: min(400px, 100%);
  height: auto;
}

.title {
  margin: 34px 0 0;
  font-family: "Noto Sans SC", "Noto Sans", sans-serif;
  font-weight: 700;
  font-size: clamp(40px, 4.167vw, 80px);
  line-height: 1.362;
  letter-spacing: 0.02em;
  color: var(--ink);
  white-space: nowrap;
}

.title span {
  color: var(--brand-blue);
}

.subtitle {
  margin: 34px 0 0;
  font-family: "Noto Sans SC", "Noto Sans", sans-serif;
  font-weight: 400;
  font-size: clamp(16px, 1.25vw, 24px);
  line-height: 1.362;
  letter-spacing: 0.02em;
  color: var(--ink);
}

.platforms {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: var(--btn-gap);
  width: 100%;
  margin-top: clamp(48px, 18.15vh, 196px);
  padding: 0 16px;
}

.platform-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  width: var(--btn-size);
  height: var(--btn-size);
  flex-shrink: 0;
  padding: 30px 18px;
  border-radius: 999px;
  background: var(--glass);
  border: 1.2px solid var(--glass-border);
  text-decoration: none;
  color: var(--text-muted);
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

@media (hover: hover) and (pointer: fine) {
  .platform-btn:hover {
    transform: translateY(-4px);
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 12px 28px rgba(6, 20, 77, 0.12);
  }
}

.platform-btn:active {
  transform: scale(0.96);
  background: rgba(255, 255, 255, 0.8);
}

.platform-btn img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.platform-btn span {
  font-family: "PingFang SC", "Noto Sans SC", sans-serif;
  font-weight: 500;
  font-size: 20px;
  line-height: 28px;
  text-align: center;
  color: var(--text-muted);
}

.platform-btn span.platform-btn-label-sm {
  font-size: 18px;
  line-height: 25px;
}

/* ---------- Tablet ---------- */
@media (max-width: 1100px) {
  :root {
    --side-pad: 40px;
    --btn-size: 132px;
    --btn-gap: 24px;
  }

  .hero {
    padding-top: max(64px, env(safe-area-inset-top) + 40px);
  }

  .platforms {
    margin-top: clamp(40px, 10vh, 120px);
  }

  .platform-btn {
    gap: 12px;
    padding: 24px 14px;
  }

  .platform-btn img {
    width: 32px;
    height: 32px;
  }

  .platform-btn span {
    font-size: 16px;
    line-height: 22px;
  }

  .platform-btn span.platform-btn-label-sm {
    font-size: 14px;
    line-height: 20px;
  }
}

/* ---------- Phone ---------- */
@media (max-width: 720px) {
  :root {
    --side-pad: 0px;
    --btn-size: 120px;
    --btn-gap: 20px;
  }

  .page {
    background-position: 70% center;
  }

  .hero {
    align-items: center;
    justify-content: center;
    padding-top: max(24px, env(safe-area-inset-top));
    padding-bottom: max(24px, env(safe-area-inset-bottom));
    padding-left: max(20px, env(safe-area-inset-left));
    padding-right: max(20px, env(safe-area-inset-right));
  }

  .hero-copy {
    align-items: center;
    text-align: center;
    max-width: 100%;
    width: 100%;
    margin-left: 0;
    padding-right: 0;
  }

  .logo {
    width: min(220px, 58vw);
    margin-inline: auto;
  }

  .title {
    margin-top: 20px;
    font-size: clamp(28px, 8.5vw, 36px);
    letter-spacing: 0.01em;
    white-space: normal;
  }

  .subtitle {
    margin-top: 12px;
    font-size: clamp(14px, 3.8vw, 16px);
    max-width: 18em;
    margin-left: auto;
    margin-right: auto;
  }

  .platforms {
    margin-top: 36px;
    padding: 0;
  }

  .platform-btn {
    gap: 10px;
    padding: 18px 12px;
  }

  .platform-btn img {
    width: 32px;
    height: 32px;
  }

  .platform-btn span {
    font-size: 15px;
    line-height: 20px;
  }

  .platform-btn span.platform-btn-label-sm {
    font-size: 12px;
    line-height: 16px;
  }
}

/* Short phone viewport */
@media (max-width: 720px) and (max-height: 700px) {
  :root {
    --btn-size: 100px;
    --btn-gap: 16px;
  }

  .hero {
    justify-content: center;
    min-height: 100vh;
    min-height: 100dvh;
    padding-top: max(20px, env(safe-area-inset-top));
    padding-bottom: max(20px, env(safe-area-inset-bottom));
  }

  .logo {
    width: min(180px, 48vw);
  }

  .title {
    margin-top: 12px;
    font-size: 26px;
  }

  .subtitle {
    margin-top: 8px;
    font-size: 13px;
  }

  .platforms {
    margin-top: 54px;
  }

  .platform-btn {
    gap: 8px;
    padding: 14px 10px;
  }

  .platform-btn img {
    width: 28px;
    height: 28px;
  }

  .platform-btn span {
    font-size: 13px;
    line-height: 18px;
  }
}

/* Very narrow */
@media (max-width: 380px) {
  :root {
    --btn-size: 96px;
    --btn-gap: 12px;
  }

  .platform-btn span {
    font-size: 12px;
    line-height: 16px;
  }
}
