/* Diskoala marketing site — tokens from yao-scai-cli/docs/design-system.md */
:root {
  --brand: #3B82F6;
  --brand-hover: #2563EB;
  --brand-soft: rgba(59, 130, 246, .14);
  --safe: #22C55E;
  --review: #F59E0B;
  --risky: #EF4444;
  --bg: #F8FAFC;
  --surface: #FFFFFF;
  --border: #E2E8F0;
  --text: #1E293B;
  --text-2: #475569;
  --muted: #94A3B8;
  --shadow: 0 1px 3px rgba(15, 23, 42, .08);
  --shadow-lg: 0 12px 40px rgba(15, 23, 42, .18);
  --term-bg: #0F172A;
  --term-text: #E2E8F0;
}
[data-theme="dark"] {
  --brand-soft: rgba(59, 130, 246, .2);
  --safe: #4ADE80;
  --review: #FBBF24;
  --risky: #F87171;
  --bg: #0F172A;
  --surface: #1E293B;
  --border: #334155;
  --text: #E2E8F0;
  --text-2: #CBD5E1;
  --muted: #94A3B8;
  --shadow: 0 1px 3px rgba(0, 0, 0, .4);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, .55);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: "Microsoft YaHei UI", "PingFang SC", "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  transition: background .25s, color .25s;
}
.container { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
h1, h2, h3 { line-height: 1.3; font-weight: 700; }
h2 { font-size: 28px; text-align: center; margin-bottom: 12px; letter-spacing: -.01em; }
code {
  font-family: Consolas, "Courier New", monospace;
  font-size: .9em;
  background: var(--brand-soft);
  color: var(--text);
  border-radius: 5px;
  padding: 1px 6px;
}
a { color: var(--brand); }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; gap: 28px; height: 60px; }
.brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 17px; color: var(--text); text-decoration: none;
}
.brand img { border-radius: 7px; }
.brand-zh { font-weight: 400; color: var(--text-2); font-size: 15px; }
.nav-links { display: flex; gap: 22px; margin-left: auto; }
.nav-links a { color: var(--text-2); text-decoration: none; font-size: 14.5px; }
.nav-links a:hover { color: var(--brand); }
.nav-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn, .lang-btn {
  border: 1px solid var(--border); background: var(--surface); color: var(--text-2);
  border-radius: 8px; cursor: pointer; font-size: 13.5px; height: 34px;
  transition: border-color .15s, color .15s;
}
.icon-btn { width: 34px; }
.lang-btn { padding: 0 12px; font-weight: 600; }
.icon-btn:hover, .lang-btn:hover { border-color: var(--brand); color: var(--brand); }

/* ---------- hero ---------- */
.hero { padding: 72px 0 56px; }
.hero-inner {
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center;
}
.hero-badges { display: flex; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; }
.badge {
  font-size: 12.5px; font-weight: 600; padding: 3px 11px; border-radius: 999px;
  border: 1px solid var(--border); color: var(--text-2); background: var(--surface);
}
.badge-blue { background: var(--brand-soft); color: var(--brand); border-color: transparent; }
.badge-green { background: rgba(34, 197, 94, .13); color: var(--safe); border-color: transparent; }
.hero h1 { font-size: 46px; letter-spacing: -.02em; }
.hero-zh { font-weight: 400; }
.tagline { font-size: 20px; font-weight: 600; color: var(--brand); margin: 10px 0 12px; }
.hero-sub { color: var(--text-2); max-width: 46ch; }
.hero-cta { display: flex; gap: 12px; margin-top: 28px; flex-wrap: wrap; }

.btn {
  display: inline-block; padding: 11px 24px; border-radius: 9px;
  font-size: 15.5px; font-weight: 600; text-decoration: none; border: 1px solid transparent;
  transition: background .15s, border-color .15s, transform .1s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-hover); }
