/* =====================================================================
 * The front page
 *
 * One accent, used only for actions.
 *
 * The reference this was drawn from gives every card its own colour —
 * purple, green, blue, red — which reads well as a picture and badly as a
 * page, because colour stops meaning anything once everything has some.
 * Here the accent marks what can be pressed and nothing else, and the
 * cards are told apart by their marks.
 * ================================================================== */

.bf-home {
  padding-bottom: 80px;
}

/*
 * Measured on the reference: the rows span 83% of the page.
 *
 * Both the tools and the models sit in a band 1602 px wide on a 1920 px
 * picture. Held to a share rather than a fixed width, the same
 * proportion holds on a wider screen.
 */
.bf-home .bf-container {
  /*
   * Measured: the reference's rows span 83% of the page, and mine came
   * out at 60% because a 1600 px ceiling cut in well before that on a
   * 1920 px screen. Held to the share, with a ceiling far enough out
   * that it only catches genuinely wide displays.
   */
  width: min(2200px, 83%);

  /*
   * The ceiling has to be lifted too.
   *
   * `.bf-container` carries `max-width: 1200px` from the base sheet, and
   * a width of 83% cannot beat it — the element came out 1200 px on a
   * 1920 px screen, which is the 60% that kept showing up in the
   * measurements while the width rule itself was plainly winning.
   */
  max-width: min(2200px, 83%);
  margin-inline: auto;
}

/* ---- the opening ---------------------------------------------------- */

.bf-home__hero {
  padding: 86px 0 64px;
  text-align: center;
}

.bf-home__title {
  margin: 0 0 14px;
  font-size: clamp(30px, 5vw, 50px);
  font-weight: 800;
  line-height: 1.35;
  color: var(--bf-text);
}

.bf-home__title span {
  color: var(--orange-500);
}

.bf-home__lead {
  margin: 0 0 32px;
  font-size: clamp(15px, 2vw, 18px);
  color: var(--bf-text-muted);
}

.bf-home__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.bf-home__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border: 1px solid var(--bf-line);
  border-radius: var(--bf-radius-xs);
  background: var(--surface-2);
  color: var(--bf-text);
  font-size: var(--bf-size-base);
  font-weight: 600;
  text-decoration: none;
  transition: var(--bf-ease-all);
}

.bf-home__cta:hover {
  border-color: var(--bf-line-strong);
  background: var(--surface-3);
}

.bf-home__cta.is-primary {
  border-color: var(--orange-600);
  background:
    linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,0) 34%),
    var(--orange-500);
  color: var(--bf-on-accent);
}

/*
 * Under the pointer it warms, it does not brighten.
 *
 * The white wash across the top was doing the reacting, and on a large
 * button that reads as a pale film laid over the colour rather than as
 * the button answering. The colour itself lifting is the whole gesture.
 */
.bf-home__cta.is-primary:hover {
  border-color: var(--orange-500);
  background: var(--orange-400);
}

/* ---- a section and its heading -------------------------------------- */

.bf-home__section {
  padding: 56px 0;
}

.bf-home__head {
  margin-bottom: 34px;
  text-align: center;
}

.bf-home__head h2 {
  margin: 0 0 8px;
  font-size: clamp(21px, 3vw, 28px);
  font-weight: 700;
  color: var(--bf-text);
}

.bf-home__head p {
  margin: 0;
  font-size: var(--bf-size-base);
  color: var(--bf-text-muted);
}

/* ---- the grids ------------------------------------------------------ */

.bf-home__grid {
  display: grid;
  gap: 16px;
}

/*
 * Six tools in one row, five models in one row — as the reference has
 * them, and as the measurements confirm:
 *
 *   tools    6 cards, 240 x 477 each, 30 px apart
 *   models   5 cards, 291 x 475 each, 33 px apart
 *
 * The gap is written as a share of the card so the spacing holds when
 * the row is narrower than the reference's 1920 px.
 */
.bf-home__grid--tools {
  grid-template-columns: repeat(6, 1fr);
  /* 30 px on the reference's 1920 px, held as a share of the row. */
  gap: 1.9%;
}

.bf-home__grid--models {
  grid-template-columns: repeat(5, 1fr);
  /* 33 px on the reference's 1920 px. */
  gap: 2.1%;
}

