:root {
  --bg: #050914;
  --bg-soft: #0b1322;
  --surface: rgba(18, 30, 50, 0.62);
  --border: rgba(255, 255, 255, 0.1);
  --text: #f4f7fc;
  --text-2: rgba(244, 247, 252, 0.76);
  --text-3: rgba(244, 247, 252, 0.46);
  --brand: #5ee7ff;
  --brand-2: #4aa3ff;
  --solo: #8b9bff;
  --wifi: #3aa0ff;
  --battery: #2fd48a;
  --fanqie: #ff6b5b;
  --wrap: 1100px;
  --radius: 20px;
  --font: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
  position: relative;
  overflow-x: hidden;
}

body.menu-open { overflow: hidden; }

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

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

.wrap {
  width: min(var(--wrap), calc(100% - 48px));
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

/* ===== Atmosphere + cosmos canvas ===== */
.world-atmosphere {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  background:
    radial-gradient(ellipse 90% 55% at 50% -8%, rgba(70, 120, 210, 0.28), transparent 62%),
    radial-gradient(ellipse 45% 35% at 78% 22%, rgba(120, 90, 180, 0.1), transparent 58%),
    radial-gradient(ellipse 55% 30% at 18% 70%, rgba(30, 80, 140, 0.12), transparent 60%),
    linear-gradient(180deg, #060d1c 0%, #050914 42%, #03060e 72%, #02050c 100%);
}

.cosmos-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.95;
}

.world-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.38;
}

.world-glow-a {
  width: min(72vw, 780px);
  height: min(52vw, 560px);
  top: -18%;
  left: 50%;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(90, 150, 255, 0.42), transparent 72%);
}

.world-glow-b {
  width: min(48vw, 500px);
  height: min(48vw, 500px);
  top: 28%;
  right: -12%;
  background: radial-gradient(circle, rgba(140, 110, 220, 0.18), transparent 70%);
}

.world-glow-c {
  width: min(56vw, 560px);
  height: min(40vw, 420px);
  bottom: -6%;
  left: 10%;
  background: radial-gradient(circle, rgba(40, 110, 180, 0.22), transparent 70%);
}

.world-veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(5, 9, 20, 0.12) 0%, transparent 30%, rgba(3, 7, 16, 0.28) 68%, rgba(2, 5, 12, 0.82) 100%);
}

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(5, 9, 20, 0.62);
  border-bottom: 1px solid transparent;
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  transition: border-color 0.2s, background 0.2s;
}

.site-header.is-scrolled {
  border-bottom-color: var(--border);
  background: rgba(5, 9, 20, 0.9);
}

.header-row {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.02em;
}

.brand img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.nav-main {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.nav-main a {
  padding: 8px 14px;
  border-radius: 8px;
  color: var(--text-2);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.15s, background 0.15s;
}

.nav-main a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.header-cta { margin-left: 8px; }

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  margin-left: auto;
  place-items: center;
  gap: 5px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
}

.nav-toggle span {
  display: block;
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background: var(--text);
  transition: transform 0.2s var(--ease);
}

body.menu-open .nav-toggle span:first-child {
  transform: translateY(3.5px) rotate(45deg);
}

body.menu-open .nav-toggle span:last-child {
  transform: translateY(-3.5px) rotate(-45deg);
}

.mobile-scrim,
.mobile-nav {
  display: none;
}

.mobile-scrim.is-open,
body.menu-open .mobile-scrim {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(0, 0, 0, 0.55);
}

.mobile-nav.is-open,
body.menu-open .mobile-nav {
  display: grid;
  position: fixed;
  top: 72px;
  left: 16px;
  right: 16px;
  z-index: 95;
  gap: 2px;
  padding: 12px;
  border-radius: 16px;
  background: #121c2e;
  border: 1px solid var(--border);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}

.mobile-nav[hidden],
.mobile-scrim[hidden] {
  display: none !important;
}

.mobile-nav a {
  padding: 14px 12px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 500;
}

.mobile-nav a:hover {
  background: rgba(255, 255, 255, 0.05);
}

