/*
 * Bodylet AI: landing page layout.
 *
 * Only what belongs to this page: the hero scene, the setup line, the two
 * product objects (the agent's terminal, the live session) and the section
 * rhythm. Every color, size and component comes from vendor/brand;
 * if a rule here would serve the dashboard too, it belongs in the brand
 * repository.
 *
 * Spacing uses the 4 px scale of the tokens (--bl-space-*) and one section
 * rhythm (--site-section). Nothing else sets a distance.
 *
 * Light or dark. The page follows the system setting through the brand's
 * light tokens (vendor/brand/tokens/light.css), and data-bl-theme on <html>
 * forces one scheme. Windows and terminals take the scheme of the page too.
 * A colour that this page sets for one scheme only is written
 * light-dark(light, dark): it follows the scheme of the element. What is not
 * a colour (a blend mode, a filter) is set per scheme in the block below.
 */

:root {
  --bl-container: 80rem;       /* the page is wider than the product: 1280 */
  --site-section: clamp(5rem, 9vw, 8rem);
  --site-head-gap: clamp(2.5rem, 4vw, 3.5rem);
  --site-visual: 62rem;        /* product objects keep the density of the dashboard */

  /* Per scheme: dark here, light below. */
  --site-field-blend: screen;           /* the hero's field over the page */
  --site-glow-blend: plus-lighter;      /* the breathing light of the object's edge */
  --site-mark-glow: drop-shadow(0 0 0.375rem rgba(176, 240, 79, 0.42)) drop-shadow(0 0 1.75rem rgba(143, 212, 58, 0.35));
  --site-plain: 0.7;                    /* strength of the plain behind the terminal */
  --site-valley: 0.62;                  /* and of the valley at the foot */
}

/* The light scheme: the system asks for it, or the page forces it. The two
   blocks hold the same values; change both together. */
@media (prefers-color-scheme: light) {
  :root:not([data-bl-theme="dark"]) {
    --site-field-blend: multiply;
    --site-glow-blend: normal;
    --site-mark-glow: drop-shadow(0 0 0.25rem rgba(143, 212, 58, 0.45));
    --site-plain: 1;
    --site-valley: 1;
  }
}

:root[data-bl-theme="light"] {
  --site-field-blend: multiply;
  --site-glow-blend: normal;
  --site-mark-glow: drop-shadow(0 0 0.25rem rgba(143, 212, 58, 0.45));
  --site-plain: 1;
  --site-valley: 1;
}

html {
  scroll-behavior: smooth;
}

body {
  overflow-x: clip;
}

.nb {
  white-space: nowrap;
}

/* Section headings: one size and weight for the whole page. */
.bl-title {
  font-size: clamp(1.875rem, 1.25rem + 2vw, 2.5rem);
  font-weight: var(--bl-weight-bold);
  line-height: 1.15;
  letter-spacing: -0.025em;
}

.bl-lead {
  font-size: clamp(1.0625rem, 0.95rem + 0.45vw, 1.25rem);
}

/* ── Navigation ─────────────────────────────────────────────────────────── */

.bl-nav__inner {
  height: 5.5rem;
}

.bl-nav__brand {
  margin-right: var(--bl-space-12);
  font-size: 2.375rem;
}

.bl-nav__links {
  gap: var(--bl-space-4);
}

.bl-nav__link {
  white-space: nowrap;
  color: var(--bl-text);
  font-size: var(--bl-text-base);
  font-weight: var(--bl-weight-semibold);
}

.bl-nav__actions .bl-btn {
  --_h: 2.875rem;
  --_px: 1.25rem;
  font-size: var(--bl-text-base);
}

@media (max-width: 860px) {
  .bl-nav__inner {
    height: 4rem;
  }

  .bl-nav__brand {
    margin-right: 0;
    font-size: 1.75rem;
  }

  .bl-nav__actions .bl-btn {
    --_h: 2.5rem;
    --_px: 1rem;
    font-size: var(--bl-text-md);
  }
}

/* ── Segmented choice: radio buttons that look like tabs ────────────────── */
/* Used by the setup line and by the agent's terminal. No script: the panel
   that matches the checked radio is shown with :has(). */

