/* Solution landing pages: the FAQ and cross-link blocks. Everything else on
   these pages reuses case.css and services.css. */

#solution-story,
#solution-modules {
  padding: var(--section-padding);
}

#solution-story .case-part-head,
#solution-modules .services-header {
  margin-bottom: 56px;
}

/* ── FAQ ──────────────────────────────────────────────────────────────
   <details> rather than JS: the answers are in the DOM for a crawler
   whether or not the item is open, and it survives JS failing to load. */

#solution-faq {
  padding: var(--section-padding);
  border-top: 1px solid var(--grey-2);
}

.faq-inner {
  max-width: 820px;
  margin: 0 auto;
}

.faq-inner .section-heading {
  margin-bottom: 48px;
}

.faq-list {
  display: flex;
  flex-direction: column;
}

.faq-item {
  border-top: 1px solid var(--grey-2);
}

.faq-item:last-child {
  border-bottom: 1px solid var(--grey-2);
}

.faq-q {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 0;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 15px;
  line-height: 1.5;
  color: var(--white);
  list-style: none;
  transition: color var(--transition-base);
}

/* Both, because Safari still uses the WebKit pseudo-element. */
.faq-q::-webkit-details-marker {
  display: none;
}

.faq-q::marker {
  content: '';
}

.faq-q:hover {
  color: var(--grey-4);
}

/* Drawn rather than a glyph so the crossbar rotation is exact. */
.faq-marker {
  position: relative;
  flex-shrink: 0;
  width: 12px;
  height: 12px;
  margin-top: 5px;
}

.faq-marker::before,
.faq-marker::after {
  content: '';
  position: absolute;
  background: var(--grey-3);
  transition: transform var(--dur-menu) var(--ease-out);
}

.faq-marker::before {
  top: 5px;
  left: 0;
  width: 12px;
  height: 2px;
}

.faq-marker::after {
  top: 0;
  left: 5px;
  width: 2px;
  height: 12px;
}

.faq-item[open] .faq-marker::after {
  transform: rotate(90deg);
}

.faq-a {
  padding: 0 44px 28px 0;
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.75;
  color: var(--grey-4);
}

@media (prefers-reduced-motion: reduce) {
  .faq-marker::before,
  .faq-marker::after {
    transition: none;
  }
}

/* ── Related solutions ────────────────────────────────────────────────
   Each solution page links to the other three, so none of them is more
   than one hop from any other. */

#solution-related {
  padding: var(--section-padding-sm);
  border-top: 1px solid var(--grey-2);
}

.related-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.related-inner .section-label {
  margin-bottom: 28px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1px;
  background: var(--grey-2);
  border: 1px solid var(--grey-2);
}

.related-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 28px 24px;
  background: var(--black);
  text-decoration: none;
  transition: background var(--transition-base);
}

.related-card:hover {
  background: var(--grey-1);
}

.related-name {
  font-family: var(--font-display);
  font-size: 19px;
  line-height: 1.2;
  color: var(--white);
}

.related-arrow {
  flex-shrink: 0;
  font-size: 16px;
  color: var(--grey-3);
  transition: transform var(--transition-base);
}

.related-card:hover .related-arrow {
  transform: translateX(4px);
}

@media (prefers-reduced-motion: reduce) {
  .related-card:hover .related-arrow {
    transform: none;
  }
}

/* The solution hero leads with a label rather than a client logo, so it
   needs the top spacing case-id would otherwise have provided. */
#case-hero .section-label {
  margin-bottom: 20px;
}
