/* 首页样式。账号相关的页面用 site.css，这里只管首页。
   配色照 PromptCut 的默认皮肤「流光」（PromptCut 仓库 src/skins/palettes.ts）：青蓝强调色，
   深色是带紫调的近黑（酱紫）、浅色是银白；品牌渐变从强调色过渡到紫，Agent 用黄色。
   深色在 [data-theme="dark"]（home-boot.js 设置），没有脚本时跟随系统。 */

:root {
  color-scheme: light;
  --bg: #e6e5eb;
  --bg-2: #f3f2f7;
  --card: #ffffff;
  --card-2: #eae9f0;
  --float: #ffffff;
  --line: #e7e6eb;
  --line-2: #d3d1db;
  --fg: #1b1a21;
  --muted: #5d5b68;
  --faint: #8f8d98;
  --accent: #0e7a85;
  --accent-2: #705ff3;
  --accent-fg: #ffffff;
  --accent-soft: #ddecee;
  --accent-ink: #0e7a85;
  --agent: #7c6b26;
  --agent-fill: #e9c75a;
  --purple: #6a4bc0;
  --hover: rgba(27, 26, 33, .06);
  --nav-bg: rgba(230, 229, 235, .82);
  --glow-a: rgba(14, 122, 133, .07);
  --glow-b: rgba(112, 95, 243, .05);
  --shadow-sm: 0 1px 2px rgba(20, 22, 24, .06), 0 8px 24px -12px rgba(20, 22, 24, .2);
  --shadow-lg: 0 8px 24px rgba(20, 22, 24, .14), 0 40px 90px -40px rgba(20, 22, 24, .3);
  --window-shadow: 0 30px 80px -30px rgba(20, 22, 24, .35), 0 8px 24px rgba(20, 22, 24, .12);
  --dim: rgba(230, 229, 235, .62);
  --font: "Segoe UI Variable Text", "Segoe UI", "Microsoft YaHei UI", "PingFang SC", system-ui, -apple-system, "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --font-display: "Segoe UI Variable Display", "Segoe UI", "Microsoft YaHei UI", "PingFang SC", system-ui, -apple-system, "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --mono: "Cascadia Code", ui-monospace, SFMono-Regular, Consolas, monospace;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --nav-h: 64px;
  --gutter: 24px;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #111016;
  --bg-2: #1b1a21;
  --card: #23222a;
  --card-2: #2c2b34;
  --float: #383742;
  --line: #2a2932;
  --line-2: #3a3944;
  --fg: #f2f1f6;
  --muted: #a6a4b2;
  --faint: #72707d;
  --accent: #00dbdb;
  --accent-2: #6f69fb;
  --accent-fg: #111016;
  --accent-soft: #163b40;
  --accent-ink: #00dbdb;
  --agent: #dcbf49;
  --agent-fill: #dcbf49;
  --purple: #a98cf0;
  --hover: rgba(242, 241, 246, .07);
  --nav-bg: rgba(17, 16, 22, .78);
  --glow-a: rgba(0, 219, 219, .14);
  --glow-b: rgba(0, 219, 219, .08);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4), 0 6px 18px rgba(0, 0, 0, .35);
  --shadow-lg: 0 6px 18px rgba(0, 0, 0, .45), 0 40px 100px -40px rgba(0, 0, 0, .8);
  --window-shadow: 0 40px 100px -30px rgba(0, 0, 0, .85), 0 0 0 1px rgba(255, 255, 255, .02);
  --dim: rgba(8, 7, 12, .55);
}

/* 没有脚本时（拿不到 data-theme）跟随系统深色；内容同上一段 */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --bg: #111016; --bg-2: #1b1a21; --card: #23222a; --card-2: #2c2b34; --float: #383742;
    --line: #2a2932; --line-2: #3a3944; --fg: #f2f1f6; --muted: #a6a4b2; --faint: #72707d;
    --accent: #00dbdb; --accent-2: #6f69fb; --accent-fg: #111016; --accent-soft: #163b40; --accent-ink: #00dbdb;
    --agent: #dcbf49; --agent-fill: #dcbf49; --purple: #a98cf0;
    --hover: rgba(242, 241, 246, .07); --nav-bg: rgba(17, 16, 22, .78);
    --glow-a: rgba(0, 219, 219, .14); --glow-b: rgba(0, 219, 219, .08);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4), 0 6px 18px rgba(0, 0, 0, .35);
    --shadow-lg: 0 6px 18px rgba(0, 0, 0, .45), 0 40px 100px -40px rgba(0, 0, 0, .8);
    --window-shadow: 0 40px 100px -30px rgba(0, 0, 0, .85), 0 0 0 1px rgba(255, 255, 255, .02);
    --dim: rgba(8, 7, 12, .55);
  }
}

