/* ============================================================
   base.css —— 设计令牌 / 重置 / 通用组件
   配色取自 Anthropic (Claude) 品牌体系：暖纸色 + 陶土橙 + 暖炭黑
   所有中性色都带暖调，不使用纯白 / 纯黑 / 冷灰
   ============================================================ */

:root {
  /* 表面 */
  --ivory:      #FAF9F5;  /* 主页面背景 */
  --parchment:  #F5F4ED;  /* 交替区块背景 */
  --oat:        #F0EEE6;  /* 卡片 / 面板底 */
  --sand:       #E8E6DC;  /* 按钮底 / 突出边框 */
  --sand-deep:  #D1CFC5;  /* 悬停环 / 深色边框 */

  /* 品牌 */
  --clay:       #D97757;  /* 主强调：按钮、链接、选中态 */
  --clay-dark:  #C96442;  /* 强调深一档 */
  --clay-soft:  #EFC2B0;  /* 强调浅一档 */
  --clay-wash:  #F7E9E2;  /* 强调极浅底 */

  /* 文字与深色表面 */
  --ink:        #141413;  /* 主文字 / 深色区块 */
  --charcoal:   #30302E;  /* 深色容器 */
  --body:       #3D3D3A;  /* 正文 */
  --muted:      #5E5D59;  /* 次要文字 */
  --stone:      #87867F;  /* 三级文字 / 脚注 */
  --silver:     #B0AEA5;  /* 深色表面上的文字 */

  /* 语义 */
  --border:       #E8E6DC;
  --border-soft:  #F0EEE6;
  --border-dark:  #3A3936;
  --blue:         #6A9BCC;  /* 极少量辅色 */
  --green:        #788C5D;  /* 极少量辅色 */

  /* 阴影：Claude 式 ring，不靠重投影 */
  --ring: 0 0 0 1px var(--border);
  --ring-hover: 0 0 0 1px var(--sand-deep), 0 8px 24px rgba(20, 20, 19, .07);
  --shadow-soft: 0 2px 4px rgba(20, 20, 19, .03), 0 12px 32px rgba(20, 20, 19, .05);

  --sans: "Inter", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, Arial, sans-serif;
  --serif: Georgia, "Noto Serif SC", "Source Han Serif SC", "Songti SC", serif;

  --maxw: 1200px;
  --header-h: 72px;
  --radius: 8px;
  --radius-lg: 16px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); background: var(--ivory); }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.75;
  color: var(--body);
  background: var(--ivory);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.no-scroll { overflow: hidden; }

h1, h2, h3, h4, h5, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
img, svg { display: block; max-width: 100%; }
table { border-collapse: collapse; }

::selection { background: var(--clay-soft); color: var(--ink); }

/* ---------- 布局 ---------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: 88px 0; position: relative; }
.section--tint { background: var(--parchment); }
.section--oat  { background: var(--oat); }
.section--paper { background: var(--ivory); }

.section-head { text-align: center; margin-bottom: 48px; }
.section-head h2 {
  font-size: 38px;
  line-height: 1.35;
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--ink);
}
.section-head p {
  margin-top: 14px;
  font-size: 17px;
  color: var(--muted);
  line-height: 1.8;
}
.section-head--light h2 { color: var(--ivory); }
.section-head--light p { color: var(--silver); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .08em;
  color: var(--clay-dark);
  margin-bottom: 16px;
}
.eyebrow::before {
  content: "";
  width: 18px; height: 2px;
  background: var(--clay);
  border-radius: 2px;
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 24px;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  transition: background-color .2s, color .2s, box-shadow .2s, transform .2s, border-color .2s;
  box-shadow: 0 0 0 1px transparent;
}
.btn:active { transform: translateY(1px); }

.btn--primary { background: var(--clay); color: #fff; }
.btn--primary:hover { background: var(--clay-dark); box-shadow: 0 0 0 3px var(--clay-soft); }

.btn--outline { color: var(--clay-dark); box-shadow: inset 0 0 0 1px var(--clay); }
.btn--outline:hover { background: var(--clay-wash); box-shadow: inset 0 0 0 1px var(--clay-dark), 0 0 0 3px var(--clay-soft); }

.btn--sand { background: var(--sand); color: var(--charcoal); }
.btn--sand:hover { background: var(--sand-deep); }

.btn--light { background: var(--ivory); color: var(--ink); }
.btn--light:hover { box-shadow: 0 0 0 3px rgba(250, 249, 245, .35); }

.btn--dark-outline { color: var(--ivory); box-shadow: inset 0 0 0 1px var(--silver); }
.btn--dark-outline:hover { background: var(--charcoal); }

.btn--sm { height: 36px; padding: 0 16px; font-size: 13px; border-radius: 5px; }
.btn--lg { height: 50px; padding: 0 32px; font-size: 16px; }

/* ---------- 图标 ---------- */
.icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.icon--fill { fill: currentColor; stroke: none; }
.icon--sm { width: 15px; height: 15px; }
.icon--lg { width: 26px; height: 26px; }

