/* ==========================================================================
   官网样式 · macOS 26 "Tahoe" 主题架构（Liquid Glass）
   --------------------------------------------------------------------------
   架构分四层，改主题只动前两层：

   L1 原始值（primitives）  系统色板 + 结构常量（圆角、模糊、投影、动效曲线）
   L2 语义 token            外观相关：--label / --separator / --glass-* / --accent
                            基线为亮色；支持 light-dark() 的浏览器升级为
                            「跟随系统 + data-theme 覆盖」的双外观
   L3 材质与组件            玻璃材质（thin/regular/thick）、窗口、工具栏、
                            控件、卡片、Quick Look 浮层
   L4 页面区块              首页与案例库各自的版式

   外观协议：
   - 无 data-theme   → 跟随系统（prefers-color-scheme）
   - data-theme=dark → 深色；data-theme=light → 浅色（site.js 写入，localStorage 记忆）
   - 用 color-scheme 作为唯一开关：所有 light-dark() 颜色随它一次性翻转

   约束（与 server/app.py 的 CSP 一致）：
   - 只允许外部样式表，不能出现 style="" / <style> / 内联脚本
   - 字体只能用系统字体（font-src 未放行），-apple-system 正好就是 SF Pro
   ========================================================================== */

/* ==========================================================================
   L1 原始值
   ========================================================================== */

:root {
  /* 系统色板（亮色） */
  --sys-blue: #007aff;
  --sys-indigo: #5856d6;
  --sys-purple: #af52de;
  --sys-pink: #ff2d55;
  --sys-teal: #30b0c7;
  --sys-orange: #ff9500;

  /* 尺寸与版心 */
  --shell: 1120px;
  --nav-h: 60px;

  /* 同心圆角：外层半径 = 内层 + 内边距，保持 macOS 的连续曲率 */
  --r-window: 26px;
  --r-panel: 22px;
  --r-card: 16px;
  --r-control: 11px;
  --r-inset: 8px;
  --r-pill: 980px;

  /* 玻璃材质：只有工具栏这类"底下会滑动"的表面才开模糊 */
  --blur-nav: 30px;
  --sat: 180%;
  --hairline: 0.5px;

  /* 层级投影：数值越大越"离开桌面" */
  --shadow-1: 0 1px 2px rgba(9, 9, 14, 0.06), 0 1px 6px rgba(9, 9, 14, 0.05);
  --shadow-2: 0 8px 22px -8px rgba(9, 9, 14, 0.2), 0 1px 3px rgba(9, 9, 14, 0.08);
  --shadow-3: 0 30px 64px -24px rgba(9, 9, 14, 0.42), 0 12px 26px -16px rgba(9, 9, 14, 0.26),
    0 1px 2px rgba(9, 9, 14, 0.12);
  --shadow-glow: 0 12px 30px -12px rgba(0, 122, 255, 0.5);

  /* 字体：SF Pro（-apple-system）在 Windows 上回落到雅黑 */
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", system-ui, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC",
    "Microsoft YaHei", "Helvetica Neue", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;

  /* 动效：Apple 的 ease-out 与带过冲的 spring */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring-soft: cubic-bezier(0.32, 1.24, 0.6, 1);
  --ease-io: cubic-bezier(0.4, 0, 0.2, 1);
  --dur-1: 0.18s;
  --dur-2: 0.3s;
  --dur-3: 0.55s;
}

/* ==========================================================================
   L2 语义 token · 基线（不支持 light-dark() 的浏览器固定亮色）
   ========================================================================== */

:root {
  color-scheme: light;

  --label: rgba(0, 0, 0, 0.88);
  --label-2: rgba(60, 60, 67, 0.62);
  --label-3: rgba(60, 60, 67, 0.36);
  --separator: rgba(60, 60, 67, 0.18);

  --canvas: #eaeef5;
  --surface: #ffffff;
  --surface-2: #f6f7fb;
  --surface-solid: #ffffff;
  --surface-inset: rgba(120, 120, 128, 0.12);
  --fill-1: rgba(120, 120, 128, 0.16);
  --fill-2: rgba(120, 120, 128, 0.1);

  --accent: #007aff;
  --accent-strong: #0063d1;
  --accent-tint: rgba(0, 122, 255, 0.12);

  /* 玻璃：从最薄（贴近背景）到最厚（贴近内容）
     说明：只有"底下会滑动/有照片"的表面才值得开 backdrop-filter（工具栏、灯箱、
     卡片角标）；铺在平滑壁纸上的面板用等效的填充色即可，省下的合成层很可观 */
  --glass-1: rgba(255, 255, 255, 0.52);
  --glass-2: rgba(255, 255, 255, 0.68);
  --glass-3: rgba(255, 255, 255, 0.86);
  --glass-card: rgba(255, 255, 255, 0.78);
  --glass-stroke: rgba(255, 255, 255, 0.62);
  --glass-hairline: rgba(9, 9, 14, 0.09);
  --rim-light: rgba(255, 255, 255, 0.8);
  --tint-dark: rgba(9, 9, 14, 0.05);
}

