/* ─────────────────────────────────────────────
   LiteShell 官网 — 轻量级 SSH 运维终端
   近黑 / 骨白 / 琥珀 · 终端台账质感
   ───────────────────────────────────────────── */
:root {
  --ink: #0c0b09;
  --ink-2: #131210;
  --bone: #f2eee3;
  --bone-dim: rgba(242, 238, 227, 0.55);
  --amber: #f2a93b;
  --amber-soft: rgba(242, 169, 59, 0.16);
  --line: rgba(242, 238, 227, 0.13);
  --line-soft: rgba(242, 238, 227, 0.07);
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", Consolas, "Courier New", monospace;
  --disp: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --pad: clamp(20px, 4vw, 56px);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
/* 隐藏滚动条（保留滚动功能） */
html { scrollbar-width: none; -ms-overflow-style: none; }
html::-webkit-scrollbar { display: none; width: 0; height: 0; }
body {
  background: var(--ink);
  color: var(--bone);
  font-family: var(--disp);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
::selection { background: var(--amber); color: var(--ink); }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
code { font-family: var(--mono); }
h1, h2, h3 { font-weight: 700; letter-spacing: -0.02em; }

.mono { font-family: var(--mono); }
.little { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; }
.idx { font-family: var(--mono); font-size: 13px; color: var(--amber); margin-right: 14px; }

/* ── 背景：颗粒 + 缓慢漂移的琥珀光 ── */
.grain {
  position: fixed; inset: -50%; z-index: 0; pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain-shift 0.9s steps(3) infinite;
}
@keyframes grain-shift {
  0% { transform: translate(0, 0); }
  33% { transform: translate(2%, -1%); }
  66% { transform: translate(-2%, 2%); }
  100% { transform: translate(0, 0); }
}
.mesh {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(50% 42% at 80% 6%, rgba(242, 169, 59, 0.11), transparent 66%),
    radial-gradient(40% 36% at 10% 90%, rgba(242, 169, 59, 0.05), transparent 70%);
  animation: mesh-drift 30s ease-in-out infinite alternate;
}
@keyframes mesh-drift {
  from { transform: translate3d(-1.2%, -0.6%, 0) scale(1); }
  to { transform: translate3d(1.2%, 0.8%, 0) scale(1.05); }
}

/* ── 按钮 ── */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--disp); font-weight: 600; font-size: 15px;
  padding: 13px 24px; border: 1px solid transparent; cursor: pointer;
  transition: all 0.25s;
}
.btn-accent { background: var(--amber); color: var(--ink); }
.btn-accent:hover { background: #f6b75a; transform: translateY(-1px); box-shadow: 0 8px 30px rgba(242, 169, 59, 0.25); }
.btn-ghost { border-color: var(--line); color: var(--bone); background: transparent; }
.btn-ghost:hover { border-color: var(--amber); color: var(--amber); }

/* ── 顶栏 ── */
.top {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 18px var(--pad);
  backdrop-filter: blur(10px);
  background: linear-gradient(to bottom, rgba(12, 11, 9, 0.78), rgba(12, 11, 9, 0));
}
.brand { display: flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 700; letter-spacing: 0.01em; }
.brand svg { color: var(--amber); }
.brand:hover { color: var(--amber); }
.top-cta { padding: 9px 16px; font-size: 12px; }

/* ── HERO ── */
#hero {
  position: relative; z-index: 1;
  min-height: 100vh;
  display: flex; align-items: center;
  padding: 130px var(--pad) 60px;
}
.hero-frame { width: 100%; }
.kicker {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.34em; text-transform: uppercase;
  color: var(--bone-dim); margin-bottom: 30px;
  display: flex; align-items: center; gap: 14px;
}
.kicker::before { content: ""; width: 34px; height: 1px; background: var(--amber); }
.type-hero {
  font-size: clamp(40px, 9vw, 124px);
  font-weight: 800; letter-spacing: -0.035em; line-height: 1.04;
  min-height: 1.12em;
  white-space: pre-wrap; word-break: break-word;
}
.lede {
  margin-top: 34px; max-width: 560px;
  font-size: clamp(14px, 1.4vw, 17px); line-height: 1.85; color: var(--bone-dim);
}
.lede em { font-style: normal; color: var(--bone); border-bottom: 1px solid var(--line); }
.hero-cta { margin-top: 38px; display: flex; gap: 14px; flex-wrap: wrap; }

