/* The ground floor: everything below the pinned stage.
 *
 * The stage is the pitch and stays theatrical. This is the workshop, so it
 * changes register deliberately — smaller headings, a visible label column,
 * real product captures, and status words that mean what they say. Colour here
 * is information, not decoration: each capability, each connected tool and each
 * bot carries the identity colour it has in the product.
 *
 * Tokens come from studio.css, so both appearances are covered by one set of
 * rules. Only the identity colours are declared here.
 */
:root {
  --id-acid: #ccff00;
  --id-pink: #ff6ccb;
  --id-cyan: #53e5ff;
  --id-lilac: #b694ff;
  /* Readable on the light canvas; the marks above stay as marks. */
  --id-acid-text: #4a5a00;
  --id-pink-text: #a3186c;
  --id-cyan-text: #00606f;
  --id-lilac-text: #5b3fa8;
  --ground-gutter: clamp(20px, 5.5vw, 88px);
  --ground-max: 1240px;
}
/* Set on the element rather than in a style attribute: the production CSP is
   `style-src 'self'`, so an inline style is dropped and the colour silently
   falls back to grey. */
[data-id="acid"] {
  --id: var(--id-acid);
  --id-text: var(--id-acid-text);
}
[data-id="pink"] {
  --id: var(--id-pink);
  --id-text: var(--id-pink-text);
}
[data-id="cyan"] {
  --id: var(--id-cyan);
  --id-text: var(--id-cyan-text);
}
[data-id="lilac"] {
  --id: var(--id-lilac);
  --id-text: var(--id-lilac-text);
}
:root[data-theme="dark"] {
  --id-acid-text: #ccff00;
  --id-pink-text: #ff6ccb;
  --id-cyan-text: #53e5ff;
  --id-lilac-text: #b694ff;
}

.ground {
  position: relative;
  z-index: 2;
  background: var(--bg);
}
.ground > section {
  padding-block: clamp(64px, 8vw, 128px);
}
.ground-inner {
  width: min(100% - var(--ground-gutter) * 2, var(--ground-max));
  margin-inline: auto;
}
.ground h2 {
  /* Deliberately smaller than the stage headings: coming down from the show. */
  font-size: clamp(32px, 3.6vw, 52px);
  line-height: 1.04;
  letter-spacing: -0.045em;
  font-weight: 500;
  margin: 0 0 14px;
  text-wrap: balance;
}
.ground h3 {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
}
/* Scoped to the type element, not the class, so a later single-class rule such
   as .track-note can still set its own margin. `.ground p` outranks `.track-note`
   on specificity, and silently zeroed every margin those rules asked for. */
.ground :where(p) {
  margin: 0;
  text-wrap: pretty;
}
.ground-head {
  max-width: 58ch;
  margin-bottom: clamp(36px, 4.5vw, 64px);
}
.ground-head p {
  color: var(--muted);
  font-size: clamp(16px, 1.25vw, 18px);
  line-height: 1.6;
}

/* The seam. The stage hands over to a document; say so with one quiet rule
   rather than another full-bleed hero. */
.ground-seam {
  border-top: 1px solid var(--edge);
}

/* --------------------------------------------------------------- workbench */

.workbench-grid {
  display: grid;
  gap: clamp(28px, 4vw, 64px);
  grid-template-columns: minmax(0, 1fr);
}
.capability-stage {
  position: sticky;
  top: 16px;
  z-index: 1;
  margin: 0;
  background: var(--bg);
  padding-bottom: 20px;
}
.capability-frame {
  position: relative;
  border: 1px solid var(--edge);
  border-radius: 18px;
  overflow: hidden;
  background: var(--desk);
  /* Every capture is captured at this ratio, so the frame never jumps. */
  aspect-ratio: 16 / 10;
}
.capability-frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top left;
  opacity: 0;
  transition: opacity 260ms var(--ease);
}
/* Each capture exists in both appearances; the one that does not match the
   current theme is removed outright so it is never downloaded. */