/* 双外观：light-dark() 让每个 token 只写一次，color-scheme 负责翻转 */
@supports (color: light-dark(#000, #fff)) {
  :root {
    color-scheme: light dark;

    --label: light-dark(rgba(0, 0, 0, 0.88), rgba(255, 255, 255, 0.95));
    --label-2: light-dark(rgba(60, 60, 67, 0.62), rgba(235, 235, 245, 0.62));
    --label-3: light-dark(rgba(60, 60, 67, 0.36), rgba(235, 235, 245, 0.34));
    --separator: light-dark(rgba(60, 60, 67, 0.18), rgba(235, 235, 245, 0.16));

    --canvas: light-dark(#eaeef5, #0c0c11);
    --surface: light-dark(#ffffff, #1c1c1e);
    --surface-2: light-dark(#f6f7fb, #232326);
    --surface-solid: light-dark(#ffffff, #1c1c1e);
    --surface-inset: light-dark(rgba(120, 120, 128, 0.12), rgba(120, 120, 128, 0.24));
    --fill-1: light-dark(rgba(120, 120, 128, 0.16), rgba(120, 120, 128, 0.3));
    --fill-2: light-dark(rgba(120, 120, 128, 0.1), rgba(120, 120, 128, 0.18));

    --accent: light-dark(#007aff, #0a84ff);
    --accent-strong: light-dark(#0063d1, #409cff);
    --accent-tint: light-dark(rgba(0, 122, 255, 0.12), rgba(10, 132, 255, 0.2));

    --glass-1: light-dark(rgba(255, 255, 255, 0.52), rgba(30, 30, 34, 0.5));
    --glass-2: light-dark(rgba(255, 255, 255, 0.68), rgba(28, 28, 32, 0.64));
    --glass-3: light-dark(rgba(255, 255, 255, 0.86), rgba(24, 24, 28, 0.82));
    --glass-card: light-dark(rgba(255, 255, 255, 0.78), rgba(32, 32, 36, 0.74));
    --glass-stroke: light-dark(rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0.12));
    --glass-hairline: light-dark(rgba(9, 9, 14, 0.09), rgba(255, 255, 255, 0.09));
    --rim-light: light-dark(rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.18));
    --tint-dark: light-dark(rgba(9, 9, 14, 0.05), rgba(0, 0, 0, 0.24));

    --shadow-1: 0 1px 2px light-dark(rgba(9, 9, 14, 0.06), rgba(0, 0, 0, 0.4)),
      0 1px 6px light-dark(rgba(9, 9, 14, 0.05), rgba(0, 0, 0, 0.3));
    --shadow-2: 0 8px 22px -8px light-dark(rgba(9, 9, 14, 0.2), rgba(0, 0, 0, 0.55)),
      0 1px 3px light-dark(rgba(9, 9, 14, 0.08), rgba(0, 0, 0, 0.4));
    --shadow-3: 0 30px 64px -24px light-dark(rgba(9, 9, 14, 0.42), rgba(0, 0, 0, 0.72)),
      0 12px 26px -16px light-dark(rgba(9, 9, 14, 0.26), rgba(0, 0, 0, 0.5)),
      0 1px 2px light-dark(rgba(9, 9, 14, 0.12), rgba(0, 0, 0, 0.5));
    --shadow-glow: 0 12px 30px -12px light-dark(rgba(0, 122, 255, 0.5), rgba(10, 132, 255, 0.45));
  }
}

/* 显式选择优先于系统偏好（两条 :root[data-theme] 的特异性高于上面的 :root） */
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }

/* macOS 26 的连续曲率圆角：支持的浏览器自动获得方圆形转角 */
@supports (corner-shape: squircle) {
  :root {
    --r-window: 30px;
    --r-panel: 26px;
    --r-card: 18px;
    --r-control: 12px;
  }
  .hero-window,
  .hero-download,
  .feature-list,
  .faq,
  .rail-item,
  .case-card,
  .segmented,
  .btn,
  .nav-inner,
  .appearance,
  .window-chip,
  .lightbox-media,
  .contact img {
    corner-shape: squircle;
  }
}

/* ==========================================================================
   L3 基础重置与排版
   ========================================================================== */

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--nav-h) + 28px);
  /* 预留滚动条槽位：切换排序、翻页、开灯箱时页面不会左右抖一下 */
  scrollbar-gutter: stable;
  background-color: var(--canvas);
}

body {
  margin: 0;
  background: transparent;
  color: var(--label);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.5;
  letter-spacing: -0.012em;
  font-optical-sizing: auto;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img, video { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
/* 触屏上消掉点击延迟，交互跟手才叫流畅 */
a, button, summary, label { touch-action: manipulation; }
[hidden] { display: none !important; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  letter-spacing: -0.028em;
  line-height: 1.08;
  text-wrap: balance;
}
p { text-wrap: pretty; }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 10px;
}

.skip-link {
  position: absolute; left: -9999px; top: 12px; z-index: 200;
  background: var(--surface); color: var(--label);
  padding: 10px 16px; border-radius: var(--r-control);
  box-shadow: var(--shadow-2), inset 0 0 0 var(--hairline) var(--glass-hairline);
}
.skip-link:focus { left: 16px; }

.shell { width: 100%; max-width: var(--shell); margin: 0 auto; padding: 0 24px; }

/* ---------- 桌面壁纸：玻璃材质的折射来源 ---------- */

.wallpaper {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-color: var(--canvas);
  /* 单一主色 + 中性底：只留顶部一束冷蓝当"打光"，右下角一点极淡的青做呼应。
     之前那四团蓝/紫/粉 pastel 光晕是最典型的"AI 生成落地页"签名，已去掉。 */
  background-image:
    radial-gradient(120% 64% at 50% -20%, rgba(0, 122, 255, 0.16), transparent 70%),
    radial-gradient(64% 46% at 102% 104%, rgba(48, 176, 199, 0.1), transparent 72%),
    linear-gradient(180deg, #f8f9fc 0%, #eef0f5 48%, #e9ecf2 100%);
}
/* 极细颗粒：避免大面积渐变出现色带，同时给玻璃一点"质感" */
.wallpaper::after {
  content: ""; position: absolute; inset: 0;
  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='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.42'/%3E%3C/svg%3E");
  opacity: 0.16; mix-blend-mode: overlay;
}

@supports (color: light-dark(#000, #fff)) {
  .wallpaper {
    background-image:
      radial-gradient(120% 64% at 50% -20%, light-dark(rgba(0, 122, 255, 0.16), rgba(10, 132, 255, 0.24)), transparent 70%),
      radial-gradient(64% 46% at 102% 104%, light-dark(rgba(48, 176, 199, 0.1), rgba(64, 200, 224, 0.12)), transparent 72%),
      linear-gradient(180deg, light-dark(#f8f9fc, #131319) 0%, light-dark(#eef0f5, #0d0d12) 48%, light-dark(#e9ecf2, #0b0b10) 100%);
  }
}

/* ==========================================================================
   L3 菜单栏 / 工具栏（悬浮玻璃岛）
   ========================================================================== */

.globalnav {
  position: sticky; top: 0; z-index: 60;
  padding: 10px 0;
  background: transparent;
}
/* 渐进模糊：胶囊是悬浮的，内容会从上下两侧滑过；顶部做一层渐隐的模糊，
   避免划过时露出半截按钮（macOS 工具栏的同款处理） */
.globalnav::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  pointer-events: none;
  backdrop-filter: blur(12px) saturate(150%);
  -webkit-backdrop-filter: blur(12px) saturate(150%);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 58%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 0%, #000 58%, transparent 100%);
}

.nav-inner {
  position: relative; z-index: 1;
  max-width: var(--shell); margin: 0 auto;
  height: 52px; padding: 0 8px 0 14px;
  display: flex; align-items: center; gap: 18px;
  border-radius: var(--r-pill);
  background: var(--glass-1);
  backdrop-filter: blur(var(--blur-nav)) saturate(var(--sat));
  -webkit-backdrop-filter: blur(var(--blur-nav)) saturate(var(--sat));
  box-shadow:
    0 1px 2px var(--tint-dark),
    0 10px 30px -18px rgba(9, 9, 14, 0.34),
    inset 0 0 0 var(--hairline) var(--glass-stroke),
    inset 0 1px 0 var(--rim-light);
  transition:
    background var(--dur-2) var(--ease-io),
    box-shadow var(--dur-2) var(--ease-io);
}
/* 滚动后材质变厚（macOS 工具栏在内容滑过时会加深） */
body.scrolled .nav-inner {
  background: var(--glass-2);
  box-shadow:
    0 1px 2px var(--tint-dark),
    0 16px 40px -20px rgba(9, 9, 14, 0.42),
    inset 0 0 0 var(--hairline) var(--glass-stroke),
    inset 0 1px 0 var(--rim-light);
}

.brand {
  display: inline-flex; align-items: center; gap: 9px;
  color: var(--label); font-weight: 600; font-size: 15px; letter-spacing: -0.015em;
  white-space: nowrap;
}
.brand:hover { text-decoration: none; }
/* 品牌标记：macOS 应用图标式的方圆形渐变块 + 顶部高光 */
.brand-mark {
  position: relative;
  width: 24px; height: 24px; border-radius: 7px; flex: none;
  background: linear-gradient(150deg, var(--sys-blue) 0%, var(--sys-indigo) 100%);
  box-shadow:
    0 2px 8px rgba(0, 90, 220, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    inset 0 0 0 var(--hairline) rgba(255, 255, 255, 0.24);
  transition: transform var(--dur-3) var(--ease-spring-soft);
}
.brand-mark::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.42), transparent 52%);
  border-radius: inherit;
  mix-blend-mode: soft-light;
}
.brand:hover .brand-mark { transform: rotate(-10deg) scale(1.06); }

/* 导航项做成工具栏胶囊：hover / 当前项用填充块，而不是下划线 */
.nav-links { display: flex; gap: 2px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  display: inline-block; padding: 5px 11px; border-radius: var(--r-inset);
  color: var(--label-2); font-size: 13.5px; font-weight: 500; letter-spacing: -0.008em;
  transition:
    background var(--dur-1) var(--ease-io),
    color var(--dur-1) var(--ease-io);
}
.nav-links a:hover {
  background: var(--fill-2); color: var(--label); text-decoration: none;
}
.nav-links a[aria-current="page"] {
  background: var(--fill-1); color: var(--label); font-weight: 600;
}

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

/* 外观切换：三格分段控件（跟随系统 / 浅色 / 深色） */
.appearance {
  display: inline-flex; gap: 1px; padding: 2px;
  border-radius: var(--r-pill);
  background: var(--surface-inset);
  box-shadow: inset 0 0 0 var(--hairline) var(--glass-hairline);
}
.appearance-btn {
  display: inline-grid; place-items: center;
  width: 28px; height: 24px; padding: 0; border: 0; cursor: pointer;
  border-radius: var(--r-pill);
  background: transparent; color: var(--label-2);
  transition:
    background var(--dur-1) var(--ease-io),
    color var(--dur-1) var(--ease-io),
    box-shadow var(--dur-1) var(--ease-io);
}
.appearance-btn:hover { color: var(--label); }
.appearance-btn[aria-pressed="true"] {
  background: var(--surface); color: var(--label);
  box-shadow: var(--shadow-1), inset 0 0 0 var(--hairline) var(--glass-hairline);
}

.nav-cta {
  display: inline-flex; align-items: center;
  font-size: 13px; font-weight: 500; color: #fff;
  background: var(--accent);
  padding: 6px 15px; border-radius: var(--r-pill); white-space: nowrap;
  box-shadow:
    var(--shadow-glow),
    inset 0 1px 0 rgba(255, 255, 255, 0.34),
    inset 0 0 0 var(--hairline) rgba(255, 255, 255, 0.18);
  transition:
    transform var(--dur-2) var(--ease-spring-soft),
    filter var(--dur-1) var(--ease-io);
}
.nav-cta:hover { text-decoration: none; transform: translateY(-1px); filter: brightness(1.08); }
.nav-cta:active { transform: scale(0.97); }

/* ==========================================================================
   L3 按钮与链接
   ========================================================================== */

.btn {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; cursor: pointer; text-decoration: none;
  padding: 12px 26px; border-radius: var(--r-pill);
  font-size: 15.5px; font-weight: 500; letter-spacing: -0.012em;
  transition:
    transform var(--dur-2) var(--ease-spring-soft),
    box-shadow var(--dur-2) var(--ease-out),
    background var(--dur-1) var(--ease-io),
    filter var(--dur-1) var(--ease-io);
}
/* 主按钮：系统蓝填充 + 顶部高光（macOS 默认按钮） */
.btn-primary {
  background: var(--accent); color: #fff;
  box-shadow:
    var(--shadow-glow),
    inset 0 1px 0 rgba(255, 255, 255, 0.34),
    inset 0 0 0 var(--hairline) rgba(255, 255, 255, 0.2);
}
.btn-primary:hover {
  background: var(--accent); color: #fff; text-decoration: none;
  filter: brightness(1.07); transform: translateY(-1.5px);
}
.btn-primary:active { transform: scale(0.975); background: var(--accent-strong); filter: brightness(0.96); }
/* 掠过式高光：只在 hover 时跑一次 */
.btn-primary::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 45%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.32), transparent);
  transform: translateX(-220%) skewX(-18deg);
}
.btn-primary:hover::after { animation: sweep 0.85s var(--ease-out); }
@keyframes sweep { to { transform: translateX(320%) skewX(-18deg); } }

