/* ==========================================================================
   发条娱乐苹果 · 共享外壳样式 /assets/site.css
   机芯配色 · 切角面板 · 左右分置导航 · 刻度与齿轮动效
   ========================================================================== */

:root {
  /* 色彩体系 */
  --ink-green: #0E2B24;
  --ink-green-deep: #0B221C;
  --brass-dark: #8C5A2B;
  --amber: #E89A3C;
  --silver: #C9D1D3;
  --paper: #F3E9D2;
  --paper-light: #FBF4E4;
  --brass: #D9B26A;
  --rust: #B34A2E;
  --teal-slate: #1F3A3D;
  --carbon: #141413;
  --cream: #F8F4EA;

  --line-brass: rgba(217, 178, 106, 0.38);
  --line-soft: rgba(140, 90, 43, 0.24);
  --shell-w: 1200px;
  --shell-pad: 24px;
  --cut: 16px;

  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC",
    system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
    "Liberation Mono", "Courier New", monospace;
}

/* ---------- 基础重置 ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.8;
  color: var(--carbon);
  background-color: var(--paper);
  background-image:
    linear-gradient(135deg, rgba(140, 90, 43, 0.05) 0 1px, transparent 1px 14px),
    radial-gradient(circle at 8% 3%, rgba(232, 154, 60, 0.10), transparent 44%),
    radial-gradient(circle at 96% 22%, rgba(31, 58, 61, 0.08), transparent 40%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

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

a { color: var(--brass-dark); text-decoration: none; }
a:hover { color: var(--rust); }

h1, h2, h3, h4, h5 {
  margin: 0 0 0.6em;
  color: var(--ink-green);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(34px, 5.4vw, 64px); }
h2 { font-size: clamp(24px, 3.2vw, 36px); }
h3 { font-size: clamp(18px, 2.2vw, 24px); }
h4 { font-size: 17px; }

p { margin: 0 0 1.1em; }

ul, ol { margin: 0 0 1.1em; padding-left: 1.2em; }

:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 3px;
}

/* ---------- 通用容器 ---------- */

.shell {
  width: 100%;
  max-width: var(--shell-w);
  margin-inline: auto;
  padding-inline: var(--shell-pad);
}

.stack { display: flex; flex-direction: column; gap: 16px; }

.mono { font-family: var(--font-mono); }

/* ---------- 跳至主要内容 ---------- */

.skip-link {
  position: absolute;
  left: 16px;
  top: -80px;
  z-index: 300;
  padding: 11px 20px;
  background: linear-gradient(180deg, #F0C47C, #D9A356);
  color: var(--carbon);
  font-weight: 800;
  font-size: 14px;
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
  transition: top 0.18s ease;
}

.skip-link:focus { top: 14px; color: var(--carbon); }

/* ==========================================================================
   页头 · 上弦轨道
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  color: var(--cream);
  background: linear-gradient(180deg, #133529 0%, #0B221C 100%);
  border-bottom: 1px solid var(--line-brass);
  box-shadow: 0 16px 32px -24px rgba(0, 0, 0, 0.95);
}

.header-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: 100%;
  max-width: var(--shell-w);
  margin-inline: auto;
  min-height: 78px;
  padding: 10px var(--shell-pad);
}

/* 品牌钟面 */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
  color: var(--cream);
  text-decoration: none;
}

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