.btn-ghost { border-color: var(--border); color: var(--text); background: var(--surface); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }
.btn-green { background: var(--safe); color: #052e16; }
.btn-green:hover { filter: brightness(1.06); }

/* terminal mockup */
.hero-term {
  border-radius: 13px; overflow: hidden; box-shadow: var(--shadow-lg);
  background: var(--term-bg); border: 1px solid #334155;
}
.term-bar {
  display: flex; align-items: center; gap: 7px; padding: 10px 14px;
  background: #1E293B; border-bottom: 1px solid #334155;
}
.term-bar .dot { width: 11px; height: 11px; border-radius: 50%; background: #475569; }
.term-bar .dot:first-child { background: #EF4444; }
.term-bar .dot:nth-child(2) { background: #F59E0B; }
.term-bar .dot:nth-child(3) { background: #22C55E; }
.term-title { margin-left: 8px; color: #94A3B8; font-size: 12.5px; font-family: Consolas, monospace; }
.term-body {
  padding: 18px 20px 22px; font-family: Consolas, "Courier New", monospace;
  font-size: 13px; line-height: 1.75; color: var(--term-text);
  overflow-x: auto; tab-size: 2;
}
.t-dim { color: #94A3B8; }
.t-green { color: #4ADE80; }
.t-amber { color: #FBBF24; }
.t-hl { color: #60A5FA; font-weight: 700; }

/* ---------- trust ---------- */
.trust { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--surface); }
.trust-row { display: flex; justify-content: center; gap: 48px; padding: 18px 0; flex-wrap: wrap; }
.trust-item { display: flex; align-items: center; gap: 9px; font-size: 14.5px; color: var(--text-2); }
.trust-icon { font-weight: 800; font-size: 16px; }
.t-green { color: var(--safe); }

/* ---------- sections ---------- */
.section { padding: 72px 0; }
.section-alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-sub { text-align: center; color: var(--text-2); max-width: 62ch; margin: 0 auto 44px; }

/* features */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: 26px 24px; box-shadow: var(--shadow);
  transition: transform .15s, box-shadow .15s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.card-icon {
  width: 44px; height: 44px; border-radius: 10px; background: var(--brand-soft); color: var(--brand);
  display: flex; align-items: center; justify-content: center;
  font-family: Consolas, monospace; font-size: 17px; font-weight: 700; margin-bottom: 16px;
}
.card h3 { font-size: 19px; margin-bottom: 8px; }
.card-desc { color: var(--text-2); font-size: 14.5px; margin-bottom: 14px; }
.card-list { list-style: none; font-size: 13.5px; color: var(--text-2); }
.card-list li { padding: 4px 0; }

/* safety */
.risk-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 36px; }
.risk-card {
  border-radius: 14px; padding: 22px; background: var(--bg);
  border: 1px solid var(--border); border-top: 4px solid var(--muted);
}
.risk-card code { background: none; padding: 0; color: var(--muted); font-size: 13px; }
.risk-card p { color: var(--text-2); font-size: 13.5px; margin-top: 10px; }
.risk-pill {
  display: inline-block; font-size: 13px; font-weight: 700;
  padding: 3px 12px; border-radius: 999px; margin-bottom: 10px;
}
.risk-safe { border-top-color: var(--safe); }
.risk-safe .risk-pill { background: #DCFCE7; color: #166534; }
.risk-review { border-top-color: var(--review); }
.risk-review .risk-pill { background: #FEF3C7; color: #92400E; }
.risk-risky { border-top-color: var(--risky); }
.risk-risky .risk-pill { background: #FEE2E2; color: #991B1B; }
.safe-notes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.safe-note {
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 18px; font-size: 13.5px; color: var(--text-2);
  display: flex; flex-direction: column; gap: 6px;
}
.safe-note strong { color: var(--text); font-size: 14.5px; }

/* download */
.dl-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.dl-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: 26px 24px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; align-items: flex-start;
}
.dl-card-accent { border-color: var(--safe); box-shadow: 0 0 0 1px var(--safe) inset; }
.dl-card h3 { font-size: 18px; margin-bottom: 8px; }
.dl-desc { color: var(--text-2); font-size: 14px; flex: 1; }
.dl-meta { color: var(--muted); font-size: 12.5px; margin: 14px 0; }
.dl-btn { width: 100%; text-align: center; }
.dl-note { text-align: center; color: var(--muted); font-size: 13.5px; margin-top: 26px; }

/* skill */
.code-block {
  max-width: 760px; margin: 0 auto 18px; border-radius: 12px; overflow: hidden;
  background: var(--term-bg); border: 1px solid #334155; box-shadow: var(--shadow);
}
.code-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 16px; background: #1E293B; color: #94A3B8; font-size: 12.5px;
}
.copy-btn {
  background: none; border: 1px solid #475569; color: #CBD5E1; font-size: 12px;
  border-radius: 6px; padding: 3px 12px; cursor: pointer;
}
.copy-btn:hover { border-color: #60A5FA; color: #60A5FA; }
.code-block pre { padding: 16px 18px; overflow-x: auto; }
.code-block code { background: none; padding: 0; color: #E2E8F0; font-size: 13.5px; }
.sk-flow { display: flex; justify-content: center; gap: 14px; margin-top: 36px; flex-wrap: wrap; }
.sk-step {
  display: flex; align-items: center; gap: 9px; font-size: 13.5px; color: var(--text-2);
  background: var(--surface); border: 1px solid var(--border); border-radius: 999px;
  padding: 7px 16px 7px 8px;
}
.sk-num {
  width: 24px; height: 24px; border-radius: 50%; background: var(--brand-soft); color: var(--brand);
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12.5px;
}

/* footer */
.footer { border-top: 1px solid var(--border); padding: 28px 0; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.footer-brand { display: flex; align-items: center; gap: 9px; font-weight: 600; font-size: 14.5px; }
.footer-brand img { border-radius: 6px; }
.footer-meta { color: var(--muted); font-size: 13px; display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; gap: 36px; }
  .hero h1 { font-size: 36px; }
  .card-grid, .risk-grid, .dl-grid, .safe-notes { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .trust-row { gap: 18px; }
}