/* 次按钮：玻璃胶囊（macOS 的有边框按钮） */
.btn-ghost {
  background: var(--glass-2); color: var(--label);
  box-shadow: inset 0 0 0 var(--hairline) var(--glass-hairline), inset 0 1px 0 var(--rim-light);
}
.btn-ghost:hover {
  background: var(--glass-3); text-decoration: none; transform: translateY(-1.5px);
}
.btn-ghost:active { transform: scale(0.975); }

.link-arrow {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 15.5px; font-weight: 500; color: var(--accent);
}
.link-arrow::after {
  content: "›"; font-size: 1.25em; line-height: 1;
  transition: transform var(--dur-2) var(--ease-out);
}
.link-arrow:hover { text-decoration: none; }
.link-arrow:hover::after { transform: translateX(5px); }
.link-arrow.light { color: #64b5ff; }

/* ==========================================================================
   L3 窗口（统一标题栏 + 侧边栏 vibrancy + 内容区）
   ========================================================================== */

.hero-window {
  position: relative;
  max-width: 1040px; margin: 0 auto;
  border-radius: var(--r-window);
  /* 窗口本身不叠 backdrop-filter：它几乎被标题栏/侧边栏/内容盖满，
     毛玻璃看不出来，却要在整段视差里反复重算采样 */
  background: var(--glass-2);
  box-shadow:
    var(--shadow-3),
    inset 0 0 0 var(--hairline) var(--glass-stroke),
    inset 0 1px 0 var(--rim-light);
  overflow: hidden;
  will-change: transform;
}

.window-bar {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  gap: 12px; height: 44px; padding: 0 14px;
  background: var(--glass-1);
  border-bottom: var(--hairline) solid var(--separator);
}
.traffic { display: flex; gap: 8px; }
.traffic .dot {
  width: 12px; height: 12px; border-radius: 50%;
  background: #ff5f57;
  box-shadow: inset 0 0 0 var(--hairline) rgba(0, 0, 0, 0.14), 0 1px 1px rgba(0, 0, 0, 0.06);
}
.traffic .dot:nth-child(2) { background: #febc2e; }
.traffic .dot:nth-child(3) { background: #28c840; }
.window-title {
  font-size: 12.5px; font-weight: 600; letter-spacing: -0.008em;
  color: var(--label-2);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.window-tools { display: flex; justify-content: flex-end; }
.window-chip {
  font-size: 11px; font-weight: 500; padding: 3px 9px;
  border-radius: var(--r-pill);
  background: var(--fill-2); color: var(--label-2);
  box-shadow: inset 0 0 0 var(--hairline) var(--glass-hairline);
}

.window-shell {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 168px minmax(0, 1fr);
  align-items: stretch;
}
.window-sidebar {
  display: grid; align-content: start; gap: 1px;
  padding: 12px 10px;
  background: var(--fill-2);
  border-right: var(--hairline) solid var(--separator);
}
.sidebar-group {
  margin: 4px 8px 6px;
  font-size: 10.5px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--label-3);
}
.sidebar-item {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 9px; border-radius: var(--r-inset);
  font-size: 12.5px; font-weight: 500; color: var(--label-2);
}
.sidebar-item svg { flex: none; opacity: 0.72; }
.sidebar-item.is-current {
  background: var(--accent); color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22);
}
.sidebar-item.is-current svg { opacity: 1; }

/* 内容区：比例跟着媒体走，竖屏也不会被裁 */
.window-body {
  position: relative; overflow: hidden;
  min-width: 0;
  width: 100%;
  aspect-ratio: var(--media-ar, 16 / 10);
  max-height: 560px;
  /* 留白用中性材质而不是纯黑：浅色外观下两块黑 bar 会非常突兀 */
  background: var(--surface-2);
}
.window-body img, .window-body video { width: 100%; height: 100%; object-fit: cover; }
/* 封面比例要等图片解码后才知道，直接跳会让整页往下弹一下：
   让它平滑落位（只在首屏加载和换案例时发生） */
@media (prefers-reduced-motion: no-preference) {
  .window-body { transition: aspect-ratio 0.42s var(--ease-out); }
}
/* 窗口里的铺底层只当"环境光"：提亮、降透明，避免出现两块灰 bar */
.window-body .frame-backdrop {
  filter: blur(46px) saturate(150%);
  opacity: 0.5;
  transform: scale(1.25);
}
.window-body .frame-media { box-shadow: 0 14px 38px -14px rgba(9, 9, 14, 0.42); }
/* 骨架微光，避免加载时出现空白块 */
.window-placeholder {
  position: absolute; inset: 0;
  background: linear-gradient(100deg, var(--surface-inset) 30%, var(--fill-2) 50%, var(--surface-inset) 70%);
  background-size: 220% 100%;
  animation: shimmer 1.6s linear infinite;
}
@keyframes shimmer { to { background-position: -220% 0; } }

/* ---------- 自适应画幅：完整显示媒体，空白用同素材铺底 ---------- */

.frame-ready { position: relative; }
.frame-backdrop {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  filter: blur(30px) saturate(160%) brightness(0.6);
  transform: scale(1.2);
  pointer-events: none;
}
.frame-media {
  position: relative;
  object-fit: contain !important;
  border-radius: 10px;
  box-shadow: 0 16px 44px -14px rgba(0, 0, 0, 0.55);
}
.lightbox-media.frame-ready .frame-media { border-radius: 0; box-shadow: none; }

/* ==========================================================================
   L4 Hero
   ========================================================================== */

.hero {
  position: relative;
  padding: clamp(30px, 5vw, 60px) 0 0;
}
.section, .page-head, .hero { scroll-margin-top: calc(var(--nav-h) + 26px); }

/* 12 列网格：文案 7 列，下载卡 5 列且下沉，做不对称版面 */
.hero-bento {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 24px;
  align-items: start;
}
.hero-copy { grid-column: 1 / 8; padding-top: 12px; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12.5px; font-weight: 500; letter-spacing: -0.005em; color: var(--label-2);
  background: var(--glass-2);
  box-shadow: inset 0 0 0 var(--hairline) var(--glass-stroke), inset 0 1px 0 var(--rim-light);
  padding: 5px 13px; border-radius: var(--r-pill);
  margin: 0 0 22px;
}
/* 呼吸点：用 transform/opacity（合成层）而不是 box-shadow（每帧重绘） */
.eyebrow::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
  animation: pulse 2.6s var(--ease-io) infinite;
}
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.28); opacity: 0.62; }
}

.hero-title {
  /* 上一版是 clamp(40px, 5.6vw, 76px)：那是给"一套账号，"这种六字短句配的尺寸，
     换成"免费生成 AI 视频，"会折成三行，把窗口和规格条全顶到首屏外 */
  font-size: clamp(36px, 4.8vw, 60px);
  font-weight: 700; line-height: 1.06; letter-spacing: -0.034em;
  margin: 0;
}
/* 强调字：实色主色，而不是蓝→紫→粉的四色渐变。
   四色渐变标题是"AI 生成落地页"的第二大签名，去掉后整页立刻像人做的。 */
.accent-text { color: var(--accent); }

.hero-sub {
  font-size: clamp(16px, 1.7vw, 19px); line-height: 1.6; color: var(--label-2);
  margin: 20px 0 0; max-width: 520px;
}
.hero-actions {
  display: flex; gap: 12px 26px; align-items: center;
  margin-top: 30px; flex-wrap: wrap;
}

/* 规格条：把卖点写成可核对的具体项（模型 / 画幅 / 模板 / 成片），
   替掉"强大却简单"这类形容词——官网像不像人写的，主要看这里。
   挂在下载卡里，正好把右栏原本空着的那一大块补上 */
