*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --bg: #0a0e17;
  --bg-tint: #1a1822;
  --purple: #9b7fd4;
  --purple-deep: #6e56a8;
  --purple-accent: #8b5cf6;
  --purple-glow: #b084ff;
  --text: #f4f0fa;
  --text-muted: #b8b0c8;
  --text-subtle: #8a8298;
  --border: rgba(255, 255, 255, 0.1);
  --glass: rgba(255, 255, 255, 0.05);
  --max-width: 720px;
  --nav-height: 72px;
  --ease: 0.2s ease;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  display: flex;
  flex-direction: column;
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background:
    radial-gradient(ellipse 70% 45% at 50% -5%, rgba(139, 92, 246, 0.18), transparent),
    radial-gradient(ellipse 50% 35% at 100% 100%, rgba(110, 86, 168, 0.12), transparent),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-tint) 100%);
  background-attachment: fixed;
}

a {
  color: var(--purple-glow);
  text-decoration: none;
  transition: color var(--ease);
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  background: rgba(10, 14, 23, 0.78);
  border-bottom: 1px solid var(--border);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1.75rem;
  height: var(--nav-height);
}

.logo {
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.14em;
  color: var(--text);
  text-transform: uppercase;
  transition: color var(--ease);
}

.logo:hover {
  color: var(--purple-glow);
}

.lang-switch {
  font-size: 0.875rem;
  letter-spacing: 0.01em;
  color: var(--text-subtle);
}

.lang-switch a {
  color: var(--text-muted);
  font-weight: 500;
  padding: 0.25rem 0.1rem;
  transition: color var(--ease);
}

.lang-switch a:hover,
.lang-switch a[aria-current="true"] {
  color: var(--purple-glow);
}

.lang-switch__sep {
  margin: 0 0.5rem;
  opacity: 0.35;
}

/* Layout */

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 960px;
  width: 100%;
  margin: 0 auto;
  padding: 4rem 1.75rem 5rem;
}

main:has(.page-narrow) {
  justify-content: flex-start;
  padding-top: 3rem;
}

.page-narrow {
  max-width: var(--max-width);
  margin: 0 auto;
  width: 100%;
}

/* Hero */

.home {
  text-align: center;
  padding: 3rem 0 2rem;
}

.home h1 {
  margin: 0 0 1.5rem;
  font-size: clamp(2.75rem, 7vw, 3.75rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.08;
  background: linear-gradient(160deg, #ffffff 0%, var(--purple-glow) 85%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.home__subtitle {
  margin: 0 auto 0.75rem;
  max-width: 26rem;
  color: var(--text);
  font-size: clamp(1.05rem, 2.5vw, 1.25rem);
  font-weight: 400;
  line-height: 1.55;
  letter-spacing: -0.01em;
}

.home__tagline {
  margin: 0 auto 3.5rem;
  max-width: 24rem;
  color: var(--text-subtle);
  font-size: 0.95rem;
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: 0.01em;
}

.home__actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.875rem;
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 240px;
  padding: 0.875rem 1.75rem;
  border-radius: 14px;
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  border: 1px solid rgba(176, 132, 255, 0.25);
  background: linear-gradient(160deg, rgba(139, 92, 246, 0.55) 0%, rgba(110, 86, 168, 0.45) 100%);
  color: var(--text);
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.2),
    0 4px 16px rgba(139, 92, 246, 0.15);
  transition:
    transform var(--ease),
    box-shadow var(--ease),
    border-color var(--ease),
    background var(--ease);
}

.btn:hover {
  color: #ffffff;
  transform: translateY(-2px);
  border-color: rgba(176, 132, 255, 0.45);
  background: linear-gradient(160deg, rgba(139, 92, 246, 0.72) 0%, rgba(110, 86, 168, 0.62) 100%);
  box-shadow:
    0 2px 4px rgba(0, 0, 0, 0.2),
    0 8px 28px rgba(139, 92, 246, 0.32);
}

.btn:active {
  transform: translateY(0);
  transition-duration: 0.1s;
}

/* Language panels */

.home-panel--zh {
  display: none;
}

body:has(#zh:target) .home-panel--en {
  display: none;
}

body:has(#zh:target) .home-panel--zh {
  display: block;
}

body:has(#zh:target) .lang-switch a[href="#zh"] {
  color: var(--purple-glow);
}

body:has(#zh:target) .lang-switch a[href="./"] {
  color: var(--text-muted);
}

/* Content pages */

.page-header {
  margin-bottom: 2.5rem;
}

.page-header h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.page-header p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.legal-section {
  margin-bottom: 2.25rem;
  padding-bottom: 2.25rem;
  border-bottom: 1px solid var(--border);
}

.legal-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.legal-section h2 {
  margin: 0 0 0.875rem;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.legal-section p {
  margin: 0 0 0.75rem;
  color: var(--text-muted);
  font-size: 0.9375rem;
  line-height: 1.7;
}

.legal-section p:last-child {
  margin-bottom: 0;
}

.legal-section ul {
  margin: 0;
  padding-left: 1.25rem;
  color: var(--text-muted);
  font-size: 0.9375rem;
  line-height: 1.7;
}

.legal-section li {
  margin-bottom: 0.5rem;
}

.legal-section li:last-child {
  margin-bottom: 0;
}

.legal-section a:hover {
  color: var(--purple-glow);
}

/* Support */

.support-card {
  text-align: center;
  padding: 3rem 2rem;
  border-radius: 16px;
  border: 1px solid rgba(155, 127, 212, 0.22);
  background: linear-gradient(180deg, rgba(139, 92, 246, 0.1), rgba(255, 255, 255, 0.03));
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
}

.support-card h2 {
  margin: 0 0 0.5rem;
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.support-card p {
  margin: 0 0 1.25rem;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.support-email {
  display: inline-block;
  font-size: clamp(1.1rem, 3vw, 1.3rem);
  font-weight: 600;
  color: var(--purple-glow);
  word-break: break-all;
  transition: color var(--ease);
}

.support-email:hover {
  color: var(--text);
}

/* Footer */

.site-footer {
  max-width: 960px;
  width: 100%;
  margin: 0 auto;
  padding: 2rem 1.75rem 2.75rem;
  border-top: 1px solid var(--border);
  text-align: center;
}

.site-footer__tagline {
  margin: 0 0 0.875rem;
  color: #9b8fb8;
  font-size: 0.875rem;
  font-weight: 400;
  letter-spacing: 0.01em;
  line-height: 1.5;
}

.site-footer__copy {
  margin: 0;
  color: var(--text-subtle);
  font-size: 0.8125rem;
  font-weight: 400;
  letter-spacing: 0.02em;
}

.site-footer__version {
  margin-left: 0.35rem;
  color: rgba(184, 176, 200, 0.5);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.03em;
}

/* Responsive */

@media (max-width: 640px) {
  :root {
    --nav-height: 64px;
  }

  .site-header__inner {
    padding: 0 1.25rem;
  }

  main {
    padding: 2.5rem 1.25rem 3.5rem;
  }

  main:has(.page-narrow) {
    padding-top: 2rem;
  }

  .home {
    padding: 1.5rem 0 1rem;
  }

  .home h1 {
    margin-bottom: 1.25rem;
  }

  .home__tagline {
    margin-bottom: 2.75rem;
    font-size: 0.9rem;
  }

  .btn {
    width: 100%;
    max-width: 300px;
    min-width: unset;
  }

  .support-card {
    padding: 2.25rem 1.5rem;
  }

  .site-footer {
    padding: 1.75rem 1.25rem 2.25rem;
  }
}
