:root {
  color-scheme: light;
  --black: #050505;
  --text: #111111;
  --muted: #6b6b6b;
  --line: #e8e8e8;
  --soft: #f5f5f7;
  --white: #ffffff;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.08);
  font-family:
    Inter, "SF Pro Display", "SF Pro Text", "PingFang SC", "Microsoft YaHei",
    system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--white);
  color: var(--text);
}

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

button {
  border: 0;
  font: inherit;
  cursor: pointer;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 64px;
  padding: 0 clamp(28px, 5vw, 72px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(18px);
}

.brand {
  justify-self: start;
  font-size: 18px;
  font-weight: 750;
  letter-spacing: 0;
}

.desktop-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 34px;
  color: #303030;
  font-size: 14px;
}

.desktop-nav a {
  transition: color 0.18s ease;
}

.desktop-nav a:hover {
  color: var(--black);
}

.auth-actions {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.text-button,
.outline-button,
.solid-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border-radius: 999px;
  padding: 0 18px;
  font-size: 14px;
  font-weight: 650;
  line-height: 1;
}

.text-button {
  background: transparent;
  color: #1f1f1f;
}

.solid-button {
  background: var(--black);
  color: var(--white);
}

.solid-button.small {
  min-height: 32px;
  padding: 0 15px;
}

.site-header .text-button {
  min-height: 32px;
  padding: 0 10px;
  font-size: 14px;
}

.site-header .solid-button.small {
  min-height: 32px;
  padding: 0 15px;
  font-size: 14px;
}

.outline-button {
  border: 1px solid #171717;
  background: transparent;
  color: var(--black);
}

.outline-button:hover,
.solid-button:hover {
  transform: translateY(-1px);
}

.hero-section {
  display: grid;
  place-items: center;
  align-content: center;
  min-height: calc(100vh - 64px);
  padding: 64px 24px 86px;
  text-align: center;
}

.hero-kicker {
  margin: 0 0 18px;
  color: #777777;
  font-size: 13px;
  font-weight: 720;
  letter-spacing: 0;
}

.hero-section h1 {
  max-width: 960px;
  margin: 0;
  color: var(--black);
  font-size: clamp(54px, 7vw, 92px);
  font-weight: 760;
  line-height: 1.04;
  letter-spacing: 0;
}

.hero-copy {
  max-width: 620px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: clamp(18px, 2vw, 23px);
  line-height: 1.65;
}

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

.hero-section h1 br {
  display: block;
}

.framework-section {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto 96px;
  padding-top: 28px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.section-heading span {
  color: #8a8a8a;
  font-size: 13px;
}

.section-heading strong {
  color: #1c1c1c;
  font-size: 18px;
  font-weight: 720;
}

.placeholder-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr 1fr;
  gap: 18px;
}

.placeholder-block {
  display: grid;
  align-content: end;
  min-height: 260px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(0, 0, 0, 0.025)),
    var(--soft);
}

.placeholder-block.large {
  min-height: 320px;
}

.placeholder-block span {
  width: 46px;
  height: 46px;
  margin-bottom: 24px;
  border-radius: 50%;
  background: #e4e4e6;
}

.placeholder-block i {
  display: block;
  width: 72%;
  height: 12px;
  margin-top: 12px;
  border-radius: 999px;
  background: #dedee1;
}

.placeholder-block i.short {
  width: 45%;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 50;
  max-width: min(360px, calc(100vw - 48px));
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  padding: 13px 15px;
  background: #111111;
  color: #ffffff;
  box-shadow: var(--shadow);
  font-size: 14px;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- 滚动渐入：进入视口加 .is-in 后浮现 ----------
   仅在 JS 可用（<html class="js">）时才预先隐藏，避免脚本失败时内容消失。 */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.6s cubic-bezier(0.22, 0.61, 0.36, 1),
    transform 0.6s cubic-bezier(0.22, 0.61, 0.36, 1);
  will-change: opacity, transform;
}

.js [data-reveal].is-in {
  opacity: 1;
  transform: none;
}

/* 按钮加载态 */
button[data-loading],
.auth-submit[data-loading],
.modal-submit[data-loading] {
  opacity: 0.6;
  cursor: progress;
}

.nav-greeting {
  margin-right: 4px;
  color: #6b6b6b;
  font-size: 14px;
  font-weight: 650;
}

/* ---------- 首页：平台数据 ---------- */
.stats-section {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto 92px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.stats-grid article {
  padding: 44px 24px;
  text-align: center;
}

.stats-grid article + article {
  border-left: 1px solid var(--line);
}

.stats-grid strong {
  display: block;
  color: var(--black);
  font-size: clamp(40px, 5vw, 64px);
  font-weight: 760;
  line-height: 1;
  letter-spacing: 0;
}

.stats-grid span {
  display: block;
  margin-top: 12px;
  color: var(--muted);
  font-size: 14px;
}

/* ---------- 首页：服务特点 ---------- */
.features-section {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto 92px;
}

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

.feature-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 32px;
  background: var(--white);
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.feature-index {
  display: block;
  color: #c4c4c4;
  font-size: 14px;
  font-weight: 760;
  letter-spacing: 1px;
}

.feature-card h3 {
  margin: 18px 0 0;
  color: var(--black);
  font-size: 24px;
  font-weight: 730;
}

.feature-card p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}