@media (max-width: 1280px) {
  .bf-home__grid--tools  { grid-template-columns: repeat(3, 1fr); }
  .bf-home__grid--models { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 860px) {
  .bf-home__grid--tools  { grid-template-columns: repeat(2, 1fr); }
  .bf-home__grid--models { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
  .bf-home__grid--tools,
  .bf-home__grid--models { grid-template-columns: 1fr; }
}


/* ---- a card --------------------------------------------------------- */

/*
 * A card is twice as tall as it is wide, and its button sits at the foot.
 *
 * The reference's tools are 240 x 477 — a ratio of almost exactly one to
 * two — and the models 291 x 475. Cards of the same height across a row
 * mean the buttons line up, which is what makes the row read as a set
 * rather than as six separate things.
 */
.bf-home__card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  min-height: 296px;
  padding: 26px 18px 20px;
  border: 1px solid var(--bf-line);
  border-radius: 16px;
  background: var(--surface-2);
  text-align: center;
  transition: var(--bf-ease-all);
}

.bf-home__card:hover {
  border-color: var(--bf-line-strong);
  background: var(--surface-3);
}

.bf-home__card h3 {
  margin: 0;
  font-size: 15.5px;
  font-weight: 700;
  line-height: 1.7;
  color: var(--bf-text);
}

.bf-home__card p {
  flex: 1;
}

.bf-home__card p {
  margin: 0;
  font-size: var(--bf-size-sm);
  line-height: 1.9;
  color: var(--bf-text-muted);
}

.bf-home__icon {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  margin-bottom: 4px;
  border: 1px solid var(--bf-line);
  border-radius: 16px;
  background: var(--surface-3);
  color: var(--orange-500);
}

.bf-home__icon svg {
  width: 28px;
  height: 28px;
}

/*
 * A model's mark, at one size and with no colour of its own.
 *
 * The reference gives each vendor its brand colour, which reads well as
 * a picture and badly here: six brand colours in a row leave nothing for
 * the accent to mean. The mark is shown as supplied and the tile behind
 * it stays neutral.
 */
.bf-home__logo {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin-bottom: 4px;
}

.bf-home__logo .bf-model-logo {
  width: 64px;
  height: 64px;
  border: 0;
  background: transparent;
}

.bf-home__logo .bf-model-logo img,
.bf-home__logo .bf-model-logo svg {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ---- the button at the foot of a card ------------------------------- */

.bf-home__button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  margin-top: auto;
  padding: 11px 14px;
  border: 1px solid var(--bf-line);
  border-radius: 10px;
  background: var(--surface-3);
  color: var(--bf-text);
  font-size: var(--bf-size-sm);
  font-weight: 600;
  text-decoration: none;
  transition: var(--bf-ease-all);
}

.bf-home__button:hover {
  border-color: var(--orange-600);
  background: rgba(169, 79, 49, .12);
  color: var(--orange-400);
}

/*
 * The reasons sit in one row of four, and their text starts at the top.
 *
 * Left to themselves the four boxes each took their own height, so the
 * headings sat at different levels and the row looked accidental.
 */
.bf-home__grid--reasons {
  /*
   * Four across, as the reference has them.
   *
   * An earlier edit replaced the column count with the alignment alone
   * and left the grid with no columns at all, so the four stacked into a
   * single tall column — right down the middle of an otherwise wide page.
   */
  grid-template-columns: repeat(4, 1fr);
  align-items: start;
}

@media (max-width: 1000px) {
  .bf-home__grid--reasons { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
  .bf-home__grid--reasons { grid-template-columns: 1fr; }
}

.bf-home__card.is-quiet {
  text-align: center;
  align-items: center;
}

.bf-home__card.is-quiet h3 {
  min-height: 2.6em;
  display: flex;
  align-items: center;
}

/*
 * The "why us" cards make no claim on the pointer.
 *
 * They are read, not pressed, so they do not lift on hover — an ordinary
 * paragraph that behaves like a button invites a click that goes nowhere.
 */
/*
 * The reasons are read, not pressed, so they take only the height their
 * own words need. Inheriting the card's minimum left each of them
 * standing in a column of empty space.
 */
.bf-home__card.is-quiet {
  background: transparent;
  border-color: transparent;
  padding: 18px 8px;
  min-height: 0;
}

.bf-home__card.is-quiet:hover {
  background: transparent;
  border-color: transparent;
}

.bf-home__card.is-quiet .bf-home__icon {
  background: transparent;
  border-color: var(--bf-line);
}

/* ---- the link out of a card ----------------------------------------- */

.bf-home__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  padding-top: 6px;
  color: var(--orange-500);
  font-size: var(--bf-size-sm);
  font-weight: 600;
  text-decoration: none;
}

.bf-home__link:hover {
  color: var(--orange-400);
}

/* ---- a model, named and marked -------------------------------------- */

.bf-home__model {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 22px 14px;
  border: 1px solid var(--bf-line);
  border-radius: var(--bf-radius-md);
  background: var(--surface-2);
  text-align: center;
  transition: var(--bf-ease-all);
}

.bf-home__model:hover {
  border-color: var(--bf-line-strong);
  background: var(--surface-3);
}

.bf-home__model .bf-model-logo {
  width: 46px;
  height: 46px;
}

.bf-home__model h3 {
  margin: 0;
  font-size: var(--bf-size-base);
  font-weight: 600;
  color: var(--bf-text);
}

.bf-home__vendor {
  margin: 0;
  font-size: var(--bf-size-sm);
  color: var(--bf-text-dim);
}

/* ---- the way out of a section --------------------------------------- */

.bf-home__more {
  margin: 30px 0 0;
  text-align: center;
}

.bf-home__more a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--bf-text-muted);
  font-size: var(--bf-size-base);
  text-decoration: none;
  transition: var(--bf-ease-all);
}

