/* ===== wb-pains: the home page's four problems, one level deeper. Four columns stand on the dark ground,
   each a problem, its deeper line and the kinds of work it bites hardest; under them one lit band runs edge
   to edge, and each problem's answer lands in it, straight below its problem. The small mark beside "Bites
   hardest" is the hero's ground in miniature (three kinds level, three climbing), its bitten treads lit.
   Still: only hover and focus answer the visitor. ===== */
.wb-pains { padding-block: var(--section-gap-s) 0; }
.wb-pains__head { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); column-gap: var(--gap-columns); align-items: end; margin-bottom: var(--space-2xl); }
.wb-pains__line { max-width: 36ch; font-size: var(--text-lead); line-height: 1.45; color: var(--color-ink-2); padding-bottom: 0.2em; }

.wb-pains__list {
  position: relative; isolation: isolate;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: repeat(4, auto);
  column-gap: var(--gap-columns); margin: 0; padding: 0; list-style: none;
}
/* the lit band: the row the answers stand in, edge to edge */
.wb-pains__list::before {
  content: ""; grid-row: 4; grid-column: 1 / -1; z-index: -1;
  margin-inline: calc(-1 * var(--gutter));
  border-top: 1px solid var(--color-rule-2);
  background:
    radial-gradient(55% 140% at 82% 100%, color-mix(in oklab, var(--color-dawn-2) 20%, transparent), transparent 70%),
    radial-gradient(40% 90% at 20% 100%, color-mix(in oklab, var(--color-dawn) 9%, transparent), transparent 70%),
    linear-gradient(to bottom, var(--color-paper-3), var(--color-paper-2) 60%);
}
/* each problem is four rows of one shared grid, so titles, lines, kinds and answers each start on one line */
.wb-pains__item { grid-row: 1 / span 4; display: grid; grid-template-rows: subgrid; min-width: 0; }
.wb-pains__item:nth-child(1) { grid-column: 1; }
.wb-pains__item:nth-child(2) { grid-column: 2; }
.wb-pains__item:nth-child(3) { grid-column: 3; }
.wb-pains__item:nth-child(4) { grid-column: 4; }
.wb-pains__problem { grid-row: 1 / span 3; display: grid; grid-template-rows: subgrid; align-content: start; padding-bottom: var(--space-xl); }
.wb-pains__here { grid-row: 4; }
.wb-pains__title { font-size: var(--text-title); line-height: 1.2; }
.wb-pains__deep { margin-top: var(--space-sm); max-width: 34ch; color: var(--color-ink-2); }
.wb-pains__bites { display: grid; justify-items: start; align-content: start; margin-top: var(--space-lg); }
.wb-pains__label { font-size: var(--text-sm); font-weight: 500; color: var(--color-muted); }

/* the mark: six small blocks, three level and three climbing like the hero's plinths; the bitten ones solid and lit */
.wb-pains__mark { width: 100%; max-width: 233px; height: auto; margin-top: var(--space-sm); overflow: visible; }
.wb-pains__blk rect { fill: none; stroke: var(--color-rule-2); stroke-width: 1; transition: fill var(--dur-short) var(--ease-out); }
.wb-pains__blk path { fill: none; stroke: none; stroke-width: 3; }
.wb-pains__blk.is-lit rect { fill: color-mix(in oklab, var(--color-accent-2) 45%, var(--color-paper-3)); stroke: none; }
.wb-pains__blk.is-lit path { fill: color-mix(in oklab, var(--color-dawn) 55%, var(--color-paper-3)); }

.wb-pains__kinds { grid-column: 1 / -1; display: grid; justify-items: start; margin: var(--space-2xs) 0 0; padding: 0; list-style: none; }
.wb-pains__kind {
  display: inline-flex; align-items: center; min-height: 44px; color: var(--color-ink);
  text-decoration: underline; text-decoration-color: var(--color-rule-2); text-decoration-thickness: 1px; text-underline-offset: 0.22em;
  transition: text-decoration-color var(--dur-short) var(--ease-out);
}
.wb-pains__kind:hover { text-decoration-color: var(--color-ink); }
.wb-pains__kind:active { color: var(--color-ink-2); }
.wb-pains__kind:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
/* pointing at a kind lights its tread in the mark */
.wb-pains__bites:has([data-k="tools"]:is(:hover, :focus-visible)) .wb-pains__blk[data-k="tools"] rect,
.wb-pains__bites:has([data-k="product"]:is(:hover, :focus-visible)) .wb-pains__blk[data-k="product"] rect,
.wb-pains__bites:has([data-k="industry"]:is(:hover, :focus-visible)) .wb-pains__blk[data-k="industry"] rect,
.wb-pains__bites:has([data-k="tests"]:is(:hover, :focus-visible)) .wb-pains__blk[data-k="tests"] rect,
.wb-pains__bites:has([data-k="features"]:is(:hover, :focus-visible)) .wb-pains__blk[data-k="features"] rect,
.wb-pains__bites:has([data-k="legacy"]:is(:hover, :focus-visible)) .wb-pains__blk[data-k="legacy"] rect { fill: color-mix(in oklab, var(--color-dawn) 55%, var(--color-paper-3)); }

/* the answer: the payoff, set a step up in the lit band */
.wb-pains__here { position: relative; display: grid; align-content: start; gap: var(--space-sm); padding-block: var(--space-xl) var(--space-2xl); }
/* who the answer belongs to: a short top edge, gold where a person approves, azure where agents do the work */
.wb-pains__here::before { content: ""; position: absolute; top: -1px; left: 0; width: var(--space-2xl); height: 3px; background: var(--wb-p-who); }
.wb-pains__here--gold { --wb-p-who: var(--color-gold); }
.wb-pains__here--azure { --wb-p-who: var(--color-accent); }
.wb-pains__here .wb-pains__label { color: var(--color-ink-2); }
.wb-pains__answer { font-size: var(--text-lead); line-height: 1.4; color: var(--color-ink); text-wrap: pretty; }

/* ===== two by two under 72rem, one column on phones: each answer stays with its problem ===== */
@media (max-width: 72rem) {
  .wb-pains { padding-bottom: var(--section-gap-s); }
  .wb-pains__list { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: none; row-gap: var(--space-2xl); }
  .wb-pains__list::before { content: none; }
  .wb-pains__item, .wb-pains__item:nth-child(n) { grid-row: auto; grid-column: auto; grid-template-rows: auto 1fr; }
  .wb-pains__problem { grid-row: auto; grid-template-rows: none; padding-bottom: var(--space-lg); }
  .wb-pains__here { grid-row: auto; }
  .wb-pains__here {
    padding: var(--space-lg); border-top: 1px solid var(--color-rule-2);
    background: linear-gradient(to bottom, var(--color-paper-3), var(--color-paper-2) 50%);
  }
}
@media (max-width: 60rem) {
  .wb-pains__head { grid-template-columns: minmax(0, 1fr); row-gap: var(--space-md); margin-bottom: var(--space-xl); }
}
@media (max-width: 40rem) {
  .wb-pains__list { grid-template-columns: minmax(0, 1fr); row-gap: var(--space-xl); }
  .wb-pains__here { padding: var(--space-md); }
}
@media (prefers-reduced-motion: reduce) { .wb-pains__blk rect, .wb-pains__kind { transition: none; } }
