/* ============================================================
   NxCode — landing page styles
   Tema: "Claude-like" (Warm Beige, Elegan, Tipografi Serif)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Newsreader:ital,opsz,wght@0,6..72,300..800;1,6..72,300..800&display=swap');

:root {
  /* Brand color */
  --brand: #e8956f;
  --brand-strong: #d47a52;
  
  /* Claude-like warm light theme */
  --bg: #F9F8F6;          /* Warm off-white / beige */
  --bg-2: #F2EFEA;        /* Slightly darker beige */
  --surface: #FFFFFF;     /* Pure white for cards */
  --surface-2: #FDFDFC;   
  
  --border: #E6E4DD;
  --border-strong: #D4D1C9;
  
  /* Elegant dark brown/charcoal text instead of harsh black */
  --text: #2D2C2A;
  --text-dim: #5C5B59;
  --text-mute: #8E8B85;

  /* Terminal syntax colors (Monokai) - kept for the terminal mockup */
  --mono-pink: #f92672;
  --mono-cyan: #66d9ef;
  --mono-green: #a6e22e;
  --mono-purple: #ae81ff;
  --mono-blue: #7fb3ff;

  /* Typography */
  --serif: "Newsreader", "Playfair Display", "Georgia", "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, system-ui, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", "JetBrains Mono", "Cascadia Code", Consolas, "Liberation Mono", monospace;
  
  /* Soft, large radiuses */
  --radius: 20px;
  --maxw: 1080px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: var(--brand-strong);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Inline code outside terminal */
code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.15em 0.4em;
  color: var(--text);
}

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

/* ---------- background glow (softened for light mode) ---------- */
.bg-glow {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(800px 500px at 15% -5%, rgba(232, 149, 111, 0.08), transparent 65%),
    radial-gradient(800px 500px at 90% 5%, rgba(220, 210, 190, 0.4), transparent 65%);
}

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(12px);
  background: rgba(249, 248, 246, 0.85); /* Matches --bg with transparency */
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  font-family: var(--serif);
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

.brand:hover {
  text-decoration: none;
}

.brand-logo {
  display: block;
  width: 32px;
  height: 31px;
  object-fit: contain;
  border-radius: 8px;
  image-rendering: -webkit-optimize-contrast;
}

.footer-brand .brand-logo {
  width: 28px;
  height: 27px;
}

.brand-accent {
  color: var(--brand-strong);
  font-style: italic;
}

.nav {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 0.95rem;
  font-weight: 500;
}

.nav a {
  color: var(--text-dim);
}

.nav a:hover {
  color: var(--text);
  text-decoration: none;
}

.nav-gh, .nav-sponsor {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text) !important;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 999px; /* Pill shape */
  padding: 6px 14px;
  transition: all 0.2s ease;
}

.nav-gh:hover {
  background: var(--text);
  color: var(--surface) !important;
  border-color: var(--text);
}

.nav-sponsor:hover {
  background: #fdf5f8;
  color: #db61a2 !important;
  border-color: #db61a2;
}

/* ---------- lang switcher ---------- */
.lang-switch {
  display: inline-flex;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 999px; /* Pill shape */
  overflow: hidden;
  margin-left: 10px;
  padding: 2px;
}

.lang-switch button {
  border: 0;
  background: transparent;
  color: var(--text-dim);
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s;
}

.lang-switch button.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

/* ---------- hero ---------- */
.hero {
  text-align: center;
  padding: 90px 24px 40px;
}

.hero-logo {
  display: block;
  width: 90px;
  height: 87px;
  object-fit: contain;
  margin: 0 auto 30px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-dim);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 16px;
  margin-bottom: 30px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}

.badge .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand);
}

.hero-title {
  font-family: var(--serif);
  font-size: clamp(2.8rem, 7vw, 4.2rem);
  line-height: 1.1;
  letter-spacing: -0.04em;
  margin: 0 0 24px;
  font-weight: 400;
  color: var(--text);
}

.grad {
  /* Subtle brand coloring for the serif text */
  color: var(--brand-strong);
  font-style: italic;
}