.seg {
  display: flex;
  gap: var(--bl-space-1);
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.seg__opt {
  position: relative;
  cursor: pointer;
}

.seg__opt input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.seg__opt > span {
  display: block;
  height: 2rem;
  padding: 0 var(--bl-space-3);
  border-radius: var(--bl-radius-sm);
  color: var(--bl-text-3);
  font-size: var(--bl-text-sm);
  font-weight: var(--bl-weight-semibold);
  line-height: 2rem;
  white-space: nowrap;
  transition: background-color var(--bl-dur-1) ease, color var(--bl-dur-1) ease;
}

.seg__opt:hover > span {
  color: var(--bl-text);
}

.seg__opt:has(input:checked) > span {
  background: var(--bl-accent-wash-2);
  color: light-dark(var(--bl-accent), var(--bl-lime-200));
}

.seg__opt:has(input:focus-visible) > span {
  outline: 2px solid var(--bl-accent);
  outline-offset: 1px;
}

/* ── The setup line ─────────────────────────────────────────────────────── */
/* The page's call to action: one line to paste. Nothing in it but what is copied. */

.setup {
  width: 100%;
  max-width: 40rem;   /* the terminal line fits on one row at this width */
  overflow: hidden;
  border: 1px solid var(--bl-accent-line);
  border-radius: var(--bl-radius-lg);
  background: light-dark(rgba(255, 255, 255, 0.88), rgba(9, 13, 10, 0.86));
  box-shadow:
    var(--bl-highlight),
    0 1.5rem 3.5rem -1.75rem light-dark(rgba(111, 174, 34, 0.3), rgba(176, 240, 79, 0.32)),
    var(--bl-shadow-2);
  text-align: left;
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.setup__switch {
  padding: var(--bl-space-2);
  border-bottom: 1px solid var(--bl-border);
}

.setup__body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: var(--bl-space-4);
  padding: var(--bl-space-4) var(--bl-space-4) var(--bl-space-5) var(--bl-space-5);
}

/* The three lines share one cell, so the block keeps one height. */
.setup__lines {
  display: grid;
  min-width: 0;
  padding-top: 0.5rem;
}

.setup__line {
  grid-area: 1 / 1;
  display: flex;
  gap: 0.75em;
  min-width: 0;
  visibility: hidden;
  font-family: var(--bl-font-mono);
  font-size: 0.9375rem;
  font-variant-ligatures: none;
  line-height: 1.6;
}

.setup__line code {
  min-width: 0;
  color: var(--bl-text);
  font: inherit;
  overflow-wrap: anywhere;
  -webkit-user-select: all;
  user-select: all;
}

.setup__prompt {
  flex: none;
  color: var(--bl-accent);
  user-select: none;
}

/* A long command breaks once, before its address: the flags on one row, the
   address and the pipe on the next. The tail only breaks inside when a row
   cannot hold it. */
.setup__tail {
  display: inline-block;
  max-width: 100%;
  overflow-wrap: anywhere;
  vertical-align: top;
}

.setup:has(input[value="claude"]:checked) [data-setup-line="claude"],
.setup:has(input[value="codex"]:checked) [data-setup-line="codex"],
.setup:has(input[value="terminal"]:checked):has(input[value="unix"]:checked):not(:has(input[value="wget"]:checked)) [data-setup-line="unix"],
.setup:has(input[value="terminal"]:checked):has(input[value="unix"]:checked):has(input[value="wget"]:checked) [data-setup-line="wget"],
.setup:has(input[value="terminal"]:checked):has(input[value="windows"]:checked) [data-setup-line="windows"] {
  visibility: visible;
}

/* The terminal tab: the line of one system, and under it the switch to the
   other. It shares the cell of the agents' sentence, so the block keeps one
   height whatever is chosen. */
.setup__term {
  grid-area: 1 / 1;
  display: grid;
  gap: var(--bl-space-2);
  min-width: 0;
  visibility: hidden;
}

.setup:has(input[value="terminal"]:checked) .setup__term {
  visibility: visible;
}

.setup__stack {
  display: grid;
  min-width: 0;
}

/* Under the line: the system, and beside it the other way to fetch the
   installer on a Linux that has no curl. The first word starts under the
   first word of the line. */
.setup__under {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--bl-space-1) var(--bl-space-4);
  margin-left: calc(0.9375rem * 0.6 + 0.75 * 0.9375rem - var(--bl-space-2));
}