/* ---------- 页脚 ---------- */
.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 30px 0 48px;
  border-top: 1px solid var(--line);
  color: #9b9b9b;
  font-size: 13px;
}

/* ---------- 通用弹窗 ---------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.34);
  opacity: 0;
  transition: opacity 0.2s ease;
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}

.modal-backdrop.is-open {
  opacity: 1;
}

.modal {
  width: min(440px, 100%);
  max-height: 90vh;
  overflow: auto;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.22);
  transform: translateY(12px) scale(0.98);
  transition: transform 0.22s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.modal-backdrop.is-open .modal {
  transform: none;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 24px 0;
}

.modal-head h3 {
  margin: 0;
  color: var(--black);
  font-size: 20px;
  font-weight: 730;
}

.modal-close {
  padding: 4px;
  background: transparent;
  color: #9b9b9b;
  font-size: 24px;
  line-height: 1;
}

.modal-close:hover {
  color: var(--black);
}

.modal-body {
  padding: 18px 24px 26px;
}

.modal-form {
  display: grid;
  gap: 16px;
}

.modal-form label {
  display: grid;
  gap: 8px;
}

.modal-form label > span {
  color: #1f1f1f;
  font-size: 14px;
  font-weight: 650;
}

.modal-form input,
.modal-form select {
  width: 100%;
  min-height: 46px;
  border: 1px solid #dedede;
  border-radius: 10px;
  padding: 0 14px;
  background: #ffffff;
  color: #111111;
  font: inherit;
  outline: none;
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}

.modal-form input:focus,
.modal-form select:focus {
  border-color: #050505;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.08);
}

.modal-hint {
  margin: 0;
  color: #8a8a8a;
  font-size: 13px;
  line-height: 1.6;
}

.modal-hint strong {
  color: var(--black);
}

.modal-submit {
  width: 100%;
  min-height: 48px;
  border-radius: 999px;
  background: var(--black);
  color: #ffffff;
  font-size: 15px;
  font-weight: 720;
}

.modal-submit.is-ghost {
  background: transparent;
  border: 1px solid #e2e2e2;
  color: #1f1f1f;
}

.modal-error,
.form-error {
  display: none;
  margin: 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: #f7eeee;
  color: #9b2c2c;
  font-size: 13px;
  line-height: 1.5;
}

.form-error {
  margin-bottom: 4px;
}

.modal-error.is-visible,
.form-error.is-visible {
  display: block;
}

.amount-presets {
  display: flex;
  gap: 10px;
}

.amount-chip {
  flex: 1;
  min-height: 42px;
  border: 1px solid #e2e2e2;
  border-radius: 10px;
  background: #ffffff;
  color: #1f1f1f;
  font-weight: 700;
  transition:
    border-color 0.15s ease,
    background 0.15s ease,
    color 0.15s ease;
}

.amount-chip:hover {
  border-color: #bdbdbd;
}

.amount-chip.is-active {
  border-color: var(--black);
  background: var(--black);
  color: #ffffff;
}

.account-info {
  display: grid;
  margin-bottom: 18px;
}

.account-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.account-row span {
  color: #8a8a8a;
  font-size: 14px;
}

.account-row strong {
  color: var(--black);
  font-size: 15px;
}

.toast.is-error {
  background: #3d1212;
}

@media (max-width: 760px) {
  .site-header {
    grid-template-columns: 1fr auto;
    min-height: 58px;
    padding: 0 18px;
  }

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

  .stats-grid article {
    padding: 26px 24px;
  }

  .stats-grid article + article {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

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

  .site-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .desktop-nav {
    display: none;
  }

  .brand {
    font-size: 16px;
  }

  .auth-actions {
    gap: 2px;
  }

  .site-header .text-button,
  .site-header .solid-button.small {
    min-height: 36px;
    padding: 0 12px;
    font-size: 13px;
  }

  .hero-section {
    min-height: calc(100vh - 58px);
    padding: 54px 22px 70px;
  }

  .hero-section h1 {
    font-size: clamp(40px, 12vw, 58px);
    line-height: 1.08;
  }

  .hero-copy {
    margin-top: 18px;
    font-size: 16px;
  }

  .framework-section {
    width: calc(100% - 32px);
    margin-bottom: 56px;
  }

  .section-heading {
    align-items: start;
    flex-direction: column;
    gap: 6px;
  }

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

  .placeholder-block,
  .placeholder-block.large {
    min-height: 180px;
  }
}