.hero-specs {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 18px;
  margin: 20px 0 0; padding-top: 18px;
  border-top: var(--hairline) solid var(--separator);
}
.hero-specs .spec { display: grid; gap: 3px; min-width: 0; }
.hero-specs dt {
  font-size: 11px; font-weight: 600; letter-spacing: 0.08em;
  color: var(--label-3);
}
.hero-specs dd {
  margin: 0;
  font-size: 14.5px; font-weight: 600; letter-spacing: -0.01em;
  color: var(--label);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* 下载卡：玻璃面板，每行一个平台，按钮靠右 */
.hero-download {
  grid-column: 8 / 13;
  margin-top: 60px;
  padding: 24px 24px 20px;
  border-radius: var(--r-panel);
  background: var(--glass-card);
  box-shadow:
    var(--shadow-3),
    inset 0 0 0 var(--hairline) var(--glass-stroke),
    inset 0 1px 0 var(--rim-light);
}
.card-kicker {
  margin: 0 0 14px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--label-3);
}
.dl-list { display: grid; gap: 2px; }
.dl-row {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 12px 0;
  border-top: var(--hairline) solid var(--separator);
}
.dl-row:first-child { border-top: 0; }
.dl-meta { display: grid; gap: 2px; min-width: 0; }
.dl-os {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 15px; font-weight: 600; color: var(--label); letter-spacing: -0.01em;
}
.dl-os svg { color: var(--label-3); flex: none; }
.dl-row .download-version { font-size: 12.5px; color: var(--label-2); }
.dl-btn { padding: 8px 17px; font-size: 13.5px; }
.dl-note { margin: 14px 0 0; font-size: 12.5px; color: var(--label-2); }

/* 系统匹配到的平台高亮，另一个降级为玻璃按钮 */
.dl-row[data-current] .dl-os { color: var(--accent); }
.dl-row[data-current] .dl-os svg { color: var(--accent); }
.dl-btn.is-secondary {
  background: var(--glass-2); color: var(--label);
  filter: none; box-shadow: inset 0 0 0 var(--hairline) var(--glass-hairline), inset 0 1px 0 var(--rim-light);
}
.dl-btn.is-secondary::after { display: none; }
.dl-btn.is-secondary:hover { background: var(--glass-3); filter: none; transform: none; }

.hero-stage { margin-top: clamp(34px, 4.6vw, 58px); padding: 0 24px; }

/* ==========================================================================
   L4 通用区块
   ========================================================================== */

.section { padding: clamp(72px, 10vw, 116px) 0; }
.section-tight { padding-top: clamp(20px, 3vw, 36px); }
/* 内容带：整幅材质。底下只有平滑壁纸，模糊与不模糊肉眼无差，所以不开 backdrop-filter */
.section-alt {
  background: var(--glass-1);
  border-block: var(--hairline) solid var(--separator);
}
/* 深色整幅：深色材质，仍然是"材质"而不是纯黑 */
.section-dark {
  /* 两团低饱和的冷色光晕：整幅不至于是一块死板的黑板（同样去掉紫色那团） */
  background:
    radial-gradient(64% 120% at 10% 0%, rgba(10, 132, 255, 0.22), transparent 62%),
    radial-gradient(56% 104% at 92% 4%, rgba(64, 200, 224, 0.14), transparent 60%),
    rgba(9, 9, 14, 0.9);
  border-block: var(--hairline) solid rgba(255, 255, 255, 0.1);
  color: #f5f5f7;
  --label: #f5f5f7;
  --label-2: rgba(235, 235, 245, 0.66);
  --label-3: rgba(235, 235, 245, 0.38);
  --separator: rgba(255, 255, 255, 0.14);
  --glass-1: rgba(255, 255, 255, 0.07);
  --glass-2: rgba(255, 255, 255, 0.1);
  --glass-3: rgba(255, 255, 255, 0.16);
  /* 卡片底必须是深色玻璃：漏掉这个 token 会变成"白底白字" */
  --glass-card: rgba(255, 255, 255, 0.08);
  --glass-stroke: rgba(255, 255, 255, 0.16);
  --glass-hairline: rgba(255, 255, 255, 0.12);
  --rim-light: rgba(255, 255, 255, 0.22);
  --surface: #1a1a1f;
  --surface-inset: rgba(255, 255, 255, 0.08);
  --fill-1: rgba(255, 255, 255, 0.12);
  --fill-2: rgba(255, 255, 255, 0.08);
  --accent: #0a84ff;
  --accent-tint: rgba(10, 132, 255, 0.3);
}

.section-head { max-width: 720px; }
.section-head-center { margin: 0 auto; text-align: center; }
.kicker {
  display: inline-flex; align-items: center; gap: 7px;
  margin: 0 0 12px;
  font-size: 12.5px; font-weight: 600; letter-spacing: -0.005em;
  color: var(--accent);
}
.kicker::before {
  content: ""; width: 16px; height: 2px; border-radius: 2px;
  background: currentColor; opacity: 0.85;
}
.section-title {
  font-size: clamp(30px, 4.4vw, 52px); font-weight: 700;
  margin: 0;
}
.section-sub {
  font-size: clamp(16px, 1.8vw, 18px); color: var(--label-2);
  margin: 14px 0 0; max-width: 560px; line-height: 1.6;
}
.muted { color: var(--label-2); }
.center { text-align: center; margin-top: 52px; }

/* ---------- 左右分栏 ---------- */

.split {
  display: grid;
  grid-template-columns: minmax(260px, 0.82fr) minmax(0, 1.5fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}
.split-aside { position: sticky; top: calc(var(--nav-h) + 44px); }
.split-aside .section-sub { max-width: 380px; }
/* 分栏左侧只有 ~350px 宽，正文标题那档字号会折成三四行并在词中间断开，
   这里单独收小一档；配合 HTML 里显式的 <br> 保证断行位置干净 */
.split-aside .section-title { font-size: clamp(27px, 3.2vw, 40px); }

/* ---------- 能力清单：玻璃分组面板里的图标行（对照系统设置） ---------- */

.feature-list {
  list-style: none; margin: 0; padding: 6px 6px;
  border-radius: var(--r-panel);
  background: var(--glass-card);
  box-shadow:
    var(--shadow-2),
    inset 0 0 0 var(--hairline) var(--glass-stroke),
    inset 0 1px 0 var(--rim-light);
  contain: layout paint;
  counter-reset: feature;
}
.feature-item {
  display: grid;
  grid-template-columns: 34px 38px minmax(0, 1fr);
  gap: 14px; align-items: start;
  padding: 18px 14px;
  border-radius: var(--r-card);
  transition: background var(--dur-2) var(--ease-io);
}
.feature-item:hover { background: var(--fill-2); }
.feature-index {
  font-size: 12px; font-weight: 600; letter-spacing: 0.06em;
  font-family: var(--mono); font-variant-numeric: tabular-nums;
  color: var(--label-3);
  padding-top: 10px;
  transition: color var(--dur-2) var(--ease-io);
}
.feature-index::before { counter-increment: feature; content: counter(feature, decimal-leading-zero); }
.feature-item:hover .feature-index { color: var(--accent); }
/* 图标块：macOS 应用图标式的渐变方圆形 */
.feature-icon {
  display: grid; place-items: center;
  width: 38px; height: 38px; border-radius: 11px;
  color: #fff;
  background: linear-gradient(160deg, var(--sys-blue), var(--sys-indigo));
  box-shadow:
    0 3px 10px -2px rgba(0, 80, 200, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.45),
    inset 0 0 0 var(--hairline) rgba(255, 255, 255, 0.2);
}
/* 四个图标收敛到冷色系（蓝 / 靛 / 青），不再出现紫红渐变 */
.feature-item:nth-child(2) .feature-icon { background: linear-gradient(160deg, var(--sys-teal), var(--sys-blue)); }
.feature-item:nth-child(3) .feature-icon { background: linear-gradient(160deg, var(--sys-indigo), var(--sys-blue)); }
.feature-item:nth-child(4) .feature-icon { background: linear-gradient(160deg, var(--sys-teal), var(--sys-indigo)); }
.feature-body h3 { font-size: 19px; font-weight: 600; margin: 0 0 6px; }
.feature-body p { margin: 0; color: var(--label-2); font-size: 15px; line-height: 1.6; max-width: 52ch; }

/* ---------- 流程：横向轨道 + 玻璃节点 ---------- */

.steps-rail {
  list-style: none; margin: clamp(44px, 5.6vw, 64px) 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  counter-reset: rail;
}
.rail-item {
  position: relative; padding: 24px 22px 24px;
  border-radius: var(--r-panel);
  background: var(--glass-card);
  box-shadow:
    var(--shadow-2),
    inset 0 0 0 var(--hairline) var(--glass-stroke),
    inset 0 1px 0 var(--rim-light);
  contain: layout paint;
}
/* 节点：玻璃圆钮，与整行上方的轨道对齐 */
.rail-node {
  position: absolute; top: 0; left: 22px;
  transform: translateY(-50%);
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--surface); color: var(--accent);
  box-shadow: inset 0 0 0 var(--hairline) var(--glass-stroke), var(--shadow-2), inset 0 1px 0 var(--rim-light);
  font-family: var(--mono);
  font-size: 11.5px; font-weight: 700;
  transition:
    background var(--dur-2) var(--ease-io),
    color var(--dur-2) var(--ease-io),
    transform var(--dur-3) var(--ease-spring-soft);
}
.rail-item:hover .rail-node {
  background: var(--accent); color: #fff;
  transform: translateY(-50%) scale(1.08);
}
/* 轨道线：连接三块玻璃面板 */
.rail-item:not(:last-child)::after {
  content: ""; position: absolute; top: -10px; left: 100%; right: -20px; height: 20px;
  background: linear-gradient(90deg, var(--accent-tint), transparent);
  opacity: 0.7;
  pointer-events: none;
}
.rail-item h3 { font-size: 19px; font-weight: 600; margin: 14px 0 6px; }
.rail-item p { margin: 0; color: var(--label-2); font-size: 15px; line-height: 1.6; max-width: 34ch; }