/* The choice between curl and wget: a line of quiet text, not a control with
   a frame. It is there for the Linux and macOS line only, and keeps its place
   otherwise so the block does not change height. */
.setup__alt {
  position: relative;
  visibility: hidden;
  padding: 0 var(--bl-space-2);
  color: var(--bl-text-3);
  font-size: var(--bl-text-xs);
  line-height: 1.5rem;
  text-decoration: underline;
  text-decoration-color: var(--bl-border-strong);
  text-underline-offset: 0.25em;
  cursor: pointer;
  transition: color var(--bl-dur-1) ease, text-decoration-color var(--bl-dur-1) ease;
}

.setup:has(input[value="terminal"]:checked):has(input[value="unix"]:checked) .setup__alt {
  visibility: visible;
}

.setup__alt input {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.setup__alt:hover {
  color: var(--bl-text);
  text-decoration-color: currentColor;
}

.setup__alt:has(input:focus-visible) {
  border-radius: var(--bl-radius-sm);
  outline: 2px solid var(--bl-accent);
  outline-offset: 1px;
}

.setup__alt-on,
.setup__alt:has(input:checked) .setup__alt-off {
  display: none;
}

.setup__alt:has(input:checked) .setup__alt-on {
  display: inline;
}

.setup__os .seg__opt > span {
  height: 1.5rem;
  padding: 0 var(--bl-space-2);
  font-size: var(--bl-text-xs);
  line-height: 1.5rem;
}

@supports not selector(:has(*)) {
  [data-setup-line="claude"] {
    visibility: visible;
  }
}

.setup__copy {
  display: inline-flex;
  align-items: center;
  gap: var(--bl-space-2);
  height: 2.5rem;
  padding: 0 var(--bl-space-4) 0 var(--bl-space-3);
  border: 0;
  border-radius: var(--bl-radius-md);
  background: var(--bl-accent-fill);
  /* On light the fill takes a hairline so that it holds on white. */
  box-shadow:
    inset 0 1px 0 light-dark(rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.35)),
    inset 0 0 0 1px light-dark(rgba(59, 107, 15, 0.3), transparent);
  color: var(--bl-text-on-accent);
  font: inherit;
  font-size: var(--bl-text-md);
  font-weight: var(--bl-weight-bold);
  line-height: 1;
  cursor: pointer;
  transition: background-color var(--bl-dur-1) ease, transform var(--bl-dur-1) ease;
}

.setup__copy[hidden] {
  display: none;
}

.setup__copy:hover {
  background: var(--bl-accent-fill-hover);
}

.setup__copy:active {
  transform: translateY(1px);
}

.setup__copy:focus-visible {
  outline: 2px solid light-dark(var(--bl-accent), var(--bl-lime-200));
  outline-offset: 2px;
}

.setup__copy .bl-icon {
  width: 1.125rem;
  height: 1.125rem;
}

.setup__copy span {
  min-width: 3.25em;
  text-align: left;
}

@media (max-width: 480px) {
  .setup__pre {
    display: none;
  }

  .setup__opt {
    flex: 1;
  }

  .setup__opt > span {
    padding: 0 var(--bl-space-2);
    text-align: center;
  }

  .setup__opt > span::first-letter {
    text-transform: uppercase;
  }

  .setup__body {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--bl-space-3);
    padding: var(--bl-space-3) var(--bl-space-4) var(--bl-space-4);
  }

  .setup__lines {
    padding-top: 0;
  }

  .setup__line {
    font-size: var(--bl-text-sm);
  }

  /* The commands are longer than the sentence: one step smaller, so each
     keeps to two rows on a phone. */
  .setup__stack .setup__line {
    font-size: var(--bl-text-xs);
    line-height: 1.7;
  }

  .setup__under {
    margin-left: 0;
  }

  .setup__copy {
    justify-content: center;
  }

  .setup__copy span {
    min-width: 0;
  }

}

