/* ── Tokens ── */
:root {
  --bg:       #0a0f1e;
  --surface:  rgba(255,255,255,0.05);
  --surface2: rgba(255,255,255,0.08);
  --text:     rgba(255,255,255,0.92);
  --muted:    rgba(255,255,255,0.62);
  --border:   rgba(255,255,255,0.10);
  --accent:   #7dd3fc;
  --accent2:  #a78bfa;
  --green:    #34d399;
  --shadow:   0 8px 32px rgba(0,0,0,0.4);
  --max:      1080px;
  --radius:   14px;
  --font:     "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, sans-serif;
  --mono:     ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html { height: 100%; scroll-behavior: smooth; }
body {
  min-height: 100%;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }

/* ── Layout ── */
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* ── Header / Nav ── */
.header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(10,15,30,0.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 60px; gap: 16px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--text); flex-shrink: 0;
}
.brand-icon { flex-shrink: 0; }
.brand-text { font-size: 15px; letter-spacing: 0.3px; }
.brand-sub  { color: var(--muted); font-weight: 400; }
.nav { display: flex; gap: 4px; flex-wrap: nowrap; align-items: center; }
.nav a {
  color: var(--muted); padding: 6px 10px; border-radius: 8px;
  font-size: 13px; font-weight: 500; transition: color .15s, background .15s;
  white-space: nowrap;
}
.nav a:hover { color: var(--text); background: var(--surface); text-decoration: none; }
.nav a[aria-current="page"] {
  color: var(--text); background: var(--surface2); border: 1px solid var(--border);
}

/* mobile burger */
.nav-toggle { display: none; }
.nav-burger { display: none; cursor: pointer; flex-direction: column; gap: 5px; padding: 6px; }
.nav-burger span { display: block; width: 22px; height: 2px; background: var(--muted); border-radius: 2px; transition: .2s; }
@media (max-width: 860px) {
  .nav-burger { display: flex; }
  .nav { display: none; flex-direction: column; position: absolute; top: 60px; left: 0; right: 0; background: rgba(10,15,30,0.96); backdrop-filter: blur(14px); border-bottom: 1px solid var(--border); padding: 12px 24px; gap: 4px; }
  .nav-toggle:checked ~ .nav { display: flex; }
}

/* ── Main ── */
.main { padding-bottom: 80px; }

/* ── Hero ── */
.hero {
  padding: 72px 0 48px;
  position: relative;
}
.hero::before {
  content: "";
  position: absolute; top: -120px; left: -200px;
  width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(125,211,252,0.12) 0%, transparent 70%);
  pointer-events: none;
}
.hero::after {
  content: "";
  position: absolute; top: -80px; right: -150px;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(167,139,250,0.10) 0%, transparent 70%);
  pointer-events: none;
}
.hero h1 {
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1.08;
  letter-spacing: -0.03em;
  font-weight: 800;
  position: relative;
  max-width: 18ch;
}
.hero h1 .gradient {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-sub {
  color: var(--muted); font-size: 19px; max-width: 60ch;
  margin-top: 20px; position: relative;
}

/* ── Badges ── */
.badge-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 24px; position: relative; }
.badge {
  padding: 5px 12px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface);
  color: var(--muted); font-size: 13px; font-weight: 500;
}

/* ── CTAs ── */
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; position: relative; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: 12px;
  font-weight: 600; font-size: 15px;
  border: 1px solid var(--border); background: var(--surface);
  color: var(--text); box-shadow: var(--shadow);
  transition: filter .15s, transform .1s;
}
.btn:hover { text-decoration: none; filter: brightness(1.08); transform: translateY(-1px); }
.btn.primary {
  background: linear-gradient(135deg, rgba(125,211,252,0.20), rgba(167,139,250,0.16));
  border-color: rgba(125,211,252,0.30);
}

/* ── Compliance note ── */
.compliance-note {
  margin-top: 32px; padding: 14px 18px; border-radius: 12px;
  border-left: 3px solid var(--accent);
  background: rgba(125,211,252,0.06);
  color: var(--muted); font-size: 14px;
  position: relative; max-width: 72ch;
}
.compliance-note strong { color: var(--text); }

