/* NKS-476 — Alayo 品牌视觉系统（全站唯一 token 定义处）。
   设计 token、reset、品牌栏/产品栏/页脚、按钮、基础排版、产品卡。
   页面专属样式各自放 assets/<page>.css，在本文件之后加载，可覆盖。
   NKS-576 — 对齐 Alayo Workbench app「Quiet Islands」（31.1-Alayo DESIGN.md §1）：中性灰点阵画布、浮岛材质、
   SF 无衬线、圆角阶梯、卡片/岛阴影；深色跟随系统。颜色字面值只允许出现在下面两个 :root 块里，
   页面 css 一律引用 token（需要新颜色就在两套 :root 里加具名 token）。 */
:root {
  color-scheme: light dark;
  --canvas: #F1F2F4;
  --surface: #FFFFFF;
  --panel: #FFFFFF;
  --card: #FFFFFF;
  --island: rgba(255,255,255,.86);
  --border: rgba(25,28,38,.09);
  --region: rgba(25,28,38,.045);
  --dot: rgba(25,28,38,.065);
  --ink: #23252C;
  --ink-2: #5C606C;
  --ink-3: #656870;
  --accent: #4257B5;
  --accent-ink: #35468F;
  --accent-soft: rgba(66,87,181,.10);
  --accent-soft-strong: rgba(66,87,181,.16);
  --link-underline: rgba(53,70,143,.35);
  --on-accent: #FFFFFF;
  --pending: #E08930;
  --danger: #C8362C;
  --scrim: rgba(35,37,44,.25);
  --bezel: #171B28;
  --shadow-card: 0 2px 8px rgba(20,22,30,.08), 0 0 0 .5px rgba(25,28,38,.05);
  --shadow-island: 0 8px 24px rgba(20,22,30,.08), 0 1px 2px rgba(20,22,30,.04);
  --shadow-lifted: 0 10px 28px rgba(20,22,30,.18);
  --serif: "Newsreader", "Iowan Old Style", Georgia, "Songti SC", "STSong", serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --radius-chip: 6px;
  --radius-button: 9px;
  --radius: 10px;
  --radius-island: 14px;
  --radius-region: 16px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --canvas: #212228;
    --surface: #2B2D34;
    --panel: #2B2D34;
    --card: #33353C;
    --island: rgba(43,45,52,.88);
    --border: rgba(255,255,255,.10);
    --region: rgba(255,255,255,.05);
    --dot: rgba(255,255,255,.055);
    --ink: #E8EAF0;
    --ink-2: #A3A8B5;
    --ink-3: #9DA1AC;
    --accent: #7B8CDE;
    --accent-ink: #AAB5EE;
    --accent-soft: rgba(123,140,222,.16);
    --accent-soft-strong: rgba(123,140,222,.24);
    --link-underline: rgba(170,181,238,.40);
    --on-accent: #14151A;
    --pending: #E09A4E;
    --danger: #F08A82;
    --scrim: rgba(0,0,0,.42);
    --bezel: #171B28;
    --shadow-card: 0 2px 8px rgba(0,0,0,.28), 0 0 0 .5px rgba(255,255,255,.05);
    --shadow-island: 0 8px 24px rgba(0,0,0,.34), 0 1px 2px rgba(0,0,0,.2);
    --shadow-lifted: 0 10px 28px rgba(0,0,0,.5);
  }
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  background-color: var(--canvas);
  background-image: radial-gradient(var(--dot) 1px, transparent 1.2px);
  background-size: 20px 20px;
  color: var(--ink);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection { background: var(--accent-soft); }
::placeholder { color: var(--ink-3); opacity: 1; }
/* 作者规则的 display 会覆盖 UA 的 [hidden]{display:none}，必须作者级兜底（NKS-252） */
[hidden] { display: none !important; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
code, kbd, pre, samp { font-family: var(--mono); }
hr { border: none; border-top: 1px solid var(--border); }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 24px; }
.prose { max-width: 660px; }

/* ---------- 品牌栏：一座岛（NKS-576） ----------
   header 同时带 .wrap；岛的外沿与 .wrap 内容列对齐（宽屏 992 居中、窄屏左右各留 24），不做 sticky。 */
