/* ==========================================================================
   base.css — 设计变量、重置、排版、通用组件
   番茄小说下载器官网
   ========================================================================== */

/* ---------------------------------- 变量 --------------------------------- */
:root {
  /* 品牌色 */
  --brand: #FF3B30;
  --brand-deep: #E83A2A;
  --brand-soft: #FFF1EE;

  /* 中性色 */
  --ink: #17110F;
  --text: #1A1614;
  --muted: #857B77;
  --muted-strong: #4A4441;
  --line: #F2EAE6;
  --bg: #FFFFFF;
  --bg-warm: #FFFBF9;

  /* 功能色 */
  --success: #22C55E;

  /* 形状 */
  --r-lg: 20px;
  --r-md: 16px;
  --r-sm: 14px;
  --r-pill: 999px;

  /* 布局 */
  --container: 1200px;
  --gutter: 24px;
  --section-y: 96px;
  --nav-h: 78px;

  /* 字体 */
  --font: "Noto Sans SC", "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei",
          -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-num: Inter, "SF Pro Display", -apple-system, "Segoe UI", Roboto, sans-serif;

  /* 层级 */
  --z-nav: 100;
}

/* ---------------------------------- 重置 --------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.8 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, p, figure, ul, ol {
  margin: 0;
  padding: 0;
}

ul, ol { list-style: none; }

img, svg { display: block; max-width: 100%; }

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

strong { font-weight: 700; }

/* 键盘可达性 */
:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: 4px;
}

/* -------------------------------- 排版 ---------------------------------- */
.h1 {
  font-size: 72px;
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.02em;
}

.h2 {
  font-size: 40px;
  font-weight: 700;
  line-height: 1.24;
  letter-spacing: -0.01em;
}

.h3 {
  font-size: 26px;
  font-weight: 600;
  line-height: 1.4;
}

.lead {
  font-size: 17px;
  line-height: 1.8;
  color: var(--muted);
}

.num {
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
}

/* -------------------------------- 布局 ---------------------------------- */
.container {
  width: min(var(--container), 100% - var(--gutter) * 2);
  margin-inline: auto;
}

.section {
  padding-block: var(--section-y);
}

.section--warm { background: var(--bg-warm); }
.section--ink { background: var(--ink); color: #fff; }

/* 区块头：标题 + 说明 */
.section-head { margin-bottom: 44px; }

.section-head__desc {
  margin-top: 16px;
  max-width: 760px;
  color: var(--muted);
}

.section--ink .section-head__desc { color: rgba(255, 255, 255, .68); }

/* -------------------------------- 按钮 ---------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  padding-inline: 32px;
  border-radius: var(--r-pill);
  font-size: 16px;
  font-weight: 600;
  white-space: nowrap;
  transition: background-color .18s, border-color .18s, color .18s;
}

.btn--primary {
  background: var(--brand);
  color: #fff;
}

.btn--primary:hover { background: var(--brand-deep); }

.btn--ghost {
  background: #fff;
  color: var(--text);
  border: 1px solid var(--line);
}

.btn--ghost:hover { border-color: #E3D6D0; }

.btn--sm {
  height: 40px;
  padding-inline: 22px;
  font-size: 15px;
}

/* 页内跳转链接 */
.arrow-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--brand-deep);
  font-weight: 600;
  font-size: 15px;
}

.arrow-link:hover { color: var(--brand); }

/* -------------------------------- 徽标 ---------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 6px 18px;
  border-radius: var(--r-pill);
  background: var(--brand-soft);
  color: var(--muted-strong);
  font-size: 13px;
  font-weight: 500;
}

.badge b {
  font-family: var(--font-num);
  font-weight: 600;
  color: var(--brand-deep);
}

/* ------------------------------- 卡片 ----------------------------------- */
/* 全站无阴影，层次一律靠底色与描边区分 */
.card {
  background: var(--bg-warm);
  border-radius: var(--r-lg);
}

.card--outline {
  background: #fff;
  border: 1px solid var(--line);
}

/* ------------------------------ 页面标题区 ------------------------------- */
.page-head {
  padding-top: 72px;
  padding-bottom: 48px;
}

.page-head__desc {
  margin-top: 20px;
  max-width: 780px;
  color: var(--muted);
}

.page-head__note {
  margin-top: 20px;
  font-size: 13px;
  color: var(--muted);
}

/* --------------------------- 屏幕阅读器专用 ------------------------------ */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
