:root {
  --bg: #08090a;
  --surface: #0e0f11;
  --card: rgba(255, 255, 255, 0.022);
  --border: rgba(255, 255, 255, 0.07);
  --border-strong: rgba(255, 255, 255, 0.13);
  --text: #f7f8f8;
  --text-secondary: #b4bcd0;
  --text-dim: #8a8f98;
  --accent: #5e6ad2;
  --radius: 12px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "PingFang TC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-feature-settings: "cv02", "cv03", "cv04", "cv11";
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body.lang-zh .en { display: none; }
body.lang-en .zh { display: none; }

.container { max-width: 1024px; margin: 0 auto; padding: 0 32px; }

::selection { background: rgba(94, 106, 210, 0.4); }

/* ---------- Background ---------- */
.bg-scene {
  position: fixed; inset: 0; z-index: -1;
  background:
    radial-gradient(ellipse 60% 42% at 50% -8%, rgba(94, 106, 210, 0.16), transparent 70%),
    radial-gradient(ellipse 40% 30% at 82% 4%, rgba(125, 138, 255, 0.06), transparent 70%);
}

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 20;
  background: rgba(8, 9, 10, 0.72);
  backdrop-filter: blur(20px) saturate(1.6);
  -webkit-backdrop-filter: blur(20px) saturate(1.6);
  border-bottom: 1px solid var(--border);
}
.nav-inner { position: relative; display: flex; align-items: center; height: 60px; }
.logo {
  display: flex; align-items: center; gap: 9px;
  font-weight: 600; letter-spacing: 0.05em; font-size: 0.9rem;
  color: var(--text); text-decoration: none;
}
.logo-mark { display: block; width: 22px; height: 24px; }
.nav-links {
  position: absolute; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 4px;
}
.nav-links a {
  color: var(--text-dim); text-decoration: none;
  font-size: 0.85rem; font-weight: 500;
  padding: 7px 14px; border-radius: 999px;
  transition: color 0.15s, background 0.15s;
}
.nav-links a:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.nav-cta {
  color: #08090a; background: #e6e6e6;
  text-decoration: none; font-size: 0.82rem; font-weight: 600;
  padding: 6px 14px; border-radius: 999px; margin-left: 8px;
  transition: background 0.15s;
}
.nav-cta:hover { background: #fff; }
.lang-toggle {
  border: none; background: transparent; color: var(--text-dim);
  border-radius: 999px; padding: 7px 12px; font-size: 0.8rem; font-weight: 600;
  font-family: inherit; cursor: pointer; transition: color 0.15s, background 0.15s;
}
.lang-toggle:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }

/* ---------- Hero ---------- */
.hero { padding: 140px 0 96px; text-align: center; }
.hero h1 {
  font-size: clamp(2.7rem, 6.6vw, 4.7rem);
  line-height: 1.08; font-weight: 700; letter-spacing: -0.035em;
  background: linear-gradient(180deg, #fff 30%, rgba(255, 255, 255, 0.62));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
body.lang-zh .hero h1 { letter-spacing: -0.01em; line-height: 1.2; }
.hero-sub {
  margin: 26px auto 0; max-width: 560px;
  color: var(--text-dim); font-size: 1.08rem; line-height: 1.75;
}
.hero-actions { margin-top: 40px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.hero-metrics {
  margin: 96px auto 0; max-width: 640px;
  display: flex; justify-content: center;
  border-top: 1px solid var(--border);
  padding-top: 36px;
}
.metric { flex: 1; text-align: center; }
.metric strong {
  display: block; font-size: 1.7rem; font-weight: 700; letter-spacing: -0.02em;
  color: var(--text);
}
.metric span { color: var(--text-dim); font-size: 0.84rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 11px 22px; border-radius: 999px;
  text-decoration: none; font-weight: 600; font-size: 0.94rem;
  transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.15s;
}
.btn i { font-style: normal; transition: transform 0.15s; }
.btn:hover i { transform: translateX(2px); }
.btn-primary {
  background: #e6e6e6; color: #08090a;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
.btn-primary:hover { background: #fff; }
.btn-ghost {
  color: var(--text-secondary);
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.02);
}
.btn-ghost:hover { color: var(--text); border-color: rgba(255, 255, 255, 0.26); }
.btn-lg { padding: 14px 30px; font-size: 1.02rem; }

/* ---------- Sections ---------- */
.section { padding: 96px 0; }
.section-kicker {
  color: var(--text-dim); font-weight: 600; letter-spacing: 0.14em;
  text-transform: uppercase; font-size: 0.76rem; margin-bottom: 16px;
}
.section h2 {
  font-size: clamp(1.8rem, 3.8vw, 2.5rem);
  font-weight: 700; letter-spacing: -0.025em; line-height: 1.25;
  background: linear-gradient(180deg, #fff 40%, rgba(255, 255, 255, 0.66));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.section-sub { color: var(--text-dim); margin-top: 14px; max-width: 540px; font-size: 1.02rem; }

/* ---------- Grid & cards ---------- */
.grid { display: grid; gap: 16px; margin-top: 52px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: background 0.2s, border-color 0.2s;
}
.card:hover { background: rgba(255, 255, 255, 0.04); border-color: var(--border-strong); }
.card h3 { font-size: 1.02rem; margin-bottom: 8px; font-weight: 600; letter-spacing: -0.01em; }
.card p { color: var(--text-dim); font-size: 0.9rem; line-height: 1.7; }
.card-icon {
  width: 38px; height: 38px; border-radius: 9px; margin-bottom: 22px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-strong);
  color: var(--text-secondary);
}
.card-icon svg { width: 18px; height: 18px; }

/* ---------- App cards ---------- */
.app-card {
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: background 0.2s, border-color 0.2s;
}
.app-card:hover { background: rgba(255, 255, 255, 0.04); border-color: var(--border-strong); }
.app-card:hover .phone { transform: translateY(-5px); }

.phone-stage {
  height: 200px; display: flex; align-items: flex-end; justify-content: center;
  overflow: hidden; position: relative;
  border-bottom: 1px solid var(--border);
}
.stage-a { background: radial-gradient(ellipse 130% 110% at 50% 115%, rgba(94, 106, 210, 0.22), transparent 72%); }
.stage-b { background: radial-gradient(ellipse 130% 110% at 50% 115%, rgba(56, 130, 156, 0.2), transparent 72%); }
.stage-c { background: radial-gradient(ellipse 130% 110% at 50% 115%, rgba(124, 94, 210, 0.2), transparent 72%); }

.phone {
  width: 122px; height: 182px; margin-bottom: -32px;
  border-radius: 22px 22px 0 0;
  background: #101114;
  border: 2px solid rgba(255, 255, 255, 0.14);
  border-bottom: none;
  padding: 7px 7px 0;
  position: relative;
  box-shadow: 0 -4px 32px rgba(0, 0, 0, 0.55);
  transition: transform 0.3s ease;
}
.phone-notch {
  position: absolute; top: 8px; left: 50%; transform: translateX(-50%);
  width: 38px; height: 8px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.12); z-index: 2;
}
.phone-screen {
  width: 100%; height: 100%;
  border-radius: 15px 15px 0 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  overflow: hidden;
}
.screen-a { background: linear-gradient(165deg, #23294f, #101322); }
.screen-b { background: linear-gradient(165deg, #143540, #0a161c); }
.screen-c { background: linear-gradient(165deg, #2c2350, #131022); }
.screen-label { color: rgba(255, 255, 255, 0.9); font-weight: 700; font-size: 0.88rem; letter-spacing: 0.01em; }

.level-bubble {
  width: 32px; height: 32px; border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  position: relative;
}
.level-bubble::after {
  content: ""; position: absolute; inset: 8px;
  border-radius: 50%;
  background: #4ade80;
  animation: bubble 3.6s ease-in-out infinite alternate;
}
@keyframes bubble {
  from { transform: translate(-3px, 1px); }
  to   { transform: translate(3px, -1px); }
}
.ar-line {
  width: 60px; height: 1.5px;
  background: linear-gradient(90deg, transparent, #67e8f9, transparent);
  position: relative;
}
.ar-line::before, .ar-line::after {
  content: ""; position: absolute; top: -4px;
  width: 1.5px; height: 9px; background: #67e8f9;
}
.ar-line::before { left: 0; }
.ar-line::after { right: 0; }
.call-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, #c4b5fd, #8b5cf6);
  box-shadow: 0 0 0 0 rgba(196, 181, 253, 0.4);
  animation: pulse 2s ease-out infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(196, 181, 253, 0.4); }
  70% { box-shadow: 0 0 0 10px rgba(196, 181, 253, 0); }
  100% { box-shadow: 0 0 0 0 rgba(196, 181, 253, 0); }
}

.app-body { padding: 24px; }
.app-body h3 { font-size: 1.05rem; font-weight: 600; letter-spacing: -0.01em; }
.app-body > p { color: var(--text-dim); font-size: 0.9rem; line-height: 1.7; margin-top: 10px; }
.work-tags {
  color: var(--text-dim) !important; font-size: 0.76rem !important; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase; margin-top: 6px !important;
}
.work-link {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 18px;
  color: var(--text-secondary); text-decoration: none;
  font-size: 0.865rem; font-weight: 600;
  transition: color 0.15s;
}
.work-link i { font-style: normal; transition: transform 0.15s; }
.work-link:hover { color: var(--text); }
.work-link:hover i { transform: translate(2px, -2px); }

/* ---------- About & contact ---------- */
.about-panel {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 56px;
  background:
    radial-gradient(ellipse 70% 100% at 12% 0%, rgba(94, 106, 210, 0.09), transparent 60%),
    var(--card);
}
.about-text { margin-top: 22px; max-width: 720px; color: var(--text-secondary); font-size: 1.05rem; line-height: 1.85; }

.contact-panel { text-align: center; padding-top: 40px; padding-bottom: 40px; }
.contact-panel .section-sub { margin-left: auto; margin-right: auto; }
.contact-panel .btn { margin-top: 36px; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--border); padding: 30px 0; }
.footer-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  color: var(--text-dim); font-size: 0.84rem;
}
.footer-links { display: flex; gap: 22px; }
.footer-links a { color: var(--text-dim); text-decoration: none; transition: color 0.15s; }
.footer-links a:hover { color: var(--text); }

/* ---------- Legal pages ---------- */
.legal { max-width: 720px; margin: 0 auto; padding: 88px 32px 96px; }
.legal h1 { font-size: 2rem; font-weight: 700; letter-spacing: -0.025em; }
.legal .updated { color: var(--text-dim); font-size: 0.88rem; margin-top: 10px; }
.legal h2 {
  font-size: 1.15rem; font-weight: 600; letter-spacing: -0.01em;
  margin: 44px 0 12px; color: var(--text);
}
.legal p, .legal li { color: var(--text-secondary); font-size: 0.95rem; line-height: 1.8; }
.legal p + p { margin-top: 12px; }
.legal ul { padding-left: 22px; margin-top: 10px; }
.legal a { color: #99a3f5; text-decoration: none; }
.legal a:hover { text-decoration: underline; }
.legal .back { display: inline-block; margin-bottom: 36px; color: var(--text-dim); font-size: 0.88rem; }
.legal .back:hover { color: var(--text); }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: none; }
.grid .reveal:nth-child(2) { transition-delay: 0.08s; }
.grid .reveal:nth-child(3) { transition-delay: 0.16s; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .level-bubble::after, .call-avatar { animation: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .grid-3 { grid-template-columns: 1fr; max-width: 460px; margin-left: auto; margin-right: auto; }
  .nav-links { display: none; }
  .about-panel { padding: 40px 30px; }
}
@media (max-width: 580px) {
  .hero { padding: 96px 0 64px; }
  .section { padding: 64px 0; }
  .hero-metrics { margin-top: 64px; }
  .metric strong { font-size: 1.3rem; }
  .footer-inner { justify-content: center; text-align: center; }
}
