html {
  scroll-padding-top: 80px;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

/* Cards that glide in from the side never widen the page, which would zoom a phone out off centre. On html too, or
   body's value would go to the viewport instead of clipping body */
html,
body {
  overflow-x: clip;
}

body {
  margin: 0;
  line-height: 1.6;
  padding: 0 20px;
}

canvas#bgCanvas {
  will-change: transform;
}

header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  max-width: 100%;
  padding: 0.6rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  transition: backdrop-filter 0.3s ease, background 0.3s ease, transform 0.3s ease;
  height: 60px;
  box-sizing: border-box;
}

/* Behind the header's links: a copy of the particles behind it (home/background.js), fading out at its foot */
#headerCanvas {
  position: absolute;
  top: 0;
  left: 0;
  z-index: -1;
  width: 100%;
  height: calc(100% + 16px);
  mask-image: linear-gradient(#000 calc(100% - 16px), transparent);
  pointer-events: none;
}

header.blurred {
  backdrop-filter: blur(10px);
  background: var(--bg-glass);
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 0 0 auto;
}

.auth-brand a {
  color: white;
  text-decoration: none;
  font-size: 1.4rem;
  font-weight: 800;
  background: linear-gradient(90deg, #ffffff, #ffffff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.header-buttons {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex: 0 0 auto;
  justify-content: flex-end;
}

.btn-outline {
  color: white;
  text-decoration: none;
  white-space: nowrap;
  padding: 0.5rem 1rem;
  border-radius: 5px;
  transition: background 0.3s;
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* The header's main action, last in line where people look for it */
.btn-cta,
.btn-cta:hover {
  background: var(--gradient-blue);
  font-weight: 600;
}

.btn-cta:hover {
  opacity: 0.9;
}

h1, h2, h3 {
  font-weight: 800;
  margin: 0 0 12px;
}





.btn-primary {
  display: inline-block;
  background: var(--gradient-blue);
  color: white;
  padding: 12px 20px;
  border-radius: 6px;
  font-weight: 700;
  text-decoration: none;
  margin-top: 20px;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

section {
  max-width: 1100px;
  margin: auto;
  padding: 40px 0;
}

p { margin-bottom: 14px; }

ul {
  margin: 0 0 20px 20px;
}

footer {
  padding: 20px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Get in touch: name and email side by side, the message under them; one column on phones */
.contact {
  max-width: 640px;
  text-align: center;
}

.contact-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 24px;
  text-align: left;
}

.contact-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
  color: var(--muted);
}

.contact-message,
.contact-form .form-error,
.contact-form button {
  grid-column: 1 / -1;
}

.contact-form input,
.contact-form textarea {
  padding: 10px 12px;
  font: inherit;
  font-size: 15px;
  color: var(--text);
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 6px;
  transition: border-color 0.2s ease;
}

.contact-form textarea {
  resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--cyan);
  box-shadow: 0 0 4px rgba(6, 182, 212, 0.4);
}

/* The field only bots fill in */
.contact-trap {
  position: absolute;
  left: -9999px;
}

.contact-form .form-error {
  margin: 0;
  color: #f87171;
}

.contact-form .form-error:empty {
  display: none;
}

/* Quieter than the blue of Get early access */
.contact-form button {
  justify-self: center;
  margin-top: 4px;
  padding: 10px 32px;
  font: inherit;
  font-weight: 600;
  color: var(--text);
  background: rgba(var(--ink), 0.04);
  border: 1px solid rgba(var(--ink), 0.25);
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.contact-form button:hover {
  background: rgba(var(--ink), 0.1);
  border-color: rgba(var(--ink), 0.45);
}

.contact-form button:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

.contact-form button:disabled {
  opacity: 0.6;
  cursor: progress;
}

/* Workflows: one row of cards, processing's then training's, with a chapter button for each */
.workflows {
  padding-top: 72px;
}

.workflows-head,
.section-head {
  max-width: 760px;
  margin: 0 auto 2rem;
  text-align: center;
}

.workflows-head h2,
.section-head h2 {
  font-size: 2rem;
  color: var(--text-soft);
}

.workflows-head p,
.section-head p {
  color: var(--text-soft);
  font-size: 1.05rem;
  line-height: 1.75;
}

.workflows p code,
.flow p code {
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 0.88em;
  padding: 0.1em 0.35em;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.07);
  color: #fbbf24;
}

/* The hero's main action, with the docs as the lighter one beside it */
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.5rem;
  margin-top: 20px;
}

