@import "https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;1,300;1,400;1,500&family=Geist:wght@300;400;500;600;700&family=Geist+Mono:wght@300;400;500&display=swap";

/* ── Variables ─────────────────────────────────────────────────────────────── */
:root {
  --bg: #14110f;
  --bg-elevated: #1c1816;
  --bg-deep: #100e0c;
  --bg-card: #1a1614;
  --border: #2a2825;
  --border-subtle: #1e1c1a;
  --fg-primary: #e8e4dc;
  --fg-secondary: #c4bfb5;
  --fg-muted: #9b9288;
  --fg-subtle: #6b665e;
  --fg-faint: #4a4740;
  --accent: #d6611f;
  --accent-hover: #c2561a;
  --accent-tint: #d6611f18;
  --accent-tint-hv: #d6611f28;
  --accent-border: #d6611f35;
  --font-ui: "Geist", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-serif: "Cormorant Garamond", Georgia, serif;
  --font-mono: "Geist Mono", ui-monospace, "JetBrains Mono", Menlo, monospace;
  --bw: 0.5px;
}

/* ── Reset ─────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-ui);
  background: var(--bg);
  color: var(--fg-secondary);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

/* ── Nav ───────────────────────────────────────────────────────────────────── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  background: rgba(20, 17, 15, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: var(--bw) solid var(--border-subtle);
}

.nav-wordmark {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  text-decoration: none;
}
.nav-wordmark .word {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: 22px;
  color: var(--fg-primary);
  line-height: 1;
  letter-spacing: -0.01em;
}
.nav-wordmark .cli-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--fg-subtle);
  letter-spacing: 0.04em;
  align-self: center;
  margin-left: 2px;
}
.nav-wordmark .ember {
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: var(--accent);
  align-self: center;
  transform: translateY(1px);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  list-style: none;
}
.nav-links a {
  font-size: 13px;
  color: var(--fg-muted);
  text-decoration: none;
  transition: color 0.15s;
}
.nav-links a:hover { color: var(--fg-primary); }

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 14px;
  background: var(--accent);
  color: #fff !important;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 500;
  transition: background 0.15s;
  text-decoration: none !important;
}
.nav-cta:hover { background: var(--accent-hover); }

/* ── Hero ──────────────────────────────────────────────────────────────────── */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 24px 80px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  top: -10%;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 600px;
  border-radius: 999px;
  background: radial-gradient(ellipse, rgba(214, 97, 31, 0.08) 0%, transparent 65%);
  pointer-events: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: var(--accent-tint);
  border: var(--bw) solid var(--accent-border);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--accent);
  letter-spacing: 0.04em;
  margin-bottom: 32px;
  animation: fadeInUp 0.5s ease both;
}
.hero-badge .dot {
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: var(--accent);
}

.hero-title {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(72px, 12vw, 120px);
  line-height: 0.9;
  letter-spacing: -0.03em;
  color: var(--fg-primary);
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 24px;
  animation: fadeInUp 0.5s 0.08s ease both;
}
.hero-title .ember-large {
  display: inline-block;
  width: clamp(10px, 1.5vw, 16px);
  height: clamp(10px, 1.5vw, 16px);
  border-radius: 999px;
  background: var(--accent);
  align-self: center;
  transform: translateY(clamp(10px, 1.5vw, 18px));
  margin-left: 2px;
}

.hero-sub {
  font-size: clamp(16px, 2vw, 19px);
  color: var(--fg-muted);
  max-width: 520px;
  line-height: 1.5;
  margin-bottom: 48px;
  animation: fadeInUp 0.5s 0.14s ease both;
}

.hero-install {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  animation: fadeInUp 0.5s 0.2s ease both;
}