/* ---------- 基础 ---------- */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--nav-h) + 16px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  min-height: 100vh;
  /* 和编辑器一样：深色底朝强调色带一点径向光，浅色保持干净 */
  background:
    radial-gradient(1200px 700px at 15% -10%, var(--glow-a), transparent 60%),
    radial-gradient(900px 600px at 100% 40%, var(--glow-b), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  color: var(--fg);
  font: 16px/1.65 var(--font);
  -webkit-font-smoothing: antialiased;
}

/*
 * 首页背景那层光的**预渲染版**（见 index.html 里那个 <video>）。
 * 画的和上面那两团 CSS 径向光是同一个东西，上面那层就是它的兜底，所以这里只管盖在它上面。
 *
 * `z-index: -1`：垫到正文下面、但仍在 body 的背景之上，正好夹在两者中间。
 * `none`：视频按屏幕尺寸分档、每档一比一渲，home.js 挑一档盖得住窗口的，原尺寸居中裁切、不缩放。
 * 着色器的构图是「以画面中心对齐、光的半径是固定像素」（PromptCut 仓库 src/start/BrandGlow.tsx 的 refW / refH），
 * 所以大一档的中心裁切就是这个窗口该有的样子，像素一比一，不会被放大糊掉。
 * 窗口比最大一档还大时才退回 `cover`（.is-cover），等距放大居中裁切；`contain` 会出黑边，默认的 `fill` 会压扁。
 * `position: fixed`：和上面那条 `background-attachment: fixed` 一个意思，滚动时不跟着走。
 *
 * 只在深色下露出来：浅色那一版的 --glow-a / --glow-b 是另一组颜色（干净的青灰加淡紫），
 * 这段视频是深色那组渲的，对不上。
 */
.home-glow {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: none;
  z-index: -1;
  pointer-events: none;
  display: none;
}
.home-glow.is-cover { object-fit: cover; }
:root[data-theme="dark"] .home-glow { display: block; }
/* 没有脚本时拿不到 data-theme，跟随系统（同上面调色板那一段的做法） */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .home-glow { display: block; }
}
/* 要求「减少动态效果」就不放这段视频，露出底下那层静止的 CSS 渐变 */
@media (prefers-reduced-motion: reduce) {
  .home-glow { display: none; }
}

html.i18n-pending body { visibility: hidden; animation: vh-show 0s 1.5s forwards; }
@keyframes vh-show { to { visibility: visible; } }

