/* Contacts screens: the animated backdrop slot, and the surfaces sitting over it.

   The host is an opaque layer that fades in over the static gradient once an
   effect has a context, so the swap is a crossfade rather than a cut. The
   `.section` keeps its `background-image` on purpose: it is the fallback that
   stays visible on phones, under `prefers-reduced-motion`, and on devices the
   effect cannot run on, where the script never adds `.has-contact-backdrop`.

   Whichever effect script the page loads drives this same element, so swapping
   concepts is a one-line change in `contacts.njk`. */

.contact-backdrop {
  z-index: 0;
  pointer-events: none;
  touch-action: none;
  opacity: 0;
  background-color: var(--blue-dark);
  transition: opacity .8s ease;
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  overflow: hidden;
}

.has-contact-backdrop .contact-backdrop {
  opacity: 1;
}

.contact-backdrop canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* Review cards. The base rule in halo-lab.css paints an opaque
   #13132b -> #1a1a33 gradient, which reads as a flat panel now that there is a
   moving backdrop behind it. Same two stops at 80% so the veil tints the card
   as it drifts past; only the background is translucent, so the logo, quote,
   and author stay at full strength. */

.contact-reviews__card {
  background-image: linear-gradient(270deg, rgba(19, 19, 43, .8) 23%, rgba(26, 26, 51, .8));
}

/* Review card author. Name and role both inherit .875rem from
   `.contact-reviews__author-text-wrap`, so the role carries the same weight as
   the name it belongs to. An em rather than a rem keeps the step proportional at
   the smaller size the wrap switches to below 991px. */

.contact-reviews__author-text-wrap .opacity-60 {
  font-size: .9em;
}

/* FAQ close button. The shared component ships with `transition: all .4s`, an
   icon already lifted to `z-index: 2`, and a `:hover` that only resets an
   opacity it never lowered — the slot for a backdrop was there and nothing
   filled it, so the control gave no feedback at all. On hover a tinted disc
   scales up behind the glyph and the glyph turns a quarter turn. Scoped to
   `.contact-faq` so the video and image modals keep their own close button. */

.contact-faq .button-close {
  border-radius: 50%;
}

.contact-faq .button-close:before {
  content: "";
  background-color: var(--blue-dark-10);
  border-radius: 50%;
  opacity: 0;
  transition: transform .4s cubic-bezier(.14, 0, 0, 1.01), opacity .3s ease;
  position: absolute;
  inset: -.375rem;
  transform: scale(.4);
}

.contact-faq .button-close__icon {
  transition: transform .4s cubic-bezier(.14, 0, 0, 1.01);
}

.contact-faq .button-close:hover:before {
  opacity: 1;
  transform: scale(1);
}

.contact-faq .button-close:hover .button-close__icon {
  transform: rotate(90deg);
}

@media (prefers-reduced-motion: reduce) {
  /* Keep the disc as the hover cue, drop the travel. */

  .contact-faq .button-close:before {
    transition: opacity .3s ease;
    transform: none;
  }

  .contact-faq .button-close__icon,
  .contact-faq .button-close:hover .button-close__icon {
    transition: none;
    transform: none;
  }
}

/* One-page form. These rules stay on /contacts so the booking modal and the
   site's other forms retain their existing layout and behavior. */
.section.mod--new-contact:not(.is--success) .contact-container {
  align-items: flex-start;
  margin-top: .5rem;
}

.section.mod--new-contact:not(.is--success) .contact-steps {
  width: 38.375rem;
  min-height: 40.875rem;
  padding: 2rem 2.5rem;
}

.contact-form__fields {
  flex: 1;
  gap: 0;
}

.contact-form__fields .heading-5.mod--contact {
  font-size: 2.5rem;
  line-height: 1.3;
  letter-spacing: -.02em;
  white-space: nowrap;
  margin-bottom: 1.75rem;
}

.contact-form__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 1.5rem;
  row-gap: 1.5rem;
  margin-bottom: 2rem;
}

.contact-form__field {
  display: block;
  min-width: 0;
}

.contact-form__field .input-wrap,
.contact-form__field .iti {
  width: 100%;
}

.contact-form__field .input {
  height: 3.75rem;
}

