/* ============================================================
   硅基经纬 — 公共基础样式（首页 index.html 与工作台 workbench.html 共用）
   内容：设计变量 / 基础 reset / 按钮 / 品牌标识 / 日夜主题开关 / 夜间变量
   色调：云白底 / 浅蓝雾 / 宝蓝点缀，衬线大标题 + 无衬线正文
   ============================================================ */

:root {
  --bg: #f6f9fd;
  --bg-soft: #eef4fb;
  --bg-deep: #e7f0fa;
  --card: #ffffff;
  --ink: #14213c;
  --ink-soft: #44557c;
  --muted: #7d8cae;
  --accent: #2e6bff;
  --accent-2: #57b8ff;
  --accent-08: rgba(46, 107, 255, 0.08);
  --accent-16: rgba(46, 107, 255, 0.16);
  --accent-70: rgba(87, 184, 255, 0.7);
  --ink-strong: #10254a;
  --ink-strong-68: rgba(16, 37, 74, 0.68);
  --surface-glass: rgba(247, 251, 255, 0.88);
  --border-subtle: rgba(119, 153, 214, 0.18);
  --shadow-loading: 0 28px 70px -46px rgba(28, 52, 98, 0.35);
  --hairline: rgba(46, 107, 255, 0.14);
  --glow: rgba(46, 107, 255, 0.35);
  --shadow-soft: 0 24px 60px -26px rgba(20, 33, 60, 0.28);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --font-serif: "Cormorant Garamond", "Noto Serif SC", "Songti SC", serif;
  --font-sans: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection {
  background: rgba(46, 107, 255, 0.22);
}

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

em {
  font-style: normal;
}

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

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 36px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.08em;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  overflow: hidden;
  transition:
    transform 0.7s var(--ease-out),
    box-shadow 0.7s var(--ease-out),
    background-color 0.7s var(--ease-out),
    color 0.7s var(--ease-out),
    border-color 0.7s var(--ease-out);
  will-change: transform;
}

.btn-solid {
  background: linear-gradient(120deg, #2560e8, #2e6bff 55%, #57b8ff);
  color: #fff;
  box-shadow: 0 12px 32px -12px var(--glow);
}

/* hover 时的光泽扫过 */
.btn-solid::before {
  content: "";
  position: absolute;
  top: 0;
  left: -80%;
  width: 55%;
  height: 100%;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  transform: skewX(-18deg);
  transition: left 0.9s var(--ease-out);
}

.btn-solid:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 46px -14px rgba(46, 107, 255, 0.55);
}

.btn-solid:hover::before {
  left: 130%;
}

.btn-ghost {
  border: 1px solid var(--hairline);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(6px);
}

.btn-ghost:hover {
  transform: translateY(-3px);
  border-color: rgba(46, 107, 255, 0.5);
  background: #fff;
  box-shadow: 0 14px 34px -18px rgba(46, 107, 255, 0.35);
}

.btn-small {
  padding: 10px 24px;
  font-size: 13.5px;
}

.btn-large {
  padding: 19px 48px;
  font-size: 16px;
}

/* ---------------- 品牌标识 ---------------- */

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
}

.brand-mark {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: 0.12em;
}

.brand-sub {
  font-size: 11px;
  letter-spacing: 0.3em;
  color: var(--muted);
}

/* ---------------- 日 / 夜主题开关 ---------------- */

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--hairline);
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  transition:
    color 0.4s var(--ease-out),
    border-color 0.4s var(--ease-out),
    transform 0.4s var(--ease-out);
}

.theme-toggle:hover {
  color: var(--accent);
  border-color: var(--accent);
  transform: translateY(-1px);
}

.theme-toggle svg {
  width: 17px;
  height: 17px;
  stroke-width: 1.7;
}

.theme-toggle .icon-sun {
  display: none;
}

body.theme-night .theme-toggle .icon-sun {
  display: block;
}

body.theme-night .theme-toggle .icon-moon {
  display: none;
}

/* ---------------- 通用页脚 ---------------- */

.legal-footer {
  margin-top: clamp(72px, 8vw, 112px);
  padding: 28px 0 30px;
  border-top: 1px solid var(--hairline);
  background: transparent;
}

.legal-footer-inner {
  width: 100%;
  margin: 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px 40px;
  padding: 0 clamp(24px, 4vw, 56px);
  box-sizing: border-box;
}

.legal-footer-copy {
  max-width: 42ch;
  font-size: 12.5px;
  line-height: 1.8;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.legal-footer-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  text-align: right;
  font-size: 12.5px;
  line-height: 1.8;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.legal-footer-line {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0 14px;
}

.legal-footer-line span + span::before {
  content: "|";
  margin-right: 14px;
  color: var(--hairline);
}

.legal-footer-address {
  max-width: 52ch;
}

@media (max-width: 860px) {
  .legal-footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .legal-footer-meta {
    align-items: flex-start;
    text-align: left;
  }

  .legal-footer-line {
    justify-content: flex-start;
  }

  .legal-footer-line span + span::before {
    content: none;
    margin: 0;
  }
}

/* ============================================================
   夜间主题：body.theme-night
   深暮蓝底 + 提亮蓝 accent；带 data-night 的图片联动由 js/theme.js 处理
   ============================================================ */

body.theme-night {
  --bg: #0b1322;
  --bg-soft: #101a2e;
  --bg-deep: #080e1b;
  --card: #141f36;
  --ink: #e9eefa;
  --ink-soft: #b3c1de;
  --muted: #7c8cb0;
  --accent: #6f9dff;
  --accent-2: #57b8ff;
  --hairline: rgba(111, 157, 255, 0.16);
  --glow: rgba(111, 157, 255, 0.4);
  --shadow-soft: 0 24px 60px -26px rgba(0, 0, 0, 0.6);
}

body.theme-night .btn-ghost {
  background: rgba(20, 31, 54, 0.55);
}

body.theme-night .btn-ghost:hover {
  background: rgba(20, 31, 54, 0.92);
}