/* ── The field of dots ──────────────────────────────────────────────────── */
/* The one backdrop of the page: a sheet of lime dots, at full strength under
   the hero object, then twice more further down, fainter. Each field is a
   still frame and, over it, a canvas that draws the same field as particles
   in motion (js/field.js). The picture is never hidden, so a field cannot be
   empty: the canvas only shows once it has drawn (.is-live). */

.field {
  position: absolute;
  z-index: -1;
  aspect-ratio: 7 / 3;
  pointer-events: none;
}

.field__still,
.field__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100%;
}

/* The still frame of the scheme in force (named in the <head> of the page). */
.field__still {
  background-position: center;
  background-repeat: no-repeat;
  background-size: 100% 100%;
}

.field__canvas {
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--bl-dur-4) var(--bl-ease-out), visibility 0s var(--bl-dur-4);
}

.field.is-live .field__canvas {
  opacity: 1;
  visibility: visible;
  transition: opacity var(--bl-dur-4) var(--bl-ease-out);
}

/* Further down the page a field follows the scroll a little (--shift, from
   js/main.js: -1 when it enters at the foot of the window, 1 when it leaves
   at the top). */
.field[data-depth] {
  translate: var(--field-x, 0) calc(var(--shift, 0) * var(--field-travel, 1.25rem));
}

/* ── Hero ───────────────────────────────────────────────────────────────── */

.hero {
  position: relative;
  isolation: isolate;
  overflow: clip;
  background: var(--bl-bg);
}

/* A faint haze where the object hangs. */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(38rem 30rem at 74% 46%, rgba(143, 212, 58, 0.10), transparent 70%),
    radial-gradient(60rem 22rem at 70% 100%, rgba(143, 212, 58, 0.07), transparent 70%);
  pointer-events: none;
}

/* The field dissolves into the page at the foot of the hero. */
.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  z-index: -1;
  height: clamp(4rem, 9vw, 8rem);
  background: linear-gradient(to bottom, transparent, var(--bl-bg));
  pointer-events: none;
}

.hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.86fr);
  gap: var(--bl-space-10);
  padding-top: clamp(3rem, 5.6vw, 5rem);
  padding-bottom: clamp(7rem, 12vw, 10.5rem);
}