.form__field.mod--textarea-contact.contact-form__project {
  grid-column: 1 / -1;
  flex: 0 0 auto;
  justify-content: flex-start;
  row-gap: 1rem;
  margin-top: .75rem;
}

.contact-form__project .form__label {
  position: static;
  transform: none;
  font-size: .875rem;
  line-height: 1.15;
  margin: 0;
  padding: 0;
}

.contact-form__project .input-wrap.flex-grow {
  display: block;
  flex: 0 0 auto;
  height: 7.5rem;
}

.contact-form__project .input.is--textarea-contact {
  height: 100%;
  min-height: 100%;
  max-height: 100%;
  padding: 1rem;
  font-size: .875rem;
}

.contact-form__project .input.is--textarea-contact::placeholder {
  color: var(--blue-dark-50);
  opacity: 1;
}

.contact-form__budget {
  grid-column: 1;
  display: block;
  margin-top: 0;
}

.contact-form__budget .input {
  height: 3.75rem;
}

.contact-form__budget .input-wrap,
.contact-form__budget .form-dropdown {
  width: 100%;
}

.contact-form__budget .form-dropdown__content {
  min-width: 100%;
}

@media screen and (min-width: 992px) {
  .contact-form__budget .form-dropdown__content {
    box-shadow: 0 .5rem 1.875rem rgba(16,20,10, .08);
  }

  .contact-form__budget .form-dropdown__list {
    padding-top: .1875rem;
    padding-bottom: .1875rem;
  }

  .contact-form__budget .form-dropdown__list-item {
    height: 2.375rem;
    min-height: 2.375rem;
    padding: 0 1rem;
    font-size: .875rem;
    line-height: 1.6;
  }
}

.contact-form__submit {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 1.5rem;
  margin-top: auto;
}

.contact-form__submit .trunslite-wrap {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  align-items: stretch;
}

.contact-form__submit .form-submit-wrap {
  flex: none;
}

.contact-form__submit .contact-form__policy {
  flex: 1;
  font-size: .75rem;
  line-height: 1.6;
  margin: 0;
}

.section.mod--new-contact:not(.is--success) .contact-faq {
  width: 36.875rem;
  padding: 2.5rem 1.75rem;
}

.section.mod--new-contact:not(.is--success) .contact-faq__list {
  gap: 1rem;
}

@media screen and (max-width: 991px) {
  .section.mod--new-contact:not(.is--success) {
    row-gap: 0;
  }

  .section.mod--new-contact:not(.is--success) .contact-container {
    width: 100%;
    align-items: stretch;
    margin-top: 4.25rem;
    padding-top: 0;
  }

  .section.mod--new-contact:not(.is--success) .contact-steps,
  .section.mod--new-contact:not(.is--success) .contact-faq,
  .section.mod--new-contact:not(.is--success) .contact-footer.mod--advant.is--mob {
    width: 100%;
    max-width: 44rem;
    margin-left: auto;
    margin-right: auto;
  }

  .section.mod--new-contact:not(.is--success) .contact-steps {
    min-height: 33rem;
    padding: 1.5rem 2rem 2rem;
  }

  .contact-form__fields .heading-5.mod--contact {
    font-size: 1.75rem;
    letter-spacing: -.02em;
    margin-bottom: 1rem;
  }

  .contact-form__grid {
    row-gap: 2rem;
    margin-bottom: 0;
  }

  .contact-form__field .input {
    height: 3rem;
  }

  .form__field.mod--textarea-contact.contact-form__project {
    margin-top: 0;
  }

  .contact-form__project .input-wrap.flex-grow {
    height: 6rem;
  }

  .contact-form__project .input.is--textarea-contact::placeholder {
    color: var(--blue-dark-30);
  }

  .contact-form__budget {
    margin-top: .25rem;
  }

  .contact-form__submit {
    gap: 1.5rem;
  }

  .section.mod--new-contact:not(.is--success) .contact-footer.mod--advant:not(.is--mob) {
    display: none;
  }

  .section.mod--new-contact:not(.is--success) .contact-footer.mod--advant.is--mob {
    display: flex;
    flex-flow: row wrap;
    column-gap: 2rem;
    row-gap: 1rem;
    justify-content: flex-start;
    align-items: flex-start;
    position: relative;
    inset: auto;
    margin-top: 2rem;
  }

  .contact-footer.mod--advant.is--mob .contact-footer__list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 1.5rem;
    row-gap: 1rem;
    width: 100%;
  }

  .section.mod--new-contact:not(.is--success) .contact-faq {
    position: relative;
    inset: auto;
    transform: none;
    margin-top: 1rem;
    padding: 1.5rem 2rem;
  }

  .section.mod--new-contact:not(.is--success) .contact-faq.anim {
    display: none;
  }

  .section.mod--new-contact:not(.is--success) .contact-reviews {
    flex: none;
  }

  .section.mod--new-contact:not(.is--success) [data-anim-faq="reviews"].anim {
    opacity: 1;
  }
}

