@font-face {
  font-family: InterLocal;
  src: url("./assets/inter.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: AntonLocal;
  src: url("./assets/anton.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: Techna;
  src: url("./assets/techna.otf") format("opentype");
  font-display: swap;
}

:root {
  color-scheme: dark;
  --lime: #b9ff00;
  --ink: #070c11;
  --white: #f7f8f5;
  --muted: #9ba3a7;
  --line: rgba(255, 255, 255, 0.14);
  --body-font: InterLocal, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --display-font: Techna, InterLocal, "PingFang SC", sans-serif;
  /* 标语按设计稿用 Impact；手机系统没有 Impact，退到外形最接近的 Anton（OFL 授权，随站点打包） */
  --slogan-font: Impact, AntonLocal, "Arial Narrow", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
  background: var(--ink);
  color: var(--white);
}

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

body {
  overflow-x: clip;
  font-family: var(--body-font);
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

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

button {
  font: inherit;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 3px;
}

.display-heading {
  margin: 0;
  font-family: var(--slogan-font);
  font-weight: 400;
  letter-spacing: 0;
}

.display-heading > span {
  display: block;
  white-space: nowrap;
  /* Impact/Anton 字身比原先的 Techna 高，行距放到 1 避免上下两行贴住 */
  line-height: 1;
}

.display-heading em {
  font-style: normal;
  color: var(--lime);
}

/* Desktop */
.desktop-view {
  position: relative;
  display: none;
  min-height: 100svh;
  min-height: 100dvh;
  grid-template-rows: auto 1fr auto;
  overflow: hidden;
  isolation: isolate;
  background: var(--ink) url("./assets/hero.webp") center 42% / cover no-repeat;
}

.desktop-view::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(
      90deg,
      rgba(3, 7, 10, 0.94) 0%,
      rgba(3, 7, 10, 0.82) 22%,
      rgba(3, 7, 10, 0.4) 52%,
      rgba(3, 7, 10, 0.06) 82%,
      rgba(3, 7, 10, 0.02) 100%
    ),
    linear-gradient(0deg, rgba(3, 7, 10, 0.72) 0%, rgba(3, 7, 10, 0.12) 42%, transparent 70%);
}

.desktop-header {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px clamp(24px, 4.5vw, 64px);
}

.desktop-header .brand img {
  width: 112px;
}

.official-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 7px 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(8, 14, 19, 0.56);
  backdrop-filter: blur(12px);
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  letter-spacing: 0.04em;
}

.desktop-hero {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  padding: 7vh clamp(24px, 4.5vw, 64px) 9vh;
}

.desktop-copy {
  width: min(760px, 64vw);
}

.desktop-copy .display-heading {
  margin-bottom: 36px;
  font-size: clamp(64px, 6.3vw, 104px);
  line-height: 0.82;
}

.desktop-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.platform-card {
  position: relative;
  display: block;
  width: 268px;
  min-height: 72px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 16px;
  background: rgba(8, 14, 19, 0.62);
  backdrop-filter: blur(16px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 18px 44px rgba(0, 0, 0, 0.28);
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease;
}

.platform-card:hover,
.platform-card:focus-within {
  transform: translateY(-3px);
  border-color: rgba(185, 255, 0, 0.46);
  background: rgba(8, 14, 19, 0.78);
}

.platform-main {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 10px;
  min-height: 72px;
  padding: 12px 14px;
}

.platform-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  color: #fff;
}

.platform-icon svg {
  width: 19px;
  height: 19px;
}

.platform-copy strong {
  display: block;
  font-size: 15px;
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: 0.01em;
}

.platform-copy small {
  display: block;
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.48);
  font-size: 10px;
  line-height: 1.2;
}

.platform-arrow {
  justify-self: end;
  color: rgba(255, 255, 255, 0.62);
  font-size: 14px;
  transition: transform 0.2s ease;
}

.platform-card:hover .platform-arrow {
  transform: translate(2px, -2px);
}

.platform-card--android .platform-main {
  padding-right: 92px;
}

.platform-help {
  position: absolute;
  right: 12px;
  bottom: 9px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.46);
  font-size: 9px;
  line-height: 1;
  cursor: pointer;
}

.platform-help svg {
  width: 11px;
  height: 11px;
}

.platform-help:hover {
  color: #fff;
}

.desktop-footer {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px clamp(24px, 4.5vw, 64px);
  border-top: 1px solid var(--line);
  color: rgba(255, 255, 255, 0.52);
  font-size: 12px;
}

.desktop-footer nav,
.desktop-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.desktop-footer a:hover {
  color: #fff;
}

/* Mobile */
.mobile-view {
  position: relative;
  display: none;
  flex-direction: column;
  min-height: 100svh;
  min-height: 100dvh;
  padding:
    max(18px, env(safe-area-inset-top))
    16px
    max(20px, env(safe-area-inset-bottom));
  isolation: isolate;
  background: var(--ink);
}

.mobile-view::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(
      180deg,
      rgba(7, 12, 17, 0.2) 0%,
      rgba(7, 12, 17, 0.26) 30%,
      rgba(7, 12, 17, 0.5) 55%,
      rgba(7, 12, 17, 0.86) 72%,
      #070c11 84%
    ),
    url("./assets/hero-mobile.webp") center top / cover no-repeat;
}