.mobile-nav hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 6px 0;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  transition: transform 0.15s, background 0.15s, border-color 0.15s, opacity 0.15s, box-shadow 0.15s;
}

.btn:hover { transform: translateY(-1px); }

.btn-sm {
  min-height: 36px;
  padding: 0 14px;
  font-size: 13px;
  border-radius: 10px;
}

.btn-primary {
  background: linear-gradient(135deg, #7af0ff 0%, #4aa3ff 55%, #3de0ff 120%);
  color: #061018;
  box-shadow: 0 10px 28px rgba(74, 163, 255, 0.28);
}

.btn-primary:hover {
  box-shadow: 0 14px 34px rgba(74, 163, 255, 0.36);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  color: var(--text);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.18);
}

/* ===== Hero ===== */
.hero {
  position: relative;
  z-index: 1;
  padding: 96px 0 88px;
  min-height: min(86svh, 780px);
  display: flex;
  align-items: center;
}

.hero-inner {
  max-width: 860px;
  text-align: center;
  margin: 0 auto;
}

.hero h1 {
  margin: 0 auto;
  width: 100%;
  max-width: 100%;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  white-space: nowrap;
  /* 单行自适应：按视口宽度估算字号，保证手机也能一行站完 */
  font-size: min(46px, calc((100vw - 40px) / 14.4));
  background: linear-gradient(180deg, #ffffff 8%, #c5daf5 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lead {
  margin: 22px auto 0;
  max-width: 46em;
  color: var(--text-2);
  font-size: 16px;
  line-height: 1.95;
  text-align: left;
}

.lead strong {
  color: #fff;
  font-weight: 700;
}

.hero-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

/* ===== Section head ===== */
.section-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 44px;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(26px, 3.2vw, 34px);
  font-weight: 750;
  letter-spacing: -0.02em;
}

.section-head p {
  margin: 14px 0 0;
  color: var(--text-2);
  font-size: 15px;
  line-height: 1.75;
}

/* ===== Products ===== */
.products {
  position: relative;
  z-index: 1;
  padding: 16px 0 88px;
}

.app-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.app-card {
  display: flex;
  flex-direction: column;
  padding: 24px 22px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: border-color 0.2s, transform 0.2s var(--ease), box-shadow 0.2s;
  min-height: 270px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.app-card:hover {
  transform: translateY(-4px);
  border-color: rgba(120, 190, 255, 0.28);
  box-shadow:
    0 18px 44px rgba(0, 0, 0, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.app-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 18px;
}

.app-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
}

.app-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: var(--solo);
  background: rgba(139, 155, 255, 0.12);
}

.tag-wifi {
  color: var(--wifi);
  background: rgba(58, 160, 255, 0.12);
}

.tag-battery {
  color: var(--battery);
  background: rgba(47, 212, 138, 0.12);
}

.tag-fanqie {
  color: var(--fanqie);
  background: rgba(255, 107, 91, 0.12);
}

.app-card h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}

.app-card p {
  margin: 10px 0 0;
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.65;
  flex: 1;
}

.app-link {
  margin-top: 20px;
  color: var(--brand);
  font-size: 13px;
  font-weight: 600;
}

.app-card:hover .app-link {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ===== Global reach ===== */
.reach {
  position: relative;
  z-index: 1;
  padding: 24px 0 80px;
}

.reach-panel {
  padding: 40px 36px 36px;
  border-radius: 28px;
  background:
    linear-gradient(145deg, rgba(74, 163, 255, 0.14), rgba(47, 212, 138, 0.05) 42%, rgba(255, 255, 255, 0.02)),
    rgba(10, 18, 32, 0.55);
  border: 1px solid rgba(140, 190, 255, 0.14);
  box-shadow:
    0 28px 70px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.reach-panel .section-head {
  margin-bottom: 28px;
}

.reach-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.reach-card {
  padding: 22px 20px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: border-color 0.2s, transform 0.2s var(--ease), background 0.2s;
}

.reach-card:hover {
  transform: translateY(-2px);
  border-color: rgba(120, 190, 255, 0.22);
  background: rgba(255, 255, 255, 0.05);
}

.reach-label {
  display: inline-flex;
  margin-bottom: 12px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--brand);
  background: rgba(94, 231, 255, 0.1);
}

.reach-card h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
}