.install-block {
  display: flex;
  align-items: center;
  background: var(--bg-deep);
  border: var(--bw) solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  width: 100%;
  max-width: 440px;
}
.install-block .prompt {
  padding: 12px 14px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--fg-subtle);
  flex-shrink: 0;
  border-right: var(--bw) solid var(--border);
  background: var(--bg-elevated);
  user-select: none;
}
.install-block .cmd {
  padding: 12px 16px;
  font-family: var(--font-mono);
  font-size: 13.5px;
  color: var(--fg-primary);
  flex: 1;
  letter-spacing: -0.01em;
}
.install-block .cmd span { color: var(--accent); }
.copy-btn {
  padding: 0 14px;
  height: 100%;
  background: transparent;
  border: none;
  border-left: var(--bw) solid var(--border);
  color: var(--fg-subtle);
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  transition: color 0.15s, background 0.15s;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 5px;
}
.copy-btn:hover { background: var(--bg-elevated); color: var(--fg-primary); }
.copy-btn.copied { color: #6db96d; }

.install-or {
  font-size: 11px;
  color: var(--fg-faint);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hero-scroll {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--fg-faint);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  animation: fadeInUp 0.5s 0.4s ease both;
}
.hero-scroll .arrow {
  width: 16px;
  height: 16px;
  border-right: 1.5px solid var(--fg-faint);
  border-bottom: 1.5px solid var(--fg-faint);
  transform: rotate(45deg);
  animation: bounce 1.6s ease infinite;
}

/* ── Demo section ──────────────────────────────────────────────────────────── */
.demo-section {
  padding: 80px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}
.section-title {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(36px, 5vw, 54px);
  color: var(--fg-primary);
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin-bottom: 14px;
  text-align: center;
}
.section-sub {
  font-size: 15px;
  color: var(--fg-muted);
  max-width: 500px;
  text-align: center;
  margin-bottom: 56px;
}

/* ── Interactive Terminal ──────────────────────────────────────────────────── */
.terminal {
  width: 100%;
  max-width: 760px;
  background: #0a0908;
  border: var(--bw) solid #222;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0,0,0,0.65), 0 1px 2px rgba(0,0,0,0.5);
  font-family: var(--font-mono);
  font-size: 13px;
  display: flex;
  flex-direction: column;
  height: 500px;
  cursor: text;
}

/* macOS window bar */
.term-winbar {
  display: flex;
  align-items: center;
  padding: 10px 14px;
  background: #111;
  border-bottom: 0.5px solid #1e1e1e;
  flex-shrink: 0;
  gap: 8px;
  user-select: none;
}
.term-dots {
  display: flex;
  gap: 7px;
  align-items: center;
}
.term-winbar-title {
  flex: 1;
  text-align: center;
  font-size: 12px;
  color: #444;
  margin-right: 60px;
}

/* Window dots */
.wdot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 1;
  transition: filter 0.1s;
  flex-shrink: 0;
}
.wdot span {
  font-size: 0;
  font-weight: 800;
  line-height: 1;
  transition: font-size 0.1s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.wdot:hover span { font-size: 8px; }
.wdot-red    { background: #ff5f57; }
.wdot-yellow { background: #febc2e; }
.wdot-green  { background: #28c840; }
.wdot-red span    { color: #820005; }
.wdot-yellow span { color: #7d4800; }
.wdot-green span  { color: #005500; }
.wdot:hover { filter: brightness(0.88); }

/* Status bar - matches real Arti CLI header */
.term-statusbar {
  display: flex;
  align-items: center;
  padding: 7px 16px;
  background: #111;
  border-bottom: 1px solid #161616;
  flex-shrink: 0;
  gap: 20px;
  font-size: 13px;
  font-weight: 500;
}
.tsb-name  { color: #d6611f; }
.tsb-model { color: #d6611f; }
.tsb-cwd   { color: #505050; font-weight: 400; }
.tsb-right { margin-left: auto; color: #555; font-weight: 400; }

/* Hints */
.term-hints {
  padding: 8px 16px 4px;
  color: #3a3a3a;
  font-size: 12px;
  line-height: 1.5;
  flex-shrink: 0;
}

/* Output area */
.term-output {
  flex: 1;
  overflow-y: auto;
  padding: 6px 0 4px;
  scroll-behavior: smooth;
  min-height: 0;
}
.term-output::-webkit-scrollbar { width: 4px; }
.term-output::-webkit-scrollbar-thumb { background: #2a2a2a; border-radius: 2px; }

/* Messages */
.term-msg {
  padding: 6px 16px;
  line-height: 1.65;
}
.tmsg-who {
  display: block;
  font-size: 12px;
  color: #444;
  margin-bottom: 2px;
  font-weight: 500;
}
.tmsg-who-arti { color: #d6611f; }
.tmsg-text,
.tmsg-body {
  display: block;
  color: #bbb;
  padding-left: 2px;
  line-height: 1.65;
}

/* Tool call pill */
.term-tool-call {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 4px 16px 4px;
  padding: 3px 10px 3px 8px;
  background: #141414;
  border: 0.5px solid #242424;
  border-radius: 999px;
  font-size: 11.5px;
  color: #444;
}
.ttc-ok    { color: #5a9a5a; }
.ttc-name  { color: #bbb; }
.ttc-arrow { color: #383838; }
.ttc-arg   { color: #888; }

/* Diff block */
.tdiff {
  background: #0d0d0d;
  border: 0.5px solid #242424;
  border-radius: 6px;
  padding: 10px 14px;
  margin: 6px 0;
  font-size: 12.5px;
  overflow-x: auto;
  white-space: pre;
}
.tdiff-add { color: #5a9a5a; display: block; }
.tdiff-rm  { color: #b85050; display: block; }
.tdiff-ctx { color: #444; display: block; }

/* Approve prompt */
.tapprove {
  display: inline-block;
  color: #d6611f;
  border: 0.5px solid rgba(214,97,31,0.3);
  border-radius: 5px;
  padding: 2px 8px;
  margin: 6px 0;
  font-size: 12px;
}

/* Preformatted output */
.tpre {
  background: #0d0d0d;
  border: 0.5px solid #1e1e1e;
  border-radius: 6px;
  padding: 10px 14px;
  white-space: pre;
  color: #888;
  font-size: 12px;
  margin: 4px 0;
  overflow-x: auto;
}

/* Inline highlights in terminal output */
.thl { color: #d6611f; }
.tok { color: #5a9a5a; }
.terr { color: #b85050; }

/* Help grid */
.thelp { display: flex; flex-direction: column; gap: 3px; margin: 4px 0; }
.thelp-row { display: flex; gap: 12px; font-size: 12.5px; }
.thelp-row .thl { min-width: 80px; display: inline-block; }

/* Input area */
.term-input-wrap {
  flex-shrink: 0;
  padding: 8px 12px;
  position: relative;
}
.term-input-box {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1.5px solid #d6611f;
  border-radius: 6px;
  padding: 9px 12px;
  background: #000;
  transition: border-color 0.15s;
}
.term-input-box:focus-within { border-color: #e8702a; }
.term-prompt {
  color: #d6611f;
  font-weight: 700;
  flex-shrink: 0;
  font-size: 14px;
  line-height: 1;
}
#term-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #ccc;
  font-family: var(--font-mono);
  font-size: 13px;
  caret-color: #d6611f;
}
#term-input::placeholder { color: #2a2a2a; }

/* Command dropdown */
.term-cmd-menu {
  position: absolute;
  bottom: calc(100% - 8px);
  left: 12px;
  right: 12px;
  background: #111;
  border: 0.5px solid #2a2a2a;
  border-radius: 8px;
  overflow: hidden;
  z-index: 10;
  box-shadow: 0 -8px 24px rgba(0,0,0,0.5);
}
.tcm-header {
  padding: 6px 12px;
  font-size: 11px;
  color: #3a3a3a;
  border-bottom: 0.5px solid #1e1e1e;
  user-select: none;
}
.tcm-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 7px 12px;
  cursor: pointer;
  transition: background 0.1s;
}
.tcm-item:hover,
.tcm-item-active { background: #1a1a1a; }
.tcm-cmd  { color: #d6611f; min-width: 80px; font-size: 12.5px; }
.tcm-desc { color: #484848; font-size: 12px; }

/* Footer */
.term-footer {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 5px 16px 10px;
  font-size: 12px;
  user-select: none;
}
.term-mode-label { color: #484848; }
.term-mode-hint  { color: #2a2a2a; }

/* ── Features ──────────────────────────────────────────────────────────────── */
.features-section {
  padding: 80px 24px;
  max-width: 1100px;
  margin: 0 auto;
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  background: var(--border-subtle);
  border: var(--bw) solid var(--border-subtle);
  border-radius: 14px;
  overflow: hidden;
}
.feature-card {
  background: var(--bg);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.feature-icon {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: var(--accent-tint);
  border: var(--bw) solid var(--accent-border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.feature-icon svg { color: var(--accent); }
.feature-name {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--fg-primary);
}
.feature-desc {
  font-size: 13.5px;
  color: var(--fg-muted);
  line-height: 1.6;
}

/* ── Tutorial ──────────────────────────────────────────────────────────────── */
.tutorial-section {
  padding: 80px 24px;
  max-width: 800px;
  margin: 0 auto;
}
.steps {
  display: flex;
  flex-direction: column;
  position: relative;
}
.steps::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 36px;
  bottom: 36px;
  width: var(--bw);
  background: var(--border);
}
.step {
  display: flex;
  gap: 24px;
  padding: 0 0 40px;
}
.step:last-child { padding-bottom: 0; }
.step-num {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: var(--bg-elevated);
  border: var(--bw) solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--accent);
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}
.step-body { flex: 1; min-width: 0; padding-top: 6px; }
.step-title {
  font-size: 16px;
  font-weight: 500;
  color: var(--fg-primary);
  margin-bottom: 8px;
}
.step-desc {
  font-size: 14px;
  color: var(--fg-muted);
  margin-bottom: 14px;
  line-height: 1.6;
}

/* Code blocks (tutorial) */
.code-block {
  background: var(--bg-deep);
  border: var(--bw) solid var(--border);
  border-radius: 9px;
  overflow: hidden;
}
.code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  background: var(--bg-elevated);
  border-bottom: var(--bw) solid var(--border);
}
.code-header .lang {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--fg-subtle);
  letter-spacing: 0.06em;
}
.code-header .copy-inline {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--fg-faint);
  transition: color 0.15s;
  padding: 0;
}
.code-header .copy-inline:hover { color: var(--fg-secondary); }
.code-header .copy-inline.copied { color: #6db96d; }
.code-body {
  padding: 16px 18px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.75;
  color: var(--fg-secondary);
  overflow-x: auto;
  white-space: pre;
}
.code-body .hl  { color: var(--accent); }
.code-body .cm  { color: var(--fg-faint); font-style: italic; }
.code-body .st  { color: #a5d6ff; }

/* ── Commands section ──────────────────────────────────────────────────────── */
.commands-section {
  padding: 80px 24px;
  max-width: 800px;
  margin: 0 auto;
}
.cmd-table {
  width: 100%;
  border: var(--bw) solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  border-collapse: collapse;
}
.cmd-table thead tr {
  background: var(--bg-elevated);
  border-bottom: var(--bw) solid var(--border);
}
.cmd-table th {
  padding: 10px 16px;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-faint);
  text-align: left;
}
.cmd-table td {
  padding: 11px 16px;
  font-size: 13.5px;
  color: var(--fg-muted);
  border-bottom: var(--bw) solid var(--border-subtle);
  vertical-align: top;
}
.cmd-table tr:last-child td { border-bottom: none; }
.cmd-table tr:hover td { background: rgba(255,255,255,0.015); }
.cmd-table td code {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--fg-primary);
  background: var(--bg-elevated);
  border: var(--bw) solid var(--border);
  border-radius: 4px;
  padding: 1px 6px;
}
.badge-no  { color: #6db96d; font-size: 12px; }
.badge-yes { color: var(--accent); font-size: 12px; font-weight: 500; }

/* ── Models section ────────────────────────────────────────────────────────── */
.models-section {
  padding: 80px 24px;
  max-width: 800px;
  margin: 0 auto;
}
.models-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.model-card {
  background: var(--bg-elevated);
  border: var(--bw) solid var(--border);
  border-radius: 11px;
  padding: 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color 0.15s;
}
.model-card:hover { border-color: var(--accent-border); }
.model-card.default { border-color: var(--accent-border); box-shadow: 0 0 0 1px var(--accent-tint); }
.model-name {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 500;
  color: var(--fg-primary);
}
.model-card.default .model-name { color: var(--accent); }
.model-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--fg-subtle);
  background: var(--bg-deep);
  border: var(--bw) solid var(--border);
  border-radius: 999px;
  padding: 2px 8px;
  align-self: flex-start;
}
.model-card.default .model-tag {
  color: var(--accent);
  background: var(--accent-tint);
  border-color: var(--accent-border);
}
.model-desc {
  font-size: 13px;
  color: var(--fg-muted);
  line-height: 1.5;
  margin-top: 4px;
}

/* ── Footer ────────────────────────────────────────────────────────────────── */
footer {
  padding: 60px 32px 48px;
  border-top: var(--bw) solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
}
.footer-wordmark {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
}
.footer-wordmark .word {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: 28px;
  color: var(--fg-primary);
  letter-spacing: -0.01em;
}
.footer-wordmark .ember {
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: var(--accent);
  align-self: center;
  transform: translateY(2px);
}
.footer-links {
  display: flex;
  gap: 24px;
  list-style: none;
}
.footer-links a {
  font-size: 13px;
  color: var(--fg-subtle);
  text-decoration: none;
  transition: color 0.15s;
}
.footer-links a:hover { color: var(--fg-primary); }
.footer-copy { font-size: 12px; color: var(--fg-faint); }

/* ── Animations ────────────────────────────────────────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes bounce {
  0%, 100% { transform: rotate(45deg) translateY(0); }
  50%       { transform: rotate(45deg) translateY(4px); }
}
@keyframes termFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── Responsive ────────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .models-grid   { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  nav { padding: 0 18px; }
  .nav-links { display: none; }
  .features-grid { grid-template-columns: 1fr; }
  .models-grid   { grid-template-columns: 1fr; }
  .install-block { max-width: 100%; }
  .hero { padding: 100px 18px 80px; }
  .terminal { height: 420px; }
}
