/* ===== Reset & Base ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --blue-50: #eef4ff;
  --blue-100: #d6e8ff;
  --blue-200: #b3d4ff;
  --blue-400: #4d8eff;
  --blue-500: #2b6de8;
  --blue-600: #1a56c4;
  --blue-700: #0f3d9e;
  --text-primary: #1a1a2e;
  --text-secondary: #5c6370;
  --text-muted: #9aa0ab;
  --white: #ffffff;
  --card-shadow: 0 2px 16px rgba(43, 109, 232, 0.06);
  --card-shadow-hover: 0 8px 32px rgba(43, 109, 232, 0.12);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --header-height: 64px;
  --max-width: 1200px;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--text-primary);
  background: var(--white);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.5;
}

main {
  flex: 1;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ===== Background ===== */
.page-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    180deg,
    #e8f0fe 0%,
    #f0f5ff 30%,
    #f8faff 60%,
    #ffffff 100%
  );
  overflow: hidden;
}

.page-bg::before,
.page-bg::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
}

.page-bg::before {
  width: 600px;
  height: 600px;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(77, 142, 255, 0.25) 0%, transparent 70%);
}

.page-bg::after {
  width: 400px;
  height: 400px;
  top: 200px;
  right: 10%;
  background: radial-gradient(circle, rgba(139, 180, 255, 0.2) 0%, transparent 70%);
}

/* ===== Logo ===== */
.logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--blue-500);
}

.logo-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.logo-icon--lg {
  width: 48px;
  height: 48px;
}

.logo-text {
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.logo-text--lg {
  font-size: 2.75rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

/* ===== Header ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  padding: 0 40px;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav a {
  font-size: 0.875rem;
  color: var(--text-secondary);
  transition: color 0.2s;
}

.nav a:hover {
  color: var(--text-primary);
}

.lang-switch {
  font-family: inherit;
  font-size: 0.875rem;
  color: var(--text-secondary);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: color 0.2s;
}

.lang-switch:hover {
  color: var(--text-primary);
}

/* ===== Hero ===== */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: calc(var(--header-height) + 80px) 40px 48px;
}

.announcement {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  margin-bottom: 48px;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(43, 109, 232, 0.08);
  transition: background 0.2s, box-shadow 0.2s;
}

.announcement:hover {
  background: var(--white);
  box-shadow: var(--card-shadow);
}

.announcement-icon {
  width: 16px;
  height: 16px;
  color: var(--blue-500);
  flex-shrink: 0;
}

.announcement-arrow {
  width: 14px;
  height: 14px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.hero-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  margin-bottom: 56px;
}

.tagline {
  font-size: clamp(1.5rem, 4.5vw, 2.75rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text-primary);
  text-align: center;
  max-width: 100%;
  line-height: 1.25;
}

/* ===== Hero Cards ===== */
.hero-cards {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 16px;
  width: 100%;
  max-width: 720px;
}

.cta-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 32px 28px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(43, 109, 232, 0.08);
  border-radius: var(--radius-xl);
  box-shadow: var(--card-shadow);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
  cursor: pointer;
}

.cta-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--card-shadow-hover);
  border-color: rgba(43, 109, 232, 0.15);
}

.cta-card__title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.cta-card__desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ===== Legal / Privacy ===== */
.legal-page {
  max-width: 820px;
  margin: 0 auto;
  padding: calc(var(--header-height) + 48px) 40px 64px;
}

.legal-page__header {
  margin-bottom: 36px;
}

.legal-page__title {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 20px;
}

.legal-meta {
  display: grid;
  gap: 10px 24px;
  padding: 20px 24px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(43, 109, 232, 0.08);
  border-radius: var(--radius-lg);
  box-shadow: var(--card-shadow);
}

.legal-meta > div {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 8px 16px;
  align-items: baseline;
}

.legal-meta dt {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.legal-meta dd {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.legal-meta a {
  color: var(--blue-600);
  transition: color 0.2s;
}

.legal-meta a:hover {
  color: var(--blue-700);
}

.legal-page__body {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

.legal-page__body section {
  margin-top: 36px;
}

.legal-page__body h2 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 14px;
}

.legal-page__body h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 22px 0 10px;
}

.legal-page__body p {
  margin-bottom: 12px;
}

.legal-page__body ul {
  margin: 0 0 12px 1.25em;
}

.legal-page__body li {
  margin-bottom: 6px;
}

.legal-page__body a {
  color: var(--blue-600);
  transition: color 0.2s;
}

.legal-page__body a:hover {
  color: var(--blue-700);
}

.legal-page__body code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.8125rem;
  padding: 0.1em 0.35em;
  border-radius: 4px;
  background: rgba(43, 109, 232, 0.06);
  color: var(--blue-700);
}

.legal-table-wrap {
  overflow-x: auto;
  margin: 12px 0 16px;
  border: 1px solid rgba(43, 109, 232, 0.08);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.9);
}

.legal-table-wrap table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
  line-height: 1.6;
}

.legal-table-wrap th,
.legal-table-wrap td {
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.legal-table-wrap th {
  font-weight: 600;
  color: var(--text-primary);
  background: rgba(238, 244, 255, 0.8);
  white-space: nowrap;
}

.legal-table-wrap tr:last-child td {
  border-bottom: none;
}

.legal-table-wrap td {
  color: var(--text-secondary);
}

/* ===== Footer ===== */
.footer {
  background: var(--white);
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  padding: 32px 40px;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: center;
}

.footer-brand {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px 20px;
}

.footer-legal {
  display: flex;
  flex-direction: row;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 20px;
}

.footer-legal p {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.6;
  white-space: nowrap;
}

.footer-legal a {
  color: var(--text-muted);
  transition: color 0.2s;
}

.footer-legal a:hover {
  color: var(--text-secondary);
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .hero-cards {
    flex-direction: column;
    align-items: stretch;
    max-width: 400px;
  }
}

@media (max-width: 640px) {
  .header {
    padding: 0 20px;
  }

  .nav {
    gap: 16px;
  }

  .nav a {
    font-size: 0.8125rem;
  }

  .lang-switch {
    font-size: 0.8125rem;
  }

  .hero {
    padding: calc(var(--header-height) + 48px) 20px 40px;
  }

  .announcement {
    font-size: 0.75rem;
    padding: 6px 12px;
    text-align: center;
    flex-wrap: wrap;
    justify-content: center;
  }

  .tagline {
    font-size: clamp(1.35rem, 6vw, 2rem);
    padding: 0 8px;
  }

  .footer {
    padding: 24px 20px;
  }

  .footer-brand,
  .footer-legal {
    flex-direction: column;
    align-items: center;
    gap: 8px;
  }

  .footer-legal p {
    white-space: normal;
  }

  .legal-page {
    padding: calc(var(--header-height) + 32px) 20px 48px;
  }

  .legal-page__title {
    font-size: 1.375rem;
  }

  .legal-meta {
    padding: 16px;
  }

  .legal-meta > div {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .legal-table-wrap th,
  .legal-table-wrap td {
    padding: 10px 12px;
  }
}
