:root {
  color-scheme: light dark;
  --bg-light: #ffffff;
  --bg-dark: #000000;
  --fg-light: #111827;
  --fg-dark: #f9fafb;
  --border-light: rgba(17, 24, 39, 0.10);
  --border-dark: rgba(255, 255, 255, 0.12);
  --accent: #6d5efc;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, system-ui, -system-ui, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  background-color: var(--bg-light);
  color: var(--fg-light);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.theme-dark {
  background-color: var(--bg-dark);
  color: var(--fg-dark);
}

/* Ambient dynamic background */
body::before {
  content: "";
  position: fixed;
  inset: -220px;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(520px 520px at 18% 10%, rgba(79, 70, 229, 0.34), transparent 60%),
    radial-gradient(600px 600px at 84% 18%, rgba(236, 72, 153, 0.22), transparent 62%),
    radial-gradient(560px 560px at 50% 92%, rgba(14, 165, 233, 0.18), transparent 64%);
  filter: blur(70px) saturate(125%);
  opacity: 0.85;
  transform: translate3d(-1.5%, -1%, 0) scale(1.06);
  animation: ambient-drift 22s ease-in-out infinite;
  will-change: transform, filter;
}

body.theme-dark::before {
  background:
    radial-gradient(520px 520px at 18% 10%, rgba(129, 140, 248, 0.28), transparent 60%),
    radial-gradient(600px 600px at 84% 18%, rgba(244, 114, 182, 0.18), transparent 62%),
    radial-gradient(560px 560px at 50% 92%, rgba(56, 189, 248, 0.14), transparent 64%);
  filter: blur(78px) saturate(130%);
  opacity: 0.85;
  animation-duration: 26s;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.34'/%3E%3C/svg%3E");
  background-repeat: repeat;
  opacity: 0.06;
  mix-blend-mode: multiply;
  background-position: 0 0;
  animation: grain-shift 8s steps(10) infinite;
}

body.theme-dark::after {
  opacity: 0.07;
  mix-blend-mode: overlay;
  animation-duration: 10s;
}

@keyframes ambient-drift {
  0% {
    transform: translate3d(-1.6%, -1.1%, 0) scale(1.06);
    filter: blur(70px) saturate(122%);
  }
  50% {
    transform: translate3d(1.1%, 0.6%, 0) scale(1.09);
    filter: blur(78px) saturate(132%);
  }
  100% {
    transform: translate3d(-0.8%, 1.2%, 0) scale(1.07);
    filter: blur(72px) saturate(126%);
  }
}

@keyframes grain-shift {
  0% { background-position: 0 0; }
  100% { background-position: 180px 180px; }
}

@media (prefers-reduced-motion: reduce) {
  body::before,
  body::after {
    animation: none;
  }
}

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

a:hover {
  text-decoration: underline;
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.top-bar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 18px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  background-color: rgba(255, 255, 255, 0.78);
}

body.theme-dark .top-bar {
  border-bottom-color: var(--border-dark);
  background-color: rgba(0, 0, 0, 0.60);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.brand:hover {
  text-decoration: none;
}

.logo-wrapper {
  position: relative;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  flex-shrink: 0;
}

.logo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}

body.theme-light .logo--light {
  display: block;
}

body.theme-dark .logo--dark {
  display: block;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-main {
  font-size: 14px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.brand-sub {
  font-size: 11px;
  opacity: 0.7;
}

.controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.chip {
  border-radius: 999px;
  border: 1px solid var(--border-light);
  padding: 6px 10px;
  font-size: 12px;
  background: rgba(255, 255, 255, 0.50);
  color: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
}

body.theme-dark .chip {
  border-color: var(--border-dark);
  background: rgba(0, 0, 0, 0.35);
}

.chip--icon {
  font-size: 14px;
  line-height: 1;
  padding-inline: 10px;
}

main {
  flex: 1;
  padding: 28px 16px 40px;
}

.content-shell {
  max-width: 900px;
  margin: 0 auto;
}

.home-hero {
  padding: 64px 10px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.home-logo-wrapper {
  position: relative;
  width: 120px;
  height: 120px;
  border-radius: 28px;
  overflow: hidden;
  box-shadow:
    0 34px 90px rgba(0, 0, 0, 0.16),
    0 8px 18px rgba(0, 0, 0, 0.10);
}

.home-logo-wrapper .logo {
  display: none;
}

body.theme-light .home-logo-wrapper .logo--light {
  display: block;
}

body.theme-dark .home-logo-wrapper .logo--dark {
  display: block;
}

.home-title {
  margin: 0;
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.home-tagline {
  margin: 0;
  max-width: 720px;
  font-size: 15px;
  line-height: 1.8;
  opacity: 0.92;
}

.home-actions {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.home-button {
  border-radius: 999px;
  border: 1px solid var(--border-light);
  padding: 9px 16px;
  font-size: 13px;
  background: rgba(255, 255, 255, 0.55);
  color: inherit;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

button.home-button {
  -webkit-appearance: none;
  appearance: none;
}

body.theme-dark .home-button {
  border-color: var(--border-dark);
  background: rgba(0, 0, 0, 0.36);
}

.contact-dropdown {
  position: relative;
}

.contact-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  padding: 6px 0;
  border-radius: 12px;
  border: 1px solid var(--border-light);
  background-color: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.14);
  min-width: 180px;
  z-index: 30;
  display: none;
}

body.theme-dark .contact-menu {
  border-color: var(--border-dark);
  background-color: rgba(0, 0, 0, 0.56);
}

.contact-menu--open {
  display: block;
}

.contact-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  font-size: 13px;
  color: inherit;
  text-decoration: none;
  white-space: nowrap;
}

.contact-menu-item:hover {
  background: rgba(109, 94, 252, 0.10);
  text-decoration: none;
}

.contact-menu-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.9;
}

.section-header {
  margin-bottom: 14px;
}

.section-title {
  margin: 0 0 4px;
  font-size: 22px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.section-subtitle {
  margin: 0;
  font-size: 13px;
  opacity: 0.7;
}

.section-card {
  padding: 18px 18px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.62);
  box-shadow:
    0 22px 60px rgba(15, 23, 42, 0.10),
    0 2px 10px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

body.theme-dark .section-card {
  border-color: rgba(255, 255, 255, 0.10);
  background: rgba(0, 0, 0, 0.34);
  box-shadow:
    0 26px 70px rgba(0, 0, 0, 0.50),
    0 2px 10px rgba(0, 0, 0, 0.22);
}

.legal-content {
  font-size: 14px;
  line-height: 1.8;
}

.legal-content h2 {
  margin: 1.3em 0 0.5em;
  font-size: 18px;
}

.legal-content h3 {
  margin: 1.0em 0 0.35em;
  font-size: 15px;
}

.legal-content p {
  margin: 0.4em 0 0.8em;
}

.legal-content ul,
.legal-content ol {
  margin: 0.3em 0 0.9em;
  padding-left: 1.2em;
}

.faq-content h2:first-child {
  margin-top: 0;
}

.faq-content h3 {
  margin-top: 1.2em;
  font-size: 15px;
  line-height: 1.5;
}

.faq-content p + h2 {
  margin-top: 1.6em;
}

.faq-content a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.footer {
  padding: 12px 24px 18px;
  font-size: 11px;
  opacity: 0.6;
  text-align: center;
}

.footer-links {
  margin-bottom: 8px;
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.footer-links a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.footer-links a:hover {
  text-decoration: underline;
}

[data-lang-text],
[data-lang-block] {
  display: none;
}

body.lang-zh [data-lang-text="zh"] {
  display: inline;
}

body.lang-en [data-lang-text="en"] {
  display: inline;
}

body.lang-zh [data-lang-block="zh"] {
  display: block;
}

body.lang-en [data-lang-block="en"] {
  display: block;
}

@media (max-width: 520px) {
  .home-hero {
    padding-top: 44px;
  }
  .home-title {
    font-size: 30px;
  }
}