/* ── Section ── */
.section { padding: 48px 0; }
.section + .section { border-top: 1px solid var(--border); }
.section-label {
  text-transform: uppercase; letter-spacing: 0.12em;
  font-size: 12px; font-weight: 700; color: var(--accent);
  margin-bottom: 8px;
}
.section-title {
  font-size: clamp(24px, 3vw, 36px); font-weight: 700;
  letter-spacing: -0.02em; line-height: 1.15;
}
.section-desc {
  color: var(--muted); font-size: 17px; max-width: 62ch;
  margin-top: 10px;
}

/* ── KPI row ── */
.kpis {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px; margin-top: 32px;
}
.kpi {
  padding: 20px; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--surface);
}
.kpi-label { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.kpi-value { color: var(--muted); font-size: 13px; }

/* ── Card grid ── */
.card-grid {
  display: grid; gap: 16px; margin-top: 32px;
}
.card-grid.cols-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.card-grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow);
  transition: border-color .2s;
}
.card:hover { border-color: rgba(125,211,252,0.25); }
.card h2, .card h3 { margin: 0 0 8px; font-size: 18px; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }
.card .card-tag {
  display: inline-block; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em;
  padding: 3px 8px; border-radius: 6px; margin-bottom: 10px;
}
.card .card-tag.recommended { background: rgba(52,211,153,0.15); color: var(--green); }
.card .card-tag.java        { background: rgba(125,211,252,0.12); color: var(--accent); }

/* ── Layer diagram (CSS-only) ── */
.layer-stack {
  display: flex; flex-direction: column; gap: 0; margin-top: 36px;
  max-width: 700px;
}
.layer {
  padding: 22px 24px; position: relative;
  border: 1px solid var(--border);
}
.layer:first-child { border-radius: var(--radius) var(--radius) 0 0; }
.layer:last-child  { border-radius: 0 0 var(--radius) var(--radius); }
.layer + .layer { border-top: none; }
.layer-num {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.10em; margin-bottom: 4px;
}
.layer-name { font-size: 17px; font-weight: 700; color: var(--text); }
.layer-desc { font-size: 14px; color: var(--muted); margin-top: 4px; }
.layer.l3 { background: rgba(52,211,153,0.06); }
.layer.l3 .layer-num { color: var(--green); }
.layer.l2 { background: rgba(167,139,250,0.06); }
.layer.l2 .layer-num { color: var(--accent2); }
.layer.l1 { background: rgba(125,211,252,0.06); }
.layer.l1 .layer-num { color: var(--accent); }
.layer.l0 { background: rgba(255,200,80,0.05); }
.layer.l0 .layer-num { color: #fbbf24; }

/* ── Endpoint table ── */
.endpoint-table { width: 100%; border-collapse: collapse; margin-top: 16px; font-size: 14px; }
.endpoint-table th {
  text-align: left; padding: 10px 12px;
  font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--muted); border-bottom: 2px solid var(--border);
}
.endpoint-table td {
  padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top;
}
.endpoint-table tr:last-child td { border-bottom: none; }
.endpoint-table code { font-family: var(--mono); font-size: 13px; }
.method {
  display: inline-block; padding: 2px 8px; border-radius: 4px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.04em;
  font-family: var(--mono);
}
.method.post { background: rgba(52,211,153,0.15); color: var(--green); }
.method.get  { background: rgba(125,211,252,0.12); color: var(--accent); }

