/* Orbit, a workspace manager for Git.
 *
 * Orbit's readers trust documentation and distrust marketing, so the page is
 * a technical sheet: cool paper, ink rules between sections, labels in a
 * margin column, numbered figures with captions that say what they are, and
 * the maturity state of a claim printed next to the claim. The display face
 * is Archivo at its narrowest, in capitals, which is how instrument panels
 * and spec sheets set a heading when space is short and certainty matters.
 */

/* Chrome --------------------------------------------------------------------------- */

.site-header {
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.brand-row { display: flex; gap: var(--space-3); align-items: center; }

.brand { color: var(--text); }

.brand-word {
  font-family: var(--font-archivo);
  font-size: 1.4rem;
  font-weight: 800;
  font-stretch: 62%;
  letter-spacing: 0.02em;
  line-height: 1;
  text-transform: uppercase;
}

.site-header .nav {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-stretch: 87.5%;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.site-header .nav a:hover { color: var(--accent); }

.label { color: var(--accent); }

/* States. The only colour on the page that is not ink or cobalt, and each one
   means exactly one thing. */
.state {
  display: inline-block;
  padding: 2px 8px;
  border: 1px solid currentColor;
  border-radius: 3px;
  background: color-mix(in srgb, currentColor 8%, transparent);
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1.6;
  text-transform: uppercase;
  white-space: nowrap;
}

.state-implemented { color: var(--orbit-implemented); }
.state-experimental { color: var(--orbit-experimental); }
.state-reopened { color: var(--orbit-reopened); }

.button { border-radius: 4px; }
.button-secondary { border-color: var(--border-strong); }
.button-secondary:hover { border-color: var(--text); background: var(--bg-raised); }

h1,
h2 {
  font-weight: 800;
  font-stretch: 62%;
  letter-spacing: -0.005em;
  text-transform: uppercase;
}

h2 {
  max-width: 17ch;
  font-size: clamp(2.25rem, 4.8vw, 4rem);
  line-height: 0.9;
}

/* Hero ----------------------------------------------------------------------------- */

.hero {
  padding-block: clamp(56px, 7vw, 96px) clamp(56px, 7vw, 88px);
}

.hero-grid {
  display: grid;
  gap: var(--space-8);
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
}

@media (min-width: 1000px) {
  .hero-grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); }
}

.hero-copy {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.hero-title {
  font-size: clamp(3.25rem, 8.6vw, 7.75rem);
  line-height: 0.86;
}

.hero .lead { max-width: 52ch; font-size: 1.0625rem; }

.hero-actions { display: flex; flex-wrap: wrap; gap: var(--space-3); }

/* Figures ---------------------------------------------------------------------------- */

.fig { margin: 0; }

.fig-caption {
  margin-top: var(--space-4);
  padding-top: var(--space-3);
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.8125rem;
  line-height: 1.5;
}

.fig-num {
  margin-right: var(--space-2);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.orrery {
  display: block;
  width: 100%;
  max-width: 560px;
  height: auto;
  margin-inline: auto;
  overflow: visible;
}

/* The dial is drawn with dashes rather than sixty separate lines: a stroke on
   a circle, dashed once per minute. Circumference 2 x pi x 256 = 1608.5. */
.dial-ticks {
  fill: none;
  stroke: var(--border-strong);
  stroke-width: 12;
  stroke-dasharray: 1.2 25.608;
  stroke-dashoffset: 0.6;
}

.dial-major {
  fill: none;
  stroke: var(--text-subtle);
  stroke-width: 22;
  stroke-dasharray: 2 132.04;
  stroke-dashoffset: 1;
}

.dial-edge { fill: none; stroke: var(--border); stroke-width: 1; }

.dial-hits line { stroke: var(--accent); stroke-width: 3; stroke-linecap: round; }

.dial-labels text {
  fill: var(--text-subtle);
  font-family: var(--font-mono);
  font-size: 11px;
  text-anchor: middle;
}

.orbit-path { fill: none; stroke: var(--text-subtle); stroke-width: 1; }
.orbit-path-outer { stroke-dasharray: 3 5; }

.tree { fill: var(--text); }
.tree-core { fill: var(--accent); }

.snapshot { fill: var(--accent); }
.commit { fill: var(--bg-raised); stroke: var(--text); stroke-width: 3; }

.bodies-back .body { opacity: 0.45; }

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-5);
  justify-content: center;
  margin-top: var(--space-5);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.legend li { display: inline-flex; gap: var(--space-2); align-items: center; }

.key { display: inline-block; flex: none; }
.key-tree { width: 12px; height: 12px; border-radius: 50%; background: var(--text); }
.key-snapshot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.key-commit { width: 12px; height: 12px; border: 2.5px solid var(--text); border-radius: 50%; }
.key-dial { width: 3px; height: 12px; border-radius: 2px; background: var(--accent); }

/* Sheets ----------------------------------------------------------------------------
   Every section is a sheet: a heavy ink rule, a margin column of labels that
   stays in view while the section scrolls, and the body beside it. */

.status { padding-bottom: var(--space-9); }

.sheet { padding-block: var(--space-4) var(--space-10); }

.sheet-grid {
  display: grid;
  gap: var(--space-5) var(--space-7);
  grid-template-columns: minmax(0, 1fr);
  padding-top: var(--space-5);
  border-top: 2px solid var(--text);
}

@media (min-width: 1000px) {
  .sheet-grid { grid-template-columns: 220px minmax(0, 1fr); }
  .sheet-side { position: sticky; top: 96px; align-self: start; }
}

.sheet-side {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.side-note {
  max-width: 30ch;
  color: var(--text-subtle);
  font-size: 0.8125rem;
  line-height: 1.5;
}

.sheet-body {
  display: flex;
  flex-direction: column;
  gap: var(--space-7);
  min-width: 0;
}

/* Capabilities ----------------------------------------------------------------------- */

.specs {
  display: grid;
  gap: 0 var(--space-7);
  grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 760px) {
  .specs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.spec {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding-block: var(--space-5);
  border-top: 1px solid var(--border-strong);
}

.spec-head {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-3);
  align-items: center;
  justify-content: space-between;
}

.spec h3 {
  font-size: 1.375rem;
  font-weight: 700;
  font-stretch: 75%;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.spec p { color: var(--text-muted); font-size: 0.9375rem; }

/* Fig. 2: lanes. A diagram may be wider than a phone; it scrolls in its own
   box rather than shrinking its labels past reading. */
.fig-lanes {
  padding: var(--space-5);
  border: 1px solid var(--border);
  border-radius: 6px;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--border) 45%, transparent) 1px, transparent 1px) 0 0 / 40px 40px,
    var(--bg-raised);
}

