/*
 * agentmoshpit.com. The page is the app's own office after hours: the same
 * graphite rooms on a faint grid, the same type, the same four colours that
 * mean something. The values are the ones in src/styles/tokens.css.
 *
 * Amber means "needs you" and nothing else, here as in the app: it appears in
 * the pictures of the app and beside the words "needs you", never on a button.
 */
@font-face {
  font-family: 'Geist Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(fonts/geist-latin-wght-normal.woff2) format('woff2-variations');
}
@font-face {
  font-family: 'Geist Mono Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(fonts/geist-mono-latin-wght-normal.woff2) format('woff2-variations');
}

:root {
  color-scheme: dark;

  --bg: #0a0c0f;
  --carpet: #111418;
  --grid: rgba(255, 255, 255, 0.028);
  --wall: #252b33;
  --chrome: #0d0f12;
  --panel: #13161a;
  --inset: #1b1f25;
  --line: #20252c;
  --select: #2c3a55;

  --ink: #e7eaf0;
  --ink-2: #a0a8b4;
  --ink-3: #808a98;

  --needs: #ffb224;
  --done: #3ccf91;
  --trouble: #ff5f56;
  --work: #82aaff;
  --quiet: #808a98;

  --shadow: rgba(0, 0, 0, 0.45);
  --shadow-strong: rgba(0, 0, 0, 0.62);
  --lift: 0 1px 2px var(--shadow), 0 12px 32px -10px var(--shadow-strong);

  --button: #e7eaf0;
  --button-ink: #0a0c0f;
  --button-hover: #ffffff;
  --focus: #e7eaf0;

  --font: 'Geist Variable', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --mono: 'Geist Mono Variable', ui-monospace, 'Cascadia Mono', Consolas, monospace;

  --r-1: 7px;
  --r-2: 10px;
  --r-3: 12px;
  --bar: 52px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --quick: 180ms;

  /* the page's own measures */
  --edge: clamp(16px, 4vw, 40px);
  --wide: 1240px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--bar) + 20px);
  scrollbar-width: thin;
  scrollbar-color: var(--wall) transparent;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.55;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
p,
ul,
dl,
dd,
figure {
  margin: 0;
}

ul {
  padding: 0;
  list-style: none;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  text-decoration-color: var(--ink-3);
  transition: text-decoration-color var(--quick) var(--ease);
}
a:hover {
  text-decoration-color: currentColor;
}

code {
  font-family: var(--mono);
  font-size: 0.9em;
}

i {
  font-style: normal;
}

::selection {
  background: var(--select);
  color: var(--ink);
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: var(--r-1);
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-thumb {
  background: var(--wall);
  border: 3px solid transparent;
  border-radius: 999px;
  background-clip: padding-box;
}
::-webkit-scrollbar-track {
  background: transparent;
}

.skip {
  position: absolute;
  left: var(--edge);
  top: -60px;
  z-index: 20;
  padding: 8px 12px;
  border-radius: var(--r-1);
  background: var(--button);
  color: var(--button-ink);
  font-family: var(--mono);
  font-size: 0.8125rem;
  font-weight: 650;
  text-decoration: none;
}
.skip:focus {
  top: 8px;
}

/* ── the bar: the app's own, with the page's ways in it ─────────────────── */

.bar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 12px;
  height: var(--bar);
  padding: 0 var(--edge);
  border-bottom: 1px solid var(--line);
  background: var(--chrome);
}

.brand {
  display: flex;
  flex: none;
  align-items: center;
  gap: 10px;
  margin-right: auto;
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
  text-decoration: none;
}
.mark {
  display: block;
  flex: none;
  width: 24px;
  height: 24px;
}

.ways {
  display: flex;
  align-items: center;
  gap: 4px;
}
.ways a {
  padding: 6px 10px;
  border-radius: var(--r-1);
  color: var(--ink-2);
  font-family: var(--mono);
  font-size: 0.8125rem;
  white-space: nowrap;
  text-decoration: none;
  transition:
    color var(--quick) var(--ease),
    background var(--quick) var(--ease);
}
.ways a:hover {
  background: var(--inset);
  color: var(--ink);
}

