/* Gobob OpenWeb — 官网样式
 *
 * 配色全部走 encc-palette.css 的 token, 本文件不出现任何裸 hex 色值
 * (阴影/骨架屏的 rgba 除外, 它们是中性色, 不参与品牌表达)。
 * 改品牌色只需改 encc-palette.css 一处。
 *
 * 移动优先: 留学机构客户大量从微信内置浏览器打开, 首屏和 CTA 必须先于装饰。
 */

@import url("/assets/encc-palette.css");

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 76px; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
               "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--surface);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5em; letter-spacing: -.02em; }
p { margin: 0 0 1rem; }
a { color: var(--brand); }
b, strong { font-weight: 650; color: var(--ink); }
code {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
  font-size: .9em;
  background: var(--surface-sunk);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: .1em .38em;
}

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.muted { color: var(--ink-3); }
.grad {
  background: var(--grad-brand);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  /* 降级: 不支持 background-clip:text 时用品牌紫 */
  color: var(--brand);
}

/* ── 导航 ─────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; gap: 20px; height: 68px; }
.brand { display: flex; align-items: center; gap: 9px; text-decoration: none; }
.brand img { height: 26px; width: auto; display: block; }
.brand-sub {
  font-size: 12px; font-weight: 600; color: var(--ink-3);
  padding-left: 9px; border-left: 1px solid var(--line-2);
  letter-spacing: .02em;
}
.nav-links { display: none; gap: 22px; margin-left: auto; }
.nav-links a { color: var(--ink-2); text-decoration: none; font-size: 14.5px; transition: color .15s; }
.nav-links a:hover { color: var(--brand); }
.nav-cta { display: flex; gap: 8px; margin-left: auto; }
.nav-links + .nav-cta { margin-left: 0; }
@media (min-width: 900px) { .nav-links { display: flex; } }

/* ── 按钮 ─────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 9px 18px; border-radius: 10px;
  font-size: 14.5px; font-weight: 600; text-decoration: none;
  border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  transition: transform .12s ease, box-shadow .2s ease, background .2s ease, color .2s ease, border-color .2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

/* 主按钮: 品牌渐变, 白字。渐变中部对白字对比度偏低,
 * 故渐变两端取 700/600 档而非亮橙 500 — 保证可读。 */
.btn-primary { background: var(--grad-brand); color: #fff; box-shadow: var(--shadow-brand); }
.btn-primary:hover { background: linear-gradient(100deg, var(--brand-800) 0%, var(--accent-700) 100%); box-shadow: 0 8px 26px rgba(183,27,103,.34); }

.btn-outline { background: var(--surface); color: var(--brand); border-color: var(--brand-border); }
.btn-outline:hover { background: var(--brand-soft); border-color: var(--brand); }

.btn-ghost { color: var(--ink-2); }
.btn-ghost:hover { background: var(--surface-soft); color: var(--ink); }

.btn-dark { background: var(--ink); color: var(--surface); }
.btn-dark:hover { background: var(--brand-900); }

/* 结尾 CTA 区的按钮 — 那个区块永远是品牌渐变底, 所以按钮要反色。
   ⚠️ 文字色用 --brand (会随主题切档), 不能写死 --brand-700:
      暗色下按钮底是深色, 配近黑的 brand-700 会糊成一片。 */
.btn-white { background: var(--surface); color: var(--brand); }
.btn-white:hover { background: var(--brand-soft); }
.btn-ghost-light { color: #fff; border-color: rgba(255,255,255,.4); }
.btn-ghost-light:hover { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.6); }

/* ── 图标 (单色扁平化, 规范见 docs/ICON_STYLE.md) ──── */
/* ⚠ 这三条规则在 index.html 里也内联了一份 (critical CSS)。外部 CSS 可能被
   CDN 缓存到旧版, 那时图标会因缺尺寸规则而撑成黑块 — 内联那份保证即使
   拿到旧 CSS 页面也不会崩。改这里的值请同步改 index.html 的 <style>。 */
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 24px; height: 24px; display: block; flex: 0 0 auto; }
.icon-sm { width: 18px; height: 18px; }

.btn-lg { padding: 13px 30px; font-size: 16px; border-radius: 12px; }
.btn-block { width: 100%; margin-top: 18px; }

