/* Scene cards: a masonry of small solution cards, each with its scene on top (mk_scene_card() in
   template-parts/solutions/stage.php). Used on the home page (#toolkit) and the Try for free page.
   Three roomy columns; three scene heights keep the masonry. Phones: one swipe row with dots. */
.mk-hk-grid {
  display: flex;
  align-items: flex-start;
  gap: clamp(24px, 2.6vw, 36px);
}
.mk-hk-col {
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  min-width: 0;
}
/* The V: the two middle columns start lower than the outer two. */
.mk-hk-col:nth-child(2),
.mk-hk-col:nth-child(3) { margin-top: clamp(48px, 6vw, 96px); }
/* Each card: a thin border and a slight shadow around the scene and its words. */
.mk-hk-card {
  display: flex;
  flex-direction: column;
  margin: 0 0 clamp(24px, 2.6vw, 36px);
  padding: 8px 8px 18px;
  border: 1px solid #E4E6EB;
  border-radius: 20px;
  background: #FFFFFF;
  box-shadow: 0 1px 2px rgb(24 32 33 / 0.04), 0 6px 16px -10px rgb(24 32 33 / 0.14);
  transition: border-color 160ms ease, box-shadow 160ms ease;
  color: inherit;
  text-decoration: none;
}
a.mk-hk-card:hover,
a.mk-hk-card:focus-visible {
  color: inherit;
  border-color: #cbf9e7;
  box-shadow: 0 1px 2px rgb(24 32 33 / 0.04), 0 10px 22px -12px rgb(4 120 87 / 0.25);
}

/* The scenes are drawn for the solutions cards; zoom shrinks the whole scene to fit, so nothing crowds. */
.mk-hk-card .lx-sol-stage {
  --hk-h: 150px;
  --hk-z: 0.68;
  display: block;
  zoom: var(--hk-z);
  height: calc(var(--hk-h) / var(--hk-z));
  aspect-ratio: auto;
  padding: 0;
  overflow: hidden;
  border-radius: 13px;
  background: #f1fbf7;
  transition: background 160ms linear;
}
/* Three clearly different heights, so the columns stagger like a real masonry. */
.mk-hk-card--tall .lx-sol-stage { --hk-h: 230px; }
.mk-hk-card--short .lx-sol-stage { --hk-h: 100px; }
a.mk-hk-card:hover .lx-sol-stage { background: #e8faf3; }

.mk-hk-copy {
  display: grid;
  gap: 4px;
  padding: 14px 10px 0;
}
.mk-hk-copy strong {
  font-size: 16px;
  font-weight: 650;
  letter-spacing: -0.01em;
  color: var(--ink, #182021);
}
.mk-hk-copy strong span {
  display: inline-block;
  color: var(--mk-blue, #047857);
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 160ms ease, transform 160ms ease;
}
a.mk-hk-card:hover .mk-hk-copy strong { color: var(--mk-blue, #047857); }
a.mk-hk-card:hover .mk-hk-copy strong span { opacity: 1; transform: none; }
.mk-hk-copy small {
  display: -webkit-box;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.5;
  color: #7A807F;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

/* A quote card: the same tile, with the words where the scene would be. */
.mk-hk-quote {
  display: grid;
  align-content: center;
  gap: 14px;
  min-height: 230px;
  padding: 24px;
  border-radius: 16px;
  background: #f1fbf7;
}
.mk-hk-quote q {
  font-family: var(--font-display, inherit);
  font-size: clamp(1.25rem, 1.8vw, 1.5rem);
  font-weight: 650;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--ink, #182021);
  quotes: "\201C" "\201D";
}
.mk-hk-quote q::before { content: open-quote; color: var(--mk-blue, #047857); }
.mk-hk-quote q::after { content: close-quote; color: var(--mk-blue, #047857); }

.mk-hk-dots { display: none; }

/* Tablets: two columns of two, the right one set lower. */
@media (max-width: 820px) {
  .mk-hk-grid { flex-wrap: wrap; }
  .mk-hk-col { flex: 1 1 calc(50% - 20px); }
  .mk-hk-col:nth-child(2),
  .mk-hk-col:nth-child(3) { margin-top: 0; }
  .mk-hk-col:nth-child(even) { margin-top: 56px; }
}
@media (max-width: 600px) {
  .mk-hk-col,
  .mk-hk-col:nth-child(n) { display: contents; margin: 0; }
  .mk-hk-grid {
    display: grid;
    grid-auto-columns: 82%;
    grid-auto-flow: column;
    gap: 14px;
    /* A slider on phones: every card the same height. */
    align-items: stretch;
    padding: 2px 2px 6px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }
  .mk-hk-grid::-webkit-scrollbar { display: none; }
  .mk-hk-card {
    margin: 0;
    scroll-snap-align: start;
  }
  .mk-hk-card .lx-sol-stage,
  .mk-hk-card--tall .lx-sol-stage,
  .mk-hk-card--short .lx-sol-stage { --hk-h: 180px; --hk-z: 0.76; }
  .mk-hk-quote,
  .mk-hk-card--short .mk-hk-quote { min-height: 180px; padding: 22px; }
  .mk-hk-dots {
    display: flex;
    justify-content: center;
    margin-top: 10px;
  }
  .mk-hk-dots:empty { display: none; }
  .mk-hk-dots button {
    display: grid;
    place-items: center;
    width: 16px;
    height: 24px;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
  }
  .mk-hk-dots button::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: var(--line, #DEDFDB);
    transition: width 0.25s ease, background 0.25s ease;
  }
  .mk-hk-dots button[aria-current="true"] { width: 26px; }
  .mk-hk-dots button[aria-current="true"]::before {
    width: 18px;
    background: var(--mk-blue, #047857);
  }
}
.mk-hk-card--short .mk-hk-quote { min-height: 150px; }

/* "See all solutions" under the wall, the same underlined link as on the home page. */
.mk-hk-foot {
  display: flex;
  justify-content: center;
  margin: 36px 0 0;
}
.mk-hk-foot a {
  padding-bottom: 2px;
  border-bottom: 1px solid var(--ink, #182021);
  color: var(--ink, #182021);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}
.mk-hk-foot a:hover {
  border-color: var(--mk-blue, #047857);
  color: var(--mk-blue, #047857);
}
