/* ============================================================
   笔随官网 · 公共样式（首页和所有子页共用）
   ------------------------------------------------------------
   配色直接取应用里玻璃主题的值（src/shells/glass/tokens.css、base.css、
   glass-theme-overrides.css）：日夜两档 × 薰衣草 / 冰川青 / 雾蓝，
   写在 html[data-mode][data-accent] 上。首页「外观」段落和顶栏的日夜按钮
   切的都是它，选择记在本机，换页也跟着。
   每页只放自己的布局：首页 home.css、子页 pages.css、登录页 signin.css。
   ============================================================ */

:root {
  --serif: "Noto Serif SC", "Songti SC", "STSong", "Source Han Serif SC", "SimSun", serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --latin: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;

    --r-xl: 28px;
  --r-lg: 20px;
  --r-md: 14px;
  --r-sm: 10px;

  --wrap: 1180px;
  --gutter: 32px;
  --ease: cubic-bezier(.2, .7, .1, 1);
}

/* ── 夜间 ── */
html[data-mode="night"] {
  color-scheme: dark;
  --bg: #131316;
  --txt: #edeff3;
  --txt2: rgba(237, 239, 243, .68);
  --txt3: rgba(237, 239, 243, .5);
  --txt4: rgba(237, 239, 243, .34);

  --glass: rgba(255, 255, 255, .038);
  --glass-hi: rgba(255, 255, 255, .07);
  --glass-lite: rgba(255, 255, 255, .055);
  --edge: rgba(255, 255, 255, .08);
  --sep: rgba(255, 255, 255, .07);
  --well: rgba(255, 255, 255, .035);
  --sheen: rgba(255, 255, 255, .1);
  --shadow: 0 40px 90px -30px rgba(0, 0, 0, .75), 0 12px 30px -12px rgba(0, 0, 0, .5);
  --shadow-sm: 0 18px 40px -20px rgba(0, 0, 0, .7);
  --paper: rgba(24, 24, 28, .62);

  --rim: linear-gradient(152deg,
    rgba(228, 236, 248, .26) 0%, rgba(210, 220, 236, .12) 14%, rgba(190, 200, 218, .05) 30%,
    rgba(170, 180, 198, .025) 55%, rgba(190, 200, 218, .06) 78%, rgba(228, 236, 248, .16) 100%);

  --ok: #4cd483;
  --blob-a: .55;
  --grain: .07;
}

/* ── 白天 ── */
html[data-mode="day"] {
  color-scheme: light;
  --bg: #f1f0ec;
  --txt: rgba(23, 27, 29, .95);
  --txt2: rgba(30, 35, 37, .72);
  --txt3: rgba(38, 44, 46, .55);
  --txt4: rgba(45, 52, 55, .4);

  --glass: rgba(255, 255, 255, .42);
  --glass-hi: rgba(255, 255, 255, .7);
  --glass-lite: rgba(255, 255, 255, .55);
  --edge: rgba(42, 50, 53, .1);
  --sep: rgba(42, 50, 53, .09);
  --well: rgba(42, 50, 53, .045);
  --sheen: rgba(255, 255, 255, .8);
  --shadow: 0 40px 90px -36px rgba(32, 39, 42, .32), 0 12px 30px -14px rgba(32, 39, 42, .18);
  --shadow-sm: 0 18px 40px -22px rgba(32, 39, 42, .3);
  --paper: rgba(255, 255, 255, .6);

  --rim: linear-gradient(152deg,
    rgba(255, 255, 255, .95) 0%, rgba(255, 255, 255, .6) 14%, rgba(42, 50, 53, .05) 36%,
    rgba(42, 50, 53, .08) 60%, rgba(42, 50, 53, .12) 82%, rgba(255, 255, 255, .5) 100%);

  --ok: #3f9d68;
  --blob-a: .7;
  --grain: .05;
}