h1, h2, h3, p, ul, ol, figure, dl, dd { margin: 0; }
h1, h2, h3, .hero-sub, .sec-sub { text-wrap: balance; }
/* 中文标题只在标点和空格处换行，避免把词拆开；实在放不下时才任意断开 */
h1, h2, h3 { word-break: keep-all; overflow-wrap: anywhere; }
/* 日文先找日文字体，不然汉字会用简体中文的字形（「直」「骨」这类字形不同） */
:root[data-lang="ja"] {
  --font: "Segoe UI Variable Text", "Segoe UI", "Yu Gothic UI", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Meiryo", system-ui, -apple-system, "Noto Sans JP", sans-serif;
  --font-display: "Segoe UI Variable Display", "Segoe UI", "Yu Gothic UI", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Meiryo", system-ui, -apple-system, "Noto Sans JP", sans-serif;
}
p { text-wrap: pretty; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
button { font: inherit; color: inherit; }
svg { display: block; }
[hidden] { display: none !important; }
html:not(.js) .needs-js { display: none !important; }
::selection { background: var(--accent); color: var(--accent-fg); }
:where(a, button):focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

svg.s { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
svg.f { fill: currentColor; }
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.g-a { stop-color: var(--accent); }
.g-b { stop-color: var(--accent-2); }

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

.skip { position: absolute; left: -9999px; top: 10px; z-index: 100; padding: 8px 14px; border-radius: 8px; background: var(--fg); color: var(--bg); text-decoration: none; }
.skip:focus { left: 16px; }

/* ---------- 按钮（和编辑器一样：主按钮铺品牌渐变，其余是面板底 + 细边） ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 46px; padding: 0 22px;
  border: 1px solid transparent; border-radius: 8px;
  font-size: 15.5px; font-weight: 600; line-height: 1; text-decoration: none; white-space: nowrap;
  cursor: pointer;
  transition: transform .18s var(--ease), box-shadow .18s, background-color .18s, border-color .18s, color .18s, filter .18s;
}
.btn svg { width: 18px; height: 18px; flex: none; transition: transform .18s var(--ease); }
/*
 * 主按钮是「流光」：品牌渐变在按钮里缓缓流动（首尾同色，横向平铺，挪一整幅接得上），隔几秒有一道光斜着扫过。
 * 光带垫在文字下面（按钮自成层叠上下文，光带 z-index -1）。要求减少动效时，文末的规则让它停在静止的渐变上
 */
.btn-brand {
  position: relative; overflow: hidden; isolation: isolate;
  background: linear-gradient(90deg, var(--accent), var(--accent-2) 50%, var(--accent)) 0 0 / 200% 100%;
  color: var(--accent-fg);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .28);
  animation: brand-flow 7s linear infinite;
}
.btn-brand::after {
  content: ""; position: absolute; top: -2px; bottom: -2px; left: 0; z-index: -1; width: 42%;
  background: linear-gradient(90deg, transparent, rgb(255 255 255 / .5), transparent);
  transform: translateX(-140%) skewX(-20deg);
  animation: brand-sheen 3.8s var(--ease) infinite;
}
.btn-brand:hover { transform: translateY(-2px); box-shadow: inset 0 1px 0 rgb(255 255 255 / .28), 0 10px 24px -14px var(--accent-2); animation-duration: 3.5s; }
.btn-brand:hover svg { transform: translate(2px, -2px); }
@keyframes brand-flow { to { background-position: -200% 0; } }
@keyframes brand-sheen { 0%, 58% { transform: translateX(-140%) skewX(-20deg); } 100% { transform: translateX(340%) skewX(-20deg); } }
.btn-line { background: var(--card); color: var(--fg); border-color: var(--line-2); }
.btn-line:hover { transform: translateY(-2px); border-color: var(--accent); }
.btn-sm { height: 38px; padding: 0 16px; font-size: 14.5px; }

.icon-btn {
  display: inline-grid; place-items: center;
  width: 38px; height: 38px; padding: 0;
  border: 0; border-radius: 8px; background: none; color: var(--muted);
  cursor: pointer; text-decoration: none;
  transition: color .15s, background-color .15s, border-color .15s;
}
.icon-btn:hover { color: var(--fg); background: var(--hover); }
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn.round { width: 40px; height: 40px; border: 1px solid var(--line-2); border-radius: 50%; background: var(--card); color: var(--fg); box-shadow: var(--shadow-sm); }
.icon-btn.round:hover { border-color: var(--accent); background: var(--card); }

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

.nav {
  position: sticky; top: 0; z-index: 50;
  height: var(--nav-h);
  border-bottom: 1px solid transparent;
  transition: background-color .25s, border-color .25s;
}
.nav.scrolled, .nav.open {
  background: var(--nav-bg);
  border-bottom-color: var(--line);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
}
.nav-in { position: relative; height: 100%; display: flex; align-items: center; gap: 6px; }
.brand {
  order: 0;
  display: inline-flex; align-items: center; gap: 9px;
  border-radius: 8px;
  color: var(--fg); text-decoration: none;
  font-size: 17px; font-weight: 700; letter-spacing: .02em;
}
.logo { width: 26px; height: 26px; flex: none; }
.logo-hex { fill: none; stroke: url(#brand-grad); stroke-width: 4; stroke-linejoin: round; }
.logo-play { fill: url(#brand-grad); }

.nav-panel { display: contents; }
.nav-links { order: 1; display: flex; gap: 2px; margin-left: 22px; }
.nav-links a {
  padding: 7px 12px; border-radius: 8px;
  color: var(--muted); text-decoration: none; font-size: 15px; font-weight: 500;
  transition: color .15s, background-color .15s;
}
.nav-links a:hover { color: var(--fg); background: var(--hover); }
.nav-tools { order: 2; margin-left: auto; display: flex; align-items: center; gap: 2px; }

/* 右上角的账号入口由 account.js 填：没登录是「登录 / 注册」，登录了是账号名 */
.who {
  order: 3;
  display: flex; align-items: center; justify-content: flex-end; gap: 4px;
  min-width: 132px; min-height: 36px;
  margin-left: 10px; padding-left: 12px;
  border-left: 1px solid var(--line-2);
}
.who a {
  padding: 7px 12px; border-radius: 8px;
  color: var(--muted); text-decoration: none; font-size: 15px; font-weight: 500; white-space: nowrap;
  transition: color .15s, background-color .15s, filter .15s;
}
.who a:hover { color: var(--fg); background: var(--hover); }
.who a[href="/register"] { padding: 7px 15px; background: linear-gradient(100deg, var(--accent) 30%, var(--accent-2)); color: var(--accent-fg); font-weight: 600; }
.who a[href="/register"]:hover { color: var(--accent-fg); filter: brightness(1.06); }
.who a[href="/account"] { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line-2); background: var(--card); color: var(--fg); font-weight: 600; }
.who a[href="/account"]::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--agent-fill); }

#theme-btn .i-sun { display: none; }
:root[data-theme="dark"] #theme-btn .i-sun { display: block; }
:root[data-theme="dark"] #theme-btn .i-moon { display: none; }

.lang { position: relative; }
.lang-menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 60;
  min-width: 170px; padding: 6px;
  border: 1px solid var(--line-2); border-radius: 10px;
  background: var(--float); box-shadow: var(--shadow-lg);
  animation: pop .16s var(--ease);
}
.lang-menu button {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 9px 10px; border: 0; border-radius: 6px; background: none;
  font-size: 14.5px; text-align: left; cursor: pointer;
}
.lang-menu button:hover, .lang-menu button:focus-visible { background: var(--hover); outline: none; }
.lang-menu svg { width: 16px; height: 16px; color: var(--accent); visibility: hidden; }
.lang-menu [aria-checked="true"] { font-weight: 600; }
.lang-menu [aria-checked="true"] svg { visibility: visible; }

.menu-btn { display: none; }

/* ---------- 首屏 ---------- */

.hero { position: relative; padding: 56px 0 72px; }
.hero-in { text-align: center; }
.badge {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 6px 14px 6px 11px;
  border: 1px solid var(--line-2); border-radius: 999px;
  background: var(--card); color: var(--muted);
  font-size: 13.5px; font-weight: 500;
}
.badge-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); animation: breathe 2.4s ease-in-out infinite; }
.hero-title {
  margin: 24px auto 0;
  font-family: var(--font-display);
  font-size: clamp(38px, 6.2vw, 72px);
  font-weight: 700; line-height: 1.14; letter-spacing: -.01em;
}
:root[data-lang="en"] .hero-title { line-height: 1.04; letter-spacing: -.035em; }
.t-line { display: block; }
/* 渐变字只画在背景里：背景往下多铺一截，英文 g、y 的下伸部分才不会被切掉（负外边距把多出来的高度还回去，排版不动） */
.t-hl { padding-bottom: .2em; margin-bottom: -.14em; background: linear-gradient(100deg, var(--accent) 25%, var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-sub { max-width: 37em; margin: 22px auto 0; color: var(--muted); font-size: clamp(16px, 1.5vw, 19px); line-height: 1.7; }
.hero-cta { margin-top: 34px; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.hero-meta { margin-top: 20px; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px 12px; color: var(--faint); font-size: 13.5px; }
.hero-meta i { width: 3px; height: 3px; border-radius: 50%; background: currentColor; }
.hero-stage { max-width: 1240px; margin-top: 56px; }
.hero-cap { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 10px; margin-top: 16px; color: var(--faint); font-size: 13px; }
.hero-ver { font-family: var(--mono); font-size: 12px; }

/* ---------- 软件的真实界面（site/shell/，home.js 按比例嵌进来） ---------- */

.shell-view { position: relative; overflow: hidden; background: var(--bg-2); isolation: isolate; }
/* 界面放在这一层的影子 DOM 里（home.js 的 ShellView），缩放、平移也在里面做 */
.shell-surface { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
/* 能滑的界面（data-scroll）：里面能滚的块要接得到滚轮和手指，放开这一层；哪些块能滑由 shell-overlay.css 管 */
.shell-view[data-scroll] .shell-surface { pointer-events: auto; }
/* 拉不到界面（没有脚本、文件缺了、约定对不上）时，写一行说明代替 */
.shell-view:not(.shell-ready)::after {
  content: attr(aria-label);
  position: absolute; inset: 0; display: grid; place-items: center; padding: 24px;
  color: var(--faint); font-size: 14px; text-align: center;
}

/* 演示时圈出当前讲到的那一块 */
.tour-ring {
  position: absolute; z-index: 3; left: 0; top: 0; width: 0; height: 0;
  border-radius: 6px;
  box-shadow: inset 0 0 0 2px var(--accent), inset 0 0 14px color-mix(in oklab, var(--accent) 40%, transparent);
  opacity: 0; pointer-events: none;
  transition: left .9s cubic-bezier(.65, 0, .25, 1), top .9s cubic-bezier(.65, 0, .25, 1), width .9s cubic-bezier(.65, 0, .25, 1), height .9s cubic-bezier(.65, 0, .25, 1), border-radius .9s, opacity .4s;
}
.tour-ring.on { opacity: 1; }
/* 使用方法那里：框外压暗，像聚光灯，压暗也从区域边上开始 */
.tour-ring.spot { box-shadow: inset 0 0 0 2px var(--accent), 0 0 0 9999px var(--dim); }

/* ---------- 接入的 Agent ---------- */

.strip { padding: 8px 0 20px; }
.strip-in { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.strip-h { color: var(--faint); font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.strip-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.strip-list li {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 15px;
  border: 1px solid var(--line-2); border-radius: 999px;
  background: var(--card); color: var(--muted);
  font-size: 14px; font-weight: 500;
}
.strip-list svg { width: 17px; height: 17px; color: var(--accent); }

/* ---------- 区块通用 ---------- */

.features, .contact { padding: 100px 0; }
.sec-head { max-width: 780px; margin: 0 auto; text-align: center; }
.kicker { margin-bottom: 14px; color: var(--accent-ink); font: 600 13px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; }
.sec-head h2, .contact h2 { font-family: var(--font-display); font-size: clamp(30px, 4.2vw, 48px); font-weight: 700; line-height: 1.15; letter-spacing: -.005em; }
:root[data-lang="en"] .sec-head h2, :root[data-lang="en"] .contact h2 { letter-spacing: -.025em; line-height: 1.1; }
.sec-sub { margin-top: 16px; color: var(--muted); font-size: clamp(15.5px, 1.4vw, 18px); }

/* ---------- 首屏：真实界面 + 右边的使用步骤 ---------- */

/* 左边是编辑器的真实界面，右边一列步骤：当前这一步摊开说明，底下的进度条走完换下一步（home.js 的 howSteps） */
.how-box { display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, 300px); gap: 22px; align-items: center; text-align: left; }
.how-steps { display: flex; flex-direction: column; gap: 4px; }
.how-step { position: relative; padding: 15px 16px 17px; border: 1px solid transparent; border-radius: 10px; transition: background-color .3s, border-color .3s; }
.how-step.is-active { border-color: var(--line-2); background: var(--card); }
.how-tab {
  display: flex; align-items: baseline; gap: 12px;
  width: 100%; padding: 0; border: 0; border-radius: 6px; background: none;
  color: var(--muted); font-size: 16.5px; font-weight: 650; text-align: left;
  cursor: pointer; transition: color .2s;
}
.how-tab:hover, .is-active .how-tab { color: var(--fg); }
.how-num { color: var(--faint); font: 600 12.5px/1 var(--mono); }
.is-active .how-num { color: var(--accent); }
.how-dd { display: none; margin: 10px 0 2px 32px; color: var(--muted); font-size: 14px; line-height: 1.75; }
.is-active .how-dd { display: block; animation: fade-up .45s var(--ease) both; }
.how-bar { display: none; position: absolute; left: 16px; right: 16px; bottom: 8px; height: 2px; overflow: hidden; border-radius: 2px; background: var(--line-2); }
.js .is-active .how-bar { display: block; }
/* 每一步 4.5 秒（进度条走完换下一步；第 2、3 步里的动作也按这个长度排，见 home.js 的 howStage） */
.how-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transform: scaleX(0); transform-origin: left; animation: bar-fill 4.5s linear forwards; }
.how-box.paused .how-bar i { animation-play-state: paused; }

.how-stage { position: relative; overflow: hidden; border: 1px solid var(--line-2); border-radius: 12px; background: var(--bg-2); box-shadow: var(--window-shadow); }
/* 和拉来的编辑器界面一样的比例（scripts/pull-editor-shell.mjs 的 VIEWS.editor.viewport 是 1600×1100），改那边要跟着改这里 */
.how-screen { position: relative; aspect-ratio: 16 / 11; }
.how-screen .shell-view { position: absolute; inset: 0; opacity: 0; transition: opacity .5s; }
.how-screen .shell-view.is-on { opacity: 1; }
.pane-dd { display: none; }

/* 首屏两种界面的切换：氛围式（缺省）/ 传统式，居中压在演示上面，和编辑器顶栏的模式切换一个样子 */
.mode-tabs {
  display: flex; width: max-content; margin: 0 auto 18px; padding: 4px; gap: 2px;
  border: 1px solid var(--line-2); border-radius: 999px; background: var(--card); box-shadow: var(--shadow-sm);
}
.mode-tab {
  min-width: 112px; padding: 8px 20px; border: 0; border-radius: 999px; background: none;
  color: var(--muted); font: inherit; font-size: 14.5px; font-weight: 600; cursor: pointer;
  transition: color .2s, background-color .2s, box-shadow .2s;
}
.mode-tab:hover { color: var(--fg); }
.mode-tab[aria-selected="true"] { background: var(--accent-soft); color: var(--accent-ink); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--accent) 45%, transparent); }
.mode-tab:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* 氛围式三步各自多长（进度条走完换下一步，见 home.js 的 vibeStage）：说一句话、Agent 动手、拿到片子（片子多放一会儿） */
.vibe-box .how-step:nth-child(1) .how-bar i { animation-duration: 5s; }
.vibe-box .how-step:nth-child(2) .how-bar i { animation-duration: 5.5s; }
.vibe-box .how-step:nth-child(3) .how-bar i { animation-duration: 9s; }
/* 引用（先框菜单里那一项，再框输入框里引用进来的那块、打一句话）、详细编辑、多个 Agent 并行 */
.vibe-box .how-step:nth-child(4) .how-bar i { animation-duration: 6.5s; }
.vibe-box .how-step:nth-child(5) .how-bar i { animation-duration: 6s; }
.vibe-box .how-step:nth-child(6) .how-bar i { animation-duration: 6s; }
/* 和拉来的氛围式界面一样的比例（scripts/pull-editor-shell.mjs 的 VIEWS.vibeStart 等的 viewport），改那边要跟着改这里 */
.vibe-box .how-screen { aspect-ratio: 16 / 10; }

/* ---------- 软件特性 ---------- */

/* 第一行一张大的（Agent 做的片子在放）配素材库，第二行三张；能用真实界面的都用真实界面 */
.feat-grid { margin-top: 52px; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 20px; }
.feat {
  grid-column: span 4;
  display: flex; flex-direction: column; gap: 18px;
  padding: 18px;
  border: 1px solid var(--line-2); border-radius: 12px;
  background: var(--card);
  transition: border-color .3s, box-shadow .3s;
}
.feat:hover { border-color: color-mix(in oklab, var(--accent) 55%, var(--line-2)); box-shadow: var(--shadow-lg); }
.feat-lg { grid-column: span 7; }
.feat-md { grid-column: span 5; }
.feat-ill { position: relative; overflow: hidden; aspect-ratio: 16 / 9; border: 1px solid var(--line); border-radius: 8px; background: var(--bg-2); }
/* 素材库那张和旁边的大卡一样高：插图把剩下的高度占满 */
.feat-md .feat-ill { flex: 1; aspect-ratio: auto; min-height: 240px; }
.feat-film video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #0b0c10; }
.feat-body h3 { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 20px; line-height: 1.3; letter-spacing: -.01em; }
.feat-body h3 svg { width: 22px; height: 22px; flex: none; color: var(--accent); }
.feat-body p { color: var(--muted); font-size: 15px; line-height: 1.7; }

/* 音频处理：四条轨道的音量表，先忽高忽低，再被调到各自合适的大小，停一会儿再来一遍 */
.feat-mix { display: flex; flex-direction: column; justify-content: center; gap: 13px; padding: 20px 24px; }
.mix-row { display: grid; grid-template-columns: 4.6em minmax(0, 1fr); align-items: center; gap: 12px; color: var(--muted); font-size: 13px; }
.mix-row i { position: relative; height: 10px; overflow: hidden; border-radius: 99px; background: var(--line-2); }
.mix-row b { position: absolute; top: 0; bottom: 0; left: 0; width: 40%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--accent-2)); animation: mix-1 5s var(--ease) infinite; }
.mix-row:nth-child(2) b { animation-name: mix-2; }
.mix-row:nth-child(3) b { animation-name: mix-3; }
.mix-row:nth-child(4) b { animation-name: mix-4; }
@keyframes mix-1 { 0% { width: 46%; } 12% { width: 90%; } 24% { width: 58%; } 38%, 100% { width: 78%; } }
@keyframes mix-2 { 0% { width: 94%; } 12% { width: 66%; } 24% { width: 98%; } 38%, 100% { width: 52%; } }
@keyframes mix-3 { 0% { width: 28%; } 12% { width: 76%; } 24% { width: 40%; } 38%, 100% { width: 60%; } }
@keyframes mix-4 { 0% { width: 82%; } 12% { width: 52%; } 24% { width: 90%; } 38%, 100% { width: 34%; } }