.hero-actions .btn-primary {
  margin-top: 0;
}

.hero-docs,
.workflows-docs a {
  color: var(--cyan);
  font-weight: 600;
  text-decoration: none;
}

.hero-docs:hover,
.workflows-docs a:hover {
  text-decoration: underline;
}

.workflows-docs {
  text-align: center;
  margin-top: 2.5rem;
}

.code-block {
  margin: 0;
  padding: 1rem 1.1rem;
  overflow-x: auto;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.code-block code {
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--text-soft);
}

/* Python examples, coloured by home.js */
.tok-c { color: var(--muted); font-style: italic; }
.tok-s { color: #fbbf24; }
.tok-k { color: #67e8f9; }
.tok-n { color: #f97316; }

/* Patterns scroll sideways: the buttons step through them, the edges fade where there's more */
.rail-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

[data-chapter="processing"] { --chapter: #06b6d4; }
[data-chapter="training"] { --chapter: #8b5cf6; }

/* Each workflow's button jumps to its cards, lights while they lead the row, and fills as they go by (--seen) */
.chapters {
  display: flex;
  gap: 1.25rem;
  margin-right: auto;
}

.chapters button {
  position: relative;
  min-width: 7.5rem;
  padding: 0.3rem 0 0.65rem;
  border: none;
  background: none;
  color: var(--muted);
  font: inherit;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  transition: color 0.3s ease;
}

.chapters button:hover,
.chapters button[aria-current="true"] {
  color: var(--text-soft);
}

.chapters button::before,
.chapters button::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  border-radius: 2px;
}

.chapters button::before {
  right: 0;
  background: var(--border);
}

.chapters button::after {
  width: calc(var(--seen, 0) * 100%);
  background: var(--chapter);
  transition: width 0.4s ease;
}

.rail-btn {
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-soft);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease, opacity 0.2s ease;
}

.rail-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.12);
}

.rail-btn:disabled {
  opacity: 0.3;
  cursor: default;
}

.workflow-rail {
  position: relative;  /* the cards' offsetLeft is measured from it */
  display: flex;
  gap: 1.25rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 4px 0 0.75rem;
  scrollbar-width: none;
}

.workflow-rail::-webkit-scrollbar {
  display: none;
}

.workflow-rail.fade-right {
  mask-image: linear-gradient(90deg, #000 88%, transparent);
}

.workflow-rail.fade-left {
  mask-image: linear-gradient(90deg, transparent, #000 12%);
}

.workflow-rail.fade-left.fade-right {
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}

.workflow-card {
  flex: 0 0 440px;
  min-width: 0;  /* long code scrolls inside its box instead of widening the card */
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  padding: 1.5rem;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: 10px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: border-color 0.3s ease, transform 0.3s ease;
}

.workflow-card:hover {
  border-color: rgba(148, 163, 184, 0.5);
  transform: translateY(-3px);
}

.workflow-card h3 {
  margin: 0;
  font-size: 1.1rem;
  color: var(--text-soft);
}

.workflow-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.93rem;
  line-height: 1.65;
}

/* A workflow's first card introduces it, in its colour */
.chapter-intro {
  border-top: 3px solid var(--chapter);
}

.chapter-intro .use-tag {
  align-self: flex-start;
}

.workflow-card.chapter-intro p {
  color: var(--text-soft);
}

/* Code sits at the bottom of each card, so the three line up */
.workflow-card .code-block {
  margin-top: auto;
}

.workflow-card .code-block code {
  font-size: 0.76rem;
}

/* Four instances, each taking its share */
.shard-diagram {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.shard-diagram span {
  padding: 0.55rem 0 0.4rem;
  border-top: 4px solid var(--shard);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-soft);
  font: 600 0.72rem 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  text-align: center;
  transform-origin: left;
}

.shard-diagram span:nth-child(1) { --shard: #f97316; }
.shard-diagram span:nth-child(2) { --shard: #ef4444; }
.shard-diagram span:nth-child(3) { --shard: #06b6d4; }
.shard-diagram span:nth-child(4) { --shard: #6366f1; }

.visible .shard-diagram span {
  animation: shardIn 0.5s ease backwards;
}

.visible .shard-diagram span:nth-child(2) { animation-delay: 0.12s; }
.visible .shard-diagram span:nth-child(3) { animation-delay: 0.24s; }
.visible .shard-diagram span:nth-child(4) { animation-delay: 0.36s; }

@keyframes shardIn {
  from { opacity: 0; transform: scaleX(0.3); }
  to { opacity: 1; transform: none; }
}

/* Three things people come for, in one ruled band */
.needs {
  text-align: center;
}

.needs h2 {
  margin-bottom: 1.75rem;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.needs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-block: 1px solid var(--border);
}

.needs-grid > div {
  padding: 1.75rem 2rem;
}

.needs-grid > div + div {
  border-left: 1px solid var(--border);
}

.needs-grid h3 {
  margin-bottom: 0.4rem;
  font-size: 1.35rem;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.needs-grid p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.6;
}

.needs-foot {
  margin: 1.5rem 0 0;
  color: var(--muted);
}

/* The machines a job can run on, in a row that rolls on its own and can be dragged (home.js), fading at both edges */
.machines {
  margin-top: 2rem;
  overflow-x: auto;
  scrollbar-width: none;
  cursor: grab;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}

.machines::-webkit-scrollbar {
  display: none;
}

.machines.dragging {
  cursor: grabbing;
  user-select: none;
}

.machine-track {
  display: flex;
  gap: 1rem;
  width: max-content;
  margin: 0;
  padding: 0.25rem 0;
  list-style: none;
}

.machine {
  width: 15rem;
  padding: 1.25rem 1.35rem;
  border: 1px solid var(--surface-border);
  border-radius: 12px;
  background: var(--surface);
  text-align: left;
}

.machine h3 {
  margin: 0.7rem 0 0.35rem;
  font-size: 1.05rem;
  color: var(--text-soft);
}

.machine p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.machine .machine-big {
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1.25;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.machine code {
  display: block;
  margin-top: 0.75rem;
  color: var(--muted);
  font: 0.75rem 'Roboto Mono', monospace;
}

.machine-kind {
  padding: 0.1rem 0.5rem;
  border-radius: 4px;
  font: 700 0.7rem 'Roboto Mono', monospace;
  letter-spacing: 1px;
}

.machine-kind.gpu { background: rgba(139, 92, 246, 0.18); color: #c4b5fd; }
.machine-kind.cpu { background: rgba(6, 182, 212, 0.15); color: #67e8f9; }

.machines-note {
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}

/* Five steps either side of a line that grows to the last step lit (--fill, from home.js) */
.flow-steps {
  position: relative;
  display: grid;
  gap: 5rem;
  margin: 3.5rem 0 0;
  padding: 0;
  list-style: none;
}

.flow-steps::before,
.flow-steps::after {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  width: 2px;
  margin-left: -1px;
  background: var(--border);
}

.flow-steps::before {
  bottom: 0;
}

.flow-steps::after {
  height: calc(var(--fill, 1) * 100%);
  background: linear-gradient(var(--orange), #dc2626);
  transition: height 0.6s ease;
}

.flow-step {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6rem;
  align-items: center;
}

.flow-step > * {
  min-width: 0;
}

.flow-step:nth-child(even) .flow-text {
  order: 2;
}

.flow-node {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  margin: -1.25rem 0 0 -1.25rem;
  border: 2px solid var(--border);
  border-radius: 50%;
  background: var(--bg);
  color: var(--muted);
  font: 700 0.95rem 'Roboto Mono', monospace;
  transition: background 0.4s ease, border-color 0.4s ease, color 0.4s ease;
}

.lit .flow-node,
html:not(.js) .flow-node {
  border-color: var(--orange);
  background: var(--orange);
  color: white;
}

.flow-step > :not(.flow-node) {
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.js .flow-step:not(.lit) > :not(.flow-node) {
  opacity: 0.25;
  transform: translateY(16px);
}

.flow-label {
  color: var(--orange);
  font: 700 0.8rem 'Roboto Mono', monospace;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.flow-text h3 {
  margin: 0.4rem 0 0.75rem;
  font-size: 1.75rem;
  color: var(--text-soft);
}

.flow-text p {
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.75;
}

/* Bars that fill when their step lights up */
.meters {
  display: grid;
  gap: 0.9rem;
}

.meters span {
  color: var(--text-soft);
  font: 600 0.75rem 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
}

.meters span::after {
  content: '';
  display: block;
  width: 0;
  height: 8px;
  margin-top: 5px;
  border-radius: 4px;
  background: var(--gradient-brand);
  transition: width 1.2s ease;
}

.lit .meters span::after,
html:not(.js) .meters span::after {
  width: var(--v);
}

.checks {
  display: grid;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.checks li {
  position: relative;
  padding-left: 1.75rem;
  color: var(--text-soft);
}

.checks li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--orange);
  font-weight: 800;
}

/* Sections rise into view as they're scrolled to (only when JavaScript can reveal them) */
.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.js .reveal.visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .js .reveal,
  .visible .shard-diagram span {
    opacity: 1;
    transform: none;
    transition: none;
    animation: none;
  }
}


/* First screen: what it does, with the one command beside it, then the four outcomes across. One column reads in the
   same order: the lead, its command, the button, the outcomes */
.hero {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  grid-template-areas:
    "copy code"
    "actions code"
    "outcomes outcomes";
  gap: 2rem 3.5rem;
  align-items: center;
  max-width: 1200px;
  box-sizing: border-box;
  padding: 84px 0 32px;
}

.hero > * {
  min-width: 0;
}

.hero-copy { grid-area: copy; }
.hero-code { grid-area: code; }
.hero .hero-actions { grid-area: actions; align-self: start; margin: 0; }

.hero-eyebrow {
  display: inline-block;
  margin: 0 0 1.25rem;
  padding: 0.3rem 0.9rem;
  border: 1px solid rgba(249, 115, 22, 0.45);
  border-radius: 999px;
  color: var(--orange);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.hero h1 {
  margin: 0 0 1.25rem;
  font-size: clamp(1.85rem, 3.5vw, 3.25rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--text-bright);
}

.grad {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-lead {
  max-width: 34em;
  margin: 0;
  color: var(--text-soft);
  font-size: 1.2rem;
  line-height: 1.6;
}

/* Measured on dev's EC2 jobs, 2026-10-23: code ran 53-61 s after submitting on CPU, 118-122 s on GPU (on demand,
   Kaio's runtime). True only where jobs run on EC2 */
.hero-stats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.9rem;
  margin: 1.1rem 0 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 0.95rem;
}

.hero-stats strong {
  margin-right: 0.35rem;
  color: var(--text-bright);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.hero-stats li + li::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 4px;
  margin: 0 0.9rem 0.2rem 0;
  border-radius: 50%;
  background: var(--muted);
  opacity: 0.6;
}

.outcomes {
  grid-area: outcomes;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem 2rem;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
}

.outcomes li {
  padding-left: 0.9rem;
  border-left: 2px solid var(--shard);
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

.outcomes li:nth-child(1) { --shard: #f97316; }
.outcomes li:nth-child(2) { --shard: #06b6d4; }
.outcomes li:nth-child(3) { --shard: #6366f1; }
.outcomes li:nth-child(4) { --shard: #ef4444; }

.outcomes strong {
  display: block;
  margin-bottom: 0.15rem;
  color: var(--text-soft);
  font-size: 1rem;
}





/* The hero's command builder, after ML's install selectors: pick the job in flat rows, and its one command builds
   below. The blue of the main button marks each choice and the command's edge */
.cmd-builder {
  display: grid;
  gap: 0.45rem;
}

.cmd-row {
  display: grid;
  grid-template-columns: 6rem 1fr;
  align-items: center;
  gap: 0.75rem;
}

.cmd-label,
.cmd-out-label {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}

.cmd-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
}

.cmd-options button {
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--surface-border);
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
  font: 600 0.88rem/1.1 'Inter', sans-serif;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.cmd-options button:first-child { border-radius: 6px 2px 2px 6px; }
.cmd-options button:last-child { border-radius: 2px 6px 6px 2px; }

.cmd-options button:hover {
  border-color: rgba(22, 124, 249, 0.5);
  color: var(--text-soft);
}

.cmd-options button[aria-pressed="true"] {
  border-color: rgba(22, 124, 249, 0.85);
  background: rgba(22, 124, 249, 0.14);
  color: #fff;
  box-shadow: inset 0 -2px 0 #167cf9;
}

.cmd-options button:focus-visible,
.cmd-copy:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

.cmd-out {
  position: relative;
  margin-top: 0.55rem;
  padding: 2.1rem 1.1rem 1rem 1.25rem;
  border: 1px solid var(--surface-border);
  border-radius: 6px;
  background: linear-gradient(180deg, #f97316, #dc2626) left / 3px 100% no-repeat, rgba(2, 6, 23, 0.72);
}

.cmd-out-label {
  position: absolute;
  top: 0.7rem;
  left: 1.25rem;
}

.cmd-copy {
  position: absolute;
  top: 0.5rem;
  right: 0.6rem;
  padding: 0.25rem 0.65rem;
  border: 1px solid var(--surface-border);
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  font: 600 0.72rem 'Inter', sans-serif;
  cursor: pointer;
}

.cmd-copy:hover {
  color: var(--text-soft);
}

.cmd-code {
  display: block;
  color: var(--text-soft);
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 0.85rem;
  line-height: 1.6;
}

/* A wrapped command lines up after its $, and a flag wraps with its value */
.cmd-line {
  display: block;
  padding-left: 2ch;
  text-indent: -2ch;
}

.cmd-line::before {
  content: '$ ';
  color: var(--orange);
}

.cmd-line span {
  white-space: nowrap;
}

.cmd-code.is-python {
  overflow-x: auto;
  font-size: 0.8rem;
  white-space: pre;
}

/* What's included, quiet chips closing the jobs in action */
.stack {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin: 2.5rem 0 0;
  padding: 0;
  list-style: none;
}

.stack::before {
  content: 'Included';
  margin-right: 0.5rem;
  color: var(--muted);
  font-size: 0.8rem;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.stack li {
  padding: 0.3rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.85rem;
}

.demo-job-showcase {
  max-width: 1100px;
  margin: 60px auto;
  padding: 40px 0;
  text-align: center;
}

.demo-job-showcase h3 {
  color: var(--text-soft);
  font-weight: 800;
  margin-bottom: 0.6rem;
  font-size: 2rem;
}

.showcase-lead {
  margin: 0 0 2rem;
  color: var(--muted);
  font-size: 1.05rem;
}

.demo-image-container {
  display: flex;
  justify-content: center;
  margin: 0 auto;
}

.demo-job-image {
  max-width: 100%;
  height: auto;
  border-radius: 0;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: transform 0.3s ease;
}

.demo-job-image:hover {
  transform: translateY(-4px);
}

/* What the dashboard shows, under its picture */
.showcase-points {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin: 2.5rem 0 0;
  padding: 0;
  list-style: none;
  text-align: left;
}

.showcase-points li {
  color: var(--muted);
  line-height: 1.65;
}

.showcase-points strong {
  display: block;
  margin-bottom: 0.3rem;
  color: var(--text-soft);
  font-size: 1.05rem;
}

/* Six kinds of work, each tagged with the workflow that runs it */
.uses-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.uses-grid article {
  padding: 1.5rem;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: border-color 0.3s ease, transform 0.3s ease;
}

.uses-grid article:hover {
  border-color: rgba(148, 163, 184, 0.5);
  transform: translateY(-3px);
}

.use-tag {
  display: inline-block;
  padding: 0.1rem 0.5rem;
  border-radius: 4px;
  font: 700 0.7rem 'Roboto Mono', monospace;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.use-tag.processing { background: rgba(6, 182, 212, 0.15); color: #67e8f9; }
.use-tag.training { background: rgba(139, 92, 246, 0.18); color: #c4b5fd; }
.use-tag.endpoint { background: rgba(249, 115, 22, 0.15); color: #fdba74; }

.uses-grid h3 {
  margin: 0.75rem 0 0.5rem;
  font-size: 1.15rem;
  color: var(--text-soft);
}

.uses-grid p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

@media (max-width: 900px) {
  .tucked header {
    transform: translateY(calc(-100% - 16px));
  }

  .needs-grid,
  .showcase-points,
  .uses-grid {
    grid-template-columns: 1fr;
  }

  .uses-grid article:hover {
    transform: none;
  }

  .needs-grid > div + div {
    border-left: none;
    border-top: 1px solid var(--border);
  }

  /* Phones: the line runs down the left, each step's text then its picture */
  .flow-steps {
    gap: 3rem;
  }

  .flow-steps::before,
  .flow-steps::after {
    left: 1.25rem;
  }

  .flow-step {
    grid-template-columns: 1fr;
    gap: 1.25rem;
    padding-left: 3.5rem;
  }

  .flow-step:nth-child(even) .flow-text {
    order: 0;
  }

  .flow-node {
    top: 0;
    left: 1.25rem;
  }

  .flow-text h3 {
    font-size: 1.4rem;
  }

  .hero {
    grid-template-columns: 1fr;
    grid-template-areas: "copy" "code" "actions" "outcomes";
    gap: 1.75rem;
    padding-top: 84px;
  }

  .hero-lead {
    font-size: 1.05rem;
  }

  .outcomes {
    grid-template-columns: 1fr 1fr;
    margin-top: 0.5rem;
  }

  .cmd-row {
    grid-template-columns: 5.25rem 1fr;
    gap: 0.5rem;
  }

  .cmd-options button {
    padding: 0.55rem 0.5rem;
    font-size: 0.82rem;
  }

  .cmd-code.is-python {
    font-size: 0.75rem;
  }

  header {
    gap: 10px;
    padding: 0.6rem 1rem;
  }

  .header-buttons {
    flex-shrink: 0;
    gap: 0.3rem;
  }

  .auth-brand {
    flex-shrink: 0;
  }

  .btn-outline,
  .header-buttons .docs-link {
    padding: 0.3rem 0.6rem;
    font-size: 0.8rem;
  }


  .demo-job-showcase {
    padding: 20px 0;
    margin: 40px auto;
  }

  .demo-job-showcase h3 {
    font-size: 1.5rem;
  }

  .demo-job-image {
    max-width: 110%;
    margin: 0 auto;
  }

  .workflows {
    padding-top: 40px;
  }

  .workflows-head h2 {
    font-size: 1.6rem;
  }

  /* Phones swipe the row edge to edge, the next card peeking in, each card its own height */
  .workflow-rail {
    align-items: flex-start;
    scroll-padding: 0 20px;
    margin: 0 -20px;
    padding: 4px 20px 1rem;
  }

  .workflow-card {
    flex: 0 0 min(80%, 420px);
  }

  .workflow-card:hover {
    transform: none;
  }
}

/* Phones: one thing at a time with room around it, everything read top to bottom (only the workflows row swipes) */
@media (max-width: 600px) {
  section {
    padding: 56px 0;
  }

  .section-head,
  .workflows-head {
    margin-bottom: 1.75rem;
  }

  .section-head h2,
  .workflows-head h2 {
    font-size: 1.6rem;
  }

  /* The pill wraps on phones, so it squares off a little */
  .hero-eyebrow {
    border-radius: 10px;
  }

  /* First screen: the outcomes as four tiles */
  .outcomes {
    gap: 0.75rem;
  }

  /* The figures in three columns, each over its label */
  .hero-stats {
    display: grid;
    grid-template-columns: repeat(3, auto);
    justify-content: start;
    gap: 0 1.6rem;
    font-size: 0.78rem;
  }

  .hero-stats li {
    display: flex;
    flex-direction: column;
  }

  .hero-stats strong {
    margin: 0;
    font-size: 1.15rem;
  }

  .hero-stats li + li::before {
    display: none;
  }

  .outcomes li {
    padding: 0.9rem;
    border: 1px solid var(--border);
    border-top: 3px solid var(--shard);
    border-radius: 10px;
    background: var(--bg-glass);
    font-size: 0.85rem;
  }

  .outcomes strong {
    margin-bottom: 0.35rem;
    font-size: 0.95rem;
    line-height: 1.3;
  }

  .needs-grid > div {
    padding: 1.75rem 0.5rem;
  }

  /* The pipeline runs down a line on the left; each step comes in on a diagonal as it lights */
  .flow-steps {
    gap: 3.5rem;
  }

  .js .flow-step:not(.lit) > :not(.flow-node) {
    transform: translate(28px, 24px);
  }

  .flow-text h3 {
    font-size: 1.3rem;
  }

  .flow-text p {
    font-size: 1rem;
  }

  .uses-grid {
    gap: 1rem;
  }

  /* Workflows: the card in the middle in focus, its neighbours peeking in either side */
  .workflow-rail {
    padding: 4px 9% 1rem;
    scroll-padding: 0 9%;
  }

  .workflow-card {
    flex-basis: 82%;
    scroll-snap-align: center;
  }
}

/* Phones whose browser animates with the scroll: cards glide in on a diagonal as they come into view, alternating
   sides, and the workflow cards beside the one in focus shrink and fade. Others keep the sections' fade-in. */
@media (max-width: 600px) and (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .js .reveal {
      opacity: 1;
      transform: none;
    }

    .needs-grid > div,
    .uses-grid article,
    .showcase-points li,
    .demo-image-container,
    .section-head,
    .workflows-head {
      animation: glide-in linear both;
      animation-timeline: view();
      animation-range: entry 5% cover 30%;
    }

    .needs-grid > div:nth-child(even),
    .uses-grid article:nth-child(even),
    .showcase-points li:nth-child(even) {
      animation-name: glide-in-left;
    }

    .workflow-card {
      animation: card-focus linear both;
      animation-timeline: view(inline);
    }
  }
}

@keyframes glide-in {
  from { opacity: 0; transform: translate(32px, 40px); }
}

@keyframes glide-in-left {
  from { opacity: 0; transform: translate(-32px, 40px); }
}

@keyframes card-focus {
  entry 0% { opacity: 0.45; transform: scale(0.88); }
  entry 100% { opacity: 1; transform: none; }
  exit 0% { opacity: 1; transform: none; }
  exit 100% { opacity: 0.45; transform: scale(0.88); }
}
