/* Cubes — parallel build cubes for your agents.
   One stylesheet, no CDNs: this file is served by the Cubes handler itself. */

:root {
  --bg: #0d1017;
  --bg-raise: #151a24;
  --bg-card: #1a2130;
  --ink: #e8ecf4;
  --ink-dim: #9aa5b8;
  --edge: #2a3347;
  --cube: #7c5cff;
  --cube-hi: #9d85ff;
  --accent: #3ddc97;
  --warn: #ffb454;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

code, pre { font-family: var(--mono); font-size: 0.92em; }
pre {
  background: var(--bg-raise);
  border: 1px solid var(--edge);
  border-radius: 8px;
  padding: 0.9rem 1.1rem;
  overflow-x: auto;
  margin: 0.8rem 0;
}
code { background: var(--bg-raise); padding: 0.1em 0.35em; border-radius: 4px; }
pre code { background: none; padding: 0; }

/* ---- demo ribbon ---- */
.demo-ribbon {
  background: linear-gradient(90deg, #2b2350, #1d2a3a);
  border-bottom: 1px solid var(--edge);
  color: var(--ink-dim);
  font-size: 0.8rem;
  text-align: center;
  padding: 0.35rem 1rem;
  letter-spacing: 0.02em;
}
.demo-ribbon strong { color: var(--accent); font-weight: 600; }

/* ---- header ---- */
header.site {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 1rem 2rem;
  border-bottom: 1px solid var(--edge);
  background: var(--bg-raise);
}
.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--ink);
}
.logo svg { display: block; }
nav.main { display: flex; gap: 1.4rem; flex-wrap: wrap; }
nav.main a { color: var(--ink-dim); font-size: 0.95rem; }
nav.main a:hover, nav.main a.here { color: var(--ink); text-decoration: none; }
nav.main a.here { border-bottom: 2px solid var(--cube); }
.spacer { flex: 1; }
.btn {
  display: inline-block;
  background: var(--cube);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.55rem 1.2rem;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
}
.btn:hover { background: var(--cube-hi); text-decoration: none; }
.btn.ghost {
  background: transparent;
  border: 1px solid var(--edge);
  color: var(--ink);
}
.btn.ghost:hover { border-color: var(--cube); background: transparent; }

main { flex: 1; width: 100%; max-width: 980px; margin: 0 auto; padding: 2.5rem 1.5rem; }

/* ---- hero ---- */
.hero { text-align: center; padding: 3rem 0 2rem; }
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.15;
  margin-bottom: 1rem;
}
.hero h1 em { color: var(--cube-hi); font-style: normal; }
.hero p.sub {
  color: var(--ink-dim);
  font-size: 1.15rem;
  max-width: 40rem;
  margin: 0 auto 1.8rem;
}
.hero .cta { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ---- feature grid ---- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.2rem;
  margin: 2.5rem 0;
}
.card {
  background: var(--bg-card);
  border: 1px solid var(--edge);
  border-radius: 12px;
  padding: 1.3rem 1.4rem;
}
.card h3 { margin-bottom: 0.4rem; font-size: 1.05rem; }
.card p { color: var(--ink-dim); font-size: 0.93rem; }

/* ---- pricing ---- */
.tiers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.4rem;
  margin: 2rem 0 3rem;
  align-items: stretch;
}
.tier {
  background: var(--bg-card);
  border: 1px solid var(--edge);
  border-radius: 14px;
  padding: 1.6rem 1.5rem;
  display: flex;
  flex-direction: column;
}
.tier.featured { border-color: var(--cube); box-shadow: 0 0 24px rgba(124, 92, 255, 0.25); }
.tier .badge {
  align-self: flex-start;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: var(--cube);
  color: #fff;
  border-radius: 999px;
  padding: 0.15rem 0.6rem;
  margin-bottom: 0.7rem;
}
.tier h2 { font-size: 1.3rem; }
.tier .price { font-size: 2.2rem; font-weight: 700; margin: 0.4rem 0; }
.tier .price span { font-size: 0.9rem; color: var(--ink-dim); font-weight: 400; }
.tier ul { list-style: none; margin: 1rem 0 1.4rem; flex: 1; }
.tier li { padding: 0.3rem 0 0.3rem 1.4rem; position: relative; color: var(--ink-dim); font-size: 0.93rem; }
.tier li::before { content: "◼"; position: absolute; left: 0; color: var(--accent); font-size: 0.7rem; top: 0.55rem; }
.tier .btn { text-align: center; }