/* 通用滚动入场：.reveal → .is-visible
   只动 opacity / transform，全部落在合成层上；不加 blur（大面积滤镜过渡是滚动掉帧的主因） */
.reveal {
  opacity: 0;
  transform: translate3d(0, 16px, 0);
  transition:
    opacity 0.65s var(--ease-out),
    transform 0.65s var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
}
.reveal.is-visible { opacity: 1; transform: none; }

.reveal-title {
  opacity: 0; transform: translate3d(0, 0.4em, 0);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}
.reveal-title.is-visible { opacity: 1; transform: none; }

/* ==========================================================================
   L4 案例网格与卡片（Photos 式玻璃卡）
   ========================================================================== */

.case-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 20px; margin-top: clamp(36px, 4.6vw, 52px);
}
.case-card {
  position: relative;
  display: block; width: 100%; padding: 0; border: 0; text-align: left; cursor: pointer;
  color: inherit;
  border-radius: var(--r-card);
  overflow: hidden;
  background: var(--glass-card);
  box-shadow:
    var(--shadow-2),
    inset 0 0 0 var(--hairline) var(--glass-stroke),
    inset 0 1px 0 var(--rim-light);
  /* 把卡片隔离成独立的布局/绘制单元：12 张卡的悬浮与缩放不会互相触发重排 */
  contain: layout paint;
  transition:
    transform 0.34s var(--ease-out),
    box-shadow 0.34s var(--ease-out);
}
.case-card:hover {
  transform: translateY(-5px);
  box-shadow:
    var(--shadow-3),
    inset 0 0 0 var(--hairline) var(--glass-stroke),
    inset 0 1px 0 var(--rim-light);
}
.case-card:active { transform: translateY(-2px) scale(0.99); }

.case-thumb {
  position: relative; aspect-ratio: 3 / 4; overflow: hidden;
  background: var(--surface-inset);
  border-bottom: var(--hairline) solid var(--separator);
}
.case-thumb img, .case-thumb video {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.5s var(--ease-out);
}
.case-card:hover .case-thumb img, .case-card:hover .case-thumb video { transform: scale(1.05); }
.case-thumb video { position: absolute; inset: 0; opacity: 0; transition: opacity var(--dur-2) var(--ease-io); }
.case-card.playing .case-thumb video { opacity: 1; }

/* 悬停时的播放圆钮（玻璃圆 + 三角），仿 Photos 的快速预览 */
.case-thumb::after {
  content: ""; position: absolute; left: 50%; top: 50%; z-index: 1;
  width: 52px; height: 52px; margin: -26px 0 0 -26px;
  border-radius: 50%;
  background: var(--glass-3);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  box-shadow: inset 0 0 0 var(--hairline) var(--glass-stroke), var(--shadow-2), inset 0 1px 0 var(--rim-light);
  opacity: 0; transform: scale(0.86);
  transition: opacity var(--dur-2) var(--ease-io), transform var(--dur-3) var(--ease-spring-soft);
}
.case-thumb::before {
  content: ""; position: absolute; left: 50%; top: 50%; z-index: 2;
  margin: -7px 0 0 -4px;
  border-left: 12px solid var(--label);
  border-top: 7.5px solid transparent;
  border-bottom: 7.5px solid transparent;
  opacity: 0; transform: scale(0.86);
  transition: opacity var(--dur-2) var(--ease-io), transform var(--dur-3) var(--ease-spring-soft);
}
.case-card:hover .case-thumb::after,
.case-card:hover .case-thumb::before { opacity: 1; transform: scale(1); }

.case-badge {
  position: absolute; top: 10px; right: 10px; z-index: 3;
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--glass-3); color: var(--label);
  font-size: 11px; font-weight: 600; letter-spacing: -0.005em;
  padding: 3px 9px; border-radius: var(--r-pill);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  box-shadow: inset 0 0 0 var(--hairline) var(--glass-stroke), var(--shadow-1);
}
/* 视频角标里的播放三角 */
.case-badge::before {
  content: ""; width: 0; height: 0;
  border-left: 5px solid currentColor; border-top: 3.5px solid transparent; border-bottom: 3.5px solid transparent;
}

.case-info {
  padding: 12px 14px 14px;
  display: flex; justify-content: space-between; gap: 12px; align-items: baseline;
}
.case-title {
  font-size: 14px; font-weight: 600; margin: 0; letter-spacing: -0.012em;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.case-views { font-size: 11.5px; color: var(--label-2); white-space: nowrap; font-variant-numeric: tabular-nums; }

.empty-state { text-align: center; color: var(--label-2); margin: 56px 0; }

/* ---------- 分页 ---------- */

.pager { display: flex; justify-content: center; align-items: center; gap: 4px; margin-top: 48px; flex-wrap: wrap; }
.pager button, .pager a {
  display: inline-grid; place-items: center;
  min-width: 36px; height: 36px; padding: 0 11px; border: 0; border-radius: var(--r-pill);
  background: transparent; color: var(--label); cursor: pointer; font-size: 14px;
  text-decoration: none;
  transition:
    background var(--dur-1) var(--ease-io),
    transform var(--dur-2) var(--ease-spring-soft),
    color var(--dur-1) var(--ease-io),
    box-shadow var(--dur-2) var(--ease-out);
}
.pager button:hover:not(:disabled):not([aria-current="page"]),
.pager a:hover:not([aria-current="page"]) {
  background: var(--glass-2); text-decoration: none; transform: translateY(-1px);
  box-shadow: inset 0 0 0 var(--hairline) var(--glass-stroke), var(--shadow-1);
}
.pager button[aria-current="page"], .pager a[aria-current="page"] {
  background: var(--accent); color: #fff; font-weight: 600; cursor: default;
  box-shadow: var(--shadow-glow), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.pager button:disabled { color: var(--label-3); cursor: default; }
.pager .gap { color: var(--label-3); padding: 0 4px; }

/* ---------- 分段控件（NSSegmentedControl：胶囊 + 滑动玻璃滑块） ---------- */

.segmented {
  position: relative;
  display: inline-flex; gap: 2px;
  margin-top: 28px; padding: 3px;
  border-radius: var(--r-pill);
  background: var(--surface-inset);
  box-shadow: inset 0 0 0 var(--hairline) var(--glass-hairline);
}
/* 滑块：位置由 :has() 跟着 aria-selected 走 */
.segmented::before {
  content: ""; position: absolute; top: 3px; bottom: 3px; left: 3px;
  width: calc((100% - 6px) / 3);
  border-radius: var(--r-pill);
  background: var(--surface);
  box-shadow: var(--shadow-1), inset 0 0 0 var(--hairline) var(--glass-hairline), inset 0 1px 0 var(--rim-light);
  transition: transform var(--dur-2) var(--ease-spring-soft);
}
.segmented:has(button:nth-child(2)[aria-selected="true"])::before { transform: translateX(100%); }
.segmented:has(button:nth-child(3)[aria-selected="true"])::before { transform: translateX(200%); }
.segmented button {
  position: relative; z-index: 1;
  border: 0; background: transparent; color: var(--label-2);
  padding: 6px 22px; border-radius: var(--r-pill);
  font-size: 13.5px; font-weight: 500; cursor: pointer;
  transition: color var(--dur-1) var(--ease-io);
}
.segmented button:hover { color: var(--label); }
.segmented button[aria-selected="true"] { color: var(--label); font-weight: 600; }
/* 不支持 :has() 时退回"选中项自己带底色" */
@supports not selector(:has(*)) {
  .segmented button[aria-selected="true"] {
    background: var(--surface);
    box-shadow: var(--shadow-1), inset 0 0 0 var(--hairline) var(--glass-hairline);
  }
  .segmented::before { display: none; }
}

/* ---------- 常见问题：玻璃分组列表 + 折叠箭头 ---------- */

.faq {
  border-radius: var(--r-panel);
  background: var(--glass-card);
  box-shadow:
    var(--shadow-2),
    inset 0 0 0 var(--hairline) var(--glass-stroke),
    inset 0 1px 0 var(--rim-light);
  padding: 4px 18px;
  overflow: hidden;
  contain: layout paint;
}
.faq details { border-top: var(--hairline) solid var(--separator); }
.faq details:first-child { border-top: 0; }
.faq summary {
  cursor: pointer; list-style: none; padding: 18px 34px 18px 0; position: relative;
  font-size: 16.5px; font-weight: 500; color: var(--label);
  letter-spacing: -0.012em;
  transition: color var(--dur-1) var(--ease-io);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--accent); }
/* macOS 折叠箭头：向下 → 向上 */
.faq summary::after {
  content: ""; position: absolute; right: 14px; top: 50%;
  width: 7px; height: 7px;
  border-right: 1.6px solid var(--label-3);
  border-bottom: 1.6px solid var(--label-3);
  transform: translateY(-70%) rotate(45deg);
  transition: transform var(--dur-2) var(--ease-out);
}
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq .faq-body { padding: 0 34px 20px 0; color: var(--label-2); font-size: 15px; line-height: 1.68; }
.faq .faq-body p { margin: 0 0 10px; }
.faq .faq-body p:last-child { margin-bottom: 0; }

/* ---------- 深色展示条：无 JS 时是可滑动的卡片排，有 JS 时切成 3D 轮播 ---------- */

.showcase-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 24px; flex-wrap: wrap;
}
.showcase-head .section-title { max-width: 16ch; }
/* 标题右侧：序号 + 进入案例库的入口 + 轮播按钮 */
.showcase-tools { display: flex; align-items: center; gap: 16px; }
.shelf-index {
  display: none; margin: 0;
  font-size: 12.5px; color: var(--label-2);
  font-variant-numeric: tabular-nums;
}
.shelf-nav { display: none; gap: 6px; }
.shelf-btn {
  display: inline-grid; place-items: center;
  width: 32px; height: 32px; padding: 0 0 2px; border: 0; cursor: pointer;
  border-radius: 50%;
  background: var(--glass-2); color: var(--label);
  font-size: 19px; line-height: 1;
  box-shadow: inset 0 0 0 var(--hairline) var(--glass-stroke), inset 0 1px 0 var(--rim-light);
  transition:
    background var(--dur-1) var(--ease-io),
    transform var(--dur-2) var(--ease-spring-soft);
}
.shelf-btn:hover { background: var(--glass-3); transform: scale(1.06); }
.shelf-btn:active { transform: scale(0.94); }
/* 暂停 / 播放共用一个按钮，靠 aria-pressed 切图标 */
.shelf-toggle { padding: 0; }
.shelf-toggle svg { display: block; }
.shelf-toggle .icon-play,
.shelf-toggle[aria-pressed="true"] .icon-pause { display: none; }
.shelf-toggle[aria-pressed="true"] .icon-play { display: block; }
.shelf-toggle[aria-pressed="true"] { color: var(--label-2); }

