/* ==========================================================================
   NXC — landing page SDK
   Palet mengikuti tema SDK: gelap #202020 / terang #f3f3f3, aksen #0078d4.
   ========================================================================== */

:root {
  --accent: #0078d4;
  --accent-hover: #1a86d9;
  --accent-press: #0063b1;
  --radius: 10px;
  --radius-lg: 16px;
  --container: 1120px;
  --font: "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --mono: "Cascadia Mono", "Cascadia Code", Consolas, "SF Mono", Menlo, monospace;
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.28);
  --transition: 160ms ease;

  /* Default = tema terang (dipakai bila JS belum/tidak jalan). */
  --bg: #f3f3f3;
  --surface: #ffffff;
  --surface-2: #fafafa;
  --surface-3: #f0f0f0;
  --border: #e0e0e0;
  --border-soft: #ececec;
  --text: #1f1f1f;
  --text-muted: #5a5a5a;
  --text-dim: #8a8a8a;
  --code-bg: #ffffff;
  --code-border: #e2e2e2;
  --shadow-color: rgba(0, 0, 0, 0.12);
}

html[data-theme="dark"] {
  --bg: #1a1a1a;
  --surface: #202020;
  --surface-2: #2b2b2b;
  --surface-3: #323232;
  --border: #3a3a3a;
  --border-soft: #2f2f2f;
  --text: #ececec;
  --text-muted: #a2a2a2;
  --text-dim: #6d6d6d;
  --code-bg: #171717;
  --code-border: #333;
  --shadow-color: rgba(0, 0, 0, 0.4);
}

html[data-theme="light"] {
  --bg: #f3f3f3;
  --surface: #ffffff;
  --surface-2: #fafafa;
  --surface-3: #f0f0f0;
  --border: #e0e0e0;
  --border-soft: #ececec;
  --text: #1f1f1f;
  --text-muted: #5a5a5a;
  --text-dim: #8a8a8a;
  --code-bg: #ffffff;
  --code-border: #e2e2e2;
  --shadow-color: rgba(0, 0, 0, 0.12);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 76px; }

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); text-decoration: none; }
a:hover { color: var(--accent-hover); }

code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: var(--surface-3);
  padding: 0.12em 0.42em;
  border-radius: 5px;
}

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

.hidden { display: none !important; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), color var(--transition), transform var(--transition);
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-lg { padding: 13px 26px; font-size: 1rem; }
.btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #fff; }
.btn-outline { background: transparent; color: var(--text); border-color: var(--border); }
.btn-outline:hover { background: var(--surface-2); border-color: var(--text-dim); color: var(--text); }
.btn-ghost { background: transparent; color: var(--text-muted); border-color: transparent; }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-soft);
}
.header-inner { display: flex; align-items: center; gap: 20px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; font-size: 1.1rem; }
.brand img { border-radius: 8px; }
.nav { display: flex; gap: 4px; margin-left: 8px; }
.nav a {
  color: var(--text-muted);
  padding: 7px 12px;
  border-radius: 8px;
  font-size: 0.92rem;
  font-weight: 500;
  transition: background var(--transition), color var(--transition);
}
.nav a:hover { background: var(--surface-2); color: var(--text); }
.header-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }

.lang-switch {
  display: inline-flex;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.lang-switch button {
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 6px 11px;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}
.lang-switch button.active { background: var(--accent); color: #fff; }

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  font-size: 1.1rem;
  padding: 5px 11px;
  cursor: pointer;
}

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: 84px 0 72px; }
.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(720px 420px at 12% -10%, color-mix(in srgb, var(--accent) 26%, transparent), transparent 70%),
    radial-gradient(600px 360px at 92% 8%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 72%);
  pointer-events: none;
}
.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 22px;
}
.badge .dot { width: 8px; height: 8px; border-radius: 50%; background: #2ecc71; box-shadow: 0 0 0 4px rgba(46, 204, 113, 0.18); }
.hero h1 { font-size: clamp(2rem, 4.2vw, 3.1rem); line-height: 1.12; margin: 0 0 18px; letter-spacing: -0.02em; }
.lead { font-size: 1.1rem; color: var(--text-muted); max-width: 540px; margin: 0 0 30px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 34px; }
.hero-stats { list-style: none; display: flex; gap: 34px; padding: 0; margin: 0; }
.hero-stats li { display: flex; flex-direction: column; }
.hero-stats strong { font-size: 1.5rem; color: var(--text); }
.hero-stats span { font-size: 0.82rem; color: var(--text-muted); }

/* ---------- Window mock ---------- */
.hero-visual { display: flex; justify-content: center; }
.window-mock {
  width: 100%;
  max-width: 470px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 24px 60px var(--shadow-color);
}
.window-titlebar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border-soft);
  font-size: 0.84rem;
  color: var(--text-muted);
}
.window-titlebar img { border-radius: 4px; }
.window-buttons { display: flex; gap: 8px; margin-left: auto; }
.window-buttons span { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.wb-min { background: #f1c40f; }
.wb-max { background: #2ecc71; }
.wb-close { background: #e74c3c; }
.window-menu {
  display: flex;
  gap: 20px;
  padding: 9px 16px;
  font-size: 0.85rem;
  color: var(--text-muted);
  background: var(--surface-2);
  border-bottom: 1px solid var(--border-soft);
}
.window-body { padding: 22px 20px 24px; }
.window-body h3 { margin: 0 0 10px; font-size: 1.02rem; }
.window-body p { margin: 0 0 16px; font-size: 0.88rem; color: var(--text-muted); }
.window-log {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--text-muted);
  background: var(--code-bg);
  border: 1px solid var(--code-border);
  border-radius: 8px;
  padding: 12px 14px;
}
.log-time { color: var(--text-dim); }

/* ---------- Sections ---------- */
.section { padding: 84px 0; }
.section-alt { background: var(--surface); border-top: 1px solid var(--border-soft); border-bottom: 1px solid var(--border-soft); }
.section-head { max-width: 680px; margin: 0 auto 48px; text-align: center; }
.section-head h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin: 0 0 12px; letter-spacing: -0.015em; }
.section-head p { margin: 0; color: var(--text-muted); font-size: 1.05rem; }

/* ---------- Platform strip ---------- */
.platform-strip { border-top: 1px solid var(--border-soft); border-bottom: 1px solid var(--border-soft); background: var(--surface); padding: 26px 0; }
.platform-inner { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.platform-label { font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-dim); font-weight: 600; }
.platform-chips { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.platform-chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg);
  font-size: 0.92rem;
  font-weight: 600;
}
.platform-chip .material-symbols-rounded { font-size: 20px; color: var(--text-muted); }
.platform-chip em { font-style: normal; font-weight: 500; font-size: 0.76rem; color: var(--text-dim); }
.platform-chip-primary { border-color: color-mix(in srgb, var(--accent) 55%, var(--border)); background: color-mix(in srgb, var(--accent) 12%, var(--bg)); }
.platform-chip-primary .material-symbols-rounded { color: var(--accent); }
.platform-chip-primary em { color: var(--accent); }
.platform-note { margin: 0; max-width: 640px; color: var(--text-muted); font-size: 0.88rem; }
.platform-note strong { color: var(--text); }

.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ---------- Philosophy ---------- */
.philo-layout { display: grid; grid-template-columns: 0.95fr 1.05fr; gap: 44px; align-items: start; }

.stack-diagram { display: flex; flex-direction: column; gap: 8px; }
.stack-layer {
  border-radius: var(--radius);
  padding: 14px 18px;
  border: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.stack-layer span { font-weight: 600; font-size: 0.95rem; }
.stack-layer small { color: var(--text-muted); font-size: 0.78rem; }
.layer-app { background: color-mix(in srgb, var(--accent) 20%, var(--surface)); border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }
.layer-runtime { background: color-mix(in srgb, var(--accent) 11%, var(--surface)); }
.layer-core { background: var(--surface-2); }
.layer-qt { background: var(--surface-3); }
.layer-os { background: var(--surface-3); opacity: 0.85; }

.philo-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.philo-col h3 { font-size: 1rem; margin: 0 0 14px; }
.philo-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 11px; }
.philo-col li { position: relative; padding-left: 26px; font-size: 0.92rem; color: var(--text-muted); }
.philo-col li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--accent); font-weight: 700; }
.philo-col-what li::before { content: "→"; color: var(--text-dim); }

.runtime-card { text-align: center; }
.runtime-card h3 { font-size: 0.98rem; }
.runtime-card p { font-size: 0.86rem; }

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px 24px;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.card:hover { transform: translateY(-3px); border-color: var(--text-dim); box-shadow: 0 14px 34px var(--shadow-color); }
.card-icon {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: 11px;
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  margin-bottom: 16px;
}
.card-icon .material-symbols-rounded { color: var(--accent); font-size: 24px; }

/* Ikon Google Material Symbols (dimuat di <head>). */
.material-symbols-rounded {
  font-family: "Material Symbols Rounded";
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
  -webkit-font-feature-settings: "liga";
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "liga";
}
.card h3 { margin: 0 0 8px; font-size: 1.08rem; }
.card p { margin: 0; color: var(--text-muted); font-size: 0.94rem; }