.bf-home__more a:hover {
  color: var(--orange-500);
}

@media (max-width: 640px) {
  .bf-home__hero { padding: 56px 0 44px; }
  .bf-home__section { padding: 40px 0; }
  .bf-home__cta { width: 100%; justify-content: center; }
}

/* =====================================================================
 * The site footer
 *
 * On the reading pages only. The workspaces have a rail, and a column of
 * links under a chat window is somewhere to go instead of the thing the
 * reader came to do.
 * ================================================================== */

.bf-foot {
  margin-top: 70px;
  border-top: 1px solid var(--bf-line);
  background: var(--surface-1);
}

.bf-foot__inner {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 40px;
  width: min(1600px, 83%);
  margin-inline: auto;
  padding: 46px 0 34px;
}

.bf-foot__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  color: var(--bf-text);
  font-size: 18px;
  font-weight: 700;
  text-decoration: none;
}

.bf-foot__brand span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  color: var(--orange-500);
}

.bf-foot__brand svg {
  width: 26px;
  height: 26px;
}

.bf-foot__about p {
  margin: 0;
  max-width: 380px;
  font-size: var(--bf-size-sm);
  line-height: 2;
  color: var(--bf-text-muted);
}

.bf-foot__col h3 {
  margin: 0 0 14px;
  font-size: var(--bf-size-base);
  font-weight: 700;
  color: var(--bf-text);
}

.bf-foot__col ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.bf-foot__col li + li {
  margin-top: 10px;
}

.bf-foot__col a {
  color: var(--bf-text-muted);
  font-size: var(--bf-size-sm);
  text-decoration: none;
  transition: var(--bf-ease-all);
}

.bf-foot__col a:hover {
  color: var(--orange-400);
}

.bf-foot__base {
  border-top: 1px solid var(--bf-line);
}

.bf-foot__base p {
  width: min(1600px, 83%);
  margin: 0 auto;
  padding: 20px 0;
  font-size: var(--bf-size-sm);
  color: var(--bf-text-dim);
  text-align: center;
}

@media (max-width: 800px) {
  .bf-foot__inner { grid-template-columns: 1fr; gap: 30px; }
}

/* ---- an ordinary page or post --------------------------------------- */

.bf-page {
  padding: 56px 0 20px;
}

.bf-page .bf-container {
  width: min(820px, 88%);
  margin-inline: auto;
}

.bf-page__body h1 {
  margin: 0 0 24px;
  font-size: clamp(26px, 3.4vw, 38px);
  font-weight: 800;
  line-height: 1.4;
  color: var(--bf-text);
}

.bf-page__body {
  font-size: var(--bf-size-base);
  line-height: 2.1;
  color: var(--bf-text-muted);
}

.bf-page__body h2,
.bf-page__body h3 {
  margin: 34px 0 12px;
  color: var(--bf-text);
  line-height: 1.6;
}

.bf-page__body a {
  color: var(--orange-400);
}

.bf-page__body img {
  max-width: 100%;
  height: auto;
  border-radius: var(--bf-radius-md);
}
