/* ==========================================================================
   首饰数智设计与失蜡铸造数字孪生虚拟仿真实验 · 公共样式
   纯静态、无外部依赖，可直接部署到任意 HTTP(S) 静态站点
   ========================================================================== */

:root {
  --ink: #0f1319;
  --ink-2: #161c25;
  --ink-3: #202834;
  --paper: #f7f4ee;
  --paper-2: #fffdf9;
  --line: #e6e0d4;
  --line-2: #d5ccba;
  --gold: #b8894a;
  --gold-2: #d6b273;
  --gold-3: #f2e5c9;
  --text: #1f242b;
  --muted: #6a7079;
  --ok: #2c7a5b;
  --warn: #a9761f;
  --bad: #a44242;
  --radius: 18px;
  --shadow: 0 24px 60px rgba(15, 19, 25, 0.12);
  --shadow-sm: 0 8px 24px rgba(15, 19, 25, 0.08);
  --sans: system-ui, -apple-system, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --serif: "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC",
    "SimSun", Georgia, serif;
}

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

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

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

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

a {
  color: inherit;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

::selection {
  background: var(--gold-3);
  color: var(--ink);
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 6px;
}

.wrap {
  width: min(1180px, calc(100% - 48px));
  margin-inline: auto;
}

.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 99;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  text-decoration: none;
  transition: top 0.2s;
}

.skip:focus {
  top: 12px;
}

/* ---------- 顶栏 ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 244, 238, 0.86);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}

.topbar-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 68px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  flex: 0 0 auto;
}

.brand-mark {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.brand-text b {
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.brand-text span {
  font-size: 11.5px;
  color: var(--muted);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.nav {
  display: flex;
  align-items: center;
  gap: 26px;
  margin-left: auto;
}

.nav a {
  position: relative;
  font-size: 14.5px;
  color: #3c424b;
  text-decoration: none;
  padding: 6px 0;
  white-space: nowrap;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.nav a:hover::after,
.nav a:focus-visible::after {
  transform: scaleX(1);
}

.topbar .btn {
  flex: 0 0 auto;
}

/* ---------- 按钮 ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 12px 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 14.5px;
  font-weight: 650;
  line-height: 1.1;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease,
    border-color 0.18s ease, color 0.18s ease;
}

.btn svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.btn-gold {
  background: linear-gradient(135deg, #ecd7ab 0%, #d3ac6c 55%, #bd9252 100%);
  color: #241a0c;
  box-shadow: 0 10px 24px rgba(184, 137, 74, 0.28);
}

.btn-gold:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 32px rgba(184, 137, 74, 0.36);
}

.btn-dark {
  background: var(--ink);
  color: #f8f5ef;
}

.btn-dark:hover {
  background: var(--ink-3);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-2);
}

.btn-ghost:hover {
  border-color: var(--gold);
  background: rgba(214, 178, 115, 0.12);
}

.btn-sm {
  padding: 8px 15px;
  font-size: 13px;
}

.btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ---------- 通用标题 ---------- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 14px;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--gold);
}

.sec-head {
  max-width: 760px;
  margin-bottom: 34px;
}

.sec-head h2 {
  margin: 0 0 12px;
  font-family: var(--serif);
  font-size: clamp(25px, 3vw, 34px);
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0.01em;
}

.sec-head p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

section[id] {
  scroll-margin-top: 92px;
}

/* ---------- 卡片 ---------- */

.card {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: rgba(255, 253, 249, 0.7);
  font-size: 12.5px;
  color: #4b515a;
  white-space: nowrap;
}

/* ---------- 页脚 ---------- */

.site-foot {
  margin-top: 96px;
  padding: 52px 0 40px;
  background: var(--ink);
  color: #c8c3b8;
}

.foot-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
}

.site-foot h4 {
  margin: 0 0 10px;
  color: #f3ede1;
  font-size: 14px;
  letter-spacing: 0.06em;
}

.site-foot p {
  margin: 0 0 8px;
  font-size: 13px;
  line-height: 1.85;
  color: #a9a397;
}

.site-foot .foot-brand {
  font-family: var(--serif);
  font-size: 19px;
  color: #f3ede1;
  letter-spacing: 0.03em;
}

.site-foot .foot-line {
  width: 46px;
  height: 2px;
  margin: 14px 0 16px;
  background: linear-gradient(90deg, var(--gold-2), transparent);
}

.foot-bottom {
  margin-top: 38px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  justify-content: space-between;
  font-size: 12px;
  color: #8b8577;
}

/* ---------- 提示条 ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 34px;
  z-index: 200;
  transform: translate(-50%, 20px);
  padding: 11px 20px;
  border-radius: 999px;
  background: var(--ink);
  color: #f7f3ea;
  font-size: 13.5px;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---------- 无障碍 / 动效 ---------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

@media (max-width: 900px) {
  .wrap {
    width: min(1180px, calc(100% - 32px));
  }

  .nav {
    display: none;
  }

  .topbar .btn {
    margin-left: auto;
  }

  .brand-text span {
    display: none;
  }

  .foot-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}
