/* =============================================================================
 * NoNeedToBuy 网站 —— 全站共享样式
 * ----------------------------------------------------------------------------
 * 这一份只放真正"全站共享"的部分：设计 token、reset、容器、header、footer、
 * 按钮、语言切换器。页面专属布局（hero / features / article 等）请在各
 * 页面自己的 <style> 里写。
 *
 * 设计 token 全收在 :root，方便后续加新页面时直接复用同一套配色 / 间距 /
 * 投影。改 token 全站联动。
 * ========================================================================= */

:root {
  --c-bg: #FAFBFF;
  --c-bg-alt: #F4F6FB;
  --c-text: #0F172A;
  --c-text-2: #475569;
  --c-text-3: #94A3B8;
  --c-brand: #2351FF;
  --c-brand-soft: #E0E7FF;
  --c-accent: #6366F1;
  --c-divider: #E5E7EB;
  --c-card: #FFFFFF;
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .04);
  --shadow-md: 0 8px 24px rgba(35, 81, 255, .08);
  --shadow-lg: 0 24px 60px rgba(35, 81, 255, .18);
  color-scheme: light;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Segoe UI", Arial, sans-serif;
  color: var(--c-text);
  background: var(--c-bg);
  background-image:
    radial-gradient(ellipse 800px 600px at 50% -100px, #EEF2FF 0%, transparent 70%),
    linear-gradient(180deg, #FAFBFF 0%, #F4F6FB 100%);
  background-attachment: fixed;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;

  /* 全站布局：header 顶 / footer 底 / main 占满中间剩余空间 */
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* main 默认居中其内容（首页 hero 适用）。文章页可在 main 上加 .main-flow
   覆盖：自上而下排版而不强制居中。 */
main {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
main.main-flow { justify-content: flex-start; }

/* =============================================================================
 * Header
 * ========================================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(250, 251, 255, .82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid rgba(15, 23, 42, .04);
}
.site-header .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand img { height: 30px; width: auto; }
.nav { display: flex; align-items: center; gap: 24px; font-size: 14px; }
.nav a { color: var(--c-text-2); transition: color .15s ease; }
.nav a:hover { color: var(--c-brand); }
.nav .nav-cta {
  background: var(--c-text);
  color: #fff;
  padding: 8px 16px;
  border-radius: 999px;
  font-weight: 600;
}
.nav .nav-cta:hover {
  background: var(--c-brand);
  color: #fff;
}

/* 语言切换 segmented */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: rgba(15, 23, 42, .04);
  border-radius: 999px;
  padding: 3px;
  margin-right: 4px;
}
.lang-btn {
  background: transparent;
  border: none;
  padding: 5px 10px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--c-text-3);
  cursor: pointer;
  border-radius: 999px;
  font-family: inherit;
  transition: color .15s ease, background .15s ease;
  line-height: 1;
}
.lang-btn:hover { color: var(--c-text); }
.lang-btn[aria-pressed="true"] {
  background: #fff;
  color: var(--c-text);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

/* =============================================================================
 * 通用按钮
 * ========================================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 13px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  border: none;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, color .15s ease;
  white-space: nowrap;
}
.btn.primary {
  background: var(--c-brand);
  color: #fff;
  box-shadow: 0 8px 20px rgba(35, 81, 255, .25);
}
.btn.primary:hover { transform: translateY(-1px); box-shadow: 0 12px 24px rgba(35, 81, 255, .32); }
.btn.primary.disabled {
  background: var(--c-divider);
  color: var(--c-text-3);
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}
.btn.ghost {
  background: transparent;
  color: var(--c-text);
  padding: 13px 12px;
}
.btn.ghost:hover { color: var(--c-brand); }

/* =============================================================================
 * Footer
 * ========================================================================= */
.site-footer {
  border-top: 1px solid var(--c-divider);
  background: var(--c-card);
  padding: 32px 0;
  flex-shrink: 0;
}
.site-footer .inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
/* footer 用方形 logo（logo-square.png），1:1 比例，28px 看起来比 header
   的 banner 形 logo 体感更紧凑 */
.site-footer img { height: 28px; width: auto; opacity: .9; }
.site-footer .copyright { color: var(--c-text-3); font-size: 13px; }
.site-footer .links a {
  color: var(--c-text-2);
  font-size: 13px;
  margin-left: 16px;
  transition: color .15s;
}
.site-footer .links a:hover { color: var(--c-brand); }

/* =============================================================================
 * Responsive 基础（页面专属断点请在各自页面里再补）
 * ========================================================================= */
@media (max-width: 768px) {
  .nav { gap: 8px; }
  .nav a:not(.nav-cta) { display: none; }
  .lang-btn { padding: 4px 8px; font-size: 12px; }
  .site-footer .inner { justify-content: center; text-align: center; }
  .site-footer .links a { margin: 0 8px; }
}