.capability-frame img[data-scheme="light"] {
  display: none;
}
[data-theme="light"] .capability-frame img[data-scheme="dark"] {
  display: none;
}
[data-theme="light"] .capability-frame img[data-scheme="light"] {
  display: block;
}
/* Without the switcher, one representative capture still shows and the four
   descriptions still read. The swap only starts once JS marks the frame live. */
.capability-frame img[data-capability="conversation"] {
  opacity: 1;
}
.capability-frame[data-live] img {
  opacity: 0;
}
.capability-frame[data-live] img[data-shown] {
  opacity: 1;
}
.capability-caption {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 10px;
  font-size: 12px;
  color: var(--quiet);
}
.capability {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 4px;
}
.capability > li {
  position: relative;
  padding: 22px 0 22px 22px;
  border-left: 2px solid var(--edge);
  transition: border-color 200ms var(--ease);
}
.capability > li::before {
  content: "";
  position: absolute;
  left: -5px;
  top: 28px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--edge);
  transition:
    background 200ms var(--ease),
    transform 200ms var(--ease);
}
.capability > li[data-active] {
  border-left-color: var(--id);
}
.capability > li[data-active]::before {
  background: var(--id);
  transform: scale(1.5);
}
.capability h3 {
  color: var(--fg);
}
.capability p {
  color: var(--muted);
  max-width: 54ch;
  line-height: 1.62;
}
.capability-meta {
  display: block;
  margin-top: 10px;
  font-size: 13px;
  color: var(--id-text);
}
@media (min-width: 900px) {
  .workbench-grid {
    grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
    align-items: start;
  }
  .capability-stage {
    order: 2;
    top: 12vh;
    padding-bottom: 0;
  }
  .capability {
    order: 1;
    gap: clamp(8px, 3vw, 40px);
  }
  .capability > li {
    padding-block: clamp(18px, 3vw, 40px);
  }
}

/* ------------------------------------------------------------------- track */

.track {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2px;
  grid-template-columns: minmax(0, 1fr);
}
.track > li {
  position: relative;
  padding: 26px 0 26px 26px;
  border-left: 2px solid var(--edge);
}
.track > li::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 30px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--edge);
  background: var(--bg);
}
/* A filled dot is a stage that has actually started. */
.track > li[data-state="started"] {
  border-left-color: var(--accent);
}
.track > li[data-state="started"]::before {
  border-color: var(--accent);
  background: var(--accent);
}
.track-state {
  font-size: 13px;
  font-weight: 600;
  color: var(--quiet);
  margin-bottom: 6px;
}
.track > li[data-state="started"] .track-state {
  color: var(--accent-text);
}
.track ul {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 7px;
  max-width: 46ch;
}
.track ul li {
  position: relative;
  padding-left: 18px;
  font-size: 15px;
  color: var(--muted);
  line-height: 1.5;
}
.track ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 6px;
  height: 1px;
  background: var(--quiet);
}
.track-note {
  margin-top: clamp(28px, 4vw, 56px);
  font-size: 15px;
  color: var(--muted);
  max-width: 62ch;
}
@media (min-width: 860px) {
  .track {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
  }
  .track > li {
    padding: 34px 24px 0 0;
    border-left: 0;
    border-top: 2px solid var(--edge);
  }
  .track > li::before {
    left: 0;
    top: -7px;
  }
  .track > li[data-state="started"] {
    border-top-color: var(--accent);
  }
}

/* -------------------------------------------------------------------- spec */

.spec-grid {
  display: grid;
  gap: 0;
}
.spec-row {
  display: grid;
  gap: 6px 32px;
  padding: 22px 0;
  border-top: 1px solid var(--edge);
  grid-template-columns: minmax(0, 1fr);
}
.spec-row:last-child {
  border-bottom: 1px solid var(--edge);
}
.spec-row dt {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--fg);
}
.spec-row dd {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
  max-width: 62ch;
}
.spec-state {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border: 1px solid var(--edge);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--quiet);
  vertical-align: 1px;
}
@media (min-width: 760px) {
  .spec-row {
    grid-template-columns: 210px minmax(0, 1fr);
  }
  /* The state is part of the answer, so it stays inside the <dd> the HTML
     requires, and takes the right edge from there. */
  .spec-row dd:has(.spec-state) {
    display: grid;
    grid-template-columns: minmax(0, 62ch) auto;
    align-items: baseline;
    justify-content: space-between;
    gap: 32px;
    max-width: none;
  }
  .spec-row dd:has(.spec-state) .spec-state {
    margin-left: 0;
    flex: none;
  }
}