.button {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: var(--r-1);
  background: var(--button);
  color: var(--button-ink);
  font-family: var(--mono);
  font-size: 0.8125rem;
  font-weight: 650;
  white-space: nowrap;
  text-decoration: none;
  transition:
    background var(--quick) var(--ease),
    transform var(--quick) var(--ease);
}
.button:hover {
  background: var(--button-hover);
}
.button:active {
  transform: translateY(1px);
}
.button.big {
  min-height: 48px;
  padding: 0 20px 0 16px;
  gap: 10px;
  font-size: 0.9375rem;
}
.button svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ── the opening: what it is, the way to get it, and the thing itself ───── */

.opening {
  max-width: calc(var(--wide) + 2 * var(--edge));
  margin: 0 auto;
  padding: clamp(40px, 7vw, 88px) var(--edge) 0;
}

h1 {
  max-width: 16ch;
  font-size: clamp(2.5rem, 1.1rem + 5.6vw, 5rem);
  font-weight: 650;
  line-height: 1.02;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.lede {
  max-width: 62ch;
  margin-top: clamp(18px, 2.4vw, 28px);
  color: var(--ink-2);
  font-size: clamp(1.0625rem, 0.95rem + 0.45vw, 1.25rem);
  line-height: 1.5;
  text-wrap: pretty;
}

.get {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 20px;
  margin-top: clamp(24px, 3vw, 36px);
}
.also {
  color: var(--ink-3);
  font-size: 0.9375rem;
}
.also a {
  color: var(--ink-2);
}
.also a:hover {
  color: var(--ink);
}

.window {
  margin-top: clamp(36px, 5vw, 64px);
}
.glass {
  position: relative;
  overflow: hidden;
  aspect-ratio: 2480 / 1600;
  border: 1px solid var(--wall);
  border-radius: var(--r-3);
  background: var(--chrome);
  box-shadow: var(--lift);
}
.glass img,
.glass iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.glass img {
  object-fit: cover;
  object-position: top left;
}
.glass iframe {
  opacity: 0;
  transition: opacity 420ms var(--ease);
  color-scheme: dark;
}
.window.live .glass iframe {
  opacity: 1;
}

figcaption {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 10px;
  margin-top: 12px;
  color: var(--ink-3);
  font-size: 0.875rem;
  line-height: 1.4;
}
.tag {
  flex: none;
  padding: 1px 8px;
  border: 1px solid var(--wall);
  border-radius: 999px;
  color: var(--ink-2);
  font-family: var(--mono);
  font-size: 0.75rem;
}

/* ── rooms: the sections of the page, drawn as the app draws a project ──── */

.room {
  max-width: var(--wide);
  margin: clamp(56px, 8vw, 104px) auto 0;
  padding: 14px clamp(16px, 2.6vw, 28px) clamp(20px, 3vw, 32px);
  border: 1px solid var(--wall);
  border-radius: var(--r-3);
  background:
    linear-gradient(var(--grid) 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(90deg, var(--grid) 1px, transparent 1px) 0 0 / 28px 28px,
    var(--carpet);
}
@media (max-width: 1320px) {
  .room {
    margin-left: var(--edge);
    margin-right: var(--edge);
  }
}

.sign {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: clamp(20px, 3vw, 32px);
}
.sign h2 {
  font-family: var(--mono);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.3;
}
.slash {
  color: var(--ink-3);
}
.sign > span {
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 0.75rem;
}

h3 {
  font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

/* what you see */
.split {
  display: grid;
  grid-template-columns: minmax(0, 9fr) minmax(0, 14fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: start;
}
.prose p {
  max-width: 58ch;
  margin-top: 12px;
  color: var(--ink-2);
  text-wrap: pretty;
}
.prose h3:not(:first-child) {
  margin-top: clamp(28px, 3.6vw, 44px);
}

.cast {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 20px clamp(12px, 2vw, 28px);
  margin-bottom: clamp(32px, 4.4vw, 56px);
  padding-bottom: clamp(24px, 3vw, 36px);
  border-bottom: 1px solid var(--line);
}
.cast li {
  display: grid;
  align-content: start;
  gap: 4px;
  min-width: 0;
  color: var(--ink-2);
  font-size: 0.875rem;
  line-height: 1.4;
}
.cast img {
  width: 100%;
  max-width: 208px;
  margin: 0 0 6px -6px;
}
.cast b {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.8125rem;
  font-weight: 500;
  white-space: nowrap;
}
.cast .needs-word {
  color: var(--needs);
  font-weight: 650;
}
.dot {
  display: block;
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.dot.needs {
  background: var(--needs);
}
.dot.work {
  background: var(--work);
}
.dot.done {
  background: var(--done);
}
.dot.trouble {
  background: var(--trouble);
}
.dot.idle {
  background: var(--quiet);
}
.dot.away {
  border: 1.5px solid var(--quiet);
}

.shot img {
  border: 1px solid var(--wall);
  border-radius: var(--r-2);
  background: var(--chrome);
}

/* the facts */
.facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 clamp(24px, 4vw, 56px);
}
.facts > div {
  display: grid;
  grid-template-columns: minmax(0, 15ch) minmax(0, 1fr);
  gap: 4px 20px;
  align-items: baseline;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}
.facts > div:nth-child(-n + 2) {
  border-top: 0;
  padding-top: 0;
}
.facts dt {
  font-size: 1.0625rem;
  font-weight: 650;
  line-height: 1.3;
  letter-spacing: -0.012em;
  text-wrap: balance;
}
.facts dd {
  max-width: 52ch;
  color: var(--ink-2);
  font-size: 0.9375rem;
  text-wrap: pretty;
}
.facts dd a,
.after a,
.prose a {
  color: var(--ink);
}
.facts code,
.first code {
  padding: 1px 5px;
  border-radius: 5px;
  background: var(--inset);
  color: var(--ink);
}

.programs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}
.programs li {
  padding: 1px 7px;
  border: 1px solid var(--wall);
  border-radius: 5px;
  background: var(--panel);
  color: var(--ink-2);
  font-family: var(--mono);
  font-size: 0.75rem;
  white-space: nowrap;
}

/* download */
.systems {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 40px);
}
.system {
  display: flex;
  flex-direction: column;
  min-width: 0;
  scroll-margin-top: calc(var(--bar) + 80px);
}
.needs-os {
  margin-top: 4px;
  color: var(--ink-3);
  font-size: 0.875rem;
}
.files {
  display: grid;
  gap: 6px;
  margin-top: 16px;
}
.file {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  padding: 0 12px 0 14px;
  border: 1px solid var(--wall);
  border-radius: var(--r-1);
  background: var(--panel);
  text-decoration: none;
  transition:
    background var(--quick) var(--ease),
    border-color var(--quick) var(--ease);
}
.file:hover {
  border-color: var(--ink-3);
  background: var(--inset);
}
.file b {
  overflow: hidden;
  font-size: 0.9375rem;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.file code {
  flex: none;
  color: var(--ink-3);
  font-size: 0.8125rem;
}
/* Each system's usual file. All three look alike: no system comes first. */
.file.usual {
  border-color: transparent;
  background: var(--button);
  color: var(--button-ink);
}
.file.usual:hover {
  background: var(--button-hover);
}
.file.usual code {
  color: inherit;
  opacity: 0.66;
}
.first {
  margin-top: 14px;
  color: var(--ink-3);
  font-size: 0.875rem;
  line-height: 1.5;
}
.first b {
  color: var(--ink-2);
  font-weight: 600;
}
.first i {
  color: var(--ink-2);
}
.after {
  max-width: 78ch;
  margin-top: clamp(24px, 3vw, 36px);
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--ink-3);
  font-size: 0.875rem;
  text-wrap: pretty;
}

/* ── the foot ───────────────────────────────────────────────────────────── */

.foot {
  max-width: calc(var(--wide) + 2 * var(--edge));
  margin: clamp(56px, 8vw, 104px) auto 0;
  padding: 0 var(--edge) 48px;
  color: var(--ink-3);
  font-size: 0.8125rem;
}
.foot p:first-child {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  font-family: var(--mono);
}
.foot .who {
  margin-right: auto;
  color: var(--ink-2);
  font-weight: 600;
}
.foot a {
  color: var(--ink-2);
}
.fine {
  max-width: 78ch;
  margin-top: 14px;
  line-height: 1.5;
}

/* ── narrower windows ───────────────────────────────────────────────────── */

@media (max-width: 900px) {
  .cast {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .split {
    grid-template-columns: minmax(0, 1fr);
  }
  .facts {
    grid-template-columns: minmax(0, 1fr);
  }
  .facts > div:nth-child(2) {
    border-top: 1px solid var(--line);
    padding-top: 16px;
  }
  .systems {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }
}

@media (max-width: 620px) {
  .ways a:not(:last-child) {
    display: none;
  }
  .facts > div {
    grid-template-columns: minmax(0, 1fr);
  }
  /* A narrow page gets the picture of a narrow window, where desks are rows. */
  .window .glass {
    aspect-ratio: 840 / 1120;
  }
  .cast {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