.hero__copy {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.hero__eyebrow {
  font-family: var(--bl-font-sans);
  font-size: clamp(0.875rem, 0.75rem + 0.45vw, 1.125rem);
  font-weight: var(--bl-weight-bold);
  letter-spacing: 0.15em;
}

.hero__title {
  max-width: 11em;
  margin-top: var(--bl-space-6);
  font-size: clamp(2.5rem, 0.9rem + 4.4vw, 4.5rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.03em;
}

/* The one plain sentence: what the product is. */
.hero__lead {
  max-width: 33rem;
  margin-top: var(--bl-space-6);
  color: var(--bl-text-2);
  font-size: clamp(1.0625rem, 0.95rem + 0.55vw, 1.3125rem);
  line-height: 1.5;
}

.hero .setup {
  margin-top: var(--bl-space-10);
}

/* What the line installs, and the one fact about the network. */
.hero__note {
  max-width: 40rem;
  margin-top: var(--bl-space-4);
  color: var(--bl-text-3);
  font-size: var(--bl-text-sm);
  line-height: 1.5;
}

/* Depth. js/hero.js writes four numbers on the hero: --px and --py, the
   pointer from -1 to 1 across the hero, and --sy, how far the page has
   scrolled, in pixels. The field is the far layer, the object the middle one;
   the copy and the setup line never move. All are 0 without JavaScript, under
   reduced motion and on touch screens. */
.hero {
  --px: 0;
  --py: 0;
  --sy: 0;
}

/* The object. Its box is the square picture; the slab fills the middle 60%. */
.hero__stage {
  position: relative;
  min-width: 0;
  perspective: 70rem;
}

.hero__object {
  --size: min(46vw, 40rem);
  position: absolute;
  top: 47%;
  left: 54%;
  width: var(--size);
  height: var(--size);
  margin: calc(var(--size) / -2) 0 0 calc(var(--size) / -2);
  /* It leans a few degrees toward the pointer and trails the scroll a little. */
  transform:
    translate3d(calc(var(--px) * 0.5rem), calc(var(--py) * 0.375rem + var(--sy) * 0.12px), 0)
    rotateX(calc(var(--py) * -3.5deg))
    rotateY(calc(var(--px) * 5deg));
  animation: hero-float 9s var(--bl-ease-in-out) infinite;
  will-change: transform, translate;
}

.hero__slab,
.hero__glow {
  position: absolute;
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  /* The picture of the scheme in force (named in the <head> of the page). */
  background-position: center;
  background-repeat: no-repeat;
  background-size: 100% 100%;
}

/* A second copy of the light alone, added over the picture: its opacity is
   the breathing of the edge. */
.hero__glow {
  mix-blend-mode: var(--site-glow-blend);
  opacity: 0.3;
  animation: hero-breathe 6s ease-in-out infinite;
}

/* The mark, laid flat on the face. The centre is where the diagonals of the
   face cross in the picture, and the matrix is the perspective of the face at
   that point (see README, "Hero object"). The glow is kept tight enough for
   the three tones of a filled mark to stay apart. */
.hero__mark {
  position: absolute;
  top: 44.9%;
  left: 47.52%;
  width: 18%;
  height: auto;
  transform: translate(-50%, -50%) matrix(0.9096, -0.1065, -0.1716, 0.8586, 0, 0);
  filter: var(--site-mark-glow);
}

/* The float is on translate and rotate, so it adds to the lean above. */
@keyframes hero-float {
  0%,
  100% {
    translate: 0 -0.5rem;
    rotate: -0.4deg;
  }

  50% {
    translate: 0 0.5rem;
    rotate: 0.4deg;
  }
}

@keyframes hero-breathe {
  0%,
  100% {
    opacity: 0.06;
  }

  50% {
    opacity: 0.52;
  }
}

/* The hero's field: its ridge rises under the object. It is screened over
   the page ground, so its black is no colour at all. --field-drop slides it
   down behind the fold of the hero until its near crest sits under the copy. */
.hero__field {
  --field-drop: 11vw;
  right: 0;
  bottom: calc(var(--field-drop) * -1);
  left: 0;
  mix-blend-mode: var(--site-field-blend);
  translate: calc(var(--px) * -0.375rem) calc(var(--py) * -0.25rem + var(--sy) * 0.22px);
}

@media (max-width: 1100px) {
  .hero__inner {
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.6fr);
    gap: var(--bl-space-6);
  }

  .hero__object {
    --size: 50vw;
    left: 50%;
  }

  .bl-nav__brand {
    margin-right: var(--bl-space-6);
  }

  .bl-nav__links {
    gap: 0;
  }
}

@media (max-width: 860px) {
  .hero__inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    padding-bottom: clamp(5rem, 16vw, 8rem);
  }

  .hero__stage {
    height: min(74vw, 28rem);
    margin-top: var(--bl-space-8);
  }

  .hero__object {
    --size: min(112vw, 44rem);
    top: 50%;
    left: 51%;
  }

  .hero .setup {
    margin-top: var(--bl-space-8);
  }
}

/* ── Statement and pillars ──────────────────────────────────────────────── */

.statement {
  max-width: 22em;
  margin: 0 auto;
  padding-top: var(--bl-space-8);
  color: var(--bl-text-3);
  font-size: clamp(1.625rem, 1.1rem + 2.2vw, 2.75rem);
  font-weight: var(--bl-weight-bold);
  line-height: 1.2;
  letter-spacing: -0.025em;
  text-align: center;
  text-wrap: balance;
}

.statement span {
  display: block;
  color: var(--bl-text);
}

.pillars .pillars__list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: var(--bl-space-16) 0 0;
}

.pillar {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 var(--bl-space-5);
  border-left: 1px solid var(--bl-border);
  text-align: center;
}

.pillar:first-child {
  border-left: 0;
}

.pillar .bl-icon {
  width: 2.25rem;
  height: 2.25rem;
  color: var(--bl-accent);
  stroke-width: 1.5;
}

