/* ============================================================
   Olympia IDE 官网 — 暗色优先，沿用应用设计 token
   bg #1e1e1e / surface #252526 / elevated #2d2d2d / border #333
   accent #007acc · ac #34c759 · tle #ff9f0a · wa #ff453a
   ============================================================ */

:root {
  --bg: #1b1b1c;
  --bg-base: #1e1e1e;
  --surface: #252526;
  --elevated: #2d2d2d;
  --border: #333333;
  --accent: #007acc;
  --accent-hover: #1a8ad4;
  --accent-subtle: rgba(0, 122, 204, 0.14);
  --text-1: #d4d4d4;
  --text-2: #9a9a9a;
  --text-3: #5f5f5f;
  --ac: #34c759;
  --tle: #ff9f0a;
  --wa: #ff453a;
  --radius: 14px;
  --font-ui: "Segoe UI Variable Text", "Segoe UI", -apple-system, "SF Pro Text",
    "PingFang SC", "Microsoft YaHei UI", sans-serif;
  --font-mono: "Cascadia Mono", "Consolas", "SF Mono", Menlo, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-ui);
  background: var(--bg);
  color: var(--text-1);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: var(--accent); color: #fff; }

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #3c3c3c; border-radius: 4px; }

/* ---------- 导航 ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(27, 27, 28, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }

.brand-mark { display: block; filter: drop-shadow(0 0 10px rgba(0, 122, 204, 0.45)); }
.brand-mark svg { display: block; }

.brand-name { font-weight: 600; font-size: 15px; color: var(--text-1); letter-spacing: 0.2px; }

.nav-links { display: flex; align-items: center; gap: 26px; }

.nav-links a {
  color: var(--text-2);
  text-decoration: none;
  font-size: 13.5px;
  transition: color 0.18s ease;
}

.nav-links a:hover { color: var(--text-1); }

.nav-links a.nav-cta {
  color: #fff;
  background: var(--accent);
  padding: 7px 16px;
  border-radius: 9px;
  font-weight: 600;
  transition: background 0.18s ease;
}

.nav-links a.nav-cta:hover { background: var(--accent-hover); color: #fff; }

/* ---------- 首屏 ---------- */

.hero {
  position: relative;
  padding: 96px 24px 110px;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  inset: -40% -20% auto;
  height: 130%;
  background:
    radial-gradient(ellipse 55% 45% at 50% 0%, rgba(0, 122, 204, 0.16), transparent 70%),
    radial-gradient(ellipse 30% 30% at 80% 20%, rgba(52, 199, 89, 0.05), transparent 70%);
  pointer-events: none;
}

.hero-inner { position: relative; max-width: 1080px; margin: 0 auto; text-align: center; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text-2);
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 999px;
  padding: 6px 16px;
  margin-bottom: 26px;
}

.hero-badge .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--ac);
  box-shadow: 0 0 8px var(--ac);
}

.hero h1 {
  font-size: clamp(38px, 6.4vw, 64px);
  line-height: 1.14;
  letter-spacing: -0.02em;
  font-weight: 700;
}