.site-header {
  width: calc(100% - 48px); max-width: 992px;
  margin: 16px auto 0; padding: 0 12px 0 16px;
  background: var(--island);
  -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px);
  border-radius: var(--radius-island);
  box-shadow: var(--shadow-island), inset 0 0 0 .5px var(--border);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 0; gap: 16px;
}
.logo {
  font-family: var(--serif); font-weight: 600; font-size: 21px;
  letter-spacing: -0.01em; color: var(--ink); text-decoration: none;
  display: inline-flex; align-items: center; gap: 9px; flex: none;
}
.logo .dot { color: var(--accent); }
.logo svg { display: block; }
/* LOGO_SVG 的 stroke/fill 是写死的 presentation attribute，CSS 属性优先级更高，随主题换色 */
.logo svg rect { stroke: var(--ink); }
.logo svg circle { fill: var(--accent); }
.nav-right { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.nav-link {
  font-size: 14px; font-weight: 550; color: var(--ink-2); text-decoration: none; flex: none;
  padding: 6px 10px; border-radius: var(--radius-button);
}
.nav-link:hover { color: var(--accent-ink); }
.nav-link.active { color: var(--accent-ink); background: var(--accent-soft); font-weight: 650; }
.lang-switch {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13.5px; font-weight: 550; color: var(--ink-2);
  text-decoration: none; flex: none; transition: color .15s ease;
  padding: 6px 10px;
}
.lang-switch:hover { color: var(--accent-ink); }
.lang-switch svg { display: block; opacity: .8; }
.nav-cta {
  display: inline-flex; align-items: center; height: 34px;
  font-size: 14px; font-weight: 600; color: var(--on-accent);
  text-decoration: none; padding: 0 14px; margin-left: 4px;
  border-radius: var(--radius-button); background: var(--accent); flex: none;
  transition: background .15s ease;
}
.nav-cta:hover { background: var(--accent-ink); }

/* ---------- 产品栏（产品页：品牌栏岛内第二行） ---------- */
.product-bar {
  display: flex; align-items: center; gap: 16px;
  border-top: 1px solid var(--border); padding: 8px 0 9px;
  overflow-x: auto; scrollbar-width: none;
}
.product-bar::-webkit-scrollbar { display: none; }
.product-name {
  display: inline-flex; align-items: baseline; gap: 8px; flex: none;
  font-family: var(--sans); font-weight: 650; font-size: 15px; letter-spacing: -0.005em;
  color: var(--ink); text-decoration: none; white-space: nowrap;
}
.product-name .platform {
  font-family: var(--sans); font-size: 11px; font-weight: 600; letter-spacing: .04em; color: var(--ink-3);
  background: var(--region); border-radius: var(--radius-chip); padding: 1px 6px;
}
.product-links { display: flex; gap: 2px; }
.product-links a {
  font-size: 14px; font-weight: 550; color: var(--ink-2); text-decoration: none;
  white-space: nowrap; padding: 5px 10px; border-radius: var(--radius-button);
}
.product-links a:hover { color: var(--accent-ink); }
.product-links a[aria-current] { color: var(--accent-ink); background: var(--accent-soft); font-weight: 600; }

/* 小屏：收起「帮助」文字链（页脚仍有全部入口），保留产品链接、语言切换、CTA（NKS-355 / NKS-473） */
@media (max-width: 700px) {
  .nav { flex-wrap: wrap; gap: 8px; }
  .nav-right { gap: 2px; }
  .nav-secondary { display: none; }
  .product-bar { gap: 10px; }
  .product-links { gap: 0; }
}

/* ---------- 基础排版 ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 600; letter-spacing: .06em;
  color: var(--ink-3); background: var(--island);
  box-shadow: inset 0 0 0 .5px var(--border);
  padding: 3px 10px; border-radius: 99px; margin-bottom: 20px;
}
h1 {
  font-family: var(--sans); font-weight: 650; font-size: clamp(36px, 5.6vw, 56px);
  line-height: 1.15; letter-spacing: -0.02em; max-width: 820px;
  text-wrap: balance;
}
h1 em { font-style: normal; color: var(--accent); }
.subhead {
  margin-top: 20px; font-size: clamp(18px, 2.2vw, 20px); color: var(--ink-2);
  max-width: 640px; text-wrap: pretty;
}
.subhead em { font-style: italic; }
.section-label {
  font-size: 12px; font-weight: 600; letter-spacing: .06em;
  color: var(--ink-3); margin-bottom: 10px;
}
h2 {
  font-family: var(--sans); font-weight: 650; font-size: clamp(26px, 3.6vw, 34px);
  line-height: 1.25; letter-spacing: -0.015em; margin-bottom: 22px; text-wrap: balance;
}
.lede { font-size: 19px; color: var(--ink-2); text-wrap: pretty; }
.lede + .lede { margin-top: 18px; }
.lede strong { color: var(--ink); font-weight: 600; }
.lede em { font-style: italic; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 15.5px; font-weight: 600; line-height: 1.25; text-decoration: none;
  padding: 12px 22px; border-radius: var(--radius-button);
  transition: transform .12s ease, box-shadow .15s ease, background .15s ease;
}
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-ink); transform: translateY(-1px); }
/* NKS-576 — ghost 改为 soft 按钮：与主按钮同高同圆角 */
.btn-ghost { background: var(--accent-soft); color: var(--accent-ink); }
.btn-ghost:hover { background: var(--accent-soft-strong); transform: translateY(-1px); }
button.btn { border: none; cursor: pointer; font: inherit; font-size: 15.5px; font-weight: 600; line-height: 1.25; }
button.btn:disabled { cursor: wait; opacity: .55; }
.cta-note { font-size: 13.5px; color: var(--ink-3); margin-top: 12px; }

/* ---------- 产品卡（品牌首页 / 帮助入口） ---------- */
.product-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; margin-top: 36px; }
.product-card {
  display: flex; flex-direction: column; gap: 10px;
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow-card);
  padding: 26px 26px 22px; text-decoration: none; color: inherit;
  transition: box-shadow .15s ease, transform .12s ease;
}
.product-card:hover { transform: translateY(-1px); box-shadow: var(--shadow-lifted); }
.card-meta {
  display: flex; align-items: center; gap: 8px;
  font-size: 12.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3);
}
.card-meta .status { color: var(--accent-ink); background: var(--accent-soft); border-radius: var(--radius-chip); padding: 2px 8px; }
.card-meta .status-presale { color: var(--on-accent); background: var(--accent); }
.card-meta .status-available { color: var(--on-accent); background: var(--accent); }
.product-card h3 { font-family: var(--sans); font-weight: 650; font-size: 22px; letter-spacing: -0.015em; }
.card-tagline { font-family: var(--sans); font-size: 16.5px; font-weight: 500; color: var(--ink); }
.product-card p { font-size: 15.5px; color: var(--ink-2); text-wrap: pretty; }
.card-cta { margin-top: auto; padding-top: 8px; font-size: 15px; font-weight: 590; color: var(--accent-ink); }

/* ---------- 页脚 ---------- */
.site-footer { padding: 56px 0 64px; }
.site-footer .wrap { border-top: 1px solid var(--border); padding-top: 32px; }
.foot-brand { font-family: var(--serif); font-size: 15.5px; color: var(--ink-2); margin-bottom: 24px; }
.foot-brand .dot { color: var(--accent); }
.foot-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.foot-col { display: flex; flex-direction: column; gap: 8px; }
.foot-col h4 {
  font-family: var(--sans); font-size: 12.5px; font-weight: 650; letter-spacing: .05em;
  text-transform: uppercase; color: var(--ink-3); margin-bottom: 4px;
}
.foot-col a { font-size: 14.5px; color: var(--ink-2); text-decoration: none; }
.foot-col a:hover { color: var(--accent-ink); }
.foot-copy { margin-top: 32px; font-size: 13.5px; color: var(--ink-3); }
@media (max-width: 640px) {
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .site-footer { padding: 40px 0 56px; }
}