.pillar__name {
  margin-top: var(--bl-space-3);
  font-size: var(--bl-text-xl);
  font-weight: var(--bl-weight-bold);
  letter-spacing: -0.015em;
}

.pillar p {
  max-width: 14.5rem;
  margin-top: var(--bl-space-2);
  color: var(--bl-text-2);
  font-size: var(--bl-text-base);
  line-height: 1.5;
  text-wrap: balance;
}

@media (max-width: 860px) {
  .pillars .pillars__list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--bl-space-10) 0;
    padding-top: var(--bl-space-12);
  }

  .pillar:nth-child(odd) {
    border-left: 0;
  }
}

@media (max-width: 480px) {
  .pillar {
    padding: 0 var(--bl-space-3);
  }

  .pillar .nb {
    white-space: normal;
  }

  .pillar p {
    font-size: var(--bl-text-md);
  }
}

/* ── Product sections: one heading, one sentence, one object ────────────── */

.show {
  padding-top: var(--site-section);
  /* A field behind the object is as wide as the window of the browser. */
  overflow-x: clip;
}

.show__head {
  max-width: 42rem;
  margin: 0 auto var(--site-head-gap);
  text-align: center;
}

/* The words of a section are always in front of what lies behind its object. */
.show__head,
.scenarios,
.show__note {
  position: relative;
  z-index: 1;
}

.show__head .bl-lead,
.cta__inner .bl-lead {
  margin-top: var(--bl-space-4);
  text-wrap: balance;
}

.show__visual {
  position: relative;
  /* What lies behind the object (light, a field) stays behind it and in
     front of the page, with or without the drift below. */
  isolation: isolate;
  max-width: var(--site-visual);
  margin-inline: auto;
}

/* A breath of the accent behind each object. */
.show__visual::before {
  content: "";
  position: absolute;
  inset: 12% 8% -4%;
  z-index: -1;
  background: radial-gradient(closest-side, rgba(143, 212, 58, 0.13), transparent);
  filter: blur(2.5rem);
  pointer-events: none;
}

.show__visual--agent {
  max-width: 54rem;
}

/* The plain behind the agent's terminal. Its pictures are laid on the page
   ground, so it needs no blend mode. It is as wide as the window of the
   browser, and hangs so that its far edge runs just under the top of the
   terminal: the light on that edge rises behind the window. */
.field--plain {
  --width: max(100vw, 72rem);
  --field-x: -50%;
  top: calc(var(--width) * -0.172 + 2.5rem);
  left: 50%;
  width: var(--width);
  opacity: var(--site-plain);
}

.show__visual--agent::before {
  content: none;
}

/* The session window is lit the same way, from behind its top edge: the
   same low dome of light on the same line, without the dots. */
.session-slot::before {
  inset: -8.5rem -14% auto;
  height: 10rem;
  background:
    linear-gradient(to right, transparent, light-dark(rgba(111, 174, 34, 0.32), rgba(198, 248, 122, 0.55)) 30%, light-dark(rgba(111, 174, 34, 0.32), rgba(198, 248, 122, 0.55)) 70%, transparent) 50% 100% / 100% 1px no-repeat,
    radial-gradient(44% 100% at 50% 100%, light-dark(rgba(176, 240, 79, 0.3), rgba(176, 240, 79, 0.5)), light-dark(rgba(143, 212, 58, 0.08), rgba(143, 212, 58, 0.16)) 46%, transparent 78%);
  filter: none;
}

/* The object eases up into place as it enters (--drift, from js/main.js),
   and is still once it is where it is read. */
[data-drift] {
  translate: 0 calc(var(--drift, 0) * 2.25rem);
}

/* Which story the two objects tell. */
.scenarios {
  justify-content: center;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto var(--bl-space-6);
  padding: var(--bl-space-1);
  border: 1px solid var(--bl-border);
  border-radius: var(--bl-radius-md);
  background: var(--bl-surface-1);
}

.show__note {
  margin-top: var(--bl-space-5);
  color: var(--bl-text-3);
  font-size: var(--bl-text-sm);
  text-align: center;
}

