/* 品牌样式 · 炭黑 + 沙色 + 图标蓝
   深色：炭黑底、沙色字。浅色：沙色纸面、炭黑字。跟随系统设置，没有手动开关。
   蓝色只用图标的 #14357F，只做两件事：按钮和整块色带。它压在炭黑上只有 1.47:1，不能当字色，
   所以深色下字标和标题用沙色；浅色下字标仍是图标蓝。
   大字标像期刊刊头，文字全部离开照片，照片上什么都不压。
   Playfair 没有中日文字形，所以斜体只给拉丁文；中日文用直立的衬线体，不做假斜体。 */

/* Playfair Display（SIL OFL，许可证见 fonts/OFL.txt）的拉丁字符子集，放在站内 */
@font-face {
  font-family: "Playfair Display";
  src: url("fonts/PlayfairDisplay-500-latin.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Playfair Display";
  src: url("fonts/PlayfairDisplay-500-italic-latin.woff2") format("woff2");
  font-weight: 500;
  font-style: italic;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* 中日文标题用字（Noto Serif，SIL OFL）。只含现有标题用到的字，改标题后要重新生成，见 README。 */
@font-face {
  font-family: "Dmin Serif SC";
  src: url("fonts/NotoSerifSC-600-headings.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Dmin Serif JP";
  src: url("fonts/NotoSerifJP-600-headings.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light dark;

  /* 原色：下面的语义色都从这里取，组件里不直接写色值 */
  --charcoal: #1e1e1c;
  --sand: #d8cbb3;
  --icon-blue: #14357f;
  --icon-paper: #f6f8fc;

  /* 浅色：沙色纸面 */
  --rule-rgb: 30 30 28;
  --bg: #f1ebdf;
  --bg-raised: #faf6ee;
  --bg-header: rgb(241 235 223 / 0.82);
  --bg-media: #e3d9c6;
  --text: var(--charcoal);
  --text-2: #4e4a41;
  --text-3: #6a6558;
  --display: var(--charcoal);
  --wordmark: var(--icon-blue);
  --accent: var(--icon-blue);
  --accent-hover: #0f2a66;
  --accent-edge: transparent;
  --on-accent: var(--icon-paper);
  --focus: var(--icon-blue);
  --img-outline: rgb(0 0 0 / 0.1);
  --shadow-1: 0 1px 2px rgb(30 30 28 / 0.05), 0 10px 24px -14px rgb(30 30 28 / 0.16);
  --shadow-2: 0 2px 6px rgb(30 30 28 / 0.06), 0 26px 48px -24px rgb(20 53 127 / 0.34);
  --pop-shadow: 0 18px 40px -22px rgb(30 30 28 / 0.4);

  --line: rgb(var(--rule-rgb) / 0.12);
  --line-2: rgb(var(--rule-rgb) / 0.26);
  --glass-border: rgb(var(--rule-rgb) / 0.14);
  --glass-fallback: var(--bg-raised);
  --tint: rgb(var(--rule-rgb) / 0.05);
  --tint-2: rgb(var(--rule-rgb) / 0.08);

  --r-xl: 14px;
  --r-lg: 12px;
  --r-md: 10px;
  --r-sm: 8px;
  --r-xs: 6px;
  --header-h: 68px;
  --section-gap: clamp(88px, 11vw, 152px);

  --serif-cjk: "Dmin Serif SC", "Noto Serif SC", "Noto Serif CJK SC", "Source Han Serif SC", "Songti SC", "STSong", "SimSun";
  --font-display: "Playfair Display", var(--serif-cjk), Constantia, Georgia, serif;
}

/* 深色：炭黑底、沙色字。主按钮仍是图标蓝配图标的字色（10.7:1），加一圈沙色细边，让它在炭黑上看得出边界。 */
@media (prefers-color-scheme: dark) {
  :root {
    --rule-rgb: 216 203 179;
    --bg: var(--charcoal);
    --bg-raised: #272724;
    --bg-header: rgb(30 30 28 / 0.82);
    --bg-media: #171715;
    --text: #ebe3d3;
    --text-2: #c4b9a5;
    --text-3: #a09684;
    --display: var(--sand);
    --wordmark: var(--sand);
    --accent-hover: #1b429b;
    --accent-edge: rgb(216 203 179 / 0.26);
    --focus: var(--sand);
    --img-outline: rgb(255 255 255 / 0.1);
    --shadow-1: 0 12px 28px -18px rgb(0 0 0 / 0.7);
    --shadow-2: 0 30px 60px -30px rgb(0 0 0 / 0.85);
    --pop-shadow: 0 18px 40px -22px rgb(0 0 0 / 0.8);
  }
}
:lang(ja) {
  --serif-cjk: "Dmin Serif JP", "Noto Serif JP", "Noto Serif CJK JP", "Hiragino Mincho ProN", "Yu Mincho", "YuMincho";
}

html { scrollbar-color: rgb(var(--rule-rgb) / 0.3) var(--bg); accent-color: var(--accent); caret-color: var(--text); }
body { font-optical-sizing: auto; }
body::before, body::after { display: none; }
::selection { background: var(--accent); color: var(--on-accent); }
a { text-decoration-color: rgb(var(--rule-rgb) / 0.4); }
:focus-visible { outline-color: var(--focus); }
.skip-link { background: var(--accent); color: var(--on-accent); border-radius: var(--r-sm); }

/* 字重只有站内实际提供的两档，关掉浏览器的假粗体 */
h1, h2, h3, .plan-price { font-weight: 500; font-synthesis-weight: none; color: var(--display); letter-spacing: -0.012em; }
:lang(zh) :is(h1, h2, h3, .plan-price), :lang(ja) :is(h1, h2, h3, .plan-price) { font-weight: 600; letter-spacing: 0.02em; }
:lang(en) h1, :lang(es) h1 { font-style: italic; }

/* 卡片靠阴影分层，不靠描边 */
.glass {
  background: var(--bg-raised);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  border: 0;
  box-shadow: 0 0 0 1px var(--line), var(--shadow-1);
  border-radius: var(--r-xl);
}

/* 导航：半透明材质，内容从下面滚过。页面在最顶端时没有分隔线，滚动后才出现。 */
.site-header {
  padding-top: 0;
  background: var(--bg-header);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  backdrop-filter: saturate(160%) blur(18px);
  border-bottom: 0;
  box-shadow: 0 1px 0 var(--line);
  transition: box-shadow var(--fade) ease;
}
.js .site-header[data-top] { box-shadow: 0 1px 0 transparent; }
.site-header .bar {
  background: none;
  border: 0;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  border-radius: 0;
  padding: 6px 0;
}
.brand { color: var(--wordmark); font-weight: 600; gap: 12px; font-size: var(--fs-body); }
.wordmark { display: block; width: auto; }
.wordmark-sm { height: 40px; }
/* 首页大字标还在视野里时，导航条不重复显示小字标；键盘聚焦时照常出现 */
.site-header .brand { transition: opacity 200ms ease, transform 320ms var(--ease-out); }
@media (min-width: 861px) {
  .js .site-header[data-masthead] .brand:not(:focus-visible) { opacity: 0; transform: translateY(6px); }
}

.nav a, .menu-panel nav a { border-radius: var(--r-xs); }
.nav a[aria-current="page"], .menu-panel nav a[aria-current="page"] { color: var(--text); background: none; box-shadow: inset 0 -1px 0 var(--text); border-radius: 0; }
.menu-panel nav a[aria-current="page"] { box-shadow: none; font-weight: 700; }
.chip { background: none; border-color: var(--line-2); border-radius: var(--r-sm); }
.pop[open] > .chip { background: var(--tint-2); color: var(--text); }
/* 面板 12 = 内边距 6 + 选项 6，圆角同心 */
.pop-panel { background: var(--bg-raised); border-radius: var(--r-lg); padding: 6px; box-shadow: 0 0 0 1px var(--line), var(--pop-shadow); }
.lang-list a { border-radius: var(--r-xs); }
.lang-list a[aria-current="true"] { color: var(--text); background: var(--tint-2); }
.menu-panel { border-radius: var(--r-lg); padding: 6px; }
.menu-panel nav a { border-radius: var(--r-xs); }
@media (hover: hover) and (pointer: fine) {
  .nav a:hover, .menu-panel nav a:hover { color: var(--text); background: var(--tint); }
  .nav a[aria-current="page"]:hover { background: none; }
  .chip:hover { background: var(--tint-2); color: var(--text); }
  .lang-list a:hover { background: var(--tint-2); color: var(--text); }
}

.btn { border-radius: var(--r-sm); }
.btn-primary { background: var(--accent); color: var(--on-accent); box-shadow: inset 0 0 0 1px var(--accent-edge); }
.btn-glass {
  background: none;
  color: var(--text);
  border-color: var(--line-2);
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
/* 每一屏只填充一个主按钮，导航条里的下载按钮用浅底 */
.btn-tonal { background: var(--tint-2); color: var(--text); }
.btn[aria-disabled="true"] { background: var(--tint); }
@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover { background: var(--accent-hover); }
  .btn-glass:hover { background: var(--tint); border-color: var(--text-3); }
  .btn-tonal:hover { background: rgb(var(--rule-rgb) / 0.14); }
}
.badge { border-radius: var(--r-xs); }
.badge-on { background: var(--accent); color: var(--on-accent); }
.icon-badge { background: var(--tint-2); border: 0; box-shadow: none; border-radius: var(--r-md); }
.plan-early { background: var(--tint); border-radius: var(--r-sm); }
.plan-price { font-size: var(--fs-display); font-variant-numeric: lining-nums; }
.plan-pro { background: var(--bg-raised); box-shadow: 0 0 0 1px var(--line-2), var(--shadow-2); }

.ph { border-color: rgb(var(--rule-rgb) / 0.42); background: var(--tint); }

/* 首屏：一行刊头，下面是通栏的对比照片 */
.hero { padding-top: 0; }
.masthead {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas: "mark copy actions";
  gap: 16px clamp(32px, 4.5vw, 72px);
  align-items: end;
  padding-block: clamp(8px, 1vw, 16px) clamp(24px, 2.6vw, 36px);
}
.masthead-mark { grid-area: mark; color: var(--wordmark); }
.wordmark-lg { height: clamp(104px, 10vw, 140px); }
.masthead-copy { grid-area: copy; min-width: 0; }
.masthead-copy h1 { font-size: var(--fs-display); margin-bottom: 0.3em; }
.masthead-copy .lead { color: var(--text-2); font-size: var(--fs-body); max-width: 46ch; margin: 0; }
.masthead-actions { grid-area: actions; display: grid; gap: 10px; min-width: 224px; }
.masthead-actions .actions { display: grid; gap: 10px; width: auto; }
.masthead-actions .btn { width: 100%; }
.facts { margin: 0; color: var(--text-3); font-size: var(--fs-caption); line-height: 1.5; text-align: center; }

.ba {
  height: clamp(420px, calc(100svh - 300px), 800px);
  aspect-ratio: auto;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: var(--bg-media);
  --ba-pos: 50% 66%;
}
/* 开场前：整张都是负片，把手停在最右边 */
.ba-wait .ba-after { clip-path: inset(0 0 0 100%); }
.ba-wait .ba-handle { transform: translateX(100%); }
/* 把手用实心的纸色，任何照片上都看得清；按下时略微放大，表示抓住了 */
.ba-handle::before { background: var(--icon-paper); }
.ba-knob {
  top: 50%;
  width: 44px;
  height: 44px;
  background: var(--icon-paper);
  border: 0;
  color: var(--icon-blue);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 8px 22px rgb(0 0 0 / 0.3);
}
.ba-knob svg { width: 20px; height: 20px; }
.ba.is-dragging .ba-knob { transform: translate(-50%, -50%) scale(1.08); background: #fff; }
/* 标签压在亮天空上也要看得清（最亮处 4.9:1），左右和正文栏对齐 */
.ba-tag {
  top: 16px;
  padding: 5px 10px;
  border: 0;
  border-radius: var(--r-xs);
  color: var(--icon-paper);
  font-size: var(--fs-caption);
  background: rgb(18 18 16 / 0.64);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.ba-tag-l { left: max(var(--gutter), calc((100% - var(--maxw)) / 2)); }
.ba-tag-r { right: max(var(--gutter), calc((100% - var(--maxw)) / 2)); }
.hero-note { margin: 12px 0 0; text-align: left; font-size: var(--fs-caption); color: var(--text-3); max-width: none; text-wrap: pretty; }

@media (max-width: 1180px) {
  .masthead { grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "mark copy" "mark actions"; }
  .masthead-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; min-width: 0; }
  .masthead-actions .actions { display: flex; flex-wrap: wrap; }
  .masthead-actions .btn { width: auto; }
  .facts { text-align: left; }
}
@media (max-width: 860px) {
  .hero { display: flex; flex-direction: column; }
  .ba { order: 1; height: auto; aspect-ratio: 1 / 1; --ba-pos: 50% 50%; }
  .hero-head { order: 2; }
  .hero-foot { order: 3; }
  .masthead { display: block; padding-block: 20px 0; }
  .masthead-mark { display: none; }
  .masthead-actions { display: block; margin-top: 18px; }
  .facts { margin-top: 12px; }
  .hero-note { margin-top: 18px; max-width: none; }
}
@media (max-width: 480px) {
  .masthead-actions .btn { width: 100%; }
}
/* 平板：照片压扁一点，让标题和按钮留在第一屏 */
@media (min-width: 600px) and (max-width: 860px) {
  .ba { aspect-ratio: 3 / 2; --ba-pos: 50% 60%; }
}

/* 正文：靠留白和字号分组，不画线 */
.section { padding-block: var(--section-gap) 0; }
.section-head { max-width: 640px; margin-bottom: clamp(28px, 3.5vw, 44px); }
.page-head h1 { font-size: var(--fs-display); }
.spec-list { gap: clamp(32px, 3.6vw, 44px) clamp(32px, 4.5vw, 64px); }
.spec-list li { padding: 0; border: 0; }
.spec-list h3 svg { display: none; }
.spec-list h3, .step h3, .feature-text h2 { color: var(--text); }
.spec-list h3 { font-size: var(--fs-lead); margin-bottom: 6px; }
.step h3 { font-size: var(--fs-lead); }
.steps { gap: 32px clamp(32px, 4.5vw, 64px); }
.step { padding-top: 0; border-top: 0; }
.step-num {
  position: static;
  display: block;
  width: auto;
  height: auto;
  margin-bottom: 8px;
  border: 0;
  border-radius: 0;
  background: none;
  font-family: "Playfair Display", Constantia, Georgia, serif;
  font-style: italic;
  font-weight: 500;
  font-size: var(--fs-title);
  line-height: 1;
  color: var(--wordmark);
}

/* 截图加一圈极淡的轮廓，和背景分开 */
.frame { border: 0; border-radius: var(--r-lg); background: var(--bg-media); box-shadow: 0 0 0 1px var(--img-outline); }

/* 软件是深色界面，这一段铺一整块图标蓝，截图浮在上面 */
.band { margin-top: var(--section-gap); padding-block: clamp(64px, 8vw, 112px); background: var(--icon-blue); color: var(--icon-paper); }
.band .section-head h2 { color: var(--sand); }
.band .section-head p { color: rgb(246 248 252 / 0.84); }
.band .frame { background: #1a1a1d; box-shadow: 0 0 0 1px rgb(255 255 255 / 0.12), 0 40px 80px -36px rgb(0 0 0 / 0.7); }

/* 结尾行动区：文字在左，按钮在右，和上面共用一条左边线 */
.cta-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "title actions" "text fine";
  gap: 8px clamp(32px, 5vw, 72px);
  align-items: end;
  justify-items: stretch;
  padding: 0;
  border: 0;
  border-radius: 0;
  text-align: left;
}
.cta-panel h2 { grid-area: title; font-size: var(--fs-title); margin: 0; }
.cta-panel > p:not(.fineprint) { grid-area: text; margin: 0; max-width: none; }
.cta-panel .actions { grid-area: actions; justify-content: flex-end; }
.cta-panel .fineprint { grid-area: fine; margin: 0; text-align: right; }
@media (max-width: 760px) {
  .cta-panel { grid-template-columns: 1fr; grid-template-areas: "title" "text" "actions" "fine"; }
  .cta-panel .actions { justify-content: flex-start; margin-top: 14px; }
  .cta-panel .fineprint { text-align: left; margin-top: 4px; }
}

.note { border: 0; background: var(--tint); border-radius: var(--r-md); }
.two-col .panel { padding-top: 0; border-top: 0; }
.footer-brand .wordmark-sm { height: 44px; }

/* 系统偏好：减少动态、减少透明、提高对比度 */
@media (prefers-reduced-motion: reduce) {
  .site-header .brand { transition: opacity 200ms ease; }
  .js .site-header[data-masthead] .brand:not(:focus-visible) { transform: none; }
  .ba.is-dragging .ba-knob { transform: translate(-50%, -50%); }
}
@media (prefers-reduced-transparency: reduce) {
  .site-header { background: var(--bg); -webkit-backdrop-filter: none; backdrop-filter: none; }
  .ba-tag { background: rgb(18 18 16 / 0.9); -webkit-backdrop-filter: none; backdrop-filter: none; }
}
@media (prefers-contrast: more) {
  :root { --text-2: var(--text); --text-3: var(--text); --line: var(--text-2); --line-2: var(--text); --accent-edge: var(--text); }
  .site-header { background: var(--bg); -webkit-backdrop-filter: none; backdrop-filter: none; }
  .ba-tag { background: #121210; }
}