/* 光标（打字机） */
.caret {
  display: inline-block; font-family: var(--mono); font-weight: 500;
  color: var(--amber); margin-left: 0.04em;
  animation: caret-blink 0.55s step-end infinite;
}
@keyframes caret-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

/* ── 终端演示窗 ── */
#demo { position: relative; z-index: 1; padding: 0 var(--pad); }
.term {
  border: 1px solid var(--line);
  background: #0e0d0b;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}
.term-bar {
  display: flex; align-items: center; gap: 14px;
  padding: 10px 16px; border-bottom: 1px solid var(--line);
  color: var(--bone-dim);
}
.term-dots { display: flex; gap: 6px; }
.term-dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.term-dots i:nth-child(1) { background: #ff5f57; }
.term-dots i:nth-child(2) { background: #febc2e; }
.term-dots i:nth-child(3) { background: #28c840; }
.term-title { flex: 1; text-align: center; }
.term-tag b { color: var(--amber); font-weight: 500; }
.term-body {
  font-family: var(--mono); font-size: clamp(12px, 1.25vw, 14px); line-height: 1.9;
  padding: 26px 28px 30px;
  min-height: 300px;
  white-space: pre-wrap; word-break: break-all;
  color: #cfcabe;
}
.term-body .caret { color: var(--amber); font-weight: 700; }

/* 区块通用 */
section { position: relative; z-index: 1; padding: 130px var(--pad); }
.sec-head { margin-bottom: 56px; }
.sec-head h2 {
  font-size: clamp(30px, 4.6vw, 52px); line-height: 1;
  display: flex; align-items: center;
}
.h2sub { margin-left: 16px; font-size: 12px; font-weight: 500; color: var(--bone-dim); letter-spacing: 0.3em; align-self: flex-end; padding-bottom: 8px; }
.sec-desc { margin-top: 18px; max-width: 500px; font-size: 14px; color: var(--bone-dim); line-height: 1.7; }

/* ── 特性 ── */
#features { border-top: 1px solid var(--line-soft); }
.feat-grid { list-style: none; display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line-soft); }
.feat-grid li { background: var(--ink); padding: 30px 32px; transition: background 0.3s; }
.feat-grid li:hover { background: var(--ink-2); }
.feat-grid h3 { font-size: clamp(17px, 1.9vw, 21px); margin-bottom: 10px; display: flex; align-items: baseline; gap: 10px; }
.feat-grid h3::before { content: "›"; color: var(--amber); font-family: var(--mono); }
.feat-grid p { font-size: 13.5px; line-height: 1.8; color: var(--bone-dim); }
.feat-grid code { color: var(--amber); background: var(--amber-soft); padding: 1px 5px; border-radius: 3px; font-size: 12px; }

/* ── 页脚 ── */
footer { position: relative; z-index: 1; border-top: 1px solid var(--line-soft); }
.foot-inner {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px;
  padding: 44px var(--pad); color: var(--bone-dim);
}
.foot-inner a:hover { color: var(--amber); }

/* ── 进入动画 ── */
/* 进入动画：仅当 JS 可用时才先隐藏，JS 加载失败则页面直接可见，不白屏 */
html.js [data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity 0.9s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1); }
html.js [data-reveal].in { opacity: 1; transform: none; }
#hero .kicker { transition-delay: 0.05s; }
#hero .type-hero { transition-delay: 0.15s; }
#hero .lede { transition-delay: 0.28s; }
#hero .hero-cta { transition-delay: 0.4s; }

/* ── 响应式 ── */
@media (max-width: 980px) {
  .feat-grid { grid-template-columns: 1fr; }
  .term-body { min-height: 220px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  html.js [data-reveal] { opacity: 1; transform: none; }
}