/* NxDOM landing page */
:root {
  --bg: #0b1020;
  --bg-soft: #111a30;
  --panel: #141e38;
  --line: #233152;
  --text: #e8eefb;
  --muted: #9fb0d0;
  --accent: #4f8cff;
  --accent-strong: #2f6fff;
  --ok: #3ddc84;
  --radius: 14px;
  --mono: ui-monospace, "Cascadia Code", Consolas, "Courier New", monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: system-ui, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

.container { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

h1, h2, h3 { line-height: 1.2; margin: 0 0 12px; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); text-align: center; margin-bottom: 32px; }
section { padding: 72px 0; }
p { margin: 0 0 10px; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code, pre { font-family: var(--mono); }
img { max-width: 100%; display: block; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.15rem; color: var(--text); }
.brand:hover { text-decoration: none; }
.logo { width: 30px; height: 30px; border-radius: 8px; }
.nav-links { display: flex; gap: 20px; margin-left: auto; }
.nav-links a { color: var(--muted); font-size: 0.95rem; }
.nav-links a:hover { color: var(--text); text-decoration: none; }
.nav-actions { display: flex; align-items: center; gap: 14px; margin-left: 12px; }

/* Lang switch (ID/EN) */
.lang-switch {
  display: inline-flex; background: var(--bg-soft);
  border: 1px solid var(--line); border-radius: 999px;
  overflow: hidden; padding: 2px;
}
.lang-switch button {
  border: 0; background: transparent; color: var(--muted);
  font-family: inherit; font-size: 0.72rem; font-weight: 600;
  padding: 6px 12px; border-radius: 999px; cursor: pointer; transition: 0.2s;
}
.lang-switch button.active {
  background: var(--panel); color: var(--text);
  box-shadow: 0 1px 3px rgb(0 0 0 / 40%);
}

/* Buttons */
.btn {
  display: inline-block; padding: 12px 22px; border-radius: 999px;
  font-weight: 600; font-size: 0.95rem; border: 1px solid transparent;
  cursor: pointer; transition: transform 0.15s ease, background 0.15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--accent-strong); color: #fff; }
.btn-primary:hover { background: var(--accent); }
.btn-ghost { border-color: var(--line); color: var(--text); background: transparent; }
.btn-ghost:hover { border-color: var(--accent); }
.btn-sm { padding: 8px 16px; font-size: 0.85rem; }

/* Hero */
.hero { padding: 88px 0 72px; background: radial-gradient(1000px 500px at 70% -10%, #1b2c55 0%, transparent 60%); }
.hero-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center; }
.eyebrow { color: var(--accent); font-weight: 600; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; }
.hero h1 { font-size: clamp(2.1rem, 5vw, 3.2rem); margin: 8px 0 16px; }
.accent { color: var(--accent); }
.lede { color: var(--muted); font-size: 1.1rem; max-width: 34rem; }
.hero-actions { display: flex; gap: 14px; margin: 24px 0 18px; flex-wrap: wrap; }
.hero-note { color: var(--muted); font-size: 0.85rem; }
.install-box {
  display: flex; align-items: center; gap: 12px;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 12px 16px; max-width: 34rem;
}
.install-box code { flex: 1; overflow-x: auto; white-space: nowrap; color: var(--ok); font-size: 0.9rem; }
.copy-btn {
  background: var(--bg-soft); color: var(--muted); border: 1px solid var(--line);
  border-radius: 8px; padding: 6px 12px; cursor: pointer; font-size: 0.8rem;
}
.copy-btn:hover { color: var(--text); border-color: var(--accent); }
.copy-btn.done { color: var(--ok); border-color: var(--ok); }

/* Terminal mock */
.term {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
  box-shadow: 0 24px 60px rgb(0 0 0 / 45%);
}
.term-bar { display: flex; align-items: center; gap: 7px; padding: 10px 14px; background: var(--bg-soft); border-bottom: 1px solid var(--line); }
.term-bar span { width: 11px; height: 11px; border-radius: 50%; background: #2b3a5c; }
.term-bar span:first-child { background: #ff5f56; }
.term-bar span:nth-child(2) { background: #ffbd2e; }
.term-bar span:nth-child(3) { background: #27c93f; }
.term-bar em { margin-left: auto; font-style: normal; color: var(--muted); font-size: 0.75rem; }
.term-body {
  margin: 0; padding: 18px 20px; font-size: 0.82rem; line-height: 1.55;
  overflow-x: auto; color: var(--text);
}
.t-dim { color: var(--muted); }
.t-cmd { color: var(--text); }
.t-blue { color: var(--accent); font-weight: 700; }
.t-ok { color: var(--ok); }

/* Why / cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.card:hover { border-color: var(--accent); transform: translateY(-2px); }
.card-icon {
  width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  color: var(--accent); font-size: 1.2rem; margin-bottom: 14px;
}
.card p { color: var(--muted); font-size: 0.95rem; margin: 0; }
.card code { color: var(--ok); font-size: 0.9em; }

/* Runtimes table */
.runtimes { background: var(--bg-soft); }
.runtime-table { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.rt {
  display: grid; grid-template-columns: 1.1fr 1fr 1.6fr; gap: 16px;
  padding: 14px 20px; border-bottom: 1px solid var(--line);
  background: var(--panel); font-size: 0.95rem;
}
.rt:last-child { border-bottom: 0; }
.rt-head {
  background: var(--bg); color: var(--muted); font-weight: 600;
  font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em;
}
.rt-name { font-weight: 700; color: var(--text); }
.rt span:not(.rt-name) { color: var(--muted); }
.runtimes-extra { text-align: center; color: var(--muted); margin-top: 20px; }

/* Screenshots */
.shot-main { max-width: 860px; margin: 0 auto 24px; }
.shot-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; margin-bottom: 40px; }
figure { margin: 0; }
figure img {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--panel); width: 100%;
}
figcaption { text-align: center; color: var(--muted); font-size: 0.85rem; margin-top: 8px; }

/* Steps */
.start { background: var(--bg-soft); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; max-width: 760px; margin-inline: auto; }
.steps li {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px; counter-increment: step;
}
.steps h3 { display: flex; align-items: center; gap: 12px; font-size: 1.05rem; }
.steps h3::before {
  content: counter(step); width: 30px; height: 30px; flex: 0 0 30px;
  display: grid; place-items: center; border-radius: 50%;
  background: var(--accent-strong); color: #fff; font-size: 0.9rem;
}
.steps pre {
  background: var(--bg); border: 1px solid var(--line); border-radius: 10px;
  padding: 12px 16px; overflow-x: auto; margin: 12px 0 0;
}
.steps pre code { color: var(--ok); font-size: 0.9rem; }
.step-alt { color: var(--muted); font-size: 0.85rem; margin: 10px 0 0; }
.step-alt code { color: var(--text); }

/* Download */
.download-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.dl-card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 28px; display: flex; flex-direction: column; gap: 10px;
}
.dl-card pre {
  background: var(--bg); border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 14px; overflow-x: auto; margin: 6px 0;
}
.dl-card pre code { color: var(--ok); font-size: 0.88rem; }
.dl-note { color: var(--muted); font-size: 0.85rem; margin: 0; }
.dl-note code { color: var(--text); }
.dl-card .btn { align-self: flex-start; }

/* FAQ */
.faq { background: var(--bg-soft); }
.faq-wrap { max-width: 760px; }
details {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 12px; padding: 16px 20px; margin-bottom: 12px;
}
details[open] { border-color: var(--accent); }
summary { cursor: pointer; font-weight: 600; }
summary code { color: var(--accent); }
details p { color: var(--muted); margin: 10px 0 0; }
details code { color: var(--text); }

/* Footer */
.footer { border-top: 1px solid var(--line); padding: 40px 0 32px; }
.footer-grid { display: flex; flex-wrap: wrap; align-items: center; gap: 24px; }
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-brand p { margin: 0; color: var(--muted); font-size: 0.85rem; }
.footer-links { display: flex; gap: 18px; margin-left: auto; flex-wrap: wrap; }
.footer-links a { color: var(--muted); font-size: 0.9rem; }
.footer-links a:hover { color: var(--text); }
.footer-links .text-pink { color: #db61a2; }
.footer-links .text-pink:hover { color: #e87dbb; }
.footer-copy { width: 100%; color: var(--muted); font-size: 0.8rem; margin: 0; }

/* AI highlight */
.ai-hl { background: var(--bg-soft); }
.ai-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.ai-title { text-align: left; margin-bottom: 12px; }
.ai-lede { color: var(--muted); max-width: 30rem; }
.ai-lede code { color: var(--accent); }
.ai-list { list-style: none; margin: 18px 0; padding: 0; display: grid; gap: 8px; }
.ai-list li {
  color: var(--text); font-size: 0.95rem; padding-left: 26px; position: relative;
}
.ai-list li::before { content: "❯"; position: absolute; left: 4px; color: var(--accent); font-family: var(--mono); }
.ai-token { color: var(--muted); font-size: 0.85rem; }
.ai-token code { color: var(--ok); }
.ai-term .t-warn { color: #ffbd2e; }

/* Responsive */
@media (max-width: 880px) {
  .hero-grid { grid-template-columns: 1fr; }
  .ai-grid { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .rt { grid-template-columns: 1fr; gap: 4px; }
  .rt-head { display: none; }
  .footer-links { margin-left: 0; }
}

@media (max-width: 560px) {
  .lang-switch { display: none; }
}