.mobile-header {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  min-height: 29px;
}

.mobile-header .brand img {
  width: 72px;
}

.mobile-main {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
}

.mobile-ios .mobile-main {
  padding-top: clamp(88px, 19.2vh, 162px);
}

/* 内容占满一屏时页脚的 margin-top:auto 归零，「用安卓手机？」这行会被上下两条分割线夹住，留出最小间距 */
.mobile-ios .mobile-main {
  padding-bottom: 28px;
}

.mobile-android .mobile-main {
  padding-bottom: 20px;
}

.nowrap {
  white-space: nowrap;
}

.mobile-android .mobile-main {
  margin-top: auto;
}

.mobile-ios .display-heading {
  margin-bottom: 21px;
  font-size: 48px;
  line-height: 40px;
}

.mobile-android .display-heading {
  margin-bottom: 26px;
  font-size: 58px;
  line-height: 47px;
}

.ios-steps {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.step {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(8, 14, 19, 0.76);
  backdrop-filter: blur(14px);
}

.step--featured {
  border-color: rgba(185, 255, 0, 0.34);
  background: rgba(8, 14, 19, 0.78);
}

.step-badge {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: #aab2b6;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
}

.step--featured .step-badge {
  border-color: var(--lime);
  background: var(--lime);
  color: #07100a;
}

.step-body h2 {
  margin: 0 0 5px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0.005em;
}

.step-body p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.52;
}

.step-body p strong {
  color: #fff;
  font-weight: 600;
}

.step-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  margin-top: 12px;
  padding: 8px 15px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
}

.step-action--primary {
  border-color: var(--lime);
  background: var(--lime);
  color: #07100a;
}

.action-arrow {
  font-size: 14px;
  font-weight: 500;
}

.requirement {
  margin: 15px 0 0;
  color: #8c969b;
  font-size: 12px;
  line-height: 1.4;
}

.platform-switch {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin-top: 14px;
  padding: 14px 0 0;
  border: 0;
  border-top: 1px solid var(--line);
  background: transparent;
  color: var(--white);
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.platform-switch--plain {
  margin-top: 18px;
  padding-top: 0;
  border-top: 0;
}

.switch-icon {
  flex: none;
  width: 17px;
  height: 17px;
  color: #a9b1b5;
}

.switch-arrow {
  margin-left: 2px;
  color: #a9b1b5;
  font-weight: 400;
}

.apk-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 64px;
  border-radius: 14px;
  background: var(--lime);
  box-shadow: 0 12px 34px rgba(185, 255, 0, 0.16);
  color: #07100a;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.apk-button svg {
  width: 20px;
  height: 20px;
}

.apk-button:hover {
  filter: brightness(1.03);
}

.apk-meta {
  margin: 14px 0 0;
  color: #8c969b;
  font-size: 12px;
  line-height: 1.5;
}

.apk-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 18px 0 0;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  background: rgba(8, 14, 19, 0.5);
  color: #a4adb1;
  font-size: 12px;
  line-height: 1.5;
}

.apk-note svg {
  flex: none;
  width: 15px;
  height: 15px;
  margin-top: 1px;
  color: #a4adb1;
}

.mobile-footer {
  position: relative;
  z-index: 1;
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: #7f888e;
  font-size: 12px;
  line-height: 1.65;
}

.mobile-android .mobile-footer {
  margin-top: 0;
}

.mobile-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.mobile-footer a:hover {
  color: #fff;
}

.mobile-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 7px;
}

/* Android install instructions */
.help-dialog {
  width: min(420px, calc(100vw - 32px));
  margin: auto;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 20px;
  background: #0b1116;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
  color: var(--white);
}

.help-dialog::backdrop {
  background: rgba(2, 5, 8, 0.72);
  backdrop-filter: blur(8px);
}

.help-dialog h2 {
  margin: 0 0 14px;
  font-size: 22px;
  line-height: 1.2;
}

.help-dialog ol {
  margin: 0 0 20px;
  padding-left: 20px;
  color: #a7b0b6;
  font-size: 13px;
  line-height: 1.7;
}

.help-dialog li + li {
  margin-top: 8px;
}

.help-dialog form {
  margin: 0;
}

.help-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  background: transparent;
  color: rgba(255, 255, 255, 0.66);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.help-close:hover {
  border-color: rgba(255, 255, 255, 0.4);
  color: #fff;
}

.help-action {
  width: 100%;
  padding: 12px;
  border: 0;
  border-radius: 10px;
  background: var(--lime);
  color: #07100a;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

@media (min-width: 900px) {
  .desktop-view {
    display: grid;
  }

  .mobile-view {
    display: none;
  }
}

@media (max-width: 899px) {
  .desktop-view {
    display: none;
  }

  html[data-platform="ios"] .mobile-ios,
  html[data-platform="android"] .mobile-android {
    display: flex;
  }
}

@media (max-width: 360px) {
  .mobile-ios .display-heading {
    font-size: 44px;
    line-height: 37px;
  }

  .mobile-android .display-heading {
    font-size: 52px;
    line-height: 43px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