.reach-card p {
  margin: 10px 0 0;
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.75;
}

/* ===== Vision ===== */
.vision {
  position: relative;
  z-index: 1;
  padding: 72px 0;
  background: rgba(8, 14, 26, 0.45);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.vision-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.vision-grid article {
  padding: 24px 20px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  transition: border-color 0.2s, transform 0.2s var(--ease);
}

.vision-grid article:hover {
  transform: translateY(-2px);
  border-color: rgba(120, 190, 255, 0.22);
}

.vision-grid span {
  display: block;
  margin-bottom: 14px;
  color: var(--brand);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.vision-grid h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
}

.vision-grid p {
  margin: 8px 0 0;
  color: var(--text-2);
  font-size: 13px;
  line-height: 1.65;
}

/* ===== About ===== */
.about {
  position: relative;
  z-index: 1;
  padding: 96px 0;
}

.about-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: start;
}

.about-copy h2 {
  margin: 0;
  font-size: clamp(26px, 3.2vw, 34px);
  font-weight: 750;
}

.about-copy p {
  margin: 16px 0 0;
  color: var(--text-2);
  font-size: 15px;
  line-height: 1.85;
}

.about-meta {
  margin: 0;
  display: grid;
  gap: 0;
  padding: 8px 22px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.about-meta > div {
  display: grid;
  gap: 4px;
  padding: 16px 0;
  border-top: 1px solid var(--border);
}

.about-meta > div:first-child {
  border-top: 0;
}

.about-meta dt {
  color: var(--text-3);
  font-size: 12px;
  font-weight: 500;
}

.about-meta dd {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
}

/* ===== Footer ===== */
.site-footer {
  position: relative;
  z-index: 1;
  padding: 36px 0 48px;
  border-top: 1px solid var(--border);
  background: rgba(3, 6, 12, 0.9);
}

.footer-grid {
  display: grid;
  gap: 24px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-brand img { border-radius: 7px; }

.footer-brand strong {
  display: block;
  font-size: 14px;
}

.footer-brand span {
  color: var(--text-3);
  font-size: 12px;
}

.footer-apps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}

.footer-apps a {
  color: var(--text-2);
  font-size: 13px;
}

.footer-apps a:hover { color: var(--text); }

.footer-legal {
  color: var(--text-3);
  font-size: 12px;
  line-height: 1.7;
}

.footer-legal a { color: inherit; }

/* ===== Responsive ===== */
@media (max-width: 960px) {
  .nav-main,
  .header-cta {
    display: none;
  }

  .nav-toggle {
    display: grid;
  }

  .app-grid {
    grid-template-columns: 1fr 1fr;
  }

  .reach-panel {
    padding: 28px 18px 22px;
  }

  .reach-grid {
    grid-template-columns: 1fr;
  }

  .vision-grid {
    grid-template-columns: 1fr 1fr;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .lead {
    text-align: left;
    font-size: 15px;
  }
}

@media (max-width: 560px) {
  .wrap {
    width: calc(100% - 32px);
  }

  .hero {
    padding: 56px 0 48px;
    min-height: 0;
  }

  .hero h1 {
    font-size: min(22px, calc((100vw - 32px) / 14.2));
    letter-spacing: -0.03em;
  }

  .lead {
    margin-top: 18px;
    font-size: 14px;
    line-height: 1.85;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .app-grid {
    grid-template-columns: 1fr;
  }

  .app-card {
    min-height: 0;
  }

  .vision-grid {
    grid-template-columns: 1fr;
  }

  .products {
    padding-bottom: 56px;
  }

  .reach,
  .vision,
  .about {
    padding: 48px 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .app-card,
  .reach-card,
  .vision-grid article,
  .btn {
    transition: none;
  }
}
