/* ============================================================
   Jundi Studio — site styles
   ============================================================ */

:root {
  --bg: #0b1220;
  --bg-soft: #0f1a2e;
  --bg-card: #111c30;
  --border: #1e2c44;
  --text: #e6edf7;
  --text-muted: #93a4bd;
  --accent: #10b981;
  --accent-strong: #34d399;
  --accent-ink: #06251b;
  --code-bg: #0a1019;
  --radius: 12px;
  --maxw: 1120px;
  --font: 'Segoe UI', system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
  --mono: 'Cascadia Code', 'JetBrains Mono', Consolas, 'Courier New', monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 18, 32, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 16px;
}

.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand img { height: 30px; width: 30px; }
.brand .badge { font-size: 11px; color: var(--text-muted); font-weight: 400; }

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

.nav-links a {
  color: var(--text-muted);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
}
.nav-links a:hover { color: var(--text); text-decoration: none; background: var(--bg-card); }
.nav-links a.active { color: var(--accent-strong); }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 18px;
  cursor: pointer;
}

/* ---------- Hero ---------- */

.hero {
  padding: 96px 0 72px;
  text-align: center;
  background:
    radial-gradient(800px 320px at 20% 0%, rgba(16, 185, 129, 0.12), transparent 60%),
    radial-gradient(700px 300px at 85% 10%, rgba(59, 130, 246, 0.10), transparent 60%);
  border-bottom: 1px solid var(--border);
}

.hero h1 { font-size: clamp(34px, 6vw, 60px); line-height: 1.1; margin: 0 0 16px; }
.hero h1 .grad {
  background: linear-gradient(90deg, var(--accent-strong), #6ee7b7);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero p { font-size: clamp(16px, 2.4vw, 20px); color: var(--text-muted); max-width: 640px; margin: 0 auto 32px; }

.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-strong); box-shadow: 0 8px 24px rgba(16, 185, 129, .35); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { background: var(--bg-card); }

/* ---------- Sections / headings ---------- */

.section { padding: 64px 0; }
.section-alt { background: var(--bg-soft); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.page-hero { padding: 56px 0 28px; border-bottom: 1px solid var(--border); }
.page-hero h1 { margin: 0 0 8px; font-size: clamp(28px, 4vw, 40px); }
.page-hero p { color: var(--text-muted); margin: 0; max-width: 720px; }

h2 { font-size: 26px; margin: 40px 0 12px; }
h3 { font-size: 19px; margin: 28px 0 8px; }
h2, h3 { scroll-margin-top: 84px; }

p { margin: 12px 0; }
ul, ol { padding-left: 22px; }
li { margin: 6px 0; }
strong { color: var(--text); }

/* ---------- Grid / cards ---------- */

.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.card .icon { font-size: 26px; }
.card h3 { margin-top: 8px; }
.card p { color: var(--text-muted); font-size: 14.5px; }

/* ---------- Plugin cards ---------- */

.plugin-card { position: relative; display: block; }
.plugin-card:hover { text-decoration: none; border-color: var(--accent); }
.plugin-card .tag {
  position: absolute; top: 18px; right: 18px;
  font-size: 11px; font-weight: 700; letter-spacing: .5px;
  padding: 4px 10px; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink);
}
.plugin-card .tag.soon { background: var(--bg-soft); color: var(--text-muted); border: 1px solid var(--border); }
.plugin-card h3 { margin-top: 10px; font-size: 20px; }
.plugin-card .meta { color: var(--text-muted); font-size: 13px; margin-bottom: 8px; }

/* ---------- Tables ---------- */

.table-wrap { overflow-x: auto; margin: 16px 0; }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); }
th { color: var(--text-muted); font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: .4px; }
tr:hover td { background: rgba(16, 185, 129, 0.04); }
code, .mono { font-family: var(--mono); font-size: .92em; background: var(--code-bg); border: 1px solid var(--border); padding: 1px 6px; border-radius: 6px; }
td code { white-space: nowrap; }

/* ---------- Code blocks ---------- */

pre {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 13.5px;
  line-height: 1.55;
}
pre code { background: none; border: none; padding: 0; }
.lang { display: inline-block; font-size: 11px; color: var(--text-muted); letter-spacing: .5px; margin: 0 0 6px 2px; }

/* ---------- Callouts ---------- */

.callout {
  border-left: 4px solid var(--accent);
  background: rgba(16, 185, 129, 0.07);
  padding: 14px 18px;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 18px 0;
  font-size: 15px;
}
.callout.warn { border-left-color: #f59e0b; background: rgba(245, 158, 11, 0.08); }
.callout h4 { margin: 0 0 4px; }

/* ---------- Steps ---------- */

.steps { counter-reset: step; list-style: none; padding: 0; margin: 16px 0; }
.steps li { counter-increment: step; position: relative; padding: 0 0 18px 44px; margin: 0; }
.steps li::before {
  content: counter(step);
  position: absolute; left: 0; top: 0;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--accent); color: var(--accent-ink);
  font-weight: 700; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
}
.steps li:last-child { padding-bottom: 0; }

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
  margin-top: 64px;
  background: var(--bg-soft);
}
.site-footer .cols { display: flex; flex-wrap: wrap; gap: 32px; justify-content: space-between; }
.site-footer h4 { margin: 0 0 10px; font-size: 14px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .5px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin: 6px 0; }
.site-footer a { color: var(--text-muted); font-size: 14px; }
.site-footer a:hover { color: var(--accent-strong); }
.site-footer .bottom { margin-top: 28px; color: var(--text-muted); font-size: 13px; }

/* ---------- Utility ---------- */

.muted { color: var(--text-muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; }

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; align-items: stretch;
    background: var(--bg-soft);
    border-bottom: 1px solid var(--border);
    padding: 8px 16px 16px;
    display: none;
  }
  .nav-links.open { display: flex; }
  .hero { padding: 64px 0 48px; }
  .section { padding: 48px 0; }
}