/* --------------------------------------------------------------- catalogue */

.catalogue-pair {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr);
}
.catalogue-card {
  display: block;
  padding: clamp(24px, 3vw, 36px);
  border: 1px solid var(--edge);
  border-radius: 18px;
  background: var(--surface);
  text-decoration: none;
  transition:
    border-color 180ms var(--ease),
    translate 180ms var(--ease);
}
.catalogue-card:hover {
  border-color: var(--id);
  translate: 0 -2px;
}
.catalogue-card h3 {
  margin-bottom: 10px;
}
.catalogue-card p {
  color: var(--muted);
  line-height: 1.6;
  max-width: 44ch;
}
.catalogue-count {
  display: block;
  margin-top: 18px;
  font-size: 13px;
  font-weight: 600;
  color: var(--id-text);
}
@media (min-width: 760px) {
  .catalogue-pair {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ------------------------------------------------------------------ enlist */

.enlist {
  background: var(--desk);
  border-block: 1px solid var(--edge);
}
.enlist-inner {
  display: grid;
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
  grid-template-columns: minmax(0, 1fr);
}
.enlist h2 {
  margin-bottom: 16px;
}
.enlist-copy p {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.6;
  max-width: 46ch;
}
.enlist-promise {
  list-style: none;
  margin: 22px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.enlist-promise li {
  position: relative;
  padding-left: 24px;
  font-size: 15px;
  color: var(--muted);
}
.enlist-promise li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
}
.enlist-form {
  padding: clamp(24px, 3vw, 34px);
  border: 1px solid var(--edge);
  border-radius: 20px;
  background: var(--surface);
}
.enlist-form .field-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 10px;
}
.enlist-form input[type="email"] {
  width: 100%;
  min-height: 52px;
  padding: 12px 16px;
  border: 1px solid var(--edge);
  border-radius: 12px;
  background: var(--field);
  color: var(--fg);
}
.enlist-form input[type="email"]::placeholder {
  color: var(--quiet);
}
.enlist-form button[type="submit"] {
  width: 100%;
  min-height: 52px;
  margin-top: 12px;
  border: 0;
  border-radius: 12px;
  background: var(--accent);
  color: #17181c;
  font-size: 15px;
  font-weight: 600;
  transition: translate 140ms var(--ease);
}
.enlist-form button[type="submit"]:active {
  translate: 0 1px;
}
.enlist-form .consent {
  display: flex;
  gap: 12px;
  margin-top: 20px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}
.enlist-form .consent input {
  margin: 2px 0 0;
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  flex: none;
}
.enlist-footnote {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--edge);
  line-height: 1.55;
  font-size: 13px;
  color: var(--quiet);
}
@media (min-width: 900px) {
  .enlist-inner {
    grid-template-columns: minmax(0, 1fr) minmax(0, 440px);
  }
}

/* ------------------------------------------------------------- field notes */

.ground-notes-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}
.ground-notes-head h2 {
  margin: 0;
}
.ground-notes .notes-list {
  display: grid;
  gap: 0;
}
.ground-notes .notes-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 0;
  border-top: 1px solid var(--edge);
  text-decoration: none;
  transition: padding-left 180ms var(--ease);
}
.ground-notes .notes-list a:last-child {
  border-bottom: 1px solid var(--edge);
}
.ground-notes .notes-list a:hover {
  padding-left: 10px;
}
.ground-notes .notes-list h3 {
  margin: 0;
  font-size: clamp(18px, 2vw, 24px);
  font-weight: 500;
  letter-spacing: -0.02em;
  max-width: 34ch;
}
.ground-notes .notes-arrow {
  color: var(--accent-text);
  flex: none;
}

@media (prefers-reduced-motion: reduce) {
  .capability-frame img,
  .catalogue-card,
  .ground-notes .notes-list a,
  .enlist-form button[type="submit"] {
    transition: none;
  }
}