/* 云端 Agent：一朵云里三个点一直在跳，底下一条进度一直在走 */
.feat-cloud { display: grid; grid-template-areas: "cloud" "bar"; place-items: center; align-content: center; row-gap: 18px; }
.feat-cloud .cloud, .cloud-dots { grid-area: cloud; }
.feat-cloud .cloud { width: min(42%, 150px); fill: color-mix(in oklab, var(--accent) 12%, transparent); stroke: var(--accent); stroke-width: 2.5; stroke-linejoin: round; }
.cloud-dots { display: flex; gap: 7px; margin-top: 10%; }
.cloud-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: cloud-dot 1.4s ease-in-out infinite; }
.cloud-dots i:nth-child(2) { animation-delay: .2s; }
.cloud-dots i:nth-child(3) { animation-delay: .4s; }
.cloud-bar { grid-area: bar; width: 52%; height: 6px; overflow: hidden; border-radius: 99px; background: var(--line-2); }
.cloud-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transform-origin: left; animation: cloud-progress 6s linear infinite; }
@keyframes cloud-dot { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-4px); } }
@keyframes cloud-progress { from { transform: scaleX(.06); } to { transform: scaleX(1); } }

/* ---------- 联系我们 ---------- */

.contact-in { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 28px; align-items: stretch; }
.c-rows { margin-top: 32px; border-top: 1px solid var(--line-2); }
/* 右边留出内边距：悬停时的底色要把箭头按钮整个包住，按钮不能贴边或伸出去 */
.c-row { display: grid; grid-template-columns: 60px minmax(0, 1fr) 64px; align-items: center; min-height: 80px; padding-right: 12px; border-bottom: 1px solid var(--line-2); color: inherit; text-decoration: none; transition: background-color .2s; }
.c-row:hover { background: var(--hover); }
.c-ico { display: grid; place-items: center; align-self: stretch; border-right: 1px solid var(--line-2); color: var(--muted); }
.c-ico svg { width: 22px; height: 22px; }
.c-txt { display: grid; gap: 2px; min-width: 0; padding: 0 20px; }
.c-lab { color: var(--faint); font-size: 13px; }
.c-val { overflow: hidden; font-size: 16px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.c-go { display: grid; place-items: center; width: 44px; height: 44px; justify-self: end; border: 1px solid var(--line-2); border-radius: 8px; color: var(--muted); transition: color .2s, border-color .2s; }
.c-go svg { width: 18px; height: 18px; transition: transform .2s var(--ease); }
/* 悬停时只让箭头往前挪一点，按钮本身不动 */
.c-row:hover .c-go { border-color: var(--accent); color: var(--fg); }
.c-row:hover .c-go svg { transform: translateX(2px); }
.contact-side {
  display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 12px;
  padding: 34px;
  border: 1px solid var(--line-2); border-radius: 12px;
  background: radial-gradient(120% 80% at 100% 0%, var(--accent-soft), transparent 55%), var(--card);
}
.cs-ico { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-ink); }
.cs-ico svg { width: 24px; height: 24px; }
.contact-side h3 { font-size: 20px; }
.contact-side p { color: var(--muted); font-size: 15px; line-height: 1.75; }
.contact-side .btn { margin-top: 6px; }

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