.showcase-strip {
  margin-top: clamp(30px, 3.6vw, 44px);
  padding-inline: max(24px, calc((100% - var(--shell)) / 2 + 24px));
  scroll-padding-left: max(24px, calc((100% - var(--shell)) / 2 + 24px));
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  /* 不管哪种形态都不显示滚动轴 */
  scrollbar-width: none;
}
.showcase-strip::-webkit-scrollbar { display: none; width: 0; height: 0; }
.case-strip {
  display: flex; gap: 16px;
  margin: 0; padding: 8px 0 20px;
}
.case-strip .case-card {
  flex: 0 0 clamp(180px, 22vw, 232px);
  scroll-snap-align: start;
}
/* 深色货架上的卡片：悬浮给一点冷色描边和辉光，纯黑底上才看得出层次 */
.section-dark .case-card:hover {
  box-shadow:
    0 20px 44px -20px rgba(0, 0, 0, 0.85),
    0 0 0 var(--hairline) rgba(96, 165, 250, 0.5),
    0 0 26px -6px rgba(10, 132, 255, 0.45),
    inset 0 1px 0 var(--rim-light);
}

/* ---------- 3D 卡片轮播（site.js 打上 data-carousel 后生效） ---------- */

#showcase[data-carousel="1"] .shelf-index { display: block; }
#showcase[data-carousel="1"] .shelf-nav { display: inline-flex; }

#showcase[data-carousel="1"] .showcase-strip {
  overflow: hidden;
  padding-inline: 0;
  scroll-padding-left: 0;
  scroll-snap-type: none;
  perspective: 1700px;
  perspective-origin: 50% 44%;
  /* 两侧渐隐：卡片在边缘"化开"，而不是被硬切 */
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  /* 横向拖拽交给轮播处理，纵向仍然正常滚页面 */
  touch-action: pan-y;
  /* 封面不要走浏览器的原生图片拖拽 */
  -webkit-user-drag: none;
}
#showcase[data-carousel="1"] .case-strip {
  display: block; position: relative;
  height: var(--shelf-h, 420px);
  padding: 0;
  transform-style: preserve-3d;
}
#showcase[data-carousel="1"] .case-card {
  position: absolute; top: 50%; left: 50%;
  width: clamp(206px, 17vw, 268px);
  margin-left: calc(clamp(206px, 17vw, 268px) / -2);
  flex: none;
  transform-style: preserve-3d;
  backface-visibility: hidden;
  will-change: transform, opacity;
  /* 位置全部由这几个变量（JS 写入）驱动，拖拽时只改容器上的 --shelf-drag */
  transform:
    translate3d(calc(var(--x, 0px) + var(--shelf-drag, 0px)), -50%, var(--z, 0px))
    rotateY(var(--ry, 0deg))
    scale(var(--s, 1));
  opacity: var(--o, 1);
  transition:
    transform 0.52s var(--ease-out),
    opacity 0.52s var(--ease-out),
    box-shadow 0.4s var(--ease-out);
}
#showcase[data-carousel="1"] .case-card.is-active {
  box-shadow:
    0 34px 60px -26px rgba(0, 0, 0, 0.85),
    0 0 0 var(--hairline) rgba(255, 255, 255, 0.24),
    inset 0 1px 0 var(--rim-light);
}
/* 拖拽跟手期间不要过渡，否则会"追手指" */
#showcase[data-carousel="1"] .showcase-strip[data-dragging] .case-card {
  transition: none;
}
#showcase[data-carousel="1"] .case-card:not(.is-active) .case-thumb::before,
#showcase[data-carousel="1"] .case-card:not(.is-active) .case-thumb::after { display: none; }
/* Cover Flow 式的地面倒影：只有 Blink / WebKit 支持，其他浏览器就当没有 */
@supports (-webkit-box-reflect: below) {
  #showcase[data-carousel="1"] .case-card {
    -webkit-box-reflect: below 10px linear-gradient(transparent 58%, rgba(255, 255, 255, 0.12));
  }
}

.contact { text-align: center; margin-top: 52px; color: var(--label-2); font-size: 15px; }
.contact img {
  margin: 16px auto 0; border-radius: var(--r-card);
  background: #fff; padding: 6px;
  box-shadow: var(--shadow-2), inset 0 0 0 var(--hairline) var(--glass-hairline);
}

/* ---------- 页头（内页） ---------- */

.page-head {
  text-align: center;
  padding: clamp(46px, 8vw, 88px) 24px clamp(8px, 2vw, 16px);
}
.page-title {
  font-size: clamp(32px, 5.6vw, 60px); margin: 0; font-weight: 700;
  letter-spacing: -0.034em;
}
.page-head .section-sub { margin: 16px auto 0; }
.page-head .kicker { margin-bottom: 14px; }

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

.footer {
  background: var(--glass-1);
  border-top: var(--hairline) solid var(--separator);
  color: var(--label-2); font-size: 13px;
}
.footer-inner {
  max-width: var(--shell); margin: 0 auto; padding: 30px 24px;
  display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap;
}
.footer p { margin: 0; }
.footer nav { display: flex; gap: 20px; flex-wrap: wrap; }
.footer a { color: var(--label-2); transition: color var(--dur-1) var(--ease-io); }
.footer a:hover { color: var(--label); }

/* ---------- Quick Look 式预览浮层 ---------- */

.lightbox {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  background: rgba(6, 6, 10, 0.5);
  backdrop-filter: blur(40px) saturate(150%);
  -webkit-backdrop-filter: blur(40px) saturate(150%);
  padding: 24px;
  animation: fade var(--dur-2) var(--ease-out);
}
.lightbox-panel {
  position: relative; max-width: min(960px, 100%); max-height: 100%;
  display: flex; flex-direction: column;
  animation: pop 0.42s var(--ease-spring-soft);
}
.lightbox-media {
  position: relative;
  display: flex; justify-content: center;
  width: min(960px, calc(100vw - 48px), calc((100vh - 150px) * var(--media-ar, 1.6)));
  aspect-ratio: var(--media-ar, 16 / 10);
  overflow: hidden;
  border-radius: 18px;
  background: #000;
  box-shadow:
    var(--shadow-3),
    inset 0 0 0 var(--hairline) rgba(255, 255, 255, 0.16);
}
.lightbox-media img, .lightbox-media video { width: 100%; height: 100%; object-fit: contain; }
.lightbox-media .frame-backdrop { width: 100%; height: 100%; object-fit: cover; }

