/* ===========================================================
 * 红韵铸魂 · 硒润心田  ——  Design System
 * 参考 Apple / Google 现代简约风格
 * =========================================================== */

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

:root {
  /* 中性色 */
  --bg:           #fafafa;
  --surface:      #ffffff;
  --surface-2:    #f5f5f7;
  --text:         #1d1d1f;
  --text-2:       #424245;
  --text-3:       #86868b;
  --border:       #e5e5e7;
  --border-2:     #d2d2d7;

  /* 品牌色 */
  --red:          #a82424;
  --red-2:        #c53030;
  --red-soft:     #fdecec;

  --green:        #2d6a4f;
  --green-2:      #40916c;
  --green-soft:   #eaf3ee;

  --blue:         #1d4ed8;
  --blue-2:       #2563eb;
  --blue-soft:    #eef2ff;

  --amber:        #b7791f;
  --amber-soft:   #fdf6e3;

  --purple:       #553c9a;
  --purple-soft:  #f3edff;

  /* 排版 */
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC",
          "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;

  /* 阴影 */
  --shadow-1: 0 1px 2px rgba(0,0,0,0.04), 0 1px 3px rgba(0,0,0,0.04);
  --shadow-2: 0 4px 10px rgba(0,0,0,0.04), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-3: 0 12px 28px rgba(0,0,0,0.08), 0 6px 12px rgba(0,0,0,0.04);

  /* 圆角 */
  --r-sm: 8px;
  --r:    12px;
  --r-lg: 16px;
  --r-xl: 20px;
}

html, body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -0.005em;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  outline: none;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .2s ease;
  background: transparent;
}

/* =========== Topbar =========== */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 32px;
  background: rgba(255,255,255,0.82);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.topbar .brand {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 10px;
}
.topbar .brand .brand-mark {
  width: 22px; height: 22px;
  border-radius: 6px;
  background: var(--red);
  position: relative;
}
.topbar .brand .brand-mark::after {
  content: "";
  position: absolute; inset: 4px;
  background: var(--surface);
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}

.topbar .nav {
  display: flex;
  gap: 4px;
  align-items: center;
}
.topbar .nav a {
  color: var(--text-2);
  font-size: 13px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 999px;
  transition: background .15s, color .15s;
}
.topbar .nav a:hover { background: var(--surface-2); color: var(--text); }
.topbar .nav a.active { color: var(--text); background: var(--surface-2); }
.topbar .nav .pill {
  padding: 6px 14px;
  background: var(--text);
  color: var(--surface);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  margin-left: 8px;
}

/* =========== Container =========== */
.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 40px 32px 64px;
}

.page-header { margin-bottom: 36px; }
.page-header .eyebrow {
  font-size: 12px;
  font-weight: 600;
  color: var(--red);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.page-header h1 {
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}
.page-header p {
  color: var(--text-3);
  margin-top: 8px;
  font-size: 15px;
  max-width: 720px;
  line-height: 1.7;
}

/* =========== Section / Card =========== */
.section-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-3);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 28px;
  transition: border-color .2s, transform .2s;
}
.card.elev { box-shadow: var(--shadow-2); }
.card-head {
  margin-bottom: 20px;
}
.card-head h3 {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.card-head p {
  font-size: 13px;
  color: var(--text-3);
  margin-top: 4px;
}

/* =========== Button =========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 38px;
  padding: 0 18px;
  font-size: 14px;
  font-weight: 500;
  border-radius: 999px;
  transition: background .15s, color .15s, transform .15s;
}
.btn-lg { height: 44px; padding: 0 26px; font-size: 15px; }
.btn-sm { height: 32px; padding: 0 14px; font-size: 13px; }

.btn-primary {
  background: var(--text);
  color: var(--surface);
}
.btn-primary:hover { background: #000; transform: translateY(-1px); }
.btn-primary:disabled { background: var(--border-2); cursor: not-allowed; transform: none; }

.btn-red {
  background: var(--red);
  color: var(--surface);
}
.btn-red:hover { background: var(--red-2); transform: translateY(-1px); }

.btn-outline {
  border: 1px solid var(--border-2);
  color: var(--text);
  background: var(--surface);
}
.btn-outline:hover { border-color: var(--text-2); background: var(--surface-2); }

.btn-ghost {
  color: var(--text-2);
  background: var(--surface-2);
}
.btn-ghost:hover { background: var(--border); color: var(--text); }

/* =========== Tag =========== */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  background: var(--surface-2);
  color: var(--text-2);
  margin: 0 4px 4px 0;
}
.tag.red    { background: var(--red-soft);    color: var(--red); }
.tag.green  { background: var(--green-soft);  color: var(--green); }
.tag.blue   { background: var(--blue-soft);   color: var(--blue); }
.tag.amber  { background: var(--amber-soft);  color: var(--amber); }
.tag.purple { background: var(--purple-soft); color: var(--purple); }

/* =========== Forms =========== */
input[type=text],
input[type=tel],
input[type=date],
textarea,
select {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: var(--r);
  font-size: 14px;
  font-family: inherit;
  background: var(--surface);
  color: var(--text);
  transition: border-color .15s, box-shadow .15s;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--text);
  box-shadow: 0 0 0 4px rgba(0,0,0,0.05);
  outline: none;
}
textarea { resize: vertical; min-height: 110px; line-height: 1.7; }

/* =========== Toast =========== */
.toast {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(-12px);
  background: var(--text);
  color: var(--surface);
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s, transform .25s;
  z-index: 9999;
  box-shadow: var(--shadow-3);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* =========== Modal =========== */
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9000;
  padding: 24px;
}
.modal-mask.show { display: flex; }
.modal-body {
  background: var(--surface);
  border-radius: var(--r-xl);
  padding: 32px;
  max-width: 560px;
  width: 100%;
  max-height: 84vh;
  overflow-y: auto;
  box-shadow: var(--shadow-3);
}
.modal-body h3 {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 14px;
}
.modal-close {
  float: right;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--text-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.modal-close:hover { background: var(--border); color: var(--text); }

/* =========== Icon =========== */
.icon { width: 20px; height: 20px; flex-shrink: 0; stroke-width: 1.6; }
.icon-sm { width: 16px; height: 16px; }
.icon-lg { width: 24px; height: 24px; }
.icon-xl { width: 28px; height: 28px; stroke-width: 1.4; }

/* =========== Animation =========== */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp .5s cubic-bezier(.4,0,.2,1) both; }
.fade-up:nth-child(2) { animation-delay: .05s; }
.fade-up:nth-child(3) { animation-delay: .10s; }
.fade-up:nth-child(4) { animation-delay: .15s; }
.fade-up:nth-child(5) { animation-delay: .20s; }
.fade-up:nth-child(6) { animation-delay: .25s; }

/* =========== Utility =========== */
.muted   { color: var(--text-3); }
.mb-12   { margin-bottom: 12px; }
.mb-20   { margin-bottom: 20px; }
.mb-32   { margin-bottom: 32px; }
.mt-12   { margin-top: 12px; }
.mt-20   { margin-top: 20px; }
.mt-32   { margin-top: 32px; }

.divider {
  height: 1px;
  background: var(--border);
  margin: 24px 0;
}

/* 响应式 */
@media (max-width: 760px) {
  .topbar { padding: 12px 18px; }
  .topbar .nav { gap: 2px; overflow-x: auto; }
  .topbar .nav a { padding: 8px 10px; font-size: 12px; }
  .container { padding: 28px 18px 48px; }
  .page-header h1 { font-size: 28px; }
}