.brand-gear {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border-radius: 50%;
  background:
    repeating-conic-gradient(from 0deg, var(--brass-dark) 0deg 9deg, rgba(217, 178, 106, 0) 9deg 30deg),
    radial-gradient(circle at 50% 50%, #0E2B24 0 39%, var(--brass) 40% 47%, var(--brass-dark) 48% 100%);
  box-shadow: 0 0 0 1px rgba(217, 178, 106, 0.5), inset 0 0 10px rgba(0, 0, 0, 0.6);
}

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

.brand-name {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.brand-tag {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.28em;
  color: var(--silver);
}

/* 移动端栏目按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 9px 15px;
  background: rgba(31, 58, 61, 0.62);
  border: 1px solid var(--line-brass);
  color: var(--cream);
  font: inherit;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: color 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
}

.nav-toggle:hover { color: var(--amber); border-color: var(--amber); }

.nav-toggle-label { font-size: 13px; }

.nav-toggle-bars {
  display: inline-flex;
  flex-direction: column;
  justify-content: space-between;
  width: 16px;
  height: 12px;
}

.nav-toggle-bars span {
  display: block;
  height: 2px;
  background: currentColor;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

/* 栏目齿条 */
.site-nav { display: flex; align-items: center; }

.nav-list {
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-item { position: relative; }

.nav-link {
  position: relative;
  display: block;
  padding: 10px 13px;
  font-size: 14.5px;
  font-weight: 600;
  color: #E6E2D6;
  text-decoration: none;
  border: 1px solid transparent;
  transition: color 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 13px;
  right: 13px;
  bottom: 4px;
  height: 1px;
  background: var(--amber);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 0.22s ease;
}

.nav-link:hover {
  color: var(--amber);
  background: rgba(31, 58, 61, 0.5);
  border-color: rgba(217, 178, 106, 0.35);
}

.nav-link:hover::after { transform: scaleX(1); }

.nav-link[aria-current="page"] {
  color: var(--amber);
  background: rgba(140, 90, 43, 0.30);
  border-color: rgba(217, 178, 106, 0.6);
}

.nav-link[aria-current="page"]::after { transform: scaleX(1); }

/* 上弦刻度轨 */
.gear-rail {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 3px;
  overflow: hidden;
  background: repeating-linear-gradient(90deg, rgba(201, 209, 211, 0.20) 0 1px, transparent 1px 11px);
}

.gear-rail::after {
  content: "";
  position: absolute;
  inset: 0;
  transform-origin: 0 50%;
  transform: scaleX(var(--progress, 0));
  background: linear-gradient(90deg, #8C5A2B, #E89A3C 55%, #D9B26A);
  transition: transform 0.12s linear;
}

/* ==========================================================================
   页脚 · 机芯背板
   ========================================================================== */

.site-footer {
  position: relative;
  margin-top: 72px;
  color: var(--cream);
  background: linear-gradient(180deg, #0E2B24 0%, #0B1E19 56%, #141413 100%);
  border-top: 1px solid var(--line-brass);
}

.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: repeating-linear-gradient(90deg, var(--brass-dark) 0 18px, transparent 18px 36px);
  opacity: 0.55;
}

.footer-shell { position: relative; }

.footer-top {
  display: grid;
  grid-template-columns: 1.35fr 0.8fr 0.8fr 1.1fr;
  gap: 34px;
  padding: 58px 0 40px;
}

.footer-brand { min-width: 0; }

.footer-brand-name {
  margin: 0 0 10px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--cream);
}

.footer-brand-desc {
  max-width: 34ch;
  margin: 0 0 14px;
  font-size: 14px;
  line-height: 1.85;
  color: #C6CFCB;
}

.footer-mark {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.32em;
  color: var(--brass);
  opacity: 0.85;
}

.footer-nav { min-width: 0; }

.footer-heading {
  margin: 0 0 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: var(--brass);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-links a {
  font-size: 14.5px;
  color: #D6D9D3;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.18s ease, border-color 0.18s ease;
}

.footer-links a:hover { color: var(--amber); border-bottom-color: rgba(232, 154, 60, 0.6); }

.footer-contact { min-width: 0; }

.footer-dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 12px;
  margin: 0 0 14px;
  font-size: 14px;
}

.footer-dl dt {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.12em;
  color: var(--brass);
  padding-top: 4px;
}

.footer-dl dd {
  margin: 0;
  color: #D6D9D3;
  word-break: break-word;
}

.footer-note {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.75;
  color: #9FB0AA;
}

.footer-base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 24px;
  padding: 18px 0 26px;
  border-top: 1px solid rgba(217, 178, 106, 0.22);
}

.footer-copy {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.04em;
  color: #A8B5B0;
}

.footer-copy--dim { color: #7E8F8A; }

/* 返回顶部齿轮 */
.to-top {
  position: fixed;
  right: 22px;
  bottom: 26px;
  z-index: 90;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 16px 10px 13px;
  background: rgba(14, 43, 36, 0.94);
  border: 1px solid var(--line-brass);
  color: var(--cream);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s linear, color 0.18s ease;
}

.to-top[data-visible] { opacity: 1; visibility: visible; transform: none; }

.to-top:hover { color: var(--amber); }

.to-top-gear {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background:
    repeating-conic-gradient(from 0deg, #D9B26A 0deg 12deg, rgba(217, 178, 106, 0) 12deg 45deg),
    radial-gradient(circle at 50% 50%, #0E2B24 0 41%, var(--brass) 42% 59%, #8C5A2B 60% 100%);
}

/* ==========================================================================
   通用组件
   ========================================================================== */

/* 切角面板 */
.panel-cut {
  position: relative;
  padding: 26px 24px;
  background: linear-gradient(155deg, var(--paper-light) 0%, #F1E5CB 100%);
  clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
}

.panel-cut::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, var(--brass-dark), rgba(140, 90, 43, 0)) top left / 100% 3px no-repeat;
}

.panel-cut--dark {
  color: var(--cream);
  background: linear-gradient(150deg, var(--teal-slate) 0%, var(--ink-green) 100%);
}

.panel-cut--dark h2,
.panel-cut--dark h3,
.panel-cut--dark h4 { color: var(--cream); }

.panel-cut--dark p { color: #D5DEDA; }

.lift { transition: transform 0.22s ease, box-shadow 0.22s ease; }

.lift:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 40px -26px rgba(11, 34, 28, 0.6), inset 0 0 0 1px var(--amber);
}

/* 按钮 */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  padding: 12px 24px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: var(--carbon);
  background: linear-gradient(180deg, #F0C47C, #D9A356);
  border: 0;
  cursor: pointer;
  text-decoration: none;
  clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
  transition: filter 0.18s ease, transform 0.18s ease, color 0.18s ease;
}

.btn:hover { color: var(--carbon); filter: brightness(1.08) saturate(1.05); }

.btn:active { transform: translateY(1px); }

.btn--ghost {
  color: var(--cream);
  background: linear-gradient(180deg, #1F3A3D, #16302F);
  box-shadow: inset 0 0 0 1px rgba(217, 178, 106, 0.45);
}

.btn--ghost:hover { color: var(--amber); box-shadow: inset 0 0 0 1px var(--amber); }

.btn--rust {
  color: #FFF3E6;
  background: linear-gradient(180deg, #C25437, #8E3924);
}

/* 标签 */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--ink-green);
  background: rgba(217, 178, 106, 0.28);
  border: 1px solid rgba(140, 90, 43, 0.35);
}

.tag--rust {
  color: #7A2E1B;
  background: rgba(179, 74, 46, 0.16);
  border-color: rgba(179, 74, 46, 0.45);
}

.tag--silver {
  color: #33474A;
  background: rgba(201, 209, 211, 0.5);
  border-color: rgba(31, 58, 61, 0.28);
}

/* 文本节奏组件 */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--brass-dark);
}

.eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: var(--brass-dark);
}

.title-cut {
  position: relative;
  padding-left: 24px;
}

.title-cut::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.22em;
  bottom: 0.22em;
  width: 9px;
  background: linear-gradient(180deg, var(--brass-dark), var(--amber));
  clip-path: polygon(0 0, 100% 0, 100% 70%, 50% 100%, 0 70%);
}