@media (max-width: 640px) {
  .scenarios {
    flex-direction: column;
    width: 100%;
    max-width: 20rem;
  }

  .scenarios .seg__opt > span {
    text-align: center;
  }
}

/* ── The agent's terminal ───────────────────────────────────────────────── */

.agent .bl-window__bar {
  gap: var(--bl-space-4);
}

.agent__body {
  display: grid;
  background: var(--bl-code-bg);
}

/* Every session (three scenarios, two clients) shares one cell: the window
   keeps one height. */
.agent__panel {
  grid-area: 1 / 1;
  visibility: hidden;
  padding: var(--bl-space-6) var(--bl-space-6) var(--bl-space-8);
  overflow: hidden;
  font-size: clamp(0.75rem, 0.66rem + 0.36vw, 0.875rem);
  line-height: 1.75;
}

.show:has(.scenarios input[value="systems"]:checked) .agent:has(input[value="claude"]:checked) [data-scenario="systems"][data-agent="claude"],
.show:has(.scenarios input[value="systems"]:checked) .agent:has(input[value="codex"]:checked) [data-scenario="systems"][data-agent="codex"],
.show:has(.scenarios input[value="browser"]:checked) .agent:has(input[value="claude"]:checked) [data-scenario="browser"][data-agent="claude"],
.show:has(.scenarios input[value="browser"]:checked) .agent:has(input[value="codex"]:checked) [data-scenario="browser"][data-agent="codex"],
.show:has(.scenarios input[value="workstation"]:checked) .agent:has(input[value="claude"]:checked) [data-scenario="workstation"][data-agent="claude"],
.show:has(.scenarios input[value="workstation"]:checked) .agent:has(input[value="codex"]:checked) [data-scenario="workstation"][data-agent="codex"] {
  visibility: visible;
}

@supports not selector(:has(*)) {
  .agent [data-scenario="browser"][data-agent="claude"] {
    visibility: visible;
  }
}

.agent__ask {
  color: var(--bl-text);
}

.agent__ask .bl-term__prompt {
  color: var(--bl-text-3);
}

/* A tool call: a status dot, the tool, its arguments. Wrapped lines hang. */
.agent__call,
.agent__say {
  position: relative;
  padding-left: 1.6em;
}

.agent__call b {
  color: var(--bl-text);
  font-weight: var(--bl-weight-bold);
}

.agent__dot {
  position: absolute;
  top: 0.62em;
  left: 0.2em;
  flex: none;
  width: 0.52em;
  height: 0.52em;
  border-radius: 50%;
  background: var(--bl-ok);
}

.agent__dot--say {
  background: var(--bl-text);
}

.agent__dot--plain {
  top: 0.72em;
  width: 0.32em;
  height: 0.32em;
  background: var(--bl-text-3);
}

/* Its result: an elbow, then the answer. */
.agent__result {
  position: relative;
  padding-left: 3.8em;
}

.agent__result::before {
  content: "";
  position: absolute;
  top: 0.2em;
  left: 2em;
  width: 0.7em;
  height: 0.62em;
  border: solid var(--bl-text-faint, var(--bl-text-3));
  border-width: 0 0 1.5px 1.5px;
}

.agent__result--more::before {
  content: none;
}

/* On a phone the sessions differ too much in length to share one height:
   the window takes the height of the one on show. */
@media (max-width: 640px) {
  .agent__panel {
    display: none;
  }

  .agent__panel:is([data-scenario][data-agent]) {
    visibility: visible;
  }

  .show:has(.scenarios input[value="systems"]:checked) .agent:has(input[value="claude"]:checked) [data-scenario="systems"][data-agent="claude"],
  .show:has(.scenarios input[value="systems"]:checked) .agent:has(input[value="codex"]:checked) [data-scenario="systems"][data-agent="codex"],
  .show:has(.scenarios input[value="browser"]:checked) .agent:has(input[value="claude"]:checked) [data-scenario="browser"][data-agent="claude"],
  .show:has(.scenarios input[value="browser"]:checked) .agent:has(input[value="codex"]:checked) [data-scenario="browser"][data-agent="codex"],
  .show:has(.scenarios input[value="workstation"]:checked) .agent:has(input[value="claude"]:checked) [data-scenario="workstation"][data-agent="claude"],
  .show:has(.scenarios input[value="workstation"]:checked) .agent:has(input[value="codex"]:checked) [data-scenario="workstation"][data-agent="codex"] {
    display: block;
  }
}