/* ---------- 表单 ---------- */
.field {
  height: 46px;
  width: 100%;
  padding: 0 14px;
  background: var(--ivory);
  border: 1px solid var(--border);
  border-radius: 6px;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  color: var(--ink);
}
.field::placeholder { color: var(--stone); }
.field:focus { border-color: var(--clay); box-shadow: 0 0 0 3px var(--clay-wash); }

/* ---------- 滚入动画 ----------
   内容默认完全可见（渐进增强）：即使观察器未触发、脚本未加载、
   或页面被整页截图 / 打印，标题与卡片也不会消失。 */
@keyframes revealUp {
  from { opacity: .82; transform: translateY(14px); }
  to   { opacity: 1;   transform: none; }
}
.reveal { opacity: 1; }
.reveal.in { animation: revealUp .5s ease both; }

/* ---------- 提示条 ---------- */
.toast {
  position: fixed;
  left: 50%; top: 96px;
  transform: translate(-50%, -16px);
  z-index: 200;
  min-width: 260px;
  max-width: calc(100vw - 32px);
  padding: 12px 20px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--ivory);
  font-size: 14px;
  text-align: center;
  box-shadow: 0 12px 32px rgba(20, 20, 19, .2);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s, transform .25s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.is-error { background: #8E3B2C; }

/* ---------- 预约弹窗 ---------- */
.modal-mask {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(20, 20, 19, .48);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-mask.open { display: flex; }
.modal {
  width: 100%; max-width: 440px;
  background: var(--ivory);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: 0 24px 64px rgba(20, 20, 19, .24);
  position: relative;
  transform: translateY(12px);
  animation: modalIn .25s ease forwards;
}
@keyframes modalIn { to { transform: none; } }
.modal h3 { font-size: 24px; color: var(--ink); margin-bottom: 6px; }
.modal > p { font-size: 14px; color: var(--muted); margin-bottom: 22px; }
.modal label { display: block; font-size: 13px; font-weight: 600; color: var(--body); margin: 0 0 7px; }
.modal .form-row { margin-bottom: 16px; }
.modal .btn { width: 100%; margin-top: 6px; }
.modal-close {
  position: absolute; top: 16px; right: 16px;
  width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center;
  color: var(--muted);
}
.modal-close:hover { background: var(--sand); color: var(--ink); }
.modal-note { font-size: 12px; color: var(--stone); text-align: center; margin-top: 14px; }

/* 扫码添加客服微信弹窗 */
.modal--wechat { max-width: 420px; text-align: center; }
.modal--wechat h3 { font-size: 22px; }
.modal--wechat > p { margin-bottom: 20px; }
.modal-qr { width: 218px; height: 218px; margin: 0 auto 18px; padding: 10px; background: #fff; border: 2px solid var(--clay); border-radius: 14px; }
.modal-qr img { width: 100%; height: 100%; display: block; object-fit: contain; border-radius: 6px; }
.modal-wechat-tip { font-size: 13px; color: var(--muted); line-height: 1.9; }
.modal-wechat-tip a { color: var(--clay-dark); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 480px) {
  .modal-qr { width: 190px; height: 190px; }
}

/* 无障碍 */
.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
