/* 贝塔猪 · 大陆官网（beitazhu.cn）— 视觉与 beitazhu.com 统一
   令牌真源：beitazhu/frontend/src/styles/theme.css（白底 / 富黑 / 近黑主色 / 浅边框 / 蓝色少量点缀）
   本轮按产品方案 §23（Codex 官网优化）落地。自包含：系统字体、无外链。 */

:root {
  --background: #ffffff;
  --foreground: #18181b;
  --primary: #030213;
  --primary-foreground: #ffffff;
  --secondary: #f1f2f4;
  --secondary-foreground: #030213;
  --muted: #eef0f3;
  --muted-foreground: #5c5f68;
  --accent: #e9ebef;
  --destructive: #d4183d;
  --border: #ebedf1;
  --blue: #3b82f6;
  --blue-ink: #2563eb;

  --prose-base: #27272a;
  --prose-sub: #1f2023;
  --prose-strong: #18181b;

  --radius: 0.625rem;
  --radius-md: 0.5rem;
  --radius-sm: 0.375rem;
  --shadow-sm: 0 1px 2px rgba(3, 2, 19, 0.05);
  --shadow: 0 1px 2px rgba(3,2,19,.04), 0 12px 28px -14px rgba(3,2,19,.14);
  --maxw: 1120px;
  --header-h: 66px;

  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-size: 17px;
  --fw-normal: 400;
  --fw-medium: 500;
  --fw-semi: 600;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; font-size: var(--font-size); }
body {
  font-family: var(--font);
  line-height: 1.75;
  color: var(--foreground);
  background: var(--background);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 { color: var(--foreground); font-weight: var(--fw-semi); line-height: 1.3; letter-spacing: -0.01em; }

/* 焦点可见（§23.3/§23.12）：默认焦点只在键盘导航时显示清晰蓝环 */
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 4px; }
a:focus:not(:focus-visible), button:focus:not(:focus-visible) { outline: none; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(20px, 4vw, 40px); }
.rule { border: 0; border-top: 1px solid var(--border); }
.muted { color: var(--muted-foreground); }
.label { display: inline-block; font-size: 13px; font-weight: var(--fw-medium); color: var(--muted-foreground); letter-spacing: .02em; }
/* 锚点不被 sticky 页头遮挡（§23.3） */
.section[id], .hero[id] { scroll-margin-top: calc(var(--header-h) + 22px); }

/* ——— 页头 ——— */
.nav { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.86); backdrop-filter: saturate(180%) blur(10px); border-bottom: 1px solid var(--border); }
.nav__in { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); gap: 16px; }
.brand { display: flex; align-items: center; gap: .5rem; font-weight: var(--fw-semi); color: var(--foreground); font-size: 19px; letter-spacing: -.01em; }
.brand__logo { height: 28px; width: 28px; object-fit: cover; border-radius: 50%; display: block; }
.nav__links { display: flex; align-items: center; gap: clamp(16px, 2.4vw, 32px); }
.nav__links a { font-size: 15px; color: var(--muted-foreground); transition: color .15s; padding: 4px 2px; }
.nav__links a:hover, .nav__links a:focus-visible { color: var(--foreground); }