.foot { padding: 56px 0 28px; border-top: 1px solid var(--line-2); background: var(--bg-2); }
.foot-in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 40px; }
.foot-brand { display: grid; gap: 12px; max-width: 320px; align-content: start; }
.foot-brand .brand { justify-self: start; }
.foot-brand p { color: var(--muted); font-size: 14.5px; }
.foot-cols { display: grid; grid-template-columns: repeat(3, minmax(120px, auto)); gap: 24px 56px; }
.foot-cols div { display: grid; align-content: start; gap: 10px; }
.foot-h { margin-bottom: 4px; color: var(--faint); font: 600 12px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.foot-cols a { color: var(--muted); font-size: 14.5px; text-decoration: none; }
.foot-cols a:hover { color: var(--fg); }
.foot-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 44px; padding-top: 20px; border-top: 1px solid var(--line-2); color: var(--faint); font-size: 13px; }
/* 底栏里的隐私政策 / 服务条款：和上面那几列的链接一个长相 */
.foot-legal { display: inline-flex; gap: 18px; }
.foot-legal a { color: var(--muted); text-decoration: none; }
.foot-legal a:hover { color: var(--fg); }

/* ---------- 入场 ---------- */

.rise { animation: rise .9s var(--ease) both; }
.rise.d1 { animation-delay: .08s; }
.rise.d2 { animation-delay: .16s; }
.rise.d3 { animation-delay: .24s; }
.rise.d4 { animation-delay: .3s; }
.rise.d5 { animation-delay: .38s; }
/* 滚动到才出现：home.js 先加 reveal-ready；出现后把 reveal 类摘掉，免得挡住卡片自己的悬停效果 */
.reveal-ready .reveal { opacity: 0; transform: translateY(22px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal-ready .reveal.in { opacity: 1; transform: none; }
.reveal-ready .feat-grid .reveal:nth-child(2), .reveal-ready .feat-grid .reveal:nth-child(4) { transition-delay: .08s; }
.reveal-ready .feat-grid .reveal:nth-child(5) { transition-delay: .16s; }
.reveal-ready .contact-side.reveal { transition-delay: .1s; }

@keyframes rise { from { opacity: 0; transform: translateY(18px); } }
@keyframes breathe { 50% { opacity: .55; transform: scale(.8); } }
@keyframes pop { from { opacity: 0; transform: translateY(-4px) scale(.98); } }
@keyframes fade-up { from { opacity: 0; transform: translateY(6px); } }
@keyframes bar-fill { to { transform: scaleX(1); } }

/* ---------- 窄屏 ---------- */

@media (max-width: 900px) {
  .how-box { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .how-steps {
    order: -1;
    flex-direction: row; gap: 6px;
    margin: 0 calc(-1 * var(--gutter)); padding: 2px var(--gutter) 6px;
    overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity;
    -webkit-mask-image: linear-gradient(90deg, #000 82%, transparent);
    mask-image: linear-gradient(90deg, #000 82%, transparent);
  }
  .how-steps::-webkit-scrollbar { display: none; }
  .how-step { flex: none; padding: 9px 14px 14px; scroll-snap-align: start; }
  .how-tab { gap: 8px; font-size: 14.5px; white-space: nowrap; }
  .is-active .how-dd { display: none; }
  .how-bar { left: 14px; right: 14px; bottom: 6px; }
  .pane-dd { display: block; padding: 16px 18px 14px; border-bottom: 1px solid var(--line-2); color: var(--muted); font-size: 15px; }
  .how-screen { aspect-ratio: 4 / 3; }
  .feat, .feat-lg, .feat-md { grid-column: 1 / -1; }
  .feat-md .feat-ill { flex: none; aspect-ratio: 16 / 10; min-height: 0; }
  .contact-in { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 860px) {
  .menu-btn { display: inline-grid; }
  .nav-panel {
    display: none;
    position: absolute; top: calc(var(--nav-h) - 6px); left: var(--gutter); right: var(--gutter);
    flex-direction: column; padding: 8px;
    border: 1px solid var(--line-2); border-radius: 12px;
    background: var(--float); box-shadow: var(--shadow-lg);
  }
  .nav.open .nav-panel { display: flex; animation: pop .18s var(--ease); }
  .nav-links { flex-direction: column; margin: 0; }
  .nav-links a { padding: 12px 14px; color: var(--fg); font-size: 16px; }
  .who { justify-content: flex-start; min-width: 0; margin: 6px 0 0; padding: 10px 6px 4px; border-top: 1px solid var(--line-2); border-left: 0; }
}

@media (max-width: 640px) {
  :root { --gutter: 16px; }
  .hero { padding: 40px 0 56px; }
  .hero-cta { flex-direction: column; align-items: stretch; max-width: 360px; margin-left: auto; margin-right: auto; }
  .hero-meta { flex-direction: column; gap: 2px; }
  .hero-meta i { display: none; }
  .hero-stage { margin-top: 40px; }
  .how-stage { border-radius: 8px; }
  .features, .contact { padding: 72px 0; }
  .feat { padding: 16px; }
  .c-row { grid-template-columns: 50px minmax(0, 1fr) 56px; }
  .c-txt { padding: 0 14px; }
  .contact-side { padding: 24px; }
  .foot-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
}

/* 要求减少动效：动画直接跳到最后一帧，演示不播（home.js 也不再轮播） */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0s !important;
    transition-duration: .01ms !important;
    transition-delay: 0s !important;
  }
  .how-bar { display: none !important; }
}