/* ── 强调色与色场（RGB 三元组，与应用同值） ── */
html[data-mode="night"][data-accent="lavender"] { --accent: #b4a8ff; --f1: 84 72 136; --f2: 56 84 128; --f3: 88 70 120; --f4: 60 96 104; }
html[data-mode="night"][data-accent="glacier"]  { --accent: #6fd3c6; --f1: 40 104 98; --f2: 46 80 122; --f3: 42 96 80; --f4: 70 72 124; }
html[data-mode="night"][data-accent="mist"]     { --accent: #8fb6ff; --f1: 50 76 138; --f2: 72 66 126; --f3: 40 88 118; --f4: 60 74 104; }
html[data-mode="day"][data-accent="lavender"]   { --accent: #6e5fd0; --f1: 184 172 238; --f2: 150 186 232; --f3: 198 176 230; --f4: 150 206 204; }
html[data-mode="day"][data-accent="glacier"]    { --accent: #23938a; --f1: 146 210 200; --f2: 156 196 232; --f3: 168 214 190; --f4: 182 186 232; }
html[data-mode="day"][data-accent="mist"]       { --accent: #3a74d8; --f1: 160 188 240; --f2: 180 178 236; --f3: 150 204 228; --f4: 172 188 216; }

html {
  --accent-soft: color-mix(in srgb, var(--accent) 16%, transparent);
  --accent-line: color-mix(in srgb, var(--accent) 45%, transparent);
  --on-accent: #111018;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
html[data-mode="day"] { --on-accent: #fff; }

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--txt);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color .6s var(--ease), color .6s var(--ease);
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
p, h1, h2, h3, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }
::selection { background: var(--accent-soft); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 8px; }

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ============================================================
   色场：四团很淡的颜色慢慢漂，加一层颗粒
   ============================================================ */
.field {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.blob {
  position: absolute;
  width: 62vmax;
  height: 62vmax;
  border-radius: 50%;
  filter: blur(40px);
  opacity: var(--blob-a);
  transition: background .8s var(--ease), opacity .8s var(--ease);
  will-change: transform;
}
.b1 { left: -18vmax; top: -22vmax; background: radial-gradient(closest-side, rgb(var(--f1) / .9), transparent); animation: drift1 38s ease-in-out infinite alternate; }
.b2 { right: -20vmax; top: -10vmax; background: radial-gradient(closest-side, rgb(var(--f2) / .85), transparent); animation: drift2 44s ease-in-out infinite alternate; }
.b3 { right: -14vmax; bottom: -30vmax; background: radial-gradient(closest-side, rgb(var(--f3) / .8), transparent); animation: drift3 50s ease-in-out infinite alternate; }
.b4 { left: -20vmax; bottom: -26vmax; background: radial-gradient(closest-side, rgb(var(--f4) / .7), transparent); animation: drift1 56s ease-in-out infinite alternate-reverse; }
@keyframes drift1 { to { transform: translate3d(12vmax, 8vmax, 0) scale(1.08); } }
@keyframes drift2 { to { transform: translate3d(-10vmax, 12vmax, 0) scale(.94); } }
@keyframes drift3 { to { transform: translate3d(-8vmax, -10vmax, 0) scale(1.1); } }

.grain {
  position: absolute;
  inset: -50%;
  opacity: var(--grain);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .5  0 0 0 0 .5  0 0 0 0 .5  0 0 0 1 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  mix-blend-mode: overlay;
}

/* ============================================================
   玻璃材质：底色 + 模糊 + 斜向立体边 + 指针高光
   ============================================================ */
.glass {
  position: relative;
  background:
    radial-gradient(420px circle at var(--mx, 30%) var(--my, 0%), var(--glass-hi), transparent 60%),
    var(--glass);
  -webkit-backdrop-filter: blur(28px) saturate(150%);
  backdrop-filter: blur(28px) saturate(150%);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow), inset 0 1px 0 var(--sheen);
}
.glass::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: var(--rim);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
.glass-lite {
  background: var(--glass-lite);
  border: 1px solid var(--edge);
  border-radius: var(--r-md);
}

/* ============================================================
   通用排版
   ============================================================ */
.display {
  font-family: var(--serif);
  font-weight: 700;
  letter-spacing: .02em;
  line-height: 1.12;
}
.h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(32px, 4.4vw, 54px);
  line-height: 1.22;
  letter-spacing: .01em;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  font-size: 13px;
  letter-spacing: .3em;
  color: var(--accent);
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: currentColor;
  opacity: .7;
}
.body {
  max-width: 34em;
  margin-top: 22px;
  font-size: 17px;
  color: var(--txt2);
}
.link { color: var(--accent); border-bottom: 1px solid var(--accent-line); }
.br-sm { display: none; }
.gap-sm { display: inline-block; width: .6em; }

.section { padding-top: clamp(96px, 13vw, 168px); }
.section-head { max-width: 760px; margin-bottom: 56px; }

.tag {
  display: inline-block;
  padding: 1px 8px;
  margin-right: 8px;
  border-radius: 999px;
  font-size: 11.5px;
  letter-spacing: .06em;
  color: var(--accent);
  background: var(--accent-soft);
  vertical-align: 1px;
}

/* ── 按钮 ── */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 52px;
  padding: 0 26px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 500;
  white-space: nowrap;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s;
}
.btn small { font-size: 12.5px; color: var(--txt3); font-weight: 400; }
.btn .arrow { transition: transform .25s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }
.btn:active { transform: scale(.97); }
.btn-primary {
  color: var(--on-accent);
  background: var(--accent);
  box-shadow: 0 10px 30px -8px color-mix(in srgb, var(--accent) 60%, transparent), inset 0 1px 0 rgba(255, 255, 255, .35);
}
.btn-primary:hover { box-shadow: 0 14px 40px -8px color-mix(in srgb, var(--accent) 75%, transparent), inset 0 1px 0 rgba(255, 255, 255, .35); transform: translateY(-1px); }
.btn-glass {
  background: var(--glass-lite);
  border: 1px solid var(--edge);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}
.btn-glass:hover { background: var(--glass-hi); transform: translateY(-1px); }
.btn-sm { height: 38px; padding: 0 18px; font-size: 14px; }

/* ── 标志：跟强调色走的玻璃小方块 ── */
.mark {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 15px;
  line-height: 1;
  color: var(--on-accent);
  background: linear-gradient(145deg, color-mix(in srgb, var(--accent) 70%, #fff), var(--accent) 55%, color-mix(in srgb, var(--accent) 70%, #000));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 6px 16px -6px color-mix(in srgb, var(--accent) 70%, transparent);
  transition: background .6s var(--ease);
}
.mark-xl {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  font-size: 34px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 18px 40px -12px color-mix(in srgb, var(--accent) 75%, transparent);
}

/* ============================================================
   顶栏：浮起来的玻璃胶囊
   ============================================================ */
.topbar {
  position: fixed;
  top: 14px;
  left: 0;
  right: 0;
  z-index: 50;
  padding: 0 16px;
  transition: transform .4s var(--ease);
}
.topbar-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  max-width: calc(var(--wrap) + 32px);
  height: 58px;
  margin: 0 auto;
  padding: 0 10px 0 18px;
  border-radius: 999px;
  box-shadow: var(--shadow-sm), inset 0 1px 0 var(--sheen);
}
.topbar[data-top="1"] .topbar-inner {
  background: transparent;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.topbar[data-top="1"] .topbar-inner::before { opacity: 0; }
.topbar-inner::before { transition: opacity .3s; }

.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-name { font-family: var(--serif); font-weight: 700; font-size: 19px; letter-spacing: .08em; }
.brand-en { font-family: var(--latin); font-style: italic; font-size: 16px; color: var(--txt3); }

.topnav { display: flex; gap: 4px; margin-left: auto; }
.topnav a {
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 14.5px;
  color: var(--txt2);
  transition: color .2s, background .2s;
}
.topnav a:hover { color: var(--txt); background: var(--well); }
.topnav a[aria-current="page"] { color: var(--txt); background: var(--well); }


.seg {
  position: relative;
  display: inline-grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  padding: 4px;
  margin-bottom: 16px;
  border-radius: 999px;
}
.seg button {
  position: relative;
  z-index: 1;
  padding: 7px 18px;
  border-radius: 999px;
  font-size: 14px;
  color: var(--txt3);
  transition: color .3s;
}
.seg button[aria-selected="true"], .seg button[aria-checked="true"] { color: var(--txt); }
.seg-thumb {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc(50% - 4px);
  border-radius: 999px;
  background: var(--glass-hi);
  box-shadow: var(--shadow-sm), inset 0 1px 0 var(--sheen);
  transition: transform .45s var(--ease);
}
.seg[data-index="1"] .seg-thumb { transform: translateX(100%); }

/* ============================================================
   常见问题
   ============================================================ */
.faq-grid {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}
.faq-list { display: grid; gap: 12px; }
.qa { border-radius: var(--r-md); box-shadow: var(--shadow-sm), inset 0 1px 0 var(--sheen); }
.qa summary {
  position: relative;
  display: block;
  padding: 22px 60px 22px 26px;
  font-size: 16.5px;
  font-weight: 500;
  cursor: pointer;
  list-style: none;
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after {
  content: "";
  position: absolute;
  right: 26px;
  top: 50%;
  width: 9px;
  height: 9px;
  margin-top: -7px;
  border-right: 1.5px solid var(--txt3);
  border-bottom: 1.5px solid var(--txt3);
  transform: rotate(45deg);
  transition: transform .3s var(--ease), margin .3s var(--ease);
}
.qa[open] summary::after { transform: rotate(-135deg); margin-top: -2px; border-color: var(--accent); }
.qa p { padding: 0 60px 24px 26px; color: var(--txt2); }

/* ============================================================
   页脚
   ============================================================ */
.footer { padding: 56px 0 40px; border-top: 1px solid var(--sep); }
.footer-inner { display: flex; justify-content: space-between; gap: 48px; flex-wrap: wrap; }
.footer-brand p { margin-top: 12px; color: var(--txt3); font-size: 14px; }
.footer-links { display: flex; gap: clamp(40px, 7vw, 96px); }
.footer-links p { margin-bottom: 12px; font-size: 12.5px; letter-spacing: .2em; color: var(--txt4); }
.footer-links a { display: block; padding: 3px 0; font-size: 14.5px; color: var(--txt2); transition: color .2s; }
.footer-links a:hover { color: var(--txt); }
.footer-legal {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 24px;
  margin-top: 48px;
  font-size: 12.5px;
  color: var(--txt4);
}
.footer-legal .ver:not(:empty)::before { content: " · "; }
.records { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.records a:hover { color: var(--txt2); }

/* ============================================================
   进场动画
   ============================================================ */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* ── 日夜切换（顶栏） ── */
.mode-toggle {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: var(--txt2);
  transition: background .2s, color .2s;
}
.mode-toggle:hover { background: var(--well); color: var(--txt); }
.mode-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
/* 显示点了之后会换成的那一档 */
html[data-mode="night"] .mode-toggle .moon, html[data-mode="day"] .mode-toggle .sun { display: none; }

.cta-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 40px; }
.cta-row.center { justify-content: center; }

/* ── 子页通用：页头 ── */
.page-hero { padding-top: clamp(150px, 18vh, 200px); }
.page-hero .display { font-size: clamp(44px, 6.4vw, 84px); }
.page-hero .lede {
  max-width: 34em;
  margin-top: 26px;
  font-size: clamp(16px, 1.4vw, 18px);
  color: var(--txt2);
}

/* ── 表单控件 ── */
.input, .select, .textarea {
  width: 100%;
  min-height: 46px;
  padding: 11px 16px;
  border-radius: 12px;
  border: 1px solid var(--edge);
  background: var(--well);
  color: var(--txt);
  font: inherit;
  font-size: 15px;
  transition: border-color .2s, background .2s, box-shadow .2s;
}
.textarea { min-height: 120px; resize: vertical; line-height: 1.7; }
.input::placeholder, .textarea::placeholder { color: var(--txt4); }
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--accent-line);
  background: var(--glass-lite);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.input:disabled, .select:disabled, .textarea:disabled { opacity: .55; cursor: not-allowed; }
.select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 40px;
  background-image: linear-gradient(45deg, transparent 50%, var(--txt3) 50%), linear-gradient(135deg, var(--txt3) 50%, transparent 50%);
  background-position: calc(100% - 20px) 52%, calc(100% - 15px) 52%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
}
.select option { color: #111; }
.label { display: block; margin-bottom: 8px; font-size: 13.5px; color: var(--txt2); }
.label small { color: var(--txt4); font-size: 12.5px; }

/* 状态提示（提交成功、失败） */
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 60;
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 14.5px;
  transform: translateX(-50%);
  animation: toast-in .4s var(--ease);
}
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 10px); } }

/* ============================================================
   响应式（公共）
   ============================================================ */
@media (max-width: 860px) {
  :root { --gutter: 20px; }
  .topnav { display: none; }
  .topbar-inner .mode-toggle { margin-left: auto; }
  .br-lg { display: none; }
}

@media (max-width: 640px) {
  :root { --gutter: 16px; }
  .br-sm { display: inline; }
  .gap-sm { display: none; }
  .brand-en { display: none; }
  .topbar { top: 10px; padding: 0 10px; }
  .topbar-inner { height: 52px; padding: 0 7px 0 14px; gap: 10px; }
  .btn { height: 48px; padding: 0 22px; }
  .cta-row .btn { flex: 1 1 auto; justify-content: center; }
  .qa summary { padding: 18px 48px 18px 20px; }
  .qa summary::after { right: 20px; }
  .qa p { padding: 0 20px 20px; }
  .footer-links { gap: 32px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .blob, .toast { animation: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
}