/* ── 主题切换按钮 ─────────────────────────────────── */
/* 两个图标叠在一起, 用 CSS 按当前主题显示对应那个 */
.theme-toggle {
  display: grid; place-items: center;
  width: 36px; height: 36px; flex: 0 0 auto;
  background: transparent; color: var(--ink-2);
  border: 1px solid var(--line); border-radius: 10px;
  cursor: pointer; padding: 0;
  transition: color .18s ease, background .18s ease, border-color .18s ease;
}
.theme-toggle:hover { color: var(--brand); background: var(--surface-soft); border-color: var(--brand-border); }
.theme-toggle .icon { grid-area: 1 / 1; width: 18px; height: 18px; transition: transform .25s ease, opacity .18s ease; }

/* 浅色主题: 显示月亮 (点击去深色) */
.theme-toggle .ico-moon  { opacity: 1; transform: scale(1) rotate(0); }
.theme-toggle .ico-sun   { opacity: 0; transform: scale(.6) rotate(-70deg); }

/* 深色主题: 显示太阳 (点击去浅色) */
:root[data-theme="dark"] .theme-toggle .ico-sun   { opacity: 1; transform: scale(1) rotate(0); }
:root[data-theme="dark"] .theme-toggle .ico-moon  { opacity: 0; transform: scale(.6) rotate(70deg); }
/* 跟随系统且系统是深色时, 同样显示太阳 */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .ico-sun  { opacity: 1; transform: scale(1) rotate(0); }
  :root:not([data-theme="light"]) .theme-toggle .ico-moon { opacity: 0; transform: scale(.6) rotate(70deg); }
}

/* ── Hero ─────────────────────────────────────────── */
.hero {
  position: relative;
  padding: 72px 0 80px;
  overflow: hidden;
  background: var(--surface-soft);
}
/* 品牌光晕 — 用两个品牌色做极淡的径向叠加, 不喧宾夺主 */
.hero::before, .hero::after {
  content: ""; position: absolute; border-radius: 50%;
  filter: blur(90px); pointer-events: none; z-index: 0;
}
.hero::before {
  width: 560px; height: 560px; top: -280px; left: -140px;
  background: radial-gradient(circle, rgba(183,27,103,.20), transparent 70%);
}
.hero::after {
  width: 620px; height: 620px; top: -240px; right: -180px;
  background: radial-gradient(circle, rgba(249,101,62,.20), transparent 70%);
}
.hero-inner { position: relative; z-index: 1; text-align: center; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  margin: 0 0 20px; padding: 5px 15px 5px 8px;
  background: var(--surface); border: 1px solid var(--brand-border);
  border-radius: 999px; color: var(--brand);
  font-size: 13px; font-weight: 600;
  box-shadow: var(--shadow-sm);
}
.eyebrow::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: var(--grad-brand);
}
.hero h1 { font-size: clamp(34px, 7vw, 62px); font-weight: 800; margin-bottom: 20px; }
.lede { max-width: 660px; margin: 0 auto 32px; font-size: clamp(15.5px, 2.2vw, 18px); color: var(--ink-2); }
.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero-note { margin-top: 16px; font-size: 13.5px; color: var(--ink-3); }