.card-module-head { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.module-tag {
  align-self: flex-start;
  font-family: var(--mono);
  font-size: 0.74rem;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  padding: 3px 9px;
  border-radius: 6px;
}
.card-module h3 { font-size: 1.2rem; }
.module-include { display: inline-block; margin-top: 16px; }
.modules-note { text-align: center; margin-top: 34px; }
.modules-note code { font-size: 0.86rem; padding: 10px 18px; display: inline-block; }

/* ---------- Code section ---------- */
.code-layout { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: start; }
.code-panel {
  background: var(--code-bg);
  border: 1px solid var(--code-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.code-tabs { display: flex; gap: 2px; padding: 8px 8px 0; background: var(--surface-2); border-bottom: 1px solid var(--border-soft); }
.code-tab {
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--mono);
  font-size: 0.82rem;
  padding: 9px 15px;
  border-radius: 8px 8px 0 0;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}
.code-tab:hover { color: var(--text); }
.code-tab.active { background: var(--code-bg); color: var(--text); border-bottom: 1px solid var(--code-bg); margin-bottom: -1px; }
.code-block {
  margin: 0;
  padding: 22px 24px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 0.86rem;
  line-height: 1.75;
  color: var(--text);
}
.code-block code { background: none; padding: 0; font-size: inherit; }
.c-pre { color: #c586c0; }
.c-str { color: #ce9178; }
.c-key { color: #569cd6; }
.c-fn  { color: #dcdcaa; }
.c-type { color: #4ec9b0; }
.c-com { color: #6a9955; }

.code-points { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 22px; }
.code-points li { border-left: 3px solid var(--accent); padding-left: 18px; }
.code-points h4 { margin: 0 0 6px; font-size: 1rem; }
.code-points p { margin: 0; color: var(--text-muted); font-size: 0.92rem; }

/* ---------- Quick start ---------- */
.quickstart { display: grid; grid-template-columns: 1.15fr 1fr; gap: 40px; align-items: center; }
.qs-terminal { background: var(--code-bg); border: 1px solid var(--code-border); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); }
.qs-bar { display: flex; align-items: center; gap: 8px; padding: 11px 14px; background: var(--surface-2); border-bottom: 1px solid var(--border-soft); }
.qs-dot { width: 12px; height: 12px; border-radius: 50%; }
.qs-dot.red { background: #e74c3c; }
.qs-dot.yellow { background: #f1c40f; }
.qs-dot.green { background: #2ecc71; }
.qs-bar-title { margin-left: 8px; font-size: 0.8rem; color: var(--text-muted); }
.qs-body { padding: 20px 22px; font-family: var(--mono); font-size: 0.86rem; line-height: 2; }
.qs-line { white-space: nowrap; overflow-x: auto; }
.qs-prompt { color: #2ecc71; margin-right: 8px; }
.qs-comment { color: var(--text-dim); }

.qs-steps ol { list-style: none; counter-reset: step; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 22px; }
.qs-steps li { counter-increment: step; position: relative; padding-left: 52px; }
.qs-steps li::before {
  content: counter(step);
  position: absolute;
  left: 0; top: 0;
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
}
.qs-steps h4 { margin: 4px 0 6px; font-size: 1rem; }
.qs-steps p { margin: 0; color: var(--text-muted); font-size: 0.92rem; }

/* ---------- Download ---------- */
.card-download { display: flex; flex-direction: column; }
.card-download p { margin-bottom: 22px; }
.card-download .btn { align-self: flex-start; margin-top: auto; }

.cta-band {
  margin-top: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
  padding: 34px 38px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 88%, #000), color-mix(in srgb, var(--accent) 55%, #000));
  color: #fff;
}
.cta-band h3 { margin: 0 0 6px; font-size: 1.3rem; }
.cta-band p { margin: 0; opacity: 0.9; }
.cta-band .btn-primary { background: #fff; color: var(--accent-press); border-color: #fff; }
.cta-band .btn-primary:hover { background: #f0f0f0; color: var(--accent-press); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border-soft); padding: 34px 0; background: var(--surface); }
.footer-inner { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.footer-brand { display: flex; align-items: center; gap: 9px; font-weight: 700; }
.footer-brand img { border-radius: 6px; }
.footer-note { margin: 0; color: var(--text-muted); font-size: 0.85rem; }
.footer-nav { margin-left: auto; display: flex; gap: 20px; font-size: 0.9rem; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; gap: 44px; }
  .hero-visual { order: -1; }
  .code-layout, .quickstart, .philo-layout { grid-template-columns: 1fr; gap: 32px; }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .nav { display: none; position: absolute; top: 60px; left: 0; right: 0; flex-direction: column; gap: 0; padding: 10px 16px 16px; background: var(--surface); border-bottom: 1px solid var(--border); }
  .nav.open { display: flex; }
  .nav a { padding: 12px; }
  .nav-toggle { display: inline-flex; }
  .btn-ghost { display: none; }
  .grid-2, .grid-3, .grid-4, .philo-cols { grid-template-columns: 1fr; }
  .hero { padding: 56px 0 48px; }
  .section { padding: 60px 0; }
  .hero-stats { gap: 22px; flex-wrap: wrap; }
  .cta-band { padding: 28px; }
}
