/* Homepage Capabilities (see partials/capabilities-home.php) */
.cx { padding: 5.5rem 3.5rem 5.5rem; background: var(--bg); border-top: 1px solid var(--border); }
.cx__inner { max-width: calc(var(--container) - 7rem); margin: 0 auto; }
.cx__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; margin-bottom: 3rem; }
.cx__label { display: block; margin-bottom: 1.1rem; font-family: var(--font-b); font-size: 0.8rem; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase; color: var(--red); }
.cx__title { font-family: var(--font-d); font-weight: 400; line-height: 1.05; letter-spacing: -0.02em; color: var(--text); font-size: clamp(2rem, 3.6vw, 3.6rem); max-width: 22ch; }
.cx__title em { font-style: normal; color: var(--red); }

/* two columns: a large illustration that sticks at the top, and the services that scroll up beside it */
.cx__layout { --row-h: min(58vh, 27rem); display: grid; grid-template-columns: var(--row-h) minmax(0, 1fr); gap: clamp(3rem, 6vw, 6rem); align-items: stretch; }
.cx__rail { position: relative; pointer-events: none; }
.cx__stage {
  position: sticky; top: 7rem;
  width: 100%; aspect-ratio: 1; border-radius: 50%; background: var(--red); overflow: hidden;
}
.cx__art {
  position: absolute; left: 12%; top: 12%; width: 76%; height: 76%; object-fit: cover;
  opacity: 0; transform: scale(0.9) rotate(-8deg);
  transition: opacity 0.55s var(--ease-out), transform 0.9s var(--ease-out);
}
.cx__art.is-on { opacity: 1; transform: none; }

/* rows: name, line, services and a recent-work link. Each row is tall enough to hold the screen for a moment while its illustration is showing. */
.cx__row {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr); align-items: center;
  min-height: var(--row-h); padding: 2.25rem 0;
}
.cx__row::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--border); transform-origin: left; transform: scaleX(var(--line, 1)); }
.cx__disc { display: none; }   /* small per-row disc, phones only (the sticky one takes over on desktop) */
.cx__body { max-width: 40rem; }

.cx__name { font-family: var(--font-d); font-weight: 400; letter-spacing: -0.03em; line-height: 1; font-size: clamp(1.8rem, 2.8vw, 2.8rem); color: var(--text); }
.cx__desc { margin-top: 0.9rem; max-width: 34rem; font-family: var(--font-b); font-size: clamp(1rem, 1.2vw, 1.12rem); line-height: 1.55; color: var(--muted); }
/* services: plain text with a small red dot attached to each item, so wrapping never leaves a stray separator */
.cx__tags { list-style: none; display: flex; flex-wrap: wrap; gap: 0.6rem 1.6rem; margin-top: 1.25rem; max-width: 36rem;
  font-family: var(--font-b); font-size: 0.82rem; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text); }
.cx__tags li { white-space: nowrap; }
.cx__tags li::before { content: ""; display: inline-block; width: 5px; height: 5px; margin: 0 0.6rem 0.12em 0; border-radius: 50%; background: var(--red); vertical-align: middle; }

/* one quiet line of proof: links to a real project */
.cx__recent { display: inline-flex; align-items: baseline; gap: 0.4rem; margin-top: 1.75rem; font-family: var(--font-b); font-size: 0.95rem; color: var(--muted); text-decoration: none; }
.cx__recent b { font-weight: 500; color: var(--text); border-bottom: 1px solid currentColor; padding-bottom: 1px; transition: color 0.25s; }
.cx__recent span { color: var(--red); transition: transform 0.35s var(--ease-out); }
.cx__recent:hover b, .cx__recent:focus-visible b { color: var(--red); }
.cx__recent:hover span, .cx__recent:focus-visible span { transform: translateX(4px); }


/* card shape: a rounded square like the work cards instead of the morphing blob */
.cx--card .cx__stage { border-radius: 14px; }
.cx--card .cx__art { left: 8%; top: 8%; width: 84%; height: 84%; }
.cx--card .cx__disc { border-radius: 14px; }
/* desktop: the card sits inside the divider lines, with the same breathing room (the row padding) above and below */
@media (min-width: 961px) {
  .cx--card .cx__layout { grid-template-columns: calc(var(--row-h) - 4.5rem) minmax(0, 1fr); }
  .cx--card .cx__rail { padding-top: 2.25rem; }
}

/* tablet / phone: no sticky disc; each service carries its own small disc instead */
@media (max-width: 960px) {
  .cx { padding: 4.5rem 1.5rem; }
  .cx__head { flex-direction: column; align-items: flex-start; margin-bottom: 2.5rem; }
  .cx__layout { grid-template-columns: 1fr; }
  .cx__rail { display: none; }
  .cx__row { grid-template-columns: 6rem minmax(0, 1fr); gap: 1.5rem 2rem; align-items: start; min-height: 0; padding: 2.5rem 0; }
  .cx__disc { display: block; position: relative; width: 6rem; aspect-ratio: 1; border-radius: 50%; background: var(--red); overflow: hidden; }
  .cx__disc img { position: absolute; left: 13%; top: 13%; width: 74%; height: 74%; object-fit: cover; }
}
@media (max-width: 600px) {
  .cx__row { grid-template-columns: 1fr; }
  .cx__disc { width: 4.5rem; }
}
@media (prefers-reduced-motion: reduce) { .cx__art { transition: none; transform: none; } }