/* Hero 演示 */
.hero-demo { margin-top: 56px; }
.demo-window {
  max-width: 880px; margin: 0 auto;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 16px; box-shadow: var(--shadow-lg);
  overflow: hidden; text-align: left;
}
.demo-bar {
  display: flex; align-items: center; gap: 6px;
  padding: 11px 15px; background: var(--surface-soft);
  border-bottom: 1px solid var(--line);
}
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--line-2); }
.dot:nth-child(1) { background: var(--brand-border); }
.demo-url {
  margin-left: 12px; font-size: 12.5px; color: var(--ink-3);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.demo-body { display: grid; grid-template-columns: 1fr; gap: 22px; padding: 24px; }
@media (min-width: 720px) { .demo-body { grid-template-columns: 1fr 1fr; } }
.demo-col { display: flex; flex-direction: column; gap: 9px; }
.skeleton { background: linear-gradient(90deg, var(--surface-sunk), var(--line), var(--surface-sunk)); border-radius: 6px; }
.sk-title { height: 26px; width: 70%; }
.sk-line { height: 12px; width: 100%; }
.sk-line.short { width: 55%; }
.sk-form {
  height: 92px; width: 100%; margin-top: 8px; border-radius: 8px;
  background: var(--brand-soft);
  border: 1px dashed var(--brand-border);
}

.demo-flow {
  background: var(--surface-soft); border: 1px solid var(--line);
  border-radius: 10px; padding: 16px;
  display: flex; flex-direction: column; justify-content: center;
}
.flow-step { display: flex; gap: 11px; align-items: flex-start; padding: 7px 0; }
.flow-step + .flow-step { border-top: 1px solid var(--line); padding-top: 10px; }
.flow-ico { display: grid; place-items: center; width: 24px; height: 24px; color: var(--brand); flex: 0 0 auto; }
.flow-step b { display: block; font-size: 14px; }
.flow-step em { display: block; font-style: normal; font-size: 12.5px; color: var(--ink-3); }
.demo-caption { margin-top: 14px; font-size: 13.5px; color: var(--ink-2); }
.demo-caption a { font-weight: 600; }

/* ── 区块标题 ─────────────────────────────────────── */
.sec-title { font-size: clamp(25px, 4vw, 36px); font-weight: 750; text-align: center; margin-bottom: 10px; }
.sec-title.left { text-align: left; }
.sec-sub { text-align: center; color: var(--ink-2); max-width: 620px; margin: 0 auto 44px; font-size: 16px; }

/* ── 痛点 ─────────────────────────────────────────── */
.pain { padding: 68px 0; background: var(--surface-soft); border-block: 1px solid var(--line); }
.pain-card h3 { font-size: 17px; }
.pain-card h3::before { content: "✕"; color: var(--critical); margin-right: 8px; font-weight: 700; }
.pain-card p { color: var(--ink-2); font-size: 14.5px; margin: 0; }

/* ── 网格与卡片 ─────────────────────────────────────── */
.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(232px, 1fr)); }

.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 26px 22px;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.card:hover { border-color: var(--brand-border); box-shadow: var(--shadow); transform: translateY(-2px); }
.card .ico {
  display: grid; place-items: center;
  width: 44px; height: 44px; margin-bottom: 13px;
  background: var(--brand-soft); border-radius: 11px;
  color: var(--brand);
}
.card h3 { font-size: 17px; }
.card p { color: var(--ink-2); font-size: 14.5px; margin: 0; }

.features { padding: 78px 0; }