.num {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: clamp(28px, 4vw, 46px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.01em;
  color: var(--brass-dark);
}

.num--amber { color: var(--amber); }

.prose {
  max-width: 40em;
  color: #25231E;
}

.prose p { margin: 0 0 1.15em; }

.prose h2 { margin: 1.5em 0 0.55em; }

.prose h3 { margin: 1.3em 0 0.5em; }

.prose ul,
.prose ol { margin: 0 0 1.2em; padding-left: 1.35em; }

.prose li { margin-bottom: 0.5em; }

.prose strong { color: var(--ink-green); }

.prose code {
  font-family: var(--font-mono);
  font-size: 0.92em;
  padding: 0.1em 0.4em;
  background: rgba(140, 90, 43, 0.1);
  color: #5A3A1B;
}

.divider-scale {
  height: 8px;
  margin: 34px 0;
  border-bottom: 1px solid var(--line-soft);
  background: repeating-linear-gradient(90deg, rgba(140, 90, 43, 0.55) 0 1px, transparent 1px 14px);
}

/* 面包屑 */
.breadcrumb {
  padding: 20px 0 0;
  font-size: 13px;
  color: #5D5546;
}

.breadcrumb-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.breadcrumb-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.breadcrumb-item + .breadcrumb-item::before {
  content: "/";
  color: var(--brass-dark);
  font-family: var(--font-mono);
}

.breadcrumb-item a {
  color: #6B5C43;
  text-decoration: none;
  border-bottom: 1px dotted rgba(140, 90, 43, 0.5);
}

.breadcrumb-item a:hover { color: var(--rust); }

.breadcrumb-current { color: var(--ink-green); font-weight: 700; }

/* 网格系统 */
.grid-bento {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 20px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.span-3 { grid-column: span 3; }
.span-4 { grid-column: span 4; }
.span-5 { grid-column: span 5; }
.span-6 { grid-column: span 6; }
.span-7 { grid-column: span 7; }
.span-8 { grid-column: span 8; }
.span-12 { grid-column: span 12; }

/* 图片占位容器 */
.media-frame {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: linear-gradient(140deg, var(--teal-slate), var(--ink-green-deep));
  border: 1px solid rgba(217, 178, 106, 0.3);
}

.media-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.media-frame:hover img { transform: scale(1.03); }

.media-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(217, 178, 106, 0.14), rgba(217, 178, 106, 0) 42%),
    radial-gradient(circle at 78% 84%, rgba(232, 154, 60, 0.18), transparent 55%);
}