/* ---- FAQ ---- */
.faq details {
  border: 1px solid var(--edge);
  border-radius: 10px;
  background: var(--bg-card);
  margin-bottom: 0.7rem;
  padding: 0.85rem 1.1rem;
}
.faq summary { cursor: pointer; font-weight: 600; }
.faq details p { margin-top: 0.6rem; color: var(--ink-dim); font-size: 0.95rem; }

/* ---- console / forms ---- */
.panel {
  background: var(--bg-card);
  border: 1px solid var(--edge);
  border-radius: 14px;
  padding: 1.6rem;
  margin-bottom: 1.6rem;
}
.panel h2 { margin-bottom: 0.9rem; font-size: 1.2rem; }
form .row { margin-bottom: 0.9rem; }
label { display: block; font-size: 0.85rem; color: var(--ink-dim); margin-bottom: 0.25rem; }
input, select, textarea {
  width: 100%;
  background: var(--bg-raise);
  border: 1px solid var(--edge);
  border-radius: 8px;
  color: var(--ink);
  padding: 0.55rem 0.7rem;
  font-size: 0.95rem;
  font-family: inherit;
}
textarea { min-height: 6rem; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--cube); border-color: transparent; }
.status { margin-top: 0.8rem; font-size: 0.9rem; min-height: 1.4em; }
.status.ok { color: var(--accent); }
.status.err { color: var(--warn); }

.meter { background: var(--bg-raise); border: 1px solid var(--edge); border-radius: 999px; overflow: hidden; height: 14px; }
.meter > div { height: 100%; background: linear-gradient(90deg, var(--cube), var(--accent)); }
.meter-caption { display: flex; justify-content: space-between; font-size: 0.82rem; color: var(--ink-dim); margin-top: 0.4rem; }

.cubes-row { display: flex; gap: 0.5rem; flex-wrap: wrap; margin: 0.8rem 0; }
.cube-chip {
  font-family: var(--mono);
  font-size: 0.8rem;
  border: 1px solid var(--edge);
  border-radius: 8px;
  padding: 0.35rem 0.7rem;
  color: var(--ink-dim);
}
.cube-chip.awake { border-color: var(--accent); color: var(--accent); }
.cube-chip.asleep { opacity: 0.6; }

/* ---- prose (docs) ---- */
.prose h1 { margin-bottom: 1rem; }
.prose h2 { margin: 2rem 0 0.6rem; font-size: 1.25rem; }
.prose p, .prose ul, .prose ol { margin-bottom: 0.8rem; color: var(--ink-dim); }
.prose li { margin-left: 1.4rem; }
.prose strong { color: var(--ink); }
.prose table { border-collapse: collapse; width: 100%; margin: 1rem 0; font-size: 0.92rem; }
.prose th, .prose td { border: 1px solid var(--edge); padding: 0.5rem 0.8rem; text-align: left; }
.prose th { background: var(--bg-raise); }
.table-wrap { overflow-x: auto; }

/* ---- footer ---- */
footer.site {
  border-top: 1px solid var(--edge);
  background: var(--bg-raise);
  padding: 1.6rem 2rem;
  font-size: 0.85rem;
  color: var(--ink-dim);
}
footer.site .cols {
  max-width: 980px;
  margin: 0 auto;
  display: flex;
  gap: 2.5rem;
  flex-wrap: wrap;
  justify-content: space-between;
}
footer.site .fine { max-width: 980px; margin: 1.2rem auto 0; opacity: 0.75; }
footer.site h4 { color: var(--ink); font-size: 0.85rem; margin-bottom: 0.4rem; }
footer.site ul { list-style: none; }
footer.site li { margin-bottom: 0.25rem; }