/* ── 流程 ─────────────────────────────────────────── */
.workflow { padding: 78px 0; background: var(--surface-soft); border-block: 1px solid var(--line); }
.steps { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.step { padding: 26px 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.step-n {
  display: grid; place-items: center;
  width: 36px; height: 36px; margin-bottom: 15px;
  background: var(--grad-brand); color: #fff;
  border-radius: 11px; font-weight: 700; font-size: 16px;
  box-shadow: var(--shadow-brand);
}
.step h3 { font-size: 18px; }
.step p { color: var(--ink-2); font-size: 14.5px; margin: 0; }
.workflow-cta { text-align: center; margin-top: 42px; }
.workflow-cta .muted { margin-top: 12px; font-size: 13.5px; }

/* ── 模板 ─────────────────────────────────────────── */
.templates { padding: 78px 0; }
.tpl { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); transition: box-shadow .2s ease, transform .2s ease; }
.tpl:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.tpl-thumb { height: 132px; border-bottom: 1px solid var(--line); }
.tpl-1 { background: linear-gradient(135deg, var(--brand-100), var(--brand-50)); }
.tpl-2 { background: linear-gradient(135deg, var(--accent-100), var(--accent-50)); }
.tpl-3 { background: linear-gradient(135deg, var(--brand-50), var(--accent-50)); }
.tpl-4 { background: linear-gradient(135deg, var(--accent-50), var(--brand-50)); }
.tpl h3 { font-size: 15.5px; margin: 14px 16px 4px; }
.tpl .muted { font-size: 13px; margin: 0 16px; }
.tpl-price { margin: 10px 16px 16px; font-weight: 700; color: var(--brand); font-size: 15px; }
.tpl-note { text-align: center; margin-top: 32px; font-size: 13.5px; }

/* ── 定价 ─────────────────────────────────────────── */
.pricing { padding: 78px 0; background: var(--surface-soft); border-block: 1px solid var(--line); }
.plans { align-items: stretch; }
.plan { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 28px 22px; position: relative; }
.plan-featured { border-color: var(--brand); box-shadow: var(--shadow-brand); }
.plan-badge {
  position: absolute; top: -11px; left: 50%; transform: translateX(-50%);
  background: var(--grad-brand); color: #fff;
  padding: 3px 14px; border-radius: 999px;
  font-size: 11.5px; font-weight: 700; white-space: nowrap;
}
.plan h3 { font-size: 16px; margin-bottom: 6px; }
.plan-price { font-size: 34px; font-weight: 800; margin: 0 0 2px; letter-spacing: -.03em; color: var(--ink); }
.plan-price span { font-size: 14px; font-weight: 500; color: var(--ink-3); }
.plan-for { font-size: 13px; color: var(--ink-3); margin-bottom: 16px; }
.plan ul { list-style: none; margin: 0; padding: 0; font-size: 14px; color: var(--ink-2); }
.plan li { padding: 5px 0 5px 21px; position: relative; }
.plan li::before { content: "✓"; position: absolute; left: 0; color: var(--good); font-weight: 700; font-size: 13px; }
.plan .btn { margin-top: auto; }

/* ── 开源 ─────────────────────────────────────────── */
.opensource { padding: 78px 0; }
.open-inner { display: grid; gap: 40px; grid-template-columns: 1fr; align-items: center; }
@media (min-width: 940px) { .open-inner { grid-template-columns: 1.05fr .95fr; gap: 56px; } }
.open-copy p { color: var(--ink-2); font-size: 15.5px; }
.open-points { list-style: none; padding: 0; margin: 20px 0 26px; font-size: 14.5px; }
.open-points li { padding: 6px 0 6px 26px; position: relative; color: var(--ink-2); }
.open-points li::before { content: "▸"; position: absolute; left: 6px; color: var(--brand); font-weight: 700; }
.open-code pre {
  margin: 0; padding: 22px; overflow-x: auto;
  background: var(--surface-code); color: #E8E2EC;
  border-radius: 12px; font-size: 13px; line-height: 1.75;
  box-shadow: var(--shadow-lg);
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
}
.c-prompt { color: var(--brand-300); user-select: none; }
.c-cmt { color: #7A7080; font-style: italic; }
.c-ok { color: #4ADE80; }

/* ── FAQ ──────────────────────────────────────────── */
.faq { padding: 78px 0; background: var(--surface-soft); border-block: 1px solid var(--line); }
.faq-list { max-width: 780px; margin: 0 auto; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; margin-bottom: 12px; overflow: hidden; }
.faq summary { padding: 15px 20px; cursor: pointer; font-weight: 600; font-size: 15.5px; list-style: none; position: relative; padding-right: 42px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 18px; top: 50%;
  transform: translateY(-50%); color: var(--brand); font-size: 21px; font-weight: 400; line-height: 1;
}
.faq details[open] summary::after { content: "−"; }
.faq details[open] summary { border-bottom: 1px solid var(--line); }
.faq details p { padding: 14px 20px 18px; margin: 0; color: var(--ink-2); font-size: 14.5px; }

/* ── 结尾 CTA ─────────────────────────────────────── */
.cta {
  padding: 84px 0;
  background: linear-gradient(128deg, var(--brand-800) 0%, var(--brand-700) 42%, var(--accent-600) 100%);
  color: #fff;
}
.cta h2 { font-size: clamp(25px, 4.4vw, 38px); font-weight: 780; margin-bottom: 10px; }
.cta p { color: rgba(255,255,255,.9); font-size: 16.5px; margin-bottom: 28px; }
.cta b, .cta strong { color: #fff; }

/* ── 页脚 ─────────────────────────────────────────── */
.foot { padding: 54px 0 26px; border-top: 1px solid var(--line); }
.foot-inner { display: grid; gap: 32px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.foot-brand { margin-bottom: 10px; }
.foot h4 { font-size: 13.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); margin-bottom: 12px; }
.foot-col a { display: block; padding: 3px 0; color: var(--ink-2); text-decoration: none; font-size: 14.5px; transition: color .15s; }
.foot-col a:hover { color: var(--brand); }
.foot-legal {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
  margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--line);
  font-size: 12.5px; color: var(--ink-3);
}
.foot-legal p { margin: 0; }
.foot-legal a { color: var(--brand); text-decoration: none; border-bottom: 1px solid var(--brand-border); }
.foot-legal a:hover { border-bottom-color: var(--brand); }

/* ── 无障碍 ───────────────────────────────────────── */
:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; border-radius: 4px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .card, .tpl { transition: none; }
  .btn:hover, .card:hover, .tpl:hover { transform: none; }
}

/* 打印: 去掉装饰, 保留内容 */
@media print {
  .nav, .cta, .hero::before, .hero::after { display: none; }
  body { color: #000; }
  .card, .plan { break-inside: avoid; border-color: #ccc; }
}
