/* ============================================================
   polish.css — 小橙子「高级感」视觉增强层 [v1 2026-10-09]
   原则：只叠加、不重建；全部规则包在 @media screen 内，
   不影响打印/PDF 导出；沿用站点既有设计令牌体系。
   ============================================================ */
@media screen {

  /* ---- 1. 设计令牌微调：更沉稳的橙、更柔的阴影 ---- */
  :root {
    --accent-deep: #d95d08;
    --shadow: 0 30px 60px -24px rgba(196, 98, 32, .25),
              0 12px 24px -16px rgba(196, 98, 32, .12);
    --shadow-sm: 0 14px 32px -18px rgba(196, 98, 32, .18),
                 0 2px 6px -2px rgba(120, 70, 30, .06);
    --ease-out: cubic-bezier(.22, 1, .36, 1);
  }
  [data-theme=dark] {
    --shadow: 0 30px 60px -24px rgba(0, 0, 0, .5),
              0 12px 24px -16px rgba(0, 0, 0, .3);
    --shadow-sm: 0 14px 32px -18px rgba(0, 0, 0, .4),
                 0 2px 6px -2px rgba(0, 0, 0, .2);
  }

  /* ---- 2. 全页胶片颗粒（极低透明度，高级质感的关键） ---- */
  body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 2147483000;
    pointer-events: none;
    opacity: .028;
    mix-blend-mode: multiply;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
  }
  [data-theme=dark] body::before { opacity: .05; mix-blend-mode: overlay; }

  /* ---- 3. 导航：更通透的玻璃 + 顶部高光发丝线 ---- */
  .nav {
    background: color-mix(in srgb, var(--bg) 72%, transparent);
    backdrop-filter: blur(20px) saturate(1.4);
    -webkit-backdrop-filter: blur(20px) saturate(1.4);
    box-shadow: 0 1px 0 rgba(255, 255, 255, .55) inset,
                0 12px 32px -20px rgba(120, 70, 30, .18);
  }
  [data-theme=dark] .nav {
    box-shadow: 0 1px 0 rgba(255, 255, 255, .06) inset,
                0 12px 32px -20px rgba(0, 0, 0, .5);
  }

  /* ---- 4. 卡片：内高光 + 细腻描边 + 悬停抬升 ---- */
  .card {
    box-shadow: var(--shadow-sm),
                0 1px 0 rgba(255, 255, 255, .6) inset;
    transition: transform .35s var(--ease-out), box-shadow .35s var(--ease-out),
                border-color .35s var(--ease-out);
  }
  [data-theme=dark] .card {
    box-shadow: var(--shadow-sm),
                0 1px 0 rgba(255, 255, 255, .04) inset;
  }
  .card:hover {
    transform: translateY(-3px);
    border-color: color-mix(in srgb, var(--accent) 26%, var(--line));
    box-shadow: var(--shadow),
                0 1px 0 rgba(255, 255, 255, .7) inset;
  }
  [data-theme=dark] .card:hover {
    box-shadow: var(--shadow),
                0 1px 0 rgba(255, 255, 255, .06) inset;
  }

  /* ---- 5. 主按钮：光泽渐变 + 按压反馈 ---- */
  .btn-primary {
    background: linear-gradient(160deg, #fca55c 0%, #f97316 52%, #e86a0d 100%);
    box-shadow: 0 10px 24px -10px rgba(233, 116, 22, .55),
                0 1px 0 rgba(255, 255, 255, .35) inset;
    transition: transform .2s var(--ease-out), box-shadow .25s var(--ease-out), filter .2s;
  }
  .btn-primary:hover {
    transform: translateY(-1px);
    filter: saturate(1.06) brightness(1.03);
    box-shadow: 0 14px 30px -10px rgba(233, 116, 22, .6),
                0 1px 0 rgba(255, 255, 255, .4) inset;
  }
  .btn-primary:active { transform: translateY(0.5px) scale(.985); }

  /* ---- 6. 排版：eyebrow 装饰线 + 大标题墨色渐变 ---- */
  .eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    letter-spacing: .42em;
  }
  .eyebrow::before {
    content: '';
    width: 26px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent));
  }
  .section-title.serif {
    background: linear-gradient(170deg, var(--ink) 42%, color-mix(in srgb, var(--ink) 55%, var(--muted)) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: .01em;
  }
  h1.serif, h3.serif {
    background: linear-gradient(170deg, var(--ink) 55%, color-mix(in srgb, var(--ink) 60%, var(--muted)) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
  }

  /* ---- 7. 输入框：聚焦光环 ---- */
  input:focus-visible {
    border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent);
    outline: none;
  }
  :focus-visible {
    outline: 2px solid color-mix(in srgb, var(--accent) 70%, transparent);
    outline-offset: 2px;
    border-radius: 6px;
  }

  /* ---- 8. 全局细节：选中色 / 滚动条 ---- */
  ::selection {
    background: color-mix(in srgb, var(--accent) 26%, transparent);
    color: var(--ink);
  }
  ::-webkit-scrollbar { width: 10px; height: 10px; }
  ::-webkit-scrollbar-track { background: transparent; }
  ::-webkit-scrollbar-thumb {
    background: color-mix(in srgb, var(--muted) 38%, transparent);
    border-radius: 999px;
    border: 2.5px solid transparent;
    background-clip: content-box;
  }
  ::-webkit-scrollbar-thumb:hover {
    background: color-mix(in srgb, var(--muted) 62%, transparent);
    background-clip: content-box;
  }

  /* ---- 9. 监控画面格子：内阴影暗角，质感更沉 ---- */
  .cam-tile::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    border-radius: inherit;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, .06) inset,
                0 24px 48px -24px rgba(0, 0, 0, .5) inset;
  }

  /* ---- 10. 平滑滚动（键盘翻页更优雅） ---- */
  html { scroll-behavior: smooth; }

  /* 减少动效偏好：关闭抬升与颗粒 */
  @media (prefers-reduced-motion: reduce) {
    .card, .btn-primary { transition: none; }
    .card:hover, .btn-primary:hover { transform: none; }
    body::before { display: none; }
    html { scroll-behavior: auto; }
  }
}
