/* ============================================================
   邮小豚 ANIMO 官网 — 设计系统（Tesla 风格：大字 / 低密度 / 高反差）
   base.css: 令牌 / 重置 / 导航 / 页脚 / 按钮 / 动效基础
   ============================================================ */

:root {
  --ink: #171a20;
  --ink-2: #5c5e62;
  --ink-3: #8a8d91;
  --bg: #ffffff;
  --bg-alt: #f4f4f4;
  --navy-1: #0a1020;
  --navy-2: #0e1a33;
  --navy-3: #16305c;
  --brand: #2f7cf6;
  --brand-strong: #1e63e0;
  --gold: #f5b52e;
  --line: #e3e5e8;
  --line-dark: rgba(255, 255, 255, 0.14);
  --radius: 14px;
  --shadow-card: 0 10px 34px rgba(23, 26, 32, 0.09);
  --nav-h: 60px;
  --w: 1180px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro SC", "PingFang SC",
    "HarmonyOS Sans SC", "MiSans", "Noto Sans SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font: inherit; border: 0; background: none; cursor: pointer; }

.wrap { width: min(var(--w), calc(100% - 48px)); margin: 0 auto; }

/* ---------- 字阶 ---------- */
.eyebrow {
  font-size: 13px;
  letter-spacing: 0.42em;
  text-indent: 0.42em; /* 抵消末字间距，保证视觉居中 */
  font-weight: 600;
  color: var(--brand);
  text-transform: uppercase;
}
.section--dark .eyebrow { color: #7db0ff; }

.h-display {
  font-size: clamp(38px, 7vw, 66px);
  line-height: 1.12;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.h-section {
  font-size: clamp(30px, 4.6vw, 46px);
  line-height: 1.18;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.lead {
  font-size: clamp(16px, 2vw, 19px);
  line-height: 1.75;
  color: var(--ink-2);
  max-width: 46em;
}
.section--dark .lead { color: rgba(255, 255, 255, 0.72); }

/* ---------- 按钮（Tesla 胶囊） ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 30px;
  border-radius: 22px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: transform 0.18s ease, background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn--primary {
  background: var(--brand);
  color: #fff;
}
.btn--primary:hover { background: var(--brand-strong); box-shadow: 0 8px 22px rgba(47, 124, 246, 0.35); }

.btn--ghost { border: 1.5px solid var(--ink); color: var(--ink); background: transparent; }
.btn--ghost:hover { background: rgba(23, 26, 32, 0.05); }
.on-dark .btn--ghost, .btn--ghost.on-dark { border-color: rgba(255, 255, 255, 0.85); color: #fff; }
.on-dark .btn--ghost:hover { background: rgba(255, 255, 255, 0.1); }

.btn--sm { height: 36px; padding: 0 20px; font-size: 14px; }
.btn[aria-disabled="true"] { opacity: 0.55; cursor: default; transform: none !important; }

/* ---------- 顶部导航：透明 → 实底 ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 90;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  color: #fff;
  transition: background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}
.nav__inner {
  width: min(var(--w), calc(100% - 48px));
  margin: 0 auto;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}
.nav--solid {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: saturate(1.6) blur(14px);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  color: var(--ink);
  box-shadow: 0 1px 0 var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand__mark {
  width: 30px; height: 30px;
  border-radius: 8px;
  background: linear-gradient(135deg, #3b8bff, #1e5fd0);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 15px;
  font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}
.brand__name { font-size: 17px; font-weight: 600; letter-spacing: 0.06em; }
.brand__name small { font-weight: 500; opacity: 0.55; font-size: 12px; letter-spacing: 0.18em; margin-left: 8px; }

.nav__links {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 30px;
}
.nav__links a {
  font-size: 14px;
  font-weight: 500;
  opacity: 0.88;
  transition: opacity 0.15s ease;
}
.nav__links a:hover { opacity: 1; }

.nav__cta { color: #fff; }

.nav .burger { display: none; width: 40px; height: 40px; position: relative; }
.nav .burger span {
  position: absolute; left: 10px; right: 10px; height: 1.6px; border-radius: 2px;
  background: currentColor; transition: transform 0.25s ease, top 0.25s ease, opacity 0.2s ease;
}
.nav .burger span:nth-child(1) { top: 15px; }
.nav .burger span:nth-child(2) { top: 20px; }
.nav .burger span:nth-child(3) { top: 25px; }
body.menu-open .nav .burger span:nth-child(1) { top: 20px; transform: rotate(45deg); }
body.menu-open .nav .burger span:nth-child(2) { opacity: 0; }
body.menu-open .nav .burger span:nth-child(3) { top: 20px; transform: rotate(-45deg); }

/* 移动端全屏菜单 */
.menu {
  position: fixed; inset: 0; z-index: 80;
  background: #fff;
  padding: calc(var(--nav-h) + 30px) 32px 40px;
  display: flex; flex-direction: column; gap: 6px;
  transform: translateY(-8px); opacity: 0; pointer-events: none;
  transition: opacity 0.28s ease, transform 0.28s ease;
}
body.menu-open .menu { opacity: 1; transform: none; pointer-events: auto; }
.menu a {
  font-size: 22px; font-weight: 500; padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.menu .btn { margin-top: 22px; }

/* ---------- 页脚 ---------- */
.footer { background: var(--bg-alt); color: var(--ink-2); padding: 56px 0 30px; }
.footer__grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 36px;
}
.footer__brand p { font-size: 13px; line-height: 1.8; margin-top: 12px; }
.footer h4 { font-size: 13px; color: var(--ink); letter-spacing: 0.12em; margin-bottom: 14px; }
.footer li { font-size: 14px; line-height: 2.2; }
.footer a:hover { color: var(--ink); }
.footer__bottom {
  margin-top: 44px; padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between;
}

/* ---------- 通用段落骨架 ---------- */
.section { padding: clamp(72px, 10vw, 130px) 0; position: relative; overflow: hidden; }
.section--light { background: var(--bg); }
.section--alt { background: var(--bg-alt); }
.section--dark { background: var(--navy-1); color: #fff; }
.section--dark::selection { background: var(--brand); color: #fff; }

.section-head { max-width: 720px; margin-bottom: clamp(36px, 5vw, 64px); }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head .h-section { margin: 18px 0 16px; }

/* ---------- 滚动渐显 ----------
   仅在 JS 可用时才隐藏初始态（html.js 由 site.js 加），
   无 JS / 爬虫环境内容直出可见。 */
html.js .reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.85s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.85s cubic-bezier(0.2, 0.7, 0.2, 1);
  transition-delay: var(--d, 0s);
}
html.js .reveal.in { opacity: 1; transform: none; }

/* 极端 webview 兜底：JS 3 秒后强制 hero 可见（site.js 加 anim-fallback） */
html.anim-fallback .hero__content > *,
html.anim-fallback .hero__mascots {
  opacity: 1 !important;
  animation: none !important;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(26px); }
  to { opacity: 1; transform: none; }
}
.anim-in { animation: fadeUp 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both; }

/* ---------- 徽标 / 标签 ---------- */
.badge {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(47, 124, 246, 0.12);
  color: var(--brand);
  vertical-align: 2px;
}
.badge--gold { background: rgba(245, 181, 46, 0.15); color: #b97e0a; }
.badge--dark { background: rgba(255, 255, 255, 0.12); color: rgba(255, 255, 255, 0.85); }

/* ---------- 响应式 ---------- */
@media (max-width: 1080px) {
  .nav__links { display: none; }
  .nav .burger { display: block; }
}
@media (max-width: 860px) {
  .nav .nav__cta { display: none; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .btn { height: 46px; padding: 0 26px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .anim-in { animation: none; }
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
