/* The questions people ask before they write, and then the way to write.
   The contact band is the darkest thing on the page and the last: the rosette
   that sat behind the hero comes back here in gold. */

.faq-section {
  padding: var(--section) 0;
}

.faq {
  border-top: 1px solid var(--line);
}

.faq details {
  border-bottom: 1px solid var(--line);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-5);
  padding: var(--s-5) 0;
  font-size: var(--text-md);
  font-weight: 600;
  line-height: 1.3;
  list-style: none;
  cursor: pointer;
}

.faq summary::-webkit-details-marker {
  display: none;
}

/* A plus drawn from two strokes; opening the answer turns it into a cross. */
.faq summary::after {
  content: "";
  flex: none;
  width: 0.875rem;
  height: 0.875rem;
  background:
    linear-gradient(currentColor, currentColor) center / 100% 2px no-repeat,
    linear-gradient(currentColor, currentColor) center / 2px 100% no-repeat;
  transition: transform var(--dur-move) var(--ease-out);
}

.faq details[open] summary::after {
  transform: rotate(45deg);
}

/* An answer belongs to its question more than to the line under it. */
.faq details[open] summary {
  padding-bottom: var(--s-3);
}

.faq details p {
  max-width: 36rem;
  padding-bottom: var(--s-5);
  color: var(--muted);
}

/* An answer opening is the one place a height is animated: there is no other
   way to push the next question down. Browsers that cannot do it open at once. */
@supports (interpolate-size: allow-keywords) {
  .faq {
    interpolate-size: allow-keywords;
  }

  .faq details::details-content {
    block-size: 0;
    overflow: clip;
    transition: block-size var(--dur-move) var(--ease-out), content-visibility var(--dur-move) allow-discrete;
  }

  .faq details[open]::details-content {
    block-size: auto;
  }
}

/* Contact */

.contact-section {
  position: relative;
  overflow: hidden;
  overflow: clip;
  padding: var(--section) 0;
  background: var(--forest-deep);
  color: var(--on-dark);
}

.contact-section :focus-visible {
  outline-color: var(--gold);
}

.contact-section::before {
  content: "";
  position: absolute;
  right: -17rem;
  bottom: -23rem;
  width: 46rem;
  height: 46rem;
  background: var(--gold);
  opacity: 0.3;
  -webkit-mask: url(/guilloche.svg) center / contain no-repeat;
  mask: url(/guilloche.svg) center / contain no-repeat;
  pointer-events: none;
}

.contact-section .wrap {
  position: relative;
}

.contact-lede {
  margin-top: var(--s-5);
  color: var(--on-dark-muted);
  font-size: var(--text-md);
}

.contact-ways {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s-5);
}

/* Each way is a column whose button sits at its foot, so the two buttons
   line up whatever the sentences above them come to. */
.way {
  display: flex;
  flex-direction: column;
  padding-top: var(--s-4);
  border-top: 1px solid var(--on-dark-rule);
}

.way h3 {
  font-size: var(--text-lg);
}

.way p {
  margin: var(--s-2) 0 var(--s-5);
  color: var(--on-dark-muted);
  font-size: var(--text-sm);
}

.way .btn {
  margin-top: auto;
}

.contact-direct {
  display: grid;
  gap: var(--s-3);
  margin-top: var(--s-7);
}

.contact-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-2) var(--s-3);
}

.contact-email {
  font-size: var(--text-lg);
  font-weight: 600;
  letter-spacing: -0.015em;
  text-decoration-color: var(--on-dark-muted);
  overflow-wrap: anywhere;
  transition: text-decoration-color var(--dur-fast) ease;
}

.copy {
  min-height: 2rem;
  padding: var(--s-1) var(--s-3);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--r-pill);
  background: transparent;
  font-size: var(--text-xs);
  cursor: pointer;
  transition: background var(--dur-fast) ease, transform var(--dur-press) var(--ease-out);
}

.copy:active {
  transform: scale(0.97);
}

.copy-status {
  color: var(--sprout);
  font-size: var(--text-xs);
}

.contact-direct address {
  color: var(--on-dark-muted);
  font-size: var(--text-sm);
  font-style: normal;
}

@media (hover: hover) and (pointer: fine) {
  .contact-email:hover {
    text-decoration-color: var(--gold);
  }

  .copy:hover {
    background: rgba(255, 255, 255, 0.1);
  }
}

@media (max-width: 34rem) {
  .contact-ways {
    grid-template-columns: minmax(0, 1fr);
  }

  .contact-section::before {
    right: -22rem;
    bottom: -24rem;
  }
}

@media (pointer: coarse) {
  .copy {
    min-height: 2.75rem;
    padding-inline: var(--s-4);
  }

  .contact-email {
    padding-block: var(--s-2);
  }
}