/* 控制条：浮在媒体下方的玻璃胶囊 */
.lightbox-meta {
  align-self: center;
  display: flex; align-items: center; gap: 14px;
  margin-top: 14px; padding: 9px 18px;
  border-radius: var(--r-pill);
  background: rgba(28, 28, 32, 0.6);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  box-shadow:
    inset 0 0 0 var(--hairline) rgba(255, 255, 255, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 16px 40px -20px rgba(0, 0, 0, 0.7);
  color: #f5f5f7;
}
.lightbox-meta h3 { margin: 0; font-size: 15px; font-weight: 600; letter-spacing: -0.012em; }
.lightbox-meta span {
  color: rgba(235, 235, 245, 0.6); font-size: 12.5px; white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.lightbox-close {
  position: absolute; top: -14px; right: -14px; z-index: 2;
  width: 34px; height: 34px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255, 255, 255, 0.92); color: #111;
  font-size: 20px; line-height: 1;
  display: grid; place-items: center;
  box-shadow: 0 8px 22px -8px rgba(0, 0, 0, 0.6), inset 0 0 0 var(--hairline) rgba(0, 0, 0, 0.08);
  transition: transform var(--dur-3) var(--ease-spring-soft), background var(--dur-1) var(--ease-io);
}
.lightbox-close:hover { transform: rotate(90deg) scale(1.06); background: #fff; }
/* 退场：和开场对称，别"啪"地消失 */
.lightbox.is-closing { animation: fade-out 0.2s var(--ease-io) both; }
.lightbox.is-closing .lightbox-panel { animation: pop-out 0.2s var(--ease-io) both; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(0.97); } }
@keyframes fade-out { to { opacity: 0; } }
@keyframes pop-out { to { opacity: 0; transform: translateY(8px) scale(0.975); } }

/* ==========================================================================
   L4 案例库：macOS 资料库版式（侧边栏集合 + 工具栏 + 网格/列表双视图）
   ========================================================================== */

.library { padding: clamp(22px, 3.4vw, 40px) 0 clamp(40px, 6vw, 76px); }
.library-shell {
  display: grid;
  grid-template-columns: 208px minmax(0, 1fr);
  gap: clamp(20px, 2.4vw, 32px);
  align-items: start;
}

/* ---------- 侧边栏：集合列表（source list） ---------- */

.library-sidebar {
  position: sticky; top: calc(var(--nav-h) + 32px);
  padding: 12px 10px;
  border-radius: var(--r-panel);
  background: var(--glass-card);
  box-shadow:
    var(--shadow-2),
    inset 0 0 0 var(--hairline) var(--glass-stroke),
    inset 0 1px 0 var(--rim-light);
  contain: layout paint;
}
.library-sidebar .sidebar-group { margin: 6px 8px; }
.library-sort { display: grid; gap: 1px; }
.library-item {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 9px; border-radius: var(--r-inset);
  color: var(--label-2); font-size: 13px; font-weight: 500;
  transition: background var(--dur-1) var(--ease-io), color var(--dur-1) var(--ease-io);
}
.library-item svg { flex: none; opacity: 0.72; }
.library-item:hover { background: var(--fill-2); color: var(--label); text-decoration: none; }
.library-item[aria-current="page"] {
  background: var(--accent); color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22);
}
.library-item[aria-current="page"] svg { opacity: 1; }
.library-item-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.library-count { font-size: 11.5px; font-variant-numeric: tabular-nums; color: var(--label-3); }
.library-item[aria-current="page"] .library-count { color: rgba(255, 255, 255, 0.78); }
.library-note { margin: 2px 8px 6px; font-size: 12px; line-height: 1.6; color: var(--label-3); }

/* ---------- 内容区 ---------- */

.library-content { min-width: 0; }
.library-head { padding-top: 4px; }
.library-head .kicker { margin-bottom: 10px; }
.library-head .page-title { font-size: clamp(28px, 3.6vw, 46px); }
.library-head .section-sub { margin-top: 12px; }
/* 桌面靠侧边栏切换集合，分段控件只在窄屏出现 */
.library-head .segmented { display: none; }

.library-toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  margin: clamp(18px, 2.4vw, 28px) 0 14px; padding: 0 2px;
}
.library-state {
  margin: 0; font-size: 12.5px; color: var(--label-2);
  font-variant-numeric: tabular-nums;
}
.library-state strong { color: var(--label); font-weight: 600; }
.library-dot { color: var(--label-3); margin: 0 3px; }

.view-switch {
  display: inline-flex; gap: 1px; padding: 2px; flex: none;
  border-radius: var(--r-pill);
  background: var(--surface-inset);
  box-shadow: inset 0 0 0 var(--hairline) var(--glass-hairline);
}
.view-btn {
  display: inline-grid; place-items: center;
  width: 30px; height: 25px; padding: 0; border: 0; cursor: pointer;
  border-radius: var(--r-pill);
  background: transparent; color: var(--label-2);
  transition:
    background var(--dur-1) var(--ease-io),
    color var(--dur-1) var(--ease-io),
    box-shadow var(--dur-1) var(--ease-io);
}
.view-btn:hover { color: var(--label); }
.view-btn[aria-pressed="true"] {
  background: var(--surface); color: var(--label);
  box-shadow: var(--shadow-1), inset 0 0 0 var(--hairline) var(--glass-hairline);
}

/* ---------- 网格 / 列表双视图 ---------- */

.library-body {
  --list-cols: 76px minmax(0, 1fr) 84px 104px;
  --list-gap: 16px;
  --grid-min: 188px;
  --grid-gap: 18px;
}
/* 资料库的卡片比首页窄一点：加上侧边栏后同屏仍是 4 列 */
.library-body .case-grid {
  margin-top: 0;
  grid-template-columns: repeat(auto-fill, minmax(var(--grid-min), 1fr));
  gap: var(--grid-gap);
}
.library-content .pager { margin-top: clamp(22px, 3vw, 34px); }
/* 加载中把已有内容压暗，而不是闪一下骨架屏。
   这里不加 opacity 过渡：视图过渡会截取"新状态"快照，瞬时切换才能让交叉淡入接管 */
.library-body[data-loading] .case-grid { opacity: 0.4; }

.case-kind { display: none; }
.case-list-head { display: none; }

/* 切视图时卡片错峰入场：只动 opacity / transform */
.library-body[data-animate] .case-card {
  animation: card-in 0.34s var(--ease-out) both;
  animation-delay: calc(var(--i, 0) * 14ms);
}
@keyframes card-in {
  from { opacity: 0; transform: translate3d(0, 10px, 0); }
}

.library-body[data-view="list"] {
  padding: 6px;
  border-radius: var(--r-panel);
  background: var(--glass-card);
  box-shadow:
    var(--shadow-2),
    inset 0 0 0 var(--hairline) var(--glass-stroke),
    inset 0 1px 0 var(--rim-light);
}
.library-body[data-view="list"] .case-list-head {
  display: grid; grid-template-columns: var(--list-cols); gap: var(--list-gap);
  padding: 0 14px 9px;
  font-size: 11.5px; font-weight: 600; color: var(--label-3);
}
/* 列头跟着内容对齐：浏览量列是右对齐的 */
.library-body[data-view="list"] .case-list-head span:last-child { text-align: right; }
.library-body[data-view="list"] .case-grid { display: block; }
.library-body[data-view="list"] .case-card {
  display: grid; grid-template-columns: var(--list-cols); gap: var(--list-gap);
  align-items: center;
  padding: 9px 14px;
  border-radius: var(--r-card);
  background: transparent; box-shadow: none; transform: none;
}
.library-body[data-view="list"] .case-card + .case-card { border-top: var(--hairline) solid var(--separator); }
.library-body[data-view="list"] .case-card:hover { background: var(--fill-2); transform: none; box-shadow: none; }
/* display: contents 让标题/类型/浏览量直接落到卡片网格的列上 */
.library-body[data-view="list"] .case-info { display: contents; }
.library-body[data-view="list"] .case-thumb {
  width: 76px; height: 56px; aspect-ratio: auto;
  border: 0; border-radius: 10px;
  box-shadow: inset 0 0 0 var(--hairline) var(--glass-hairline);
}
.library-body[data-view="list"] .case-thumb::before,
.library-body[data-view="list"] .case-thumb::after { display: none; }
.library-body[data-view="list"] .case-card:hover .case-thumb img,
.library-body[data-view="list"] .case-card:hover .case-thumb video { transform: none; }
.library-body[data-view="list"] .case-badge { display: none; }
.library-body[data-view="list"] .case-kind { display: block; font-size: 12.5px; color: var(--label-2); }
.library-body[data-view="list"] .case-title { font-size: 13.5px; }
.library-body[data-view="list"] .case-views { text-align: right; }