/* ——— 按钮 ——— */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; font-size: 15px; font-weight: var(--fw-medium); line-height: 1.2; padding: .68rem 1.2rem; border-radius: var(--radius-md); cursor: pointer; border: 1px solid transparent; transition: background .15s, border-color .15s, transform .15s, box-shadow .15s; white-space: nowrap; }
.btn--primary { background: var(--primary); color: var(--primary-foreground); }
.btn--primary:hover { background: #14122a; transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn--primary:active { transform: translateY(0); }
.btn--outline { background: var(--background); color: var(--foreground); border-color: var(--border); }
.btn--outline:hover { background: var(--secondary); border-color: #dcdfe5; }
.btn--sm { padding: .5rem .9rem; font-size: 14px; }
.btn--block { width: 100%; }
.btn__arrow { transition: transform .15s; }
.btn:hover .btn__arrow { transform: translateX(2px); }

/* ——— Hero（备案版：单栏、文本容器放宽 780、收紧留白 §23.4/§23.11） ——— */
.hero { padding: clamp(60px, 8vw, 100px) 0 clamp(30px, 4vw, 48px); }
.hero__in { max-width: 780px; margin: 0 auto; text-align: center; }
.hero .label { margin-bottom: 18px; padding: 4px 12px; background: var(--secondary); border: 1px solid var(--border); border-radius: 999px; }
.hero h1 { font-size: clamp(34px, 5.4vw, 56px); line-height: 1.14; font-weight: var(--fw-semi); letter-spacing: -0.022em; }
.hero h1 .hl { color: var(--blue); }
.hero__lede { font-size: clamp(16px, 2vw, 19px); color: var(--muted-foreground); margin: 20px auto 0; max-width: 660px; line-height: 1.75; }
.hero__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 28px; }
.hero__note { margin-top: 16px; font-size: 13px; color: var(--muted-foreground); }

/* 产品证据条（§23.4） */
.evidence { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: #fcfcfd; }
.evidence__in { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 26px; padding: 16px 0; font-size: 14px; color: var(--muted-foreground); }
.evidence__in b { color: var(--foreground); font-weight: var(--fw-medium); }
.evidence .dot { color: var(--border); }

/* ——— 段落节 ——— */
.section { padding: clamp(56px, 7vw, 96px) 0; }
.section__head { max-width: 640px; margin-bottom: clamp(28px, 4vw, 44px); }
.section__head .label { margin-bottom: 12px; }
.section__head h2 { font-size: clamp(28px, 3.4vw, 38px); line-height: 1.22; font-weight: var(--fw-semi); letter-spacing: -0.015em; }
.section__head p { color: var(--muted-foreground); margin-top: 12px; font-size: 16px; }

/* ——— 能力卡 / 场景卡（显式断点 §23.5/§23.12） ——— */
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.card { background: var(--background); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px 22px; box-shadow: var(--shadow-sm); transition: box-shadow .2s, transform .2s; min-height: 244px; display: flex; flex-direction: column; }
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.card__ic { width: 40px; height: 40px; border-radius: var(--radius-sm); background: var(--secondary); display: grid; place-items: center; margin-bottom: 16px; color: var(--foreground); }
.card__ic svg { width: 21px; height: 21px; display: block; }
.card__step { font-size: 12.5px; color: var(--muted-foreground); font-weight: var(--fw-medium); margin-bottom: 4px; }
.card h3 { font-size: 18px; font-weight: var(--fw-semi); margin-bottom: 8px; }
.card p { font-size: 15px; color: var(--muted-foreground); line-height: 1.72; }

/* ——— 价格与套餐（§23.7） ——— */
.plans { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; align-items: stretch; }
.plan { border: 1px solid var(--border); border-radius: var(--radius); padding: 24px 22px; background: var(--background); position: relative; display: flex; flex-direction: column; box-shadow: var(--shadow-sm); }
.plan--reco { border-color: var(--blue); box-shadow: 0 0 0 1px var(--blue), var(--shadow); }
.plan__tag { position: absolute; top: -11px; left: 22px; font-size: 12px; font-weight: var(--fw-medium); background: var(--blue); color: #fff; padding: 2px 10px; border-radius: 999px; }
.plan__name { font-size: 16px; color: var(--foreground); font-weight: var(--fw-semi); }
.plan__desc { font-size: 13px; color: var(--muted-foreground); margin-top: 2px; }
.plan__price { font-size: 34px; color: var(--foreground); font-weight: var(--fw-semi); letter-spacing: -.02em; margin: 12px 0 0; font-variant-numeric: tabular-nums; }
.plan__price small { font-size: 15px; color: var(--muted-foreground); font-weight: var(--fw-normal); }
.plan__credits { margin-top: 8px; font-size: 15px; font-weight: var(--fw-medium); color: var(--blue-ink); font-variant-numeric: tabular-nums; }
.plan__benefits { list-style: none; margin: 14px 0 0; padding: 14px 0 0; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 8px; }
.plan__benefits li { font-size: 14px; color: var(--muted-foreground); line-height: 1.5; padding-left: 20px; position: relative; }
.plan__benefits li::before { content: ""; position: absolute; left: 0; top: .5em; width: 12px; height: 8px; border-left: 2px solid var(--blue); border-bottom: 2px solid var(--blue); transform: rotate(-45deg) translateY(-1px); border-radius: 1px; }
.plan__cta { margin-top: auto; padding-top: 18px; }
.plans__note { font-size: 13.5px; color: var(--muted-foreground); margin-top: 6px; }

/* 加油包信息条（§23.7） */
.topup { margin-top: 18px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--secondary); padding: 16px 20px; font-size: 14.5px; color: var(--muted-foreground); line-height: 1.6; }
.topup b { color: var(--foreground); font-weight: var(--fw-semi); }

/* ——— FAQ（§23.8） ——— */
.faq { display: grid; gap: 10px; max-width: 820px; }
.faq details { border: 1px solid var(--border); border-radius: var(--radius); background: var(--background); overflow: hidden; }
.faq summary { cursor: pointer; list-style: none; padding: 16px 20px; font-size: 16px; font-weight: var(--fw-medium); color: var(--foreground); display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 20px; color: var(--muted-foreground); font-weight: 400; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details[open] summary { border-bottom: 1px solid var(--border); }
.faq__a { padding: 14px 20px 18px; font-size: 15px; color: var(--muted-foreground); line-height: 1.75; }

/* ——— 风险提示（收敛 §23.9） ——— */
.risk { background: #fafafb; border: 1px solid var(--border); border-left: 3px solid var(--blue); border-radius: var(--radius-md); padding: 24px 26px; }
.risk h4 { font-size: 16px; font-weight: var(--fw-semi); margin-bottom: 8px; }
.risk p { font-size: 15px; color: var(--muted-foreground); line-height: 1.75; }
.risk strong { color: var(--foreground); }

/* ——— 占位（仅内部/备案准备可见；上线前须清空 §23.7/§23.10） ——— */
.todo { background: #fff7ed; border: 1px dashed #fdba74; color: #9a3412; border-radius: var(--radius-sm); padding: 1px 7px; font-size: .9em; }

/* ——— 页脚（§23.10） ——— */
.foot { background: var(--secondary); border-top: 1px solid var(--border); margin-top: 24px; }
.foot__in { padding: clamp(48px, 5vw, 68px) 0 28px; display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 36px; }
.foot__brand .brand { font-size: 18px; }
.foot__brand p { font-size: 14px; color: var(--muted-foreground); margin-top: 12px; max-width: 300px; line-height: 1.7; }
.foot__col h5 { font-size: 13px; font-weight: var(--fw-semi); color: var(--foreground); margin-bottom: 14px; }
.foot__col a, .foot__col span.fitem { display: block; font-size: 14.5px; color: var(--muted-foreground); margin-bottom: 9px; transition: color .15s; }
.foot__col a:hover, .foot__col a:focus-visible { color: var(--foreground); }
.foot__bottom { border-top: 1px solid var(--border); padding: 20px 0 32px; display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; justify-content: center; text-align: center; }
.foot__bottom, .foot__bottom a { font-size: 13px; color: var(--muted-foreground); }
.foot__bottom a:hover { color: var(--foreground); }
.beian { display: inline-flex; align-items: center; gap: 6px; }
.beian img { height: 15px; width: auto; }

/* ——— 法务/内容页 ——— */
.doc { padding: clamp(40px, 5.5vw, 64px) 0; }
.doc__head { max-width: 760px; margin-bottom: 24px; }
.doc__head h1 { font-size: clamp(26px, 3.6vw, 36px); font-weight: var(--fw-semi); letter-spacing: -.015em; }
.doc__meta { font-size: 13px; color: var(--muted-foreground); margin-top: 10px; }
.doc__banner { background: #fffbeb; border: 1px solid #fde68a; border-radius: var(--radius-sm); padding: 12px 16px; font-size: 13.5px; color: #92400e; margin: 16px 0 4px; line-height: 1.6; }
.prose { max-width: 760px; }
.prose h2 { font-size: 19px; font-weight: var(--fw-semi); color: var(--prose-strong); margin: 32px 0 10px; padding-top: 12px; border-top: 1px solid var(--border); }
.prose h3 { font-size: 16px; font-weight: var(--fw-semi); color: var(--prose-sub); margin: 20px 0 8px; }
.prose p, .prose li { font-size: 15.5px; color: var(--prose-base); line-height: 1.85; }
.prose ul, .prose ol { margin: 10px 0 10px 22px; }
.prose li { margin-bottom: 6px; }
.prose strong { color: var(--prose-strong); font-weight: var(--fw-semi); }

/* ——— 联系卡 ——— */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.contact-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm); }
.contact-card h3 { font-size: 15px; font-weight: var(--fw-semi); margin-bottom: 6px; }
.contact-card p { font-size: 15px; color: var(--muted-foreground); }
.contact-card .val { color: var(--foreground); font-weight: var(--fw-medium); }

/* ——— 入场动画 ——— */
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.reveal { animation: rise .6s cubic-bezier(.22,1,.36,1) both; }
.reveal:nth-child(2) { animation-delay: .05s; }
.reveal:nth-child(3) { animation-delay: .1s; }
.reveal:nth-child(4) { animation-delay: .15s; }
@media (prefers-reduced-motion: reduce) { .reveal { animation: none; } .nav { backdrop-filter: none; } html { scroll-behavior: auto; } }

/* ——— 移动菜单按钮（默认显示，桌面端隐藏——稳健的 min-width 反向逻辑） ——— */
.nav__toggle { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--background); cursor: pointer; color: var(--foreground); flex: 0 0 auto; }
.nav__toggle svg { width: 20px; height: 20px; }
@media (min-width: 768px) { .nav__toggle { display: none; } }

/* ——— 响应式断点：1200 / 1024 / 768 / 390（§23.12） ——— */
@media (max-width: 1199px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .plans { grid-template-columns: repeat(2, 1fr); }   /* 2×2 */
}
@media (max-width: 860px) {
  .foot__in { grid-template-columns: 1fr 1fr; }
  .foot__brand { grid-column: 1 / -1; }
}
@media (max-width: 767px) {
  .cards { grid-template-columns: 1fr; }
  .plans { grid-template-columns: 1fr; }
  .card { min-height: 0; }
  .nav__links { display: none; }
  .nav__links.open { display: flex; position: absolute; top: var(--header-h); left: 0; right: 0; flex-direction: column; gap: 0; background: var(--background); border-bottom: 1px solid var(--border); padding: 6px 0; box-shadow: var(--shadow); }
  .nav__links.open a { padding: 13px clamp(20px,5vw,40px); border-top: 1px solid var(--border); font-size: 16px; }
  .nav__toggle { display: inline-flex; }
  .foot__in { grid-template-columns: 1fr; gap: 26px; }
}