@supports not selector(:has(*)) {
  .agent [data-scenario="browser"][data-agent="claude"] {
    display: block;
  }
}

@media (max-width: 640px) {
  .agent__panel {
    padding: var(--bl-space-4) var(--bl-space-4) var(--bl-space-5);
  }

  .agent__result {
    padding-left: 2.6em;
  }

  .agent__result::before {
    left: 1em;
  }
}

/* ── The live session ───────────────────────────────────────────────────── */
/* The window is the session component of the design system
   (vendor/brand/demo/session), which brings its own stylesheet. The slot
   holds the still state of each story until the component starts, and
   without JavaScript: the switch shows one of them. */

.show:has(.scenarios input[value="browser"]:checked) .session-slot:not(.is-live) > .bl-sd:not([data-scenario="browser"]),
.show:has(.scenarios input[value="systems"]:checked) .session-slot:not(.is-live) > .bl-sd:not([data-scenario="systems"]),
.show:has(.scenarios input[value="workstation"]:checked) .session-slot:not(.is-live) > .bl-sd:not([data-scenario="workstation"]) {
  display: none;
}

@supports not selector(:has(*)) {
  .session-slot:not(.is-live) > .bl-sd:not([data-scenario="browser"]) {
    display: none;
  }
}

/* Its two controls only show when they can act: not when the page scripts
   or the component did not start. */
html:not(.bl-js) .session-slot .bl-sd__actions,
.session-slot.is-still .bl-sd__actions {
  display: none;
}

/* ── Call to action ─────────────────────────────────────────────────────── */

.cta {
  position: relative;
  isolation: isolate;
  margin-top: var(--site-section);
  border-top: 1px solid var(--bl-border);
  overflow: clip;
}

.cta::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(46rem 22rem at 50% 0%, rgba(143, 212, 58, 0.12), transparent 70%);
}

/* The field comes back at the foot of the page: it rises on both sides and
   leaves the middle, where the setup line is, dark. */
.field--valley {
  --width: max(100%, 80rem);
  --field-x: -50%;
  bottom: calc(var(--width) * -0.085);
  left: 50%;
  z-index: -2;
  width: var(--width);
  opacity: var(--site-valley);
}

.cta__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-block: var(--site-section);
  text-align: center;
}

.cta__title {
  font-size: clamp(2.25rem, 1.4rem + 3.4vw, 3.75rem);
}

.cta__inner .bl-lead {
  max-width: 36rem;
}

.cta .setup {
  margin-top: var(--bl-space-10);
}

/* ── Footer ─────────────────────────────────────────────────────────────── */

.footer {
  border-top: 1px solid var(--bl-border);
}

.footer__inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: var(--bl-space-6) var(--bl-space-8);
  padding-block: var(--bl-space-10);
}

.footer__nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: var(--bl-space-2) var(--bl-space-6);
  font-size: var(--bl-text-md);
}

.footer__nav a {
  color: var(--bl-text-2);
}

.footer__nav a:hover {
  color: var(--bl-text);
  text-decoration: none;
}

.footer__note {
  grid-column: 1 / -1;
  color: var(--bl-text-3);
  font-size: var(--bl-text-sm);
}

/* Light or dark, at the end of the line of the note. */
.footer:has(.footer__theme:not([hidden])) .footer__note {
  grid-column: 1;
}

.footer__theme {
  justify-self: end;
}

@media (max-width: 640px) {
  .footer__inner {
    grid-template-columns: minmax(0, 1fr);
  }

  .footer__nav {
    justify-content: flex-start;
  }

  .footer__theme {
    justify-self: start;
  }
}

/* ── Reduced motion: one composed, still page ───────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .hero__object,
  .hero__glow {
    animation: none;
  }

  [data-drift] {
    translate: none;
  }

  .field[data-depth] {
    translate: var(--field-x, 0) 0;
  }
}
