/* Destar — public site
   Chalk-slate palette (matches destar.app). IBM Plex Sans + Mono.
   Technical, orthodox, dense. Built for engineers. */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600&family=IBM+Plex+Sans:ital,wght@0,100..700;1,100..700&display=swap');

:root {
  color-scheme: light dark;
  --paper: #ffffff;
  --raised: #f1f3f5;
  --ink: #1b1f26;
  --soft: #5c6470;
  --line: #dcdfe5;
  --wash: #e8ebef;
  --call: #c9582c;
  --call-text: #a5431d;
  --on-call: #fff;
  --green: #1a7f37;
  --sans: 'IBM Plex Sans', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0f1115;
    --raised: #171a21;
    --ink: #e6e9ef;
    --soft: #949ba8;
    --line: #2a2f3a;
    --wash: #1e222b;
    --call: #e57f52;
    --call-text: #efa27e;
    --on-call: #2b1608;
    --green: #5ec27a;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 15px/1.6 var(--sans);
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
}
pre, code { font-family: var(--mono); font-size: 13.5px; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: var(--call-text); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--call); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
em { font-style: normal; color: var(--call-text); font-weight: 600; }

/* ── Page ────────────────────────────────────────────────────────────── */
.page { max-width: 1080px; margin: 0 auto; padding: 0 32px; }