/* ==========================================================================
   L4 过渡与滚动：把动画尽量交给合成器
   ========================================================================== */

/* 跨页面导航（首页 ⇄ 案例库）也走原生视图过渡：整页交叉淡入，
   不再是"白屏闪一下再出内容"。两个页面都有这行，才会生效 */
@view-transition { navigation: auto; }

/* 同页内容切换（排序 / 翻页）：只让案例区做交叉淡入，其余部分不动 */
::view-transition-old(site-cases),
::view-transition-new(site-cases) {
  animation-duration: 0.3s;
  animation-timing-function: var(--ease-out);
  mix-blend-mode: normal;
}
::view-transition-group(site-cases) {
  animation-duration: 0.32s;
  animation-timing-function: var(--ease-out);
}
/* 外观切换：整页交叉淡入，像 macOS 换明暗外观 */
::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 0.32s;
  animation-timing-function: var(--ease-io);
}

/* 首屏窗口视差：支持的浏览器完全交给合成器，滚动时主线程不写样式 */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .hero-window {
      animation: hero-drift linear both;
      animation-timeline: view();
    }
  }
}
@keyframes hero-drift {
  from { transform: translate3d(0, 26px, 0); }
  to { transform: translate3d(0, -26px, 0); }
}

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

/* 中屏：Hero 收成单列，分栏堆叠，窗口收掉侧边栏 */
@media (max-width: 960px) {
  .hero-bento { grid-template-columns: 1fr; gap: 18px; }
  .hero-copy, .hero-download { grid-column: 1 / -1; }
  .hero-download { margin-top: 6px; }
  .hero-sub { max-width: none; }
  .split { grid-template-columns: 1fr; gap: 28px; }
  .split-aside { position: static; }
  .split-aside .section-sub { max-width: none; }
  .steps-rail { grid-template-columns: 1fr; gap: 26px; }
  .rail-item:not(:last-child)::after { display: none; }
  .window-shell { grid-template-columns: minmax(0, 1fr); }
  .window-sidebar { display: none; }
  .feature-item { grid-template-columns: 30px 36px minmax(0, 1fr); gap: 12px; padding: 16px 12px; }
  .feature-body p { max-width: none; }
  /* 资料库：侧边栏收成横向分段控件 */
  .library-shell { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .library-sidebar { display: none; }
  .library-head .segmented { display: inline-flex; }
}

@media (max-width: 720px) {
  .nav-links { gap: 0; }
  .nav-links a { padding: 5px 8px; font-size: 12.5px; }
  .nav-cta { display: none; }
  .case-info { flex-direction: column; gap: 2px; }
  .case-title { font-size: 13px; }
  .case-strip .case-card { flex-basis: 62vw; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 12px; }
  .lightbox-close { top: 8px; right: 8px; }
  .faq summary { padding-right: 28px; }
  .faq .faq-body { padding-right: 18px; }
  .showcase-head { align-items: flex-start; }
  /* 列表视图窄屏：去掉"类型"列 */
  .library-body { --list-cols: 60px minmax(0, 1fr) 88px; }
  .library-body[data-view="list"] .case-thumb { width: 60px; height: 46px; }
  .library-body[data-view="list"] .case-kind,
  .library-body[data-view="list"] .case-list-head span:nth-child(3) { display: none; }
  .library-toolbar { flex-wrap: wrap; }
}

/* ---------- 手机端 ---------- */

@media (max-width: 560px) {
  a, button, summary { -webkit-tap-highlight-color: transparent; }

  .globalnav { padding: 8px 0; }
  .nav-inner { height: 48px; padding: 0 6px 0 11px; gap: 10px; }
  .nav-links a { padding: 5px 7px; font-size: 12px; }
  .brand { font-size: 14px; gap: 7px; }
  .brand-mark { width: 21px; height: 21px; border-radius: 6px; }
  .appearance-btn { width: 26px; height: 22px; }

  .hero { padding-top: 24px; }
  .hero-bento { padding: 0 18px; gap: 14px; }
  .hero-title { letter-spacing: -0.03em; }
  .hero-download { padding: 20px 18px 16px; border-radius: 22px; }
  .hero-actions { flex-direction: column; align-items: stretch; gap: 14px; }
  .hero-actions .btn, .hero-actions .link-arrow { justify-content: center; }
  /* 窄屏规格条跟着下载卡一起铺满，两列仍然够放 */
  .hero-specs { margin-top: 18px; gap: 12px 16px; }
  .hero-stage { padding: 0 12px; }
  .window-body { max-height: 340px; }
  .window-title { display: none; }
  .window-bar { grid-template-columns: auto 1fr; height: 40px; }

  .shell { padding: 0 18px; }
  .section { padding: 58px 0; }
  .page-head { padding: 40px 18px 8px; }

  .feature-list, .faq { padding-left: 4px; padding-right: 4px; }
  .case-grid { grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 12px; margin-top: 30px; }
  /* 资料库的网格走变量，窄屏同样收成两列 */
  .library-body { --grid-min: 148px; --grid-gap: 12px; }
  .library-body .case-grid { margin-top: 0; }
  .case-strip { padding: 6px 0 16px; }
  /* 展示条跟着 shell 的 18px 内边距对齐 */
  .showcase-strip { padding-inline: 18px; scroll-padding-left: 18px; }
  .case-thumb::after { width: 44px; height: 44px; margin: -22px 0 0 -22px; }

  .segmented { display: flex; width: 100%; }
  .segmented button { flex: 1; padding: 6px 0; }
  /* 资料库的分段控件也要铺满（它的选择器优先级更高，需要单独覆盖） */
  .library-head .segmented { display: flex; width: 100%; }

  .pager { margin-top: 34px; }

  .lightbox { padding: 12px; }
  .lightbox-media {
    width: min(calc(100vw - 24px), calc((100vh - 130px) * var(--media-ar, 1.6)));
    width: min(calc(100vw - 24px), calc((100dvh - 130px) * var(--media-ar, 1.6)));
  }
  .lightbox-meta { flex-direction: column; gap: 2px; text-align: center; }

  .footer-inner { padding: 24px 18px; }
}

/* 极窄屏：品牌只留图标 */
@media (max-width: 400px) {
  .brand-name { display: none; }
  .nav-links { gap: 0; }
}

/* ==========================================================================
   L4 无障碍：macOS 的"减弱动态 / 降低透明度 / 提高对比度"
   ========================================================================== */

@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;
    scroll-behavior: auto !important;
  }
  .reveal, .reveal-title { opacity: 1; transform: none; }
  .case-card:hover, .feature-item:hover .feature-index, .btn:hover,
  .link-arrow:hover::after, .pager a:hover, .pager button:hover { transform: none; }
  .case-card:hover .case-thumb img, .case-card:hover .case-thumb video { transform: none; }
  .case-thumb::before, .case-thumb::after { transform: none; }
  .lightbox-panel { animation: none; }
  /* 滚动驱动的视差也要停掉，否则减弱动态时首屏还在动 */
  .hero-window { animation: none !important; }
}

/* 降低透明度：关掉毛玻璃，换成不透明材质 */
@media (prefers-reduced-transparency: reduce) {
  .globalnav::before,
  .nav-inner, .case-badge, .case-thumb::after,
  .lightbox, .lightbox-meta {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  .globalnav::before { display: none; }
  .nav-inner, .hero-download, .hero-window, .case-card, .feature-list, .faq,
  .rail-item, .btn-ghost, .library-sidebar, .library-body[data-view="list"] {
    background: var(--surface-solid);
  }
  .section-alt { background: var(--surface-solid); }
  .section-dark { background: #101014; }
  .footer { background: var(--surface-solid); }
  .window-bar, .window-sidebar { background: var(--surface-2); }
  .lightbox { background: rgba(6, 6, 10, 0.94); }
  .lightbox-meta { background: #1c1c20; }
  .eyebrow, .case-badge, .rail-node { background: var(--surface); }
}

/* 提高对比度：分隔线与描边加深 */
@media (prefers-contrast: more) {
  :root {
    --separator: rgba(60, 60, 67, 0.45);
    --label-2: rgba(40, 40, 46, 0.82);
    --label-3: rgba(40, 40, 46, 0.6);
  }
  .nav-inner, .hero-download, .hero-window, .case-card, .feature-list, .faq, .rail-item, .segmented {
    box-shadow:
      var(--shadow-2),
      inset 0 0 0 1px var(--glass-hairline),
      inset 0 1px 0 var(--rim-light);
  }
  .nav-links a[aria-current="page"] { text-decoration: underline; }
}