.fig-scroll { overflow-x: auto; }

.lanes { display: block; width: 100%; min-width: 640px; height: auto; }

.lane { stroke: var(--border-strong); stroke-width: 1; }
.lane-a circle { fill: var(--accent); }
.lane-b circle { fill: var(--bg-raised); stroke: var(--text); stroke-width: 2.5; }
.lane-arrows path { fill: none; stroke: var(--text-muted); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

.lane-labels text,
.axis-labels text,
.commit-box text {
  font-family: var(--font-mono);
  font-size: 12px;
}

.lane-labels text { fill: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; font-size: 11px; }
.axis { stroke: var(--text-subtle); }
.axis-ticks path { stroke: var(--text-subtle); }
.axis-labels text { fill: var(--text-subtle); font-size: 11px; text-anchor: middle; }

.commit-a rect { fill: var(--accent-quiet); stroke: var(--accent); }
.commit-b rect { fill: var(--bg-raised); stroke: var(--text); }
.commit-box text { fill: var(--text); }

/* Terminal: the one dark surface, because a terminal is dark. */
.terminal {
  overflow: hidden;
  border-radius: 8px;
  background: var(--orbit-ink);
  color: #dbe3ef;
  box-shadow: 0 24px 50px -30px rgb(12 22 38 / 0.6);
}

.terminal-bar {
  display: flex;
  gap: var(--space-4);
  align-items: center;
  padding: 10px var(--space-4);
  border-bottom: 1px solid #1f2b42;
  color: #8592a8;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
}

.terminal-dots { display: inline-flex; gap: 6px; }
.terminal-dots i { width: 9px; height: 9px; border-radius: 50%; background: #2c3a55; }

.terminal pre { font-size: 0.8125rem; }
.terminal .comment { color: #7d8aa0; }
.terminal .prompt { color: #86a6ff; }
.terminal .ok { color: #5fd49a; }
.terminal .ask { color: #ffb454; }

/* Maturity -------------------------------------------------------------------------- */

.tally {
  display: flex;
  gap: 4px;
  height: 16px;
}

.tally-cell { flex: 1; border-radius: 2px; background: currentColor; }

.tally-key {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-4);
  align-items: center;
  margin-top: calc(var(--space-5) * -1);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.tally-key > span { display: inline-flex; gap: var(--space-2); align-items: center; }

.tally-key .dot {
  width: 9px;
  height: 9px;
  border-radius: 2px;
  background: currentColor;
}

.maturity { font-size: 0.9375rem; }
.maturity td:first-child { color: var(--text); }
.maturity td:last-child { width: 1%; white-space: nowrap; }
.maturity tbody tr { transition: background var(--transition); }
.maturity tbody tr:hover { background: var(--bg-raised); }

/* Install ----------------------------------------------------------------------------- */

.repo-link {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  text-decoration: none;
}

.repo-link:hover { text-decoration: underline; }

/* Footer -------------------------------------------------------------------------------- */

.site-footer {
  padding-block: var(--space-6);
  background: var(--orbit-ink);
  color: #a7b3c6;
  font-size: var(--text-sm);
}

.footer-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  justify-content: space-between;
}

.site-footer a { color: #ffffff; }
.site-footer :focus-visible { outline-color: #86a6ff; }

@media (max-width: 640px) {
  .sheet { padding-bottom: var(--space-8); }
  .fig-lanes { padding: var(--space-4); }
}