/* ── Nav ─────────────────────────────────────────────────────────────── */
.nav {
  display: flex; align-items: center; gap: 24px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.wordmark {
  display: inline-flex; align-items: center; gap: 7px;
  font: 700 22px/1 var(--sans); letter-spacing: -0.03em;
  color: inherit; text-decoration: none;
}
.fold-mark { height: 22px; width: auto; }
.fold-sm { height: 16px; }
.sail-big, .sail-band { fill: var(--ink); }
.sail-small { fill: var(--call); }
.nav-links { display: flex; gap: 20px; margin-left: auto; }
.nav-links a {
  font: 500 13px/1 var(--mono); color: var(--soft);
  text-decoration: none; text-transform: lowercase;
  letter-spacing: 0.01em;
}
.nav-links a:hover { color: var(--ink); }
.nav-cta {
  font: 500 13px/1 var(--mono); color: var(--ink);
  text-decoration: none; white-space: nowrap;
}
.nav-cta:hover { color: var(--call-text); }

/* ── Mono label ──────────────────────────────────────────────────────── */
.mono-label {
  font: 500 12.5px/1 var(--mono); color: var(--call-text);
  letter-spacing: 0.02em; text-transform: lowercase;
  margin: 0 0 10px; display: block;
}

/* ── Sections ────────────────────────────────────────────────────────── */
.sect { padding: 56px 0; border-top: 1px solid var(--line); }
.sect-head { margin-bottom: 36px; }
.sect-head h2 {
  margin: 0; font: 600 28px/1.2 var(--sans);
  letter-spacing: -0.02em;
}
.sect-desc { margin: 8px 0 0; color: var(--soft); font-size: 14.5px; }

/* ── Terminal block ──────────────────────────────────────────────────── */
.term {
  background: var(--raised); border: 1px solid var(--line);
  border-radius: 8px; overflow: hidden;
}
.term-bar {
  display: flex; align-items: center; gap: 5px;
  padding: 8px 12px; border-bottom: 1px solid var(--line);
  background: var(--wash);
}
.term-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.term-file {
  margin-left: 8px; font: 400 11.5px/1 var(--mono); color: var(--soft);
}
.term-body {
  margin: 0; padding: 16px 18px;
  font-size: 13.5px; line-height: 1.6;
  white-space: pre-wrap; overflow-wrap: anywhere; overflow: auto;
}
.t-prompt { color: var(--call-text); user-select: none; margin-right: 8px; }
.t-comment { color: var(--soft); }
.t-soft { color: var(--soft); }
.t-call { color: var(--call-text); font-weight: 600; }

/* ── Hero ────────────────────────────────────────────────────────────── */
.hero {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 48px; align-items: center;
  padding: 64px 0 56px;
}
.hero h1 {
  margin: 0 0 20px; font: 700 min(34px, 2.9vw)/1.15 var(--sans);
  letter-spacing: -0.025em;
}

/* Rotating headline: five lines stacked in one grid cell, so the box is always
   exactly two lines tall. Each fades up in, holds, then fades up out: four
   seconds each, so the delays step by 4s and the percentages below are of 20s. */
.rot {
  display: grid; height: 2.3em; overflow: hidden;
}
.rot-item {
  grid-area: 1 / 1; align-self: start;
  opacity: 0; transform: translateY(14px);
  animation: rot 20s ease-in-out infinite;
}
.rot-item:nth-child(2) { animation-delay: 4s; }
.rot-item:nth-child(3) { animation-delay: 8s; }
.rot-item:nth-child(4) { animation-delay: 12s; }
.rot-item:nth-child(5) { animation-delay: 16s; }
@keyframes rot {
  0% { opacity: 0; transform: translateY(14px); }
  3.2%, 17.6% { opacity: 1; transform: none; }
  20.8%, 100% { opacity: 0; transform: translateY(-14px); }
}
@media (prefers-reduced-motion: reduce) {
  .rot-item { animation: none; }
  .rot-item.on { opacity: 1; transform: none; }
}
.hero-desc { margin: 0 0 28px; color: var(--soft); font-size: 15.5px; line-height: 1.6; }
.hero-install { max-width: 520px; }
.hero-note { margin: 10px 0 0; font-size: 13px; color: var(--soft); }
.hero-note a { color: var(--call-text); }
.hero-note-soon { font-style: italic; }

/* ── Architecture diagram ─────────────────────────────────────────────── */
/* One width for every layer, so the cards, the dashed box, the fork and the
   chips all line up at the same left and right edge. */
.dia {
  display: flex; flex-direction: column; align-items: center;
  width: 100%; max-width: 400px; margin: 0 auto;
}
.dia-tier { width: 100%; display: flex; justify-content: center; }

/* Destar-provided box */
.dia-provided {
  display: flex; flex-direction: column; align-items: center;
  width: 100%; padding: 20px 16px 20px;
  border: 2px dashed var(--call); border-radius: 12px;
  position: relative;
}
.dia-provided-badge {
  position: absolute; top: -11px; left: 20px;
  display: flex; align-items: center; gap: 6px;
  padding: 2px 12px 2px 6px;
  background: var(--paper);
  font: 600 10.5px/1 var(--mono); color: var(--call-text);
  text-transform: uppercase; letter-spacing: 0.04em;
}
.dia-provided-logo { height: 16px; }

.dia-card {
  display: flex; align-items: center; gap: 12px;
  width: 100%;
  padding: 12px 16px;
  background: var(--raised); border: 1px solid var(--line);
  border-radius: 8px; font-size: 14px;
}
.dia-card strong { font: 600 13.5px/1 var(--mono); display: block; }
.dia-desc {
  display: block; font: 400 11.5px/1.4 var(--sans);
  color: var(--soft); margin-top: 2px;
}
.dia-icon {
  flex: none; width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; border-radius: 6px;
  background: var(--wash); color: var(--soft);
  border: 1px solid var(--line);
}
.dia-you .dia-icon { background: var(--wash); color: var(--ink); }
.dia-agent { border-color: var(--call); }
.dia-agent .dia-icon { background: var(--wash); border-color: var(--call); }
.dia-agent-logo { height: 20px; }
.dia-agent strong { color: var(--call-text); }

/* Browser icon: one is shown, by what opened the page.
   Without a match (or without scripts) the neutral globe shows. */
.dia-browser { padding: 0; }
.dia-browser .bi { display: none; width: 19px; height: 19px; }
.dia-browser .bi-default { display: block; }
html[data-browser='chrome'] .dia-browser .bi-default,
html[data-browser='firefox'] .dia-browser .bi-default,
html[data-browser='edge'] .dia-browser .bi-default,
html[data-browser='safari'] .dia-browser .bi-default { display: none; }
html[data-browser='chrome'] .bi-chrome,
html[data-browser='firefox'] .bi-firefox,
html[data-browser='edge'] .bi-edge,
html[data-browser='safari'] .bi-safari { display: block; }
html[data-browser='chrome'] .dia-browser { color: #4285f4; }
html[data-browser='firefox'] .dia-browser { color: #ff7139; }
html[data-browser='edge'] .dia-browser { color: #0f7bc0; }
html[data-browser='safari'] .dia-browser { color: #0a84c8; }

/* Connector lines */
.dia-conn {
  display: flex; flex-direction: column; align-items: center;
  height: 24px; position: relative;
}
.dia-line {
  width: 1px; height: 100%;
  background: var(--line);
}
/* The line down into the two chips: a stem, a bar between the chip centres, and a
   short drop into each. It is a grid of the same two columns as the chips below it,
   so the drops land on the centres whatever the chips are called. */
.dia-fork {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
  width: 100%; height: 26px; position: relative;
}
.dia-fork::before {           /* the stem from the agent card */
  content: ''; position: absolute; top: 0; left: 50%;
  width: 1px; height: 13px; background: var(--line);
  transform: translateX(-50%);
}
.dia-fork::after {            /* the bar, chip centre to chip centre */
  content: ''; position: absolute; top: 13px;
  left: calc(25% - 3px); right: calc(25% - 3px); height: 1px;
  background: var(--line);
}
.dia-fork span {              /* the drop into each chip */
  position: relative;
}
.dia-fork span::before {
  content: ''; position: absolute; top: 13px; left: 50%;
  width: 1px; height: 13px; background: var(--line);
  transform: translateX(-50%);
}

/* LLM API + Hands */
.dia-split {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
  width: 100%;
}
.dia-chip {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 12px 20px; min-height: 62px;
  background: var(--raised); border: 1px solid var(--line);
  border-radius: 8px;
}
.dia-chip-label { font: 600 12.5px/1.3 var(--mono); color: var(--ink); text-align: center; }
.dia-chip-sub { font: 400 11px/1 var(--mono); color: var(--soft); margin-top: 4px; }

/* The model name cycles: each line fades up as it arrives, and the loop repeats.
   Width is set by the widest name, which is written out but not shown. */
.dia-cycle {
  position: relative; display: block;
  width: 100%; height: 16px; margin-top: 4px;
  overflow: hidden;
}
.dia-cycle::before {          /* the sizer: the widest name, invisible */
  content: 'deepseek-v4-pro';
  display: block; visibility: hidden;
  font: 400 11px/16px var(--mono);
}
.dia-cycle-item {
  position: absolute; top: 0; left: 0; right: 0;
  font: 400 11px/16px var(--mono); color: var(--soft);
  text-align: center; white-space: nowrap;
  opacity: 0; transform: translateY(6px);
  animation: cycle 9s ease-in-out infinite;
}
.dia-cycle-item:nth-child(2) { animation-delay: 3s; }
.dia-cycle-item:nth-child(3) { animation-delay: 6s; }
.dia-cycle-item.on { opacity: 1; transform: none; }
@keyframes cycle {
  0% { opacity: 0; transform: translateY(6px); }
  6%, 28% { opacity: 1; transform: none; }
  34%, 100% { opacity: 0; transform: translateY(-6px); }
}
@media (prefers-reduced-motion: reduce) {
  .dia-cycle-item { animation: none; }
  .dia-cycle-item:not(.on) { display: none; }
}

/* Tools row */
.dia-tools {
  display: flex; align-items: center; gap: 6px;
  font: 500 12.5px/1 var(--mono); color: var(--ink);
  padding: 8px 20px;
  background: var(--raised); border: 1px solid var(--line);
  border-radius: 6px;
}
.dia-dot { color: var(--soft); }

/* Approval block */
.dia-approval {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  width: 100%;
  padding: 14px 16px;
  background: var(--raised); border: 1px solid var(--call);
  border-radius: 8px;
}
.dia-approval-label {
  font: 600 11.5px/1 var(--mono); color: var(--call-text);
  text-transform: uppercase; letter-spacing: 0.04em;
}
.dia-approval-btns { display: flex; gap: 8px; }
.dia-btn-allow {
  padding: 4px 14px; font: 500 12px/1.5 var(--mono);
  color: var(--on-call); background: var(--green);
  border-radius: 5px;
}
.dia-btn-decline {
  padding: 4px 14px; font: 500 12px/1.5 var(--mono);
  color: var(--ink); background: var(--wash);
  border: 1px solid var(--line); border-radius: 5px;
}

/* ── Copy button ─────────────────────────────────────────────────────── */
.copy {
  display: inline-flex; align-items: center; gap: 5px;
  margin-left: auto; padding: 3px 8px;
  font: 500 11.5px/1 var(--mono); color: var(--soft);
  background: none; border: 1px solid transparent; border-radius: 5px;
}
.copy:hover { color: var(--ink); border-color: var(--line); background: var(--raised); }
.copy svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.copy .done-icon { display: none; }
.copy.done { color: var(--green); }
.copy.done .copy-icon { display: none; }
.copy.done .done-icon { display: block; }
.arch-cmd-wrap { position: relative; margin: 6px 0 10px; }
.arch-cmd-wrap .arch-cmd { margin: 0; padding-right: 76px; }
.arch-cmd-wrap .copy { position: absolute; top: 50%; right: 6px; transform: translateY(-50%); }

/* ── Architecture flow ───────────────────────────────────────────────── */
.arch-flow { max-width: 640px; }
.arch-step {
  display: grid; grid-template-columns: 40px 1fr;
  gap: 0 16px; align-items: start;
}
.arch-num {
  font: 600 13px/40px var(--mono); color: var(--call-text);
  text-align: center; width: 40px; height: 40px;
  border: 1px solid var(--line); border-radius: 8px;
  background: var(--raised);
}
/* A grid cell is as wide as its widest line unless told otherwise: without this the
   install command pushes the whole page sideways on a phone. */
.arch-body { min-width: 0; }
.arch-body h3 { margin: 0 0 4px; font: 600 16px/1.3 var(--sans); }
.arch-body h3 code { font-size: 14.5px; font-weight: 500; }
.arch-body p { margin: 0; font-size: 14px; line-height: 1.55; color: var(--soft); }
.arch-body a { color: var(--call-text); }
.arch-body code {
  background: var(--wash); border-radius: 3px; padding: 1px 5px;
  font-size: 12.5px;
}
.arch-cmd {
  margin: 6px 0 10px; padding: 8px 12px;
  background: var(--raised); border: 1px solid var(--line);
  border-radius: 6px; font-size: 13px; overflow: auto;
}
.arch-line {
  font: 400 14px/1 var(--mono); color: var(--line);
  padding: 4px 0 4px 18px; user-select: none;
}
.arch-opt {
  font: 500 11.5px/1 var(--mono); color: var(--soft);
  letter-spacing: 0.02em; margin-left: 6px;
}

/* ── Sandbox detail ──────────────────────────────────────────────────── */
.sandbox-detail {
  margin-top: 40px; padding: 24px;
  background: var(--raised); border: 1px solid var(--line);
  border-radius: 8px;
}
.sandbox-detail h3 {
  margin: 0 0 16px; font: 600 14px/1 var(--mono);
  color: var(--call-text); text-transform: uppercase;
  letter-spacing: 0.03em;
}
.sandbox-grid { display: grid; gap: 12px; }
.sandbox-item {
  display: grid; grid-template-columns: 100px 1fr;
  gap: 12px; font-size: 13.5px; line-height: 1.5;
  padding-bottom: 12px; border-bottom: 1px solid var(--line);
}
.sandbox-item:last-child { border-bottom: 0; padding-bottom: 0; }
.sandbox-label { font: 500 12.5px/1.5 var(--mono); color: var(--soft); }
.sandbox-val { color: var(--ink); }
.sandbox-val code {
  background: var(--wash); border-radius: 3px; padding: 1px 5px;
  font-size: 12.5px;
}

/* ── Team ────────────────────────────────────────────────────────────── */
/* The rows of the sandbox list, without the box around them. */
.team-grid { display: grid; gap: 12px; max-width: 720px; }

/* ── Clients table ───────────────────────────────────────────────────── */
.clients-table {
  width: 100%; border-collapse: collapse;
  background: var(--raised); border: 1px solid var(--line);
  border-radius: 8px; overflow: hidden;
}
.clients-table th {
  padding: 10px 20px; text-align: left;
  font: 600 12px/1 var(--mono); color: var(--soft);
  text-transform: uppercase; letter-spacing: 0.04em;
  background: var(--wash); border-bottom: 1px solid var(--line);
}
.clients-table td {
  padding: 12px 20px; font-size: 14px; line-height: 1.45;
  border-bottom: 1px solid var(--line); vertical-align: top;
}
.clients-table tr:last-child td { border-bottom: 0; }
.client-name { font-weight: 600; }
.clients-table a { color: var(--call-text); }
.status-live {
  display: inline-block; padding: 1px 8px;
  font: 500 11px/1.6 var(--mono); text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--green); border: 1px solid var(--green);
  border-radius: 4px;
}
.status-soon {
  display: inline-block; padding: 1px 8px;
  font: 500 11px/1.6 var(--mono); text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--soft); border: 1px solid var(--line);
  border-radius: 4px;
}

/* ── Install ─────────────────────────────────────────────────────────── */
.install-block { max-width: 640px; }
.install-reqs {
  margin-top: 20px; padding: 20px 24px;
  background: var(--raised); border: 1px solid var(--line);
  border-radius: 8px;
}
.install-reqs h4 {
  margin: 0 0 10px; font: 600 12.5px/1 var(--mono);
  color: var(--soft); text-transform: uppercase; letter-spacing: 0.03em;
}
.install-reqs ul { margin: 0; padding: 0 0 0 18px; }
.install-reqs li {
  font-size: 13.5px; line-height: 1.55; color: var(--ink);
  margin-bottom: 4px;
}

/* ── Footer ──────────────────────────────────────────────────────────── */
.foot { border-top: 1px solid var(--line); padding: 28px 0 24px; margin-top: 56px; }
.foot-row { display: flex; align-items: center; gap: 24px; }
.foot-links { display: flex; gap: 18px; margin-left: auto; }
.foot-links a { font: 400 13px/1 var(--mono); color: var(--soft); text-decoration: none; }
.foot-links a:hover { color: var(--ink); }
.foot-copy { margin: 16px 0 0; font-size: 12.5px; color: var(--soft); }

/* ── 404 ─────────────────────────────────────────────────────────────── */
.stage.lost { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding: 56px 0 160px; min-height: 50vh; }
.lost h1 { margin: 0 0 12px; font: 600 32px/1.15 var(--sans); letter-spacing: -0.02em; }
.lost p { margin: 0 0 6px; font-size: 15px; color: var(--soft); }
.lost a { color: var(--ink); }

/* ── Responsive ──────────────────────────────────────────────────────── */
@media (max-width: 860px) {
  .page { padding: 0 20px; }
  .nav-links { display: none; }
  .nav-cta { margin-left: auto; }
  .hero { grid-template-columns: 1fr; gap: 32px; padding: 40px 0 36px; }
  .hero h1 { font-size: min(28px, 7.2vw); }
  .clients-table { font-size: 13px; }
  .clients-table th, .clients-table td { padding: 8px 12px; }
  .sandbox-item { grid-template-columns: 1fr; gap: 2px; }
  /* The command wraps, and its copy button sits under it, where it would run over it. */
  .arch-cmd-wrap .arch-cmd { white-space: pre-wrap; overflow-wrap: anywhere; padding: 8px 12px 34px; }
  .arch-cmd-wrap .copy { top: auto; bottom: 5px; transform: none; }
  .wordmark { font-size: 20px; }
  .fold-mark { height: 18px; }
  .foot-links { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .dia-cycle-item { animation: none; }
}