.media-frame--square { aspect-ratio: 1 / 1; }
.media-frame--tall { aspect-ratio: 3 / 4; }
.media-frame--wide { aspect-ratio: 21 / 9; }

.media-caption {
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: #6B5C43;
}

/* ---- 页面阶段数据协议 ---- */

[data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

[data-reveal][data-revealed] {
  opacity: 1;
  transform: none;
}

[data-spy] a[data-active] {
  color: var(--rust);
  background: rgba(179, 74, 46, 0.08);
  border-color: var(--rust);
}

/* ==========================================================================
   齿轮旋转动效
   ========================================================================== */

@keyframes gear-rotate {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: no-preference) {
  .brand-gear { animation: gear-rotate 26s linear infinite; }
  .to-top[data-visible] .to-top-gear { animation: gear-rotate 7s linear infinite; }
}

/* ==========================================================================
   响应式
   ========================================================================== */

@media (max-width: 1040px) {
  .footer-top { grid-template-columns: 1fr 1fr; gap: 30px; }
}

@media (max-width: 1000px) {
  .span-3,
  .span-4,
  .span-5 { grid-column: span 6; }
}

@media (max-width: 920px) {
  .nav-toggle { display: inline-flex; }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    max-height: calc(100vh - 78px);
    overflow-y: auto;
    background: linear-gradient(180deg, #0B221C, #0E2B24);
    border-bottom: 1px solid var(--line-brass);
    box-shadow: 0 26px 40px -20px rgba(0, 0, 0, 0.8);
  }

  .site-nav[data-open] { display: block; }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 10px var(--shell-pad) 22px;
  }

  .nav-item { border-bottom: 1px dashed rgba(217, 178, 106, 0.22); }

  .nav-link { padding: 15px 4px; font-size: 15.5px; }

  .nav-link::after {
    left: 4px;
    right: auto;
    width: 24px;
    bottom: 9px;
  }
}

@media (max-width: 760px) {
  :root { --shell-pad: 18px; }

  .grid-2,
  .grid-3 { grid-template-columns: 1fr; }

  .span-3,
  .span-4,
  .span-5,
  .span-6,
  .span-7,
  .span-8 { grid-column: span 12; }

  .footer-top { grid-template-columns: 1fr; padding: 42px 0 28px; }

  .footer-brand-desc { max-width: none; }

  .brand-tag { letter-spacing: 0.2em; }

  .to-top { right: 14px; bottom: 16px; }
}

@media (max-width: 420px) {
  .brand-name { font-size: 15.5px; }
  .brand-tag { font-size: 9.5px; }
  .nav-toggle-label { display: none; }
}

/* ==========================================================================
   降低动态效果
   ========================================================================== */

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

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

  [data-reveal] {
    opacity: 1;
    transform: none;
  }

  .media-frame:hover img { transform: none; }

  .lift:hover { transform: none; }
}