.hero h1 em {
  font-style: normal;
  background: linear-gradient(100deg, #3ea6e8, var(--accent) 55%, #34c759);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  max-width: 560px;
  margin: 22px auto 0;
  color: var(--text-2);
  font-size: 16.5px;
}

.hero-actions {
  margin-top: 34px;
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-note { margin-top: 16px; font-size: 12.5px; color: var(--text-3); }

/* ---------- 按钮 ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  border-radius: 11px;
  padding: 12px 24px;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 6px 22px rgba(0, 122, 204, 0.35);
}

.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); }

.btn-ghost {
  color: var(--text-1);
  border: 1px solid var(--border);
  background: var(--surface);
}

.btn-ghost:hover { border-color: var(--accent); color: #fff; }

.btn-lg { padding: 15px 34px; font-size: 15.5px; border-radius: 13px; }

/* ---------- 仿真编辑器窗口 ---------- */

.window {
  max-width: 880px;
  margin: 64px auto 0;
  background: var(--bg-base);
  border: 1px solid #3a3a3a;
  border-radius: 12px;
  overflow: hidden;
  text-align: left;
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.03),
    0 0 90px rgba(0, 122, 204, 0.10);
  font-family: var(--font-mono);
}

.window-titlebar {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 34px;
  padding: 0 12px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.win-logo {
  width: 16px; height: 16px;
  border-radius: 5px;
  background: var(--accent);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  display: grid;
  place-items: center;
  font-family: var(--font-ui);
}

.win-title { font-family: var(--font-ui); font-size: 12px; color: var(--text-2); }

.win-controls { margin-left: auto; display: flex; gap: 8px; }

.win-controls i { width: 11px; height: 11px; border-top: 1.4px solid var(--text-3); display: block; }
.win-controls i:first-child { border: none; border-bottom: 1.4px solid var(--text-3); transform: translateY(-3px); }
.win-controls i.close { border: 1.4px solid #e81123; border-radius: 50%; transform: none; width: 10px; height: 10px; }

.window-tabbar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.tab {
  font-size: 11.5px;
  color: var(--text-3);
  padding: 6px 14px;
  border-radius: 7px 7px 0 0;
  border: 1px solid transparent;
}

.tab.active {
  color: var(--text-1);
  background: var(--bg-base);
  border-color: var(--border);
  border-bottom-color: var(--bg-base);
}

.tab-run {
  margin-left: auto;
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border-radius: 7px;
  padding: 5px 12px;
}

.tab-run kbd {
  font-size: 9.5px;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 4px;
  padding: 1px 5px;
  margin-left: 4px;
}

.window-body { display: flex; min-height: 320px; }

.editor {
  flex: 1;
  padding: 14px 0;
  font-size: 12.8px;
  line-height: 1.62;
  overflow: hidden;
}

.editor ol { list-style: none; counter-reset: line; }

.editor li {
  counter-increment: line;
  white-space: pre;
  min-height: 1.62em;
  padding-left: 0;
}

.editor li::before {
  content: counter(line);
  display: inline-block;
  width: 3em;
  padding-right: 1.4em;
  text-align: right;
  color: #4c4c4c;
  user-select: none;
}

.editor li:last-child::after {
  content: "";
  display: inline-block;
  width: 7px;
  height: 15px;
  background: var(--accent);
  margin-left: 4px;
  vertical-align: -2px;
  animation: caret 1.1s steps(1) infinite;
}

@keyframes caret { 50% { opacity: 0; } }

.k { color: #c678dd; }
.str { color: #98c379; }
.num { color: #d19a66; }
.fn { color: #61afef; }
.cmt { color: #5c6370; font-style: italic; }

/* 评测面板 */

.runner {
  width: 250px;
  border-left: 1px solid var(--border);
  background: #202122;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-family: var(--font-ui);
}

.runner-head { font-size: 11px; font-weight: 700; color: var(--text-2); text-transform: uppercase; letter-spacing: 0.08em; }

.case {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--text-2);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 11px;
}

.verdict {
  font-size: 10.5px;
  font-weight: 700;
  color: #0e2a15;
  background: var(--ac);
  border-radius: 5px;
  padding: 1.5px 7px;
  letter-spacing: 0.03em;
}

.runner-foot {
  margin-top: auto;
  font-size: 11.5px;
  color: var(--ac);
  border-top: 1px dashed var(--border);
  padding-top: 10px;
}

.window-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  height: 26px;
  padding: 0 12px;
  background: #181818;
  border-top: 1px solid var(--border);
  font-family: var(--font-ui);
  font-size: 10.5px;
  color: #8b949e;
}

.st-ok::before { content: "●"; color: var(--ac); margin-right: 6px; font-size: 8px; }
.st-run { opacity: 0.75; }

/* ---------- 通用区块 ---------- */

.section {
  max-width: 1080px;
  margin: 0 auto;
  padding: 90px 24px 30px;
}

.section h2 {
  font-size: clamp(26px, 4vw, 36px);
  letter-spacing: -0.015em;
  text-align: center;
}

.section-sub {
  text-align: center;
  color: var(--text-2);
  max-width: 520px;
  margin: 14px auto 0;
  font-size: 15px;
}

/* 特性卡片 */

.grid {
  margin-top: 52px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 18px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 24px;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-3px);
  border-color: rgba(0, 122, 204, 0.5);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.35);
}

.card-icon {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  font-size: 19px;
  margin-bottom: 16px;
}

.i-ac { background: rgba(52, 199, 89, 0.13); color: var(--ac); }
.i-warn { background: rgba(255, 159, 10, 0.13); color: var(--tle); }
.i-accent { background: var(--accent-subtle); color: #3ea6e8; }

.card h3 { font-size: 15.5px; margin-bottom: 8px; }

.card p { font-size: 13.5px; color: var(--text-2); }

/* 下载 */

.download { padding-bottom: 40px; }

.dl-card {
  margin-top: 46px;
  text-align: center;
  background:
    radial-gradient(ellipse 70% 120% at 50% -20%, rgba(0, 122, 204, 0.14), transparent 60%),
    var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 56px 30px 46px;
}

.dl-meta { color: var(--text-2); font-size: 13.5px; margin: 12px 0 28px; }

/* 双版本下载卡 */

.dl-variants {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  max-width: 680px;
  margin: 0 auto;
}

.variant {
  background: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}

.variant.v-hot { border-color: rgba(0, 122, 204, 0.55); }

.variant h3 { font-size: 15px; color: var(--text-1); }

.v-badge {
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  background: var(--accent);
  border-radius: 999px;
  padding: 2px 9px;
  vertical-align: 2px;
  margin-left: 4px;
}

.v-badge.soon { background: #8a8a8a; }

.v-size { font-size: 26px; font-weight: 700; color: #3ea6e8; letter-spacing: -0.02em; }

.variant.v-hot .v-size { color: var(--accent-hover); }

.v-desc { font-size: 12.5px; color: var(--text-2); line-height: 1.6; flex: 1; }

.variant .btn { margin-top: 6px; }

.dl-note { margin-top: 24px; font-size: 12.5px; color: var(--text-3); }

.dl-reqs {
  list-style: none;
  margin-top: 18px;
  display: flex;
  gap: 10px 28px;
  justify-content: center;
  flex-wrap: wrap;
}

.dl-reqs li {
  font-size: 12.5px;
  color: var(--text-3);
  position: relative;
  padding-left: 18px;
}

.dl-reqs li::before { content: "✓"; position: absolute; left: 0; color: var(--ac); }

/* 路线图 */

.timeline { margin-top: 46px; display: flex; flex-direction: column; gap: 12px; max-width: 720px; margin-left: auto; margin-right: auto; }

.tl-item {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 20px;
  font-size: 14px;
  color: var(--text-1);
}

.tl-item.done { color: var(--text-2); }

.tl-tag {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 700;
  border-radius: 6px;
  padding: 3px 10px;
  background: rgba(52, 199, 89, 0.14);
  color: var(--ac);
}

.tl-tag.next { background: var(--accent-subtle); color: #3ea6e8; }
.tl-tag.plan { background: rgba(255, 159, 10, 0.12); color: var(--tle); }

/* 页脚 */

.footer {
  margin-top: 70px;
  border-top: 1px solid var(--border);
  background: #191919;
}

.footer-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 44px 24px;
  text-align: center;
  color: var(--text-2);
  font-size: 13.5px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.footer-meta a { color: var(--text-2); }
.footer-meta a:hover { color: var(--text-1); }

/* 滚动淡入（渐进增强：仅在 JS 可用时隐藏待入场元素） */

.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.55s ease, transform 0.55s ease; }
.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .editor li:last-child::after { animation: none; }
}

/* 移动端 */

@media (max-width: 720px) {
  .nav-links a:not(.nav-cta) { display: none; }
  .hero { padding: 64px 18px 80px; }
  .window-body { flex-direction: column; }
  .runner { width: auto; border-left: none; border-top: 1px solid var(--border); }
  .window { margin-top: 48px; }
  .section { padding-top: 66px; }
  .dl-variants { grid-template-columns: 1fr; }
}
