/* InkStream 墨流 · 落地页样式
   品牌取自 logo：深墨蓝 + 流金。暗色单主题（品牌艺术指导）。
   配色全部走 CSS 变量，金色为唯一全局强调色；三模式各自的识别色仅用于模式卡圆点与顶边。
   字体走系统栈（Apple 设备渲染 SF Pro / 苹方，零字体加载）。
   动效靠 IntersectionObserver 加 .is-visible + CSS transition；prefers-reduced-motion 全部降级为静态。 */

:root {
  --bg: #0b1526;
  --bg-2: #0e1a30;
  --bg-3: #142640;
  --bg-card: #102039;
  --bg-card-2: #14253f;
  --line: rgba(228, 206, 150, 0.14);
  --line-soft: rgba(255, 255, 255, 0.07);

  --text: #f3ecdb;
  --text-2: #b7bfce;
  --text-3: #828d9f;

  --gold: #e6c074;
  --gold-deep: #d2a24c;
  --gold-soft: rgba(230, 192, 116, 0.12);
  --gold-grad: linear-gradient(135deg, #f4dca0, #d9a64f);

  --m-standard: #8f98aa;
  --m-academic: #6aa0e0;
  --m-creative: #e07a6a;

  --r-card: 18px;
  --r-chip: 10px;
  --r-pill: 999px;
  --shadow: 0 30px 80px -28px rgba(3, 9, 20, 0.9);
  --shadow-soft: 0 18px 50px -24px rgba(3, 9, 20, 0.8);

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
  --mono: "SF Mono", ui-monospace, "JetBrains Mono", "Cascadia Code", Menlo, Consolas, monospace;

  --wrap: 1180px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

p {
  margin: 0;
}

.mono {
  font-family: var(--mono);
  font-size: 0.92em;
  color: var(--gold);
  background: var(--gold-soft);
  padding: 0.12em 0.4em;
  border-radius: 6px;
  letter-spacing: 0;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  z-index: 100;
  background: var(--gold);
  color: #0b1526;
  padding: 10px 16px;
  border-radius: 0 0 10px 0;
}
.skip-link:focus {
  left: 0;
}

.sentinel {
  position: absolute;
  top: 0;
  height: 1px;
  width: 1px;
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: var(--r-pill);
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  border: 1px solid transparent;
  transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1), background 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.btn:active {
  transform: translateY(1px) scale(0.99);
}
.btn-gold {
  background: var(--gold-grad);
  color: #16213a;
  box-shadow: 0 10px 30px -12px rgba(230, 192, 116, 0.5);
}
.btn-gold:hover {
  box-shadow: 0 14px 36px -10px rgba(230, 192, 116, 0.6);
}
.btn-ghost {
  border-color: rgba(243, 236, 219, 0.22);
  color: var(--text);
}
.btn-ghost:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.text-link {
  color: var(--gold);
  font-weight: 600;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.text-link:hover {
  border-color: var(--gold);
}

/* ---------- 顶栏 ---------- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: 68px;
  display: flex;
  align-items: center;
  transition: background 0.3s, border-color 0.3s, backdrop-filter 0.3s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(11, 21, 38, 0.72);
  backdrop-filter: saturate(160%) blur(18px);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  border-bottom-color: var(--line-soft);
}
.nav-inner {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 650;
  font-size: 17px;
}
.brand img {
  border-radius: 8px;
}
.brand-cn {
  color: var(--text-3);
  font-weight: 500;
  margin-left: 7px;
  font-size: 14px;
}
.nav-links {
  display: flex;
  gap: 28px;
  margin-left: auto;
  font-size: 14.5px;
  color: var(--text-2);
}
.nav-links a {
  transition: color 0.2s;
}
.nav-links a:hover {
  color: var(--text);
}
.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}
.ghost-link {
  color: var(--text-2);
  display: inline-flex;
  transition: color 0.2s;
}
.ghost-link:hover {
  color: var(--gold);
}
.nav-cta {
  padding: 9px 20px;
  font-size: 14px;
}

/* ---------- HERO ---------- */
.hero {
  position: relative;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 124px 24px 60px;
  overflow: hidden;
}
.hero-glow {
  position: absolute;
  top: -10%;
  left: 50%;
  transform: translateX(-50%);
  width: min(1100px, 120vw);
  height: 760px;
  background: radial-gradient(closest-side, rgba(230, 192, 116, 0.16), rgba(230, 192, 116, 0.04) 55%, transparent 72%);
  pointer-events: none;
  z-index: 0;
}
.hero-text {
  position: relative;
  z-index: 1;
  max-width: 760px;
}
.kicker {
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 22px;
}
.hero-h1 {
  font-size: clamp(2.7rem, 7.4vw, 5.1rem);
  letter-spacing: -0.035em;
  font-weight: 700;
  line-height: 1.04;
}
.hero-sub {
  margin: 26px auto 0;
  max-width: 38ch;
  font-size: clamp(1.05rem, 1.9vw, 1.3rem);
  color: var(--text-2);
  line-height: 1.55;
}
.hero-cta {
  margin-top: 36px;
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}
.hero-shot {
  position: relative;
  z-index: 1;
  margin: 64px auto 0;
  max-width: 920px;
  width: 100%;
}
.hero-shot img {
  width: 100%;
  border-radius: var(--r-card);
  border: 1px solid var(--line-soft);
  box-shadow: var(--shadow);
}

/* ---------- 通用 section ---------- */
section {
  position: relative;
}
.section-head {
  max-width: 640px;
  margin: 0 auto 56px;
  text-align: left;
}
.section-head.center {
  text-align: center;
}
.section-h2 {
  font-size: clamp(1.9rem, 4.3vw, 3rem);
  font-weight: 680;
}
.section-desc {
  margin-top: 16px;
  color: var(--text-2);
  font-size: 1.08rem;
}
.lead {
  color: var(--text-2);
  font-size: clamp(1.05rem, 2vw, 1.28rem);
  line-height: 1.6;
}

/* ---------- 内核 ---------- */
.kernel {
  padding: 120px 0;
  border-top: 1px solid var(--line-soft);
  background: linear-gradient(180deg, var(--bg), var(--bg-2));
}
.kernel-inner {
  max-width: 760px;
  text-align: center;
}
.kernel .lead {
  margin-top: 26px;
}
.kernel-code {
  margin-top: 40px;
  display: inline-flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
  padding: 14px 24px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-2);
  font-size: 15px;
}
.kernel-arrow {
  color: var(--gold);
}

/* ---------- 三模式 ---------- */
.modes {
  padding: 120px 0;
  background: var(--bg-2);
}
.mode-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.mode-card {
  background: var(--bg-card);
  border: 1px solid var(--line-soft);
  border-top: 2px solid var(--accent, var(--gold));
  border-radius: var(--r-card);
  padding: 16px 16px 24px;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s;
}
.mode-card:hover {
  transform: translateY(-4px);
}
.mode-card[data-accent="standard"] {
  --accent: var(--m-standard);
}
.mode-card[data-accent="academic"] {
  --accent: var(--m-academic);
}
.mode-card[data-accent="creative"] {
  --accent: var(--m-creative);
}
.mode-card .shot {
  margin: 0 0 20px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  background: #0a1322;
}
.mode-card .shot img {
  width: 100%;
  display: block;
}
.mode-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}
.mode-meta .dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
}
.mode-meta h3 {
  font-size: 1.3rem;
}
.mode-cn {
  color: var(--text-3);
  font-size: 0.85rem;
  font-weight: 500;
  margin-left: 8px;
}
.mode-card > p {
  margin-top: 8px;
  color: var(--text-2);
}
.chips {
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chips li {
  font-size: 12.5px;
  color: var(--text-2);
  padding: 5px 11px;
  border: 1px solid var(--line-soft);
  border-radius: var(--r-chip);
  background: rgba(255, 255, 255, 0.02);
}

/* ---------- 写作 bento ---------- */
.write {
  padding: 120px 0;
}
.bento {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: minmax(210px, auto);
  gap: 20px;
}
.cell {
  background: var(--bg-card);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-card);
  padding: 26px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.cell h3 {
  font-size: 1.22rem;
  margin-bottom: 10px;
}
.cell p {
  color: var(--text-2);
  font-size: 0.96rem;
  line-height: 1.6;
}
.cell-wide {
  grid-column: span 2;
}
.cell-tall {
  grid-row: span 2;
}
.cell-gold {
  background: linear-gradient(150deg, rgba(230, 192, 116, 0.14), rgba(230, 192, 116, 0.03) 60%), var(--bg-card);
  border-color: var(--gold-soft);
}
.cell-art {
  margin-bottom: auto;
  min-height: 64px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.art-links {
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding-bottom: 14px;
}
.wikilink {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--gold);
  border: 1px dashed rgba(230, 192, 116, 0.4);
  border-radius: 8px;
  padding: 6px 12px;
}
.wikilink-2 {
  color: var(--text-2);
  border-color: var(--line-soft);
  margin-left: 28px;
}
.art-graph {
  flex: 1;
  min-height: 130px;
}
.art-graph svg line {
  stroke: rgba(230, 192, 116, 0.35);
  stroke-width: 1.5;
}
.art-graph svg circle {
  fill: var(--bg-3);
  stroke: var(--gold);
  stroke-width: 1.6;
}
.art-graph svg circle:nth-of-type(2) {
  fill: var(--gold);
}
.art-math {
  font-size: 30px;
  color: var(--gold);
  gap: 18px;
  font-family: var(--mono);
}
.art-focus {
  flex-direction: column;
  align-items: stretch;
  gap: 9px;
  width: 70%;
}
.art-focus .line {
  height: 7px;
  border-radius: 4px;
  background: var(--line-soft);
}
.art-focus .line.lit {
  background: var(--gold);
  width: 85%;
}
.art-focus .line:nth-child(2) {
  width: 60%;
}
.art-focus .line:nth-child(3) {
  width: 72%;
}

/* ---------- 版本管理 ---------- */
.git {
  padding: 120px 0;
  background: var(--bg-2);
}
.git-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}
.git-left .lead {
  margin: 22px 0 24px;
}
.git-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.git-list li {
  padding: 20px 0;
  border-bottom: 1px solid var(--line-soft);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.git-list li:first-child {
  padding-top: 0;
}
.git-list li b {
  font-weight: 620;
  font-size: 1.05rem;
}
.git-list li span {
  color: var(--text-2);
  font-size: 0.95rem;
}

/* ---------- 更多 ---------- */
.more {
  padding: 120px 0;
}
.more-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.more-item {
  padding: 28px;
  border: 1px solid var(--line-soft);
  border-radius: var(--r-card);
  background: var(--bg-card);
  transition: border-color 0.3s, transform 0.3s;
}
.more-item:hover {
  border-color: var(--gold-soft);
  transform: translateY(-3px);
}
.ic {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: var(--gold);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  margin-bottom: 16px;
}
.more-item h3 {
  font-size: 1.15rem;
  margin-bottom: 8px;
}
.more-item p {
  color: var(--text-2);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ---------- 下载 ---------- */
.download {
  padding: 120px 0 130px;
  background: linear-gradient(180deg, var(--bg), var(--bg-2));
  border-top: 1px solid var(--line-soft);
}
.dl-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 860px;
  margin: 0 auto;
}
.dl-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  padding: 36px 20px;
  border: 1px solid var(--line-soft);
  border-radius: var(--r-card);
  background: var(--bg-card);
  transition: border-color 0.3s, transform 0.3s, background 0.3s;
}
.dl-card:hover {
  border-color: var(--gold);
  transform: translateY(-4px);
  background: var(--bg-card-2);
}
.dl-card .ic {
  width: 34px;
  height: 34px;
  fill: var(--gold);
  stroke: none;
  margin-bottom: 6px;
}
.dl-os {
  font-size: 1.15rem;
  font-weight: 620;
}
.dl-file {
  font-size: 0.9rem;
  color: var(--text-3);
}
.dl-note {
  max-width: 620px;
  margin: 40px auto 0;
  text-align: center;
  color: var(--text-3);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* ---------- 页脚 ---------- */
.footer {
  border-top: 1px solid var(--line-soft);
  padding: 56px 0 40px;
  background: var(--bg-2);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 30px;
  flex-wrap: wrap;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}
.footer-brand img {
  border-radius: 9px;
}
.footer-name {
  font-weight: 650;
  font-size: 1.05rem;
}
.footer-name span {
  color: var(--text-3);
  font-weight: 500;
  margin-left: 6px;
  font-size: 0.85em;
}
.footer-tag {
  color: var(--text-3);
  font-size: 0.9rem;
  margin-top: 3px;
}
.footer-links {
  display: flex;
  gap: 26px;
  font-size: 0.95rem;
  color: var(--text-2);
  flex-wrap: wrap;
}
.footer-links a:hover {
  color: var(--gold);
}
.footer-copy {
  max-width: var(--wrap);
  margin: 30px auto 0;
  padding: 0 24px;
  color: var(--text-3);
  font-size: 0.85rem;
}

/* ---------- 滚动揭示动效 ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- 响应式 ---------- */
@media (max-width: 920px) {
  .nav-links {
    display: none;
  }
  .mode-grid,
  .bento,
  .more-grid,
  .dl-grid {
    grid-template-columns: 1fr 1fr;
  }
  .cell-wide,
  .cell-tall {
    grid-column: auto;
    grid-row: auto;
  }
  .git-inner {
    grid-template-columns: 1fr;
    gap: 36px;
  }
}

@media (max-width: 620px) {
  .wrap,
  .nav-inner {
    padding: 0 18px;
  }
  .hero {
    padding-top: 104px;
  }
  .kernel,
  .modes,
  .write,
  .git,
  .more,
  .download {
    padding: 80px 0;
  }
  .mode-grid,
  .bento,
  .more-grid,
  .dl-grid {
    grid-template-columns: 1fr;
  }
  .section-head {
    margin-bottom: 40px;
  }
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
  .hero-cta .btn {
    flex: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .btn,
  .mode-card,
  .more-item,
  .dl-card {
    transition: none;
  }
}