@media screen and (max-width: 479px) {
  .section.mod--new-contact:not(.is--success) {
    padding-top: 0;
  }

  .section.mod--new-contact:not(.is--success) .contact-container {
    margin-top: 0;
    padding-top: 4.5rem;
  }

  .section.mod--new-contact:not(.is--success) .contact-steps,
  .section.mod--new-contact:not(.is--success) .contact-faq {
    width: calc(100% + 2rem);
    max-width: none;
    margin-left: -1rem;
    margin-right: -1rem;
  }

  .section.mod--new-contact:not(.is--success) .contact-steps {
    min-height: 43.25rem;
    padding: 1rem;
  }

  .contact-form__fields .heading-5.mod--contact {
    font-size: 1.5rem;
    line-height: 1.1;
    white-space: normal;
    max-width: 14rem;
    margin-bottom: 0;
  }

  .contact-form__grid {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 1.5rem;
  }

  .contact-form__field .input {
    height: 2.8125rem;
  }

  .form__field.mod--textarea-contact.contact-form__project {
    grid-column: 1;
    row-gap: .5625rem;
  }

  .contact-form__project .form__label {
    font-size: .625rem;
  }

  .contact-form__project .input-wrap.flex-grow {
    height: 8.375rem;
  }

  .contact-form__project .input.is--textarea-contact {
    padding: .75rem;
  }

  .contact-form__project .input.is--textarea-contact::placeholder {
    color: var(--blue-dark-50);
  }

  .contact-form__budget {
    margin-top: 0;
  }

  .contact-form__budget .form-dropdown__toggle {
    height: 2.8125rem;
  }

  .contact-form__budget .form__label {
    padding: 0;
    color: var(--blue-dark-60);
    font-size: .75rem;
    line-height: 1.2;
  }

  .contact-form__submit {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
    margin-top: 0;
  }

  .contact-form__submit .form-submit-wrap,
  .contact-form__submit .button {
    width: 100%;
  }

  .contact-form__submit .contact-form__policy {
    font-size: .625rem;
  }

  .section.mod--new-contact:not(.is--success) .contact-footer.mod--advant.is--mob {
    margin-top: 1.5rem;
    row-gap: 1.5rem;
  }

  .contact-footer.mod--advant.is--mob .contact-footer__list {
    display: flex;
    flex-direction: column;
    row-gap: .75rem;
  }

  .contact-footer.mod--advant.is--mob .contact-footer__list-item {
    background-size: .75rem;
    padding-left: 1.125rem;
    font-size: .625rem;
    line-height: 1.2;
  }

  .contact-footer.mod--advant.is--mob .contact-footer__question,
  .contact-footer.mod--advant.is--mob .contact-footer__question .text-size-14 {
    font-size: .625rem;
    line-height: 1.4;
  }

  .contact-reviews__card {
    width: 15rem;
    padding: .75rem 1rem 1rem;
  }

  .contact-reviews__bottom {
    margin-top: 1rem;
  }

  .section.mod--new-contact:not(.is--success) .contact-faq {
    margin-top: .5rem;
    padding: 1.5rem 1rem;
  }

  .section.mod--new-contact:not(.is--success) .contact-faq__list {
    gap: .75rem;
  }

  .section.mod--new-contact:not(.is--success) .contact-faq__list-item {
    row-gap: .5rem;
  }

  .section.mod--new-contact:not(.is--success) .contact-faq__title {
    padding-right: 0;
    letter-spacing: -.01em;
  }

  .section.mod--new-contact:not(.is--success) .contact-faq__list-item p {
    font-size: .75rem;
    line-height: 1.6;
  }
}