.hero-sub {
  max-width: 680px;
  margin: 0 auto 40px;
  color: var(--text-dim);
  font-size: 1.15rem;
  line-height: 1.6;
}

/* ---------- install box ---------- */
.install-box {
  max-width: 760px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.04);
}

.tabs {
  display: flex;
  gap: 8px;
  padding: 10px 10px 0;
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
}

.tab {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--text-mute);
  font-family: var(--sans);
  font-size: 0.88rem;
  font-weight: 500;
  padding: 10px 20px;
  border-radius: 10px 10px 0 0;
  cursor: pointer;
  transition: color 0.2s;
}

.tab:hover {
  color: var(--text);
}

.tab.is-active {
  color: var(--text);
  background: var(--surface);
  font-weight: 600;
}

.cmd-row {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px 24px;
  text-align: left;
}

.cmd-row[hidden] {
  display: none;
}

.prompt {
  font-family: var(--mono);
  color: var(--text-mute);
  flex: none;
  font-size: 0.9rem;
  line-height: 1.5;
  padding-top: 1px;
}

.cmd-row code {
  flex: 1;
  background: transparent;
  border: none;
  padding: 0;
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Syntax highlighting untuk area terang (light mode) */
.hl-cmd { color: var(--brand-strong); font-weight: 600; }
.hl-flag { color: #0277bd; }
.hl-url { color: #2e7d32; text-decoration: underline; text-decoration-color: rgba(46, 125, 50, 0.3); }
.hl-op { color: #c2185b; }
.hl-type { color: #6a1b9a; }

.copy {
  flex: none;
  appearance: none;
  cursor: pointer;
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  background: var(--bg-2);
  border: 1px solid var(--border-strong);
  border-radius: 999px; /* Pill */
  padding: 8px 16px;
  transition: all 0.2s ease;
}

.copy:hover {
  background: var(--text);
  color: var(--surface);
  border-color: var(--text);
}

.copy.is-copied {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

.copy-sm {
  padding: 6px 14px;
  font-size: 0.8rem;
}

/* ---------- buttons ---------- */
.hero-cta {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 40px 0 20px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 999px; /* Pill shape */
  font-weight: 500;
  font-size: 1rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--text);
  color: var(--surface);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.btn-primary:hover {
  background: #111;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
}

.btn-ghost {
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-strong);
}

.btn-ghost:hover {
  border-color: var(--text);
  background: var(--bg-2);
}

.hero-note {
  color: var(--text-mute);
  font-size: 0.9rem;
}

/* ---------- terminal showcase (Kept Dark for Contrast) ---------- */
.terminal-section {
  padding-top: 50px;
  padding-bottom: 40px;
}

.terminal {
  max-width: 840px;
  margin: 0 auto;
  /* Hardcode dark theme for the terminal window */
  background: #1c1d17; 
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.15);
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 18px;
  background: #272822;
  border-bottom: 1px solid #3a3b34;
}

.tl {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}

.tl-r { background: #ff5f57; }
.tl-y { background: #febc2e; }
.tl-g { background: #28c840; }

.terminal-title {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: #7d7e72;
}

.terminal-body {
  margin: 0;
  padding: 24px 28px 30px;
  font-family: var(--mono);
  font-size: 0.85rem;
  line-height: 1.6;
  color: #f8f8f2;
  overflow-x: auto;
  white-space: pre;
}

/* Terminal syntax colors (Monokai hardcoded for dark bg) */
.t-orange { color: #e8956f; font-weight: 700; }
.t-green { color: #a6e22e; }
.t-cyan { color: #66d9ef; }
.t-pink { color: #f92672; }
.t-blue { color: #7fb3ff; }
.t-dim { color: #7d7e72; }

/* ---------- sections ---------- */
.section {
  padding: 90px 24px;
}

.section-title {
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 2.8rem);
  letter-spacing: -0.02em;
  margin: 0 0 16px;
  font-weight: 400;
  text-align: center;
}

.section-lead {
  text-align: center;
  color: var(--text-dim);
  font-size: 1.1rem;
  max-width: 620px;
  margin: 0 auto 50px;
  line-height: 1.6;
}

/* ---------- feature grid ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 20px rgba(0,0,0,0.02);
}

.card:hover {
  border-color: var(--border-strong);
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.05);
}

.card-icon {
  font-size: 1.8rem;
  line-height: 1;
  margin-bottom: 20px;
}

.card h3 {
  margin: 0 0 10px;
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 500;
}

.card p {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.95rem;
  line-height: 1.6;
}

.card strong {
  color: var(--text);
  font-weight: 600;
}

/* ---------- providers ---------- */
.pill-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.pill {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-dim);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 10px 20px;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.015);
}

.pill:hover {
  color: var(--text);
  border-color: var(--text);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.04);
}

/* ---------- steps ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.02);
}

.step-num {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--bg-2);
  border: 1px solid var(--border-strong);
  color: var(--text);
  font-family: var(--serif);
  font-size: 1.1rem;
  display: grid;
  place-items: center;
  margin-bottom: 20px;
}

.step h3 {
  margin: 0 0 10px;
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 500;
}

.step p {
  color: var(--text-dim);
  font-size: 0.95rem;
  margin: 0 0 16px;
  line-height: 1.5;
}

.code-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
}

.code-inline code {
  background: transparent;
  border: none;
  padding: 0;
  flex: 1;
  font-size: 0.88rem;
  white-space: nowrap;
  overflow-x: auto;
}

.step-hint {
  margin: 16px 0 0 !important;
  color: var(--text-mute) !important;
  font-size: 0.88rem !important;
}

.install-foot {
  text-align: center;
  color: var(--text-dim);
  font-size: 0.95rem;
  margin: 50px auto 0;
  max-width: 640px;
}

/* ---------- cli grid ---------- */
.cli-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.02);
}

.cli-item {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
}

.cli-item:nth-child(even) {
  border-right: none;
}
.cli-item:nth-last-child(-n+2) {
  border-bottom: none;
}

.cli-item code {
  flex: none;
  min-width: 170px;
  color: var(--brand-strong);
  background: transparent;
  border: none;
  padding: 0;
  font-size: 0.9rem;
  font-weight: 500;
}

.cli-item span {
  color: var(--text-dim);
  font-size: 0.9rem;
}

/* ---------- CTA ---------- */
.cta {
  text-align: center;
  padding: 90px 24px 110px;
}

.cta h2 {
  font-family: var(--serif);
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  letter-spacing: -0.02em;
  margin: 0 0 16px;
  font-weight: 400;
}

.cta p {
  color: var(--text-dim);
  font-size: 1.1rem;
  margin: 0 auto 12px;
  max-width: 580px;
  line-height: 1.6;
}

/* ---------- footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-2);
}

.footer-inner {
  padding: 40px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
  font-size: 1.2rem;
  color: var(--text);
}

.footer-note {
  margin: 0;
  color: var(--text-mute);
  font-size: 0.9rem;
}

.footer-links {
  display: flex;
  gap: 24px;
  font-size: 0.95rem;
  font-weight: 500;
  margin-top: 8px;
}

.footer-links a {
  color: var(--text-dim);
}

.footer-links a:hover {
  color: var(--text);
}

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .grid,
  .steps {
    grid-template-columns: 1fr 1fr;
  }
  .cli-grid {
    grid-template-columns: 1fr;
  }
  .cli-item {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .cli-item:nth-last-child(2) {
    border-bottom: 1px solid var(--border);
  }
  .cli-item:last-child {
    border-bottom: none;
  }
}

@media (max-width: 600px) {
  .nav {
    gap: 14px;
  }
  .nav a:not(.nav-gh) {
    display: none;
  }
  .grid,
  .steps {
    grid-template-columns: 1fr;
  }
  .hero {
    padding-top: 60px;
  }
  .cmd-row {
    flex-wrap: wrap;
  }
  .cli-item code {
    min-width: 140px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
/* CTA IDE note */
.cta-ide-note { margin-top: 18px; font-size: 0.9rem; color: var(--muted, #8b98ad); }
.cta-ide-note a { color: var(--accent, #e95420); font-weight: 600; }
.cta-ide-note strong { color: var(--text, #e6ecf5); }
