/* 60 FAQ. Sand ground. Heading and call button on the left, five questions on the right,
   each in its own white box. One answer open at a time (js/60-faq.js). */
.faq { background: var(--sand); }

.faq-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  column-gap: clamp(48px, 7vw, 128px);
  align-items: start;
}

/* Left column */
.faq-side {
  position: sticky;
  top: calc(var(--header-h) + 36px);
}
.faq-title { max-width: 11ch; }
.faq-lead { margin-top: 24px; max-width: 34ch; text-wrap: pretty; }
.faq-call { margin-top: 36px; }
.faq-call svg { width: 18px; height: 18px; }

/* Question boxes */
.faq-list { display: grid; gap: 10px; }
.faq-item {
  background: var(--paper);
  border-radius: var(--r-card);
  box-shadow: 0 1px 2px #3A322E0A;
}
.faq-h { font: inherit; letter-spacing: normal; line-height: inherit; }
.faq-q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
  padding: clamp(22px, 2vw, 28px) clamp(22px, 2.4vw, 32px);
  border-radius: var(--r-card);
  text-align: left;
  color: var(--cocoa);
}
.faq-q:focus-visible { outline-offset: -2px; border-radius: var(--r-card); }
.faq-q-text {
  font-family: var(--f-display);
  font-size: calc(clamp(21px, 1.9vw, 27px) * var(--display-scale));
  line-height: 1.22;
  text-wrap: balance;
}

/* Thin plus that turns into a minus */
.faq-icon { display: grid; place-items: center; flex: none; width: 24px; height: 24px; color: var(--cocoa); }
.faq-icon svg { width: 20px; height: 20px; overflow: visible; }
.faq-icon-v { transform-box: view-box; transform-origin: 12px 12px; transform: rotate(90deg); }
.faq-list.is-anim .faq-icon-v { transition: transform .45s var(--ease); }
.faq-list.is-ready .faq-item:not(.is-open) .faq-icon-v { transform: none; }

/* Answer */
.faq-a {
  display: grid;
  grid-template-rows: 1fr;
  color: var(--mute);
  font-size: clamp(15.5px, 1.15vw, 17px);
  line-height: 1.7;
  margin-top: -10px; /* pulls the answer up under its question when open */
}
.faq-a-inner { min-height: 0; overflow: hidden; }
.faq-a-inner::after { content: ""; display: block; height: clamp(24px, 2.2vw, 30px); }
.faq-a p, .faq-a-inner > .faq-link { margin-inline: clamp(22px, 2.4vw, 32px); }
.faq-a p { max-width: 58ch; padding-right: clamp(0px, 4vw, 48px); text-wrap: pretty; }

.faq-list.is-ready .faq-item:not(.is-open) .faq-a {
  grid-template-rows: 0fr;
  margin-top: 0;
  opacity: 0;
  visibility: hidden;
}
.faq-list.is-anim .faq-a {
  transition: grid-template-rows .5s var(--ease), margin-top .5s var(--ease), opacity .4s var(--ease), visibility 0s linear 0s;
}
.faq-list.is-anim .faq-item:not(.is-open) .faq-a {
  transition: grid-template-rows .45s var(--ease), margin-top .45s var(--ease), opacity .3s var(--ease), visibility 0s linear .45s;
}

.faq-a p a {
  color: var(--cocoa);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--camel-ink) 55%, transparent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: text-decoration-color .25s var(--ease);
}
.faq-a a[href^="tel:"] { white-space: nowrap; }
.faq-a p a:hover { text-decoration-color: var(--cocoa); }
.faq-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  color: var(--cocoa);
  font-weight: 600;
  font-size: 15px;
}
.faq-link svg { width: 16px; height: 16px; transition: transform .3s var(--ease); }
.faq-link:hover svg { transform: translate(2px, -2px); }

/* Tablet and phone: one column, heading above the questions */
@media (max-width: 960px) {
  .faq-grid { grid-template-columns: minmax(0, 1fr); row-gap: 48px; }
  .faq-side {
    position: static;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 40px;
    align-items: end;
  }
  .faq-side .eyebrow { grid-column: 1 / -1; justify-self: start; }
  .faq-title { max-width: 12ch; grid-column: 1; }
  .faq-lead { grid-column: 1; }
  .faq-call { grid-column: 2; grid-row: 2 / span 2; margin-top: 0; align-self: end; }
}
@media (max-width: 680px) {
  .faq-side { display: block; }
  .faq-grid { row-gap: 40px; }
  .faq-call { margin-top: 28px; }
}
@media (max-width: 480px) {
  .faq-q { gap: 16px; padding: 20px; }
  .faq-a p, .faq-a-inner > .faq-link { margin-inline: 20px; }
  .faq-a p { padding-right: 0; }
  .faq-a-inner::after { height: 22px; }
}
@media (max-width: 360px) {
  .faq-call { width: 100%; }
}