/* ── Content (markdown pages) ── */
.content { max-width: 72ch; }
.content h1 { font-size: clamp(28px, 4vw, 40px); font-weight: 800; letter-spacing: -0.02em; margin-bottom: 12px; }
.content h2 { font-size: 22px; font-weight: 700; margin-top: 40px; margin-bottom: 10px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.content h3 { font-size: 17px; font-weight: 700; margin-top: 28px; margin-bottom: 8px; }
.content p  { color: var(--muted); margin-bottom: 14px; }
.content ul, .content ol { color: var(--muted); margin: 0 0 16px 20px; }
.content li { margin: 6px 0; }
.content li strong { color: var(--text); }
.content blockquote {
  border-left: 3px solid var(--accent); padding: 12px 16px; margin: 16px 0;
  border-radius: 0 12px 12px 0;
  background: rgba(125,211,252,0.06); color: var(--muted);
}
.content pre {
  overflow-x: auto; padding: 18px 20px; margin: 16px 0;
  border-radius: var(--radius); border: 1px solid var(--border);
  background: rgba(0,0,0,0.35); font-size: 14px; line-height: 1.5;
}
.content code { font-family: var(--mono); font-size: 0.9em; }
.content p code, .content li code {
  padding: 2px 6px; border-radius: 5px;
  background: rgba(255,255,255,0.08); font-size: 0.85em;
}
.content table {
  width: 100%; border-collapse: collapse; margin: 16px 0;
  font-size: 14px;
}
.content table th {
  text-align: left; padding: 10px 12px; font-weight: 600;
  border-bottom: 2px solid var(--border); color: var(--text);
}
.content table td {
  padding: 10px 12px; border-bottom: 1px solid var(--border);
  color: var(--muted);
}
.content hr {
  border: none; height: 1px; background: var(--border); margin: 40px 0;
}

/* ── Footer ── */
.footer {
  border-top: 1px solid var(--border);
  padding: 28px 0; margin-top: 24px;
}
.footer-inner {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 16px; font-size: 13px;
}
.footer-brand strong { color: var(--text); }
.footer-brand span { display: block; color: var(--muted); margin-top: 2px; }
.footer-links { display: flex; gap: 16px; }
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--text); }

/* ── Language switcher ── */
.lang-switcher {
  display: inline-flex; align-items: center; gap: 4px;
  margin-left: 12px; padding-left: 12px;
  border-left: 1px solid var(--border);
  font-size: 13px; font-weight: 600;
  flex-shrink: 0;
}
.lang-switcher a {
  color: var(--muted); padding: 4px 6px; border-radius: 4px;
  transition: color .15s;
}
.lang-switcher a:hover { color: var(--text); text-decoration: none; }
.lang-active { color: var(--accent); padding: 4px 6px; }
@media (max-width: 860px) {
  .lang-switcher { margin-left: 0; padding-left: 0; border-left: none; padding-top: 8px; }
}

/* ── Contact form ── */
.contact-form { max-width: 480px; margin-top: 24px; }
.contact-form label {
  display: block; font-size: 14px; font-weight: 600;
  color: var(--text); margin-bottom: 6px; margin-top: 18px;
}
.contact-form input,
.contact-form textarea {
  width: 100%; padding: 10px 14px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--surface);
  color: var(--text); font-family: var(--font); font-size: 15px;
  transition: border-color .15s;
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none; border-color: var(--accent);
}
.contact-form textarea { min-height: 120px; resize: vertical; }
.contact-form button {
  margin-top: 20px; padding: 12px 28px; border-radius: 12px;
  border: 1px solid rgba(125,211,252,0.30);
  background: linear-gradient(135deg, rgba(125,211,252,0.20), rgba(167,139,250,0.16));
  color: var(--text); font-weight: 600; font-size: 15px;
  cursor: pointer; transition: filter .15s, transform .1s;
}
.contact-form button:hover { filter: brightness(1.08); transform: translateY(-1px); }

/* ── Architecture diagram (SVG) ── */
.arch-diagram { margin: 36px 0; max-width: 700px; }
.arch-diagram svg { width: 100%; height: auto; }

/* ── Roadmap timeline ── */
.roadmap-phase { margin-top: 28px; }
.roadmap-phase h3 { display: flex; align-items: center; gap: 10px; }
.roadmap-phase h3::before {
  content: ""; display: inline-block; width: 10px; height: 10px;
  border-radius: 50%; flex-shrink: 0;
}
.roadmap-phase.now h3::before { background: var(--green); }
.roadmap-phase.next h3::before { background: var(--accent); }
.roadmap-phase.later h3::before { background: var(--accent2); }

/* ── Utilities ── */
.mt-0  { margin-top: 0; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.text-muted { color: var(--muted); }
.text-sm { font-size: 14px; }
