/**
 * Hello Home — FAQ accordion.
 *
 * <details>/<summary> rather than a JS accordion: open/close, keyboard
 * operation and browser find-in-page all come for free, and the content is
 * still in the DOM for search engines when collapsed.
 *
 * Two columns from auto-fit, matching the comp: the intro sticks while the
 * questions scroll past it.
 */

.hello-faq {
  --hello-pad-x: clamp(20px, 5vw, 80px);
  --hello-pad-y: clamp(72px, 8vw, 128px);
  --hello-width: 1200px;
  background: #f6f6f6;
  color: #0d0d0d;
}

.hello-faq .hello-widget__inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: clamp(40px, 5vw, 80px);
  align-items: start;
  padding-bottom: clamp(120px, 10vw, 160px);
}

/* ---- intro -------------------------------------------------------------- */

.hello-faq__intro {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: sticky;
  top: 40px;
}

.hello-faq__heading {
  margin: 0;
  font-size: clamp(40px, 4.4vw, 64px) !important;
  line-height: 1 !important;
  font-weight: 900 !important;
  letter-spacing: -1.5px;
  text-wrap: balance;
}

.hello-faq__lead {
  margin: 8px 0 0;
  font-size: 17px;
  line-height: 1.55;
  color: #555;
  text-wrap: pretty;
}

/* ---- accordion ---------------------------------------------------------- */

.hello-faq__list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid #e4e4e4;
}

.hello-faq__item {
  border-bottom: 1px solid #e4e4e4;
}

.hello-faq__q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 0;
  cursor: pointer;
  list-style: none; /* Firefox */
  font-size: clamp(18px, 1.5vw, 22px);
  font-weight: 800;
  line-height: 1.3;
}
/* Safari / Chrome draw their own disclosure triangle without this. */
.hello-faq__q::-webkit-details-marker {
  display: none;
}
.hello-faq__q:focus-visible {
  outline: 2px solid var(--hello-accent);
  outline-offset: 4px;
}

.hello-faq__q-text {
  min-width: 0;
}

/* The +/x toggle. Drawn from two bars so it can rotate into a cross. */
.hello-faq__marker {
  position: relative;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #f1f1f1;
  color: #0d0d0d;
  transition: background-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
}
.hello-faq__marker::before,
.hello-faq__marker::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 14px;
  height: 2px;
  background: currentColor;
  transform: translate(-50%, -50%);
  transition: opacity 0.25s ease;
}
.hello-faq__marker::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

.hello-faq__item[open] .hello-faq__marker {
  background: var(--hello-accent);
  color: #fff;
  transform: rotate(135deg);
}

.hello-faq__a {
  margin: 0;
  padding: 0 60px 28px 0;
  font-size: 17px;
  line-height: 1.65;
  color: #444;
  text-wrap: pretty;
}

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

/* ---- mobile -------------------------------------------------------------
 * The intro stops sticking once it is above the list rather than beside it;
 * a sticky header there would sit over the questions as you scroll.
 * ------------------------------------------------------------------------ */

@media (max-width: 767px) {
  .hello-faq__intro {
    position: static;
  }
  .hello-faq .hello-widget__inner {
    padding-bottom: 72px;
  }
  .hello-faq__a {
    padding-right: 0;
  }
}
