:root {
  --bg: #000000;
  --bg-elevated: #0c0c0e;
  --card: #141416;
  --text: #f5f5f7;
  --muted: #98989f;
  --accent: #30d158;
  --accent-dim: rgba(48, 209, 88, 0.16);
  --line: #2a2a2e;
  --radius: 18px;
  --max: 1120px;
  --header-h: 64px;
  /* Local fonts only — no Google Fonts (often slow/blocked in CN) */
  --font: "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --display: "Segoe UI Variable Display", "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
video {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -48px;
  z-index: 100;
  padding: 8px 14px;
  background: var(--accent);
  color: #000;
  border-radius: 8px;
  font-weight: 700;
}

.skip-link:focus {
  top: 12px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(16px, 4vw, 40px);
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.brand__icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
}

.lang select {
  appearance: none;
  background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%98989f' d='M1 1l5 5 5-5'/%3E%3C/svg%3E") no-repeat right 12px center;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 36px 8px 14px;
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
}

.lang select:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.hero {
  position: relative;
  min-height: calc(100svh - var(--header-h));
  display: grid;
  align-items: end;
  padding: clamp(28px, 5vw, 56px) clamp(16px, 4vw, 40px) clamp(32px, 6vw, 64px);
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.85) brightness(0.55);
}

.hero__scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0.55) 40%, rgba(0, 0, 0, 0.92) 100%),
    radial-gradient(80% 60% at 70% 20%, rgba(48, 209, 88, 0.12), transparent 60%);
}

.hero__content {
  position: relative;
  z-index: 1;
  max-width: 640px;
}

.hero__brand {
  margin: 0 0 10px;
  font-family: var(--display);
  font-size: clamp(2rem, 6vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--text);
}

.hero h1 {
  margin: 0 0 14px;
  font-family: var(--display);
  font-size: clamp(1.8rem, 5.5vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.08;
  color: var(--accent);
}

.hero__lead {
  margin: 0 0 28px;
  max-width: 34em;
  color: rgba(245, 245, 247, 0.88);
  font-size: clamp(1rem, 2.2vw, 1.15rem);
  font-weight: 500;
}

.store-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.store-row--center {
  justify-content: center;
}

.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 168px;
  padding: 10px 18px;
  border-radius: 12px;
  background: #111;
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.store-btn:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  background: #161616;
}

.store-btn small {
  display: block;
  font-size: 0.7rem;
  opacity: 0.75;
  line-height: 1.1;
}

