:root {
  --bg: #0b0b0f;
  --bg-alt: #111118;
  --surface: #16161f;
  --border: #26262f;
  --text: #e8e8ee;
  --text-muted: #9a9aa8;
  --accent: #ff7a1a;
  --accent-soft: rgba(255, 122, 26, 0.12);
  --code-bg: #0a0a10;
  --radius: 12px;
  --max: 1080px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", sans-serif;
  --mono: "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.7;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

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

/* ============== HEADER ============== */
.site-header {
  position: sticky;
  top: 0;
  background: rgba(11, 11, 15, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}
.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 64px;
}
.logo {
  font-weight: 700;
  font-size: 18px;
  color: var(--text);
}
.logo span {
  color: var(--accent);
}
.site-header nav {
  display: flex;
  gap: 24px;
}
.site-header nav a {
  color: var(--text-muted);
  font-size: 14px;
}
.site-header nav a:hover {
  color: var(--text);
  text-decoration: none;
}

.lang-switch {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 16px;
  padding-left: 16px;
  border-left: 1px solid var(--border);
}
.lang-switch a {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.15s ease;
}
.lang-switch a:hover {
  color: var(--accent);
  text-decoration: none;
  background: var(--accent-soft);
}
.lang-switch a.active {
  color: var(--accent);
  background: var(--accent-soft);
}
.lang-switch span {
  color: var(--text-muted);
  font-size: 12px;
}

/* ============== HERO ============== */
.hero {
  padding: 100px 0 80px;
  background:
    radial-gradient(ellipse at top, rgba(255, 122, 26, 0.10), transparent 60%),
    var(--bg);
  text-align: center;
}
.badge {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--accent);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 24px;
}
.hero h1 {
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.15;
  margin: 0 0 24px;
  letter-spacing: -0.02em;
  font-weight: 700;
}
.hero .lead {
  font-size: 19px;
  color: var(--text-muted);
  max-width: 760px;
  margin: 0 auto 40px;
}
.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 32px;
}
.hero-meta {
  display: flex;
  gap: 24px;
  justify-content: center;
  flex-wrap: wrap;
  color: var(--text-muted);
  font-size: 14px;
}

/* ============== BUTTONS ============== */
.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 15px;
  transition: all 0.15s ease;
  cursor: pointer;
}
.btn-primary {
  background: var(--accent);
  color: #0b0b0f;
}
.btn-primary:hover {
  background: #ff8a3a;
  text-decoration: none;
  transform: translateY(-1px);
}
.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}
.btn-large {
  padding: 16px 36px;
  font-size: 17px;
}

/* ============== SECTIONS ============== */
.section {
  padding: 80px 0;
}
.section-alt {
  background: var(--bg-alt);
}
.section h2 {
  font-size: clamp(26px, 3.5vw, 36px);
  margin: 0 0 24px;
  letter-spacing: -0.01em;
  font-weight: 700;
}
.section h3 {
  font-size: 22px;
  margin: 40px 0 16px;
  font-weight: 600;
  color: var(--text);
}
.section h4 {
  font-size: 17px;
  margin: 0 0 8px;
  font-weight: 600;
}
.section p {
  color: var(--text-muted);
  max-width: 800px;
}
.section ol, .section ul {
  color: var(--text-muted);
  max-width: 800px;
  padding-left: 24px;
}
.section ol li, .section ul li {
  margin-bottom: 12px;
}
.section strong {
  color: var(--text);
}
.section em {
  color: var(--accent);
  font-style: normal;
}

/* ============== CARDS ============== */
.grid-3, .grid-2 {
  display: grid;
  gap: 20px;
  margin-top: 32px;
}
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 720px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.card h3, .card h4 {
  margin-top: 0;
  color: var(--text);
}
.card p {
  font-size: 15px;
  margin: 8px 0 0;
}

/* ============== CODE ============== */
pre {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.6;
  color: #d8d8e0;
  position: relative;
}
code {
  font-family: var(--mono);
  background: var(--surface);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.92em;
  color: #ffb88a;
}
pre code {
  background: transparent;
  padding: 0;
  color: inherit;
}
.copy-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--surface);
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s ease;
}
pre:hover .copy-btn { opacity: 1; }
.copy-btn:hover { color: var(--accent); border-color: var(--accent); }
.copy-btn.copied { color: var(--accent); border-color: var(--accent); }

/* ============== TABLE ============== */
.table-wrap {
  overflow-x: auto;
  margin: 24px 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}
th, td {
  padding: 14px 18px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
th {
  background: var(--surface);
  font-weight: 600;
  color: var(--text);
}
tr:last-child td { border-bottom: none; }
td { color: var(--text-muted); }
td strong { color: var(--text); }

/* ============== USE CASES ============== */
.usecases li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin-bottom: 14px;
  list-style-position: inside;
}
.usecases li::marker {
  color: var(--accent);
  font-weight: 700;
}

/* ============== FAQ ============== */
.faq {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin-bottom: 12px;
  cursor: pointer;
}
.faq summary {
  font-weight: 600;
  color: var(--text);
  list-style: none;
  position: relative;
  padding-right: 28px;
}
.faq summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 0;
  font-size: 22px;
  color: var(--accent);
  transition: transform 0.2s ease;
}
.faq[open] summary::after {
  content: "−";
}
.faq p {
  margin-top: 12px;
  color: var(--text-muted);
}

/* ============== CTA ============== */
.cta {
  text-align: center;
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-alt) 100%);
}
.cta h2 {
  margin-bottom: 16px;
}
.cta p {
  margin: 0 auto 32px;
}

/* ============== FOOTER ============== */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
}
.site-footer p {
  margin: 6px 0;
}
.legal a {
  color: var(--text-muted);
  margin: 0 8px;
}
.legal a:hover { color: var(--accent); }

/* ============== RESPONSIVE ============== */
@media (max-width: 720px) {
  .site-header nav { display: none; }
  .lang-switch { margin-left: 0; padding-left: 0; border-left: none; }
  .hero { padding: 60px 0 50px; }
  .section { padding: 60px 0; }
}
