/* B · Quiet Violet: the design direction chosen in jarvis-server #331
   (docs/design/directions/tokens.py, DIRECTIONS["B"]), the same mapping as jarvis-docs'
   docs/assets/stylesheets/theme.css. Light and dark follow the system setting. Purple is for
   actions, links and focus; neutral greys do the rest. System fonts only: nothing is fetched. */
:root {
  color-scheme: light dark;

  --bg: #f6f6f8;
  --surface: #ffffff;
  --surface-alt: #f0f0f3;
  --border: #e2e2e8;
  --border-strong: #84848f;
  --text: #16161b;
  --muted: #5b5b68;
  --primary: #8A00C4;
  --primary-hover: #6f009f;
  --on-primary: #ffffff;
  --primary-soft: #f2e6fa;
  --warning: #8a5300;
  --warning-soft: #fbefd9;
  --focus: #8A00C4;

  --font: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --mono: ui-monospace, 'SF Mono', 'Cascadia Mono', 'JetBrains Mono', Menlo, Consolas, monospace;
  --radius-control: 8px;
  --radius-card: 12px;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111115;
    --surface: #1a1a20;
    --surface-alt: #23232b;
    --border: #2e2e38;
    --border-strong: #787889;
    --text: #f2f2f5;
    --muted: #a6a6b4;
    --primary: #c084fc;
    --primary-hover: #d1a5fd;
    --on-primary: #1d0b2b;
    --primary-soft: #2e1f3d;
    --warning: #f0b44c;
    --warning-soft: #352a16;
    --focus: #c084fc;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  -webkit-text-size-adjust: 100%;
}

::selection { background: var(--primary-soft); color: var(--text); }

a {
  color: var(--primary);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

code {
  font-family: var(--mono);
  font-size: 0.875em;
  background: var(--surface-alt);
  border-radius: 4px;
  padding: 0.1em 0.35em;
  overflow-wrap: anywhere;
}
.band.alt code { background: var(--bg); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.wrap {
  max-width: 60rem;
  margin: 0 auto;
  padding: 0 16px;
}

/* Header: the logo beside the title from tablet up, above it on a phone. */
.hero { padding: 40px 0 32px; }
.hero-grid { display: grid; gap: 16px; }
.logo { display: block; width: 80px; height: 96px; margin-left: -12px; }
h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1.2;
  font-weight: 650;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.tagline { margin: 8px 0 0; font-size: 17px; color: var(--text); }
.lede { margin: 12px 0 0; max-width: 62ch; color: var(--muted); }
.note {
  margin: 20px 0 0;
  max-width: 62ch;
  padding: 12px 16px;
  background: var(--warning-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  color: var(--text);
}
.note strong { color: var(--warning); }

/* Sections */
.band { border-top: 1px solid var(--border); padding: 40px 0; }
.band.alt { background: var(--surface); }
h2 {
  margin: 0 0 20px;
  font-size: 20px;
  line-height: 1.3;
  font-weight: 650;
  text-wrap: balance;
}
h3 { margin: 0 0 4px; font-size: 18px; line-height: 1.35; font-weight: 600; }
h4 { margin: 32px 0 4px; font-size: 15px; line-height: 1.4; font-weight: 600; }
.cmd + .hint { margin-top: 12px; }
p { max-width: 70ch; }
.hint { margin: 0; font-size: 14px; color: var(--muted); }
#download > .wrap > .hint { margin-top: 24px; }
#advanced > .wrap > .hint { margin-bottom: 24px; }

/* Downloads: Server (filled, the first thing to install) and Agent (outlined), one
   button per platform, side by side from tablet up. */
.products { display: grid; gap: 32px; }
.os .links { flex-direction: column; margin-top: 12px; }

/* Buttons */
.links { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0 0; }
.button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--primary);
  border-radius: var(--radius-control);
  background: var(--primary);
  color: var(--on-primary);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 120ms ease, border-color 120ms ease, transform 100ms var(--ease-out);
}
.button.ghost,
.agent .button {
  background: var(--surface);
  border-color: var(--border-strong);
  color: var(--text);
}
@media (hover: hover) and (pointer: fine) {
  .button:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
  .button.ghost:hover,
  .agent .button:hover { background: var(--surface-alt); border-color: var(--text); }
}
.button:active { transform: scale(0.98); }

/* Steps: the numbers are the order to do them in. */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 24px; }
.steps li { display: flex; gap: 16px; }
.steps h3 { font-size: 15px; line-height: 1.4; }
.steps p { margin: 0; color: var(--muted); }
.num {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

/* Command boxes */
.cmd {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius-control);
  padding: 8px 8px 8px 16px;
}
.cmd pre {
  flex: 1;
  min-width: 0;
  margin: 0;
  padding: 4px 0;
  align-self: center;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.cmd pre code { background: none; padding: 0; font-size: 13px; line-height: 1.6; color: var(--text); }
.copy {
  flex: none;
  min-height: 36px;
  min-width: 72px;
  padding: 0 12px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  background: var(--surface-alt);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-control);
  cursor: pointer;
  transition: background-color 120ms ease, border-color 120ms ease, transform 100ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .copy:hover { border-color: var(--text); }
}
.copy:active { transform: scale(0.98); }

.badge {
  display: inline-block;
  margin-left: 4px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 12px;
  font-weight: 500;
  line-height: 20px;
  vertical-align: 1px;
}

footer {
  border-top: 1px solid var(--border);
  padding: 24px 0 32px;
  font-size: 14px;
  color: var(--muted);
}
footer .row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 24px; }
footer .row > span:last-child { display: flex; gap: 8px; margin-left: -8px; }
footer a { display: inline-block; padding: 8px; color: var(--muted); }
footer a:hover { color: var(--text); }

@media (max-width: 480px) {
  .cmd { flex-direction: column; padding: 12px; }
  .copy { align-self: flex-end; min-height: 44px; }
}

@media (min-width: 768px) {
  .hero { padding: 56px 0 48px; }
  .hero-grid { grid-template-columns: auto 1fr; gap: 24px; align-items: start; }
  .logo { width: 100px; height: 120px; margin: -8px 0 0 -16px; }
  h1 { font-size: 32px; }
  .band { padding: 48px 0; }
  h2 { font-size: 22px; }
  .products { grid-template-columns: 1fr 1fr; gap: 0 40px; }
  /* Line the two columns' buttons up whatever the length of each hint. */
  .products > .os { display: grid; grid-row: span 3; grid-template-rows: subgrid; align-content: start; }
}

/* Reduced motion: no press scale; the colour changes stay. */
@media (prefers-reduced-motion: reduce) {
  .button, .copy { transition: background-color 120ms ease, border-color 120ms ease; }
  .button:active, .copy:active { transform: none; }
}