.store-btn strong {
  display: block;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.hero__device {
  position: relative;
  z-index: 1;
  margin-top: clamp(28px, 5vw, 48px);
  display: flex;
  justify-content: center;
}

.phone {
  width: min(280px, 72vw);
  border-radius: 36px;
  padding: 10px;
  background: linear-gradient(160deg, #2a2a2e, #0a0a0a);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
  animation: rise 0.9s ease both;
}

.phone__screen {
  position: relative;
  aspect-ratio: 9 / 19;
  border-radius: 28px;
  overflow: hidden;
  background: #000;
}

.phone__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
}

.phone__badge {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.phone__badge img {
  border-radius: 8px;
}

.phone__badge strong {
  display: block;
  font-size: 0.92rem;
  line-height: 1.2;
}

.phone__badge span {
  display: block;
  font-size: 0.72rem;
  color: var(--muted);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.features {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(56px, 10vw, 96px) clamp(16px, 4vw, 40px);
}

.section-title {
  margin: 0 0 10px;
  font-family: var(--display);
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
}

.section-lead {
  margin: 0 0 40px;
  max-width: 40em;
  color: var(--muted);
  font-size: 1.05rem;
}

.feature-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 28px;
  grid-template-columns: 1fr;
}

.feature img {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  margin-bottom: 14px;
}

.feature h3 {
  margin: 0 0 8px;
  font-family: var(--display);
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.feature p {
  margin: 0;
  color: var(--muted);
  max-width: 36em;
}

.cta-band {
  margin: 0 clamp(16px, 4vw, 40px) clamp(48px, 8vw, 80px);
  padding: clamp(36px, 6vw, 56px) clamp(20px, 4vw, 40px);
  border-radius: calc(var(--radius) + 6px);
  background:
    radial-gradient(80% 120% at 10% 0%, var(--accent-dim), transparent 55%),
    var(--card);
  border: 1px solid var(--line);
  text-align: center;
}

.cta-band h2 {
  margin: 0 0 10px;
  font-family: var(--display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  letter-spacing: -0.03em;
}

.cta-band p {
  margin: 0 auto 24px;
  max-width: 32em;
  color: var(--muted);
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 28px clamp(16px, 4vw, 40px) 40px;
  color: var(--muted);
  font-size: 0.92rem;
}

.footer__row {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  justify-content: space-between;
  align-items: center;
}

.footer__nav {
  display: flex;
  gap: 18px;
}

.footer__nav a:hover {
  color: var(--accent);
}

.footer__note {
  max-width: var(--max);
  margin: 14px auto 0;
  font-size: 0.82rem;
  opacity: 0.75;
}

.dialog {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0;
  background: var(--card);
  color: var(--text);
  max-width: min(520px, calc(100vw - 32px));
}

.dialog::backdrop {
  background: rgba(0, 0, 0, 0.65);
}

.dialog form {
  padding: 24px;
}

.dialog h2 {
  margin: 0 0 12px;
  font-family: var(--display);
}

.dialog p {
  margin: 0 0 20px;
  color: var(--muted);
}

.dialog__close {
  border: 0;
  border-radius: 10px;
  padding: 10px 16px;
  background: var(--accent);
  color: #000;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

@media (min-width: 768px) {
  .hero {
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
    gap: 40px;
    padding-top: clamp(40px, 6vw, 72px);
  }

  .hero__device {
    margin-top: 0;
    justify-content: flex-end;
  }

  .phone {
    width: min(300px, 34vw);
  }

  .feature-list {
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
  }
}

@media (min-width: 1100px) {
  .hero {
    padding-inline: max(40px, calc((100vw - var(--max)) / 2));
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .phone,
  .store-btn {
    animation: none;
    transition: none;
  }
}

[dir="rtl"] .hero__content {
  text-align: right;
}

[dir="rtl"] .store-row {
  flex-direction: row-reverse;
}

/* Legal / support pages */
.legal-page {
  width: min(720px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 64px;
}

.back-home {
  display: inline-block;
  margin-bottom: 20px;
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
}

.back-home:hover {
  color: #fff;
}

.legal-page h1 {
  font-family: var(--display);
  font-size: clamp(1.75rem, 4vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0 0 8px;
}

.legal-meta {
  color: rgba(255, 255, 255, 0.55);
  margin: 0 0 28px;
  font-size: 0.95rem;
}

.legal-body h2 {
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 700;
  margin: 28px 0 10px;
}

.legal-body p {
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.7;
  margin: 0 0 12px;
}

.legal-body a,
.support-contact a,
.mail-link {
  color: #8ecbff;
  word-break: break-all;
}

.faq-list {
  display: grid;
  gap: 12px;
  margin-bottom: 40px;
}

.faq {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 14px 0 4px;
}

.faq:first-child {
  border-top: none;
  padding-top: 0;
}

.faq summary {
  cursor: pointer;
  font-weight: 700;
  list-style: none;
  padding: 4px 0;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  float: right;
  color: rgba(255, 255, 255, 0.45);
  font-weight: 500;
}

.faq[open] summary::after {
  content: "–";
}

.faq p {
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.7;
  margin: 10px 0 8px;
  padding-right: 24px;
}

.support-contact h2 {
  font-family: var(--display);
  font-size: 1.2rem;
  margin: 0 0 10px;
}

.support-contact p {
  color: rgba(255, 255, 255, 0.78);
  margin: 0 0 8px;
  line-height: 1.6;
}

[dir="rtl"] .faq summary::after {
  float: left;
}

[dir="rtl"] .faq p {
  padding-right: 0;
  padding-left: 24px;
}
