/* Contact page */
.contact-page {
  color: #111827;
  background: #ffffff;
}

.contact-container {
  width: calc(100% - (2 * var(--page-gutter)));
  max-width: var(--content-width);
  margin-inline: auto;
}

/* City background hero */
.contact-hero {
  min-height: 650px;
  color: #ffffff;
  background: #000000;
}

.contact-hero::before {
  background: rgba(0, 0, 0, 0.55);
}

.contact-hero__visual {
  position: absolute;
  z-index: 0;
  inset: 0;
  background: #000000 url("/assets/images/city-bg.jpg") center center / cover no-repeat;
}

.contact-hero .service-hero__inner {
  padding-block: calc(var(--header-height) + 4rem) 8rem;
}

.contact-hero .service-hero__eyebrow {
  color: #ffffff;
}

.contact-hero h1 {
  color: #ffffff;
  font-size: clamp(3.2rem, 6vw, 5.75rem);
}

.contact-hero .service-hero__summary {
  color: #ffffff;
}

/* Contact information and quote form */
.contact-main {
  padding-block: clamp(5.5rem, 8vw, 8rem);
  background: #ffffff;
}

.contact-main__layout {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  gap: clamp(3rem, 6vw, 6rem);
  align-items: start;
}

.contact-main__information {
  padding-top: 0.8rem;
}

.contact-main h2,
.contact-process h2 {
  margin: 0;
  color: #071126;
  font-size: clamp(2.5rem, 4.5vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.05;
  text-wrap: balance;
}

.contact-main__information > p {
  margin: 1.45rem 0 0;
  color: #4b5565;
  font-size: clamp(1.04rem, 1.4vw, 1.17rem);
  line-height: 1.72;
}

.contact-phone {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin-top: clamp(2.5rem, 4vw, 3.5rem);
  padding: clamp(1.6rem, 3vw, 2.25rem);
  background: #f3f7fa;
  border: 1px solid transparent;
  box-shadow: 0 14px 34px rgba(7, 17, 38, 0.08);
}

.contact-phone::before {
  position: absolute;
  z-index: 0;
  top: 50%;
  left: 50%;
  width: 165%;
  aspect-ratio: 1;
  background: conic-gradient(
    from 0deg,
    transparent 0deg 292deg,
    rgba(5, 167, 223, 0.18) 306deg,
    #05a7df 326deg,
    #b9f1ff 338deg,
    #05a7df 349deg,
    transparent 360deg
  );
  content: "";
  transform: translate(-50%, -50%) rotate(0deg);
  animation: contact-phone-border-trace 4.5s linear infinite;
}

.contact-phone::after {
  position: absolute;
  z-index: 1;
  inset: 2px;
  background: #f3f7fa;
  content: "";
}

.contact-phone > * {
  position: relative;
  z-index: 2;
}

@keyframes contact-phone-border-trace {
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

.contact-phone h3 {
  margin: 0;
  color: #071126;
  font-size: clamp(1.35rem, 2vw, 1.7rem);
  line-height: 1.2;
}

.contact-phone p {
  margin: 0.7rem 0 0;
  color: #4b5565;
  line-height: 1.55;
}

.contact-phone a {
  display: inline-block;
  margin-top: 1rem;
  color: #075c94;
  font-size: clamp(1.55rem, 3vw, 2rem);
  font-weight: 700;
  line-height: 1.1;
}

.contact-phone a:hover {
  color: #078fbe;
}

.contact-form {
  display: grid;
  position: relative;
  padding: clamp(1.75rem, 4vw, 3rem);
  background: #f6f8fa;
  border: 1px solid rgba(7, 17, 38, 0.1);
  border-top: 5px solid #05a7df;
  border-radius: 8px;
  box-shadow: 0 18px 50px rgba(7, 17, 38, 0.1);
}

.contact-form::after {
  position: absolute;
  inset: -7px;
  border: 2px solid var(--color-blue-400);
  border-radius: 13px;
  content: "";
  opacity: 0;
  pointer-events: none;
}

body.quote-focus-active .contact-form::after {
  animation: quote-form-focus 2.6s ease-out both;
}

.contact-form__intro {
  margin-bottom: 1.6rem;
}

.contact-form__intro h2 {
  font-size: clamp(2rem, 3.5vw, 3rem);
}

.contact-form__intro p {
  margin: 0.85rem 0 0;
  color: #4b5565;
  font-size: 1rem;
  line-height: 1.6;
}

.contact-form__row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.contact-form .form-field {
  gap: 0.45rem;
  margin-bottom: 1rem;
}

.contact-form .form-field label {
  color: #101827;
  font-size: 1rem;
  font-weight: 700;
}

.contact-form__optional {
  margin-left: 0.25rem;
  color: #687386;
  font-size: 0.78rem;
  font-weight: 400;
}

.contact-form .form-field input,
.contact-form .form-field select,
.contact-form .form-field textarea {
  width: 100%;
  color: #101827;
  background: #ffffff;
  border: 1px solid #bdc5d0;
  border-radius: 3px;
  font: inherit;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.contact-form .form-field input,
.contact-form .form-field select {
  height: 50px;
  padding-inline: 0.85rem;
}

.contact-form .form-field textarea {
  min-height: 145px;
  padding: 0.8rem 0.85rem;
  resize: vertical;
}

.contact-form .form-field input:hover,
.contact-form .form-field select:hover,
.contact-form .form-field textarea:hover {
  border-color: #8290a3;
}

.contact-form .form-field input:focus,
.contact-form .form-field select:focus,
.contact-form .form-field textarea:focus {
  border-color: #078fbe;
  outline: 0;
  box-shadow: 0 0 0 3px rgba(5, 167, 223, 0.18);
}

.contact-form__date {
  width: calc(50% - 0.5rem);
}

.contact-address-details {
  min-width: 0;
  max-height: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
  opacity: 0;
  border: 0;
  transform: translateY(-6px);
  transition: max-height 220ms ease, opacity 180ms ease, transform 220ms ease;
}

.contact-address-details.is-expanded {
  max-height: 380px;
  opacity: 1;
  transform: translateY(0);
}

.contact-address-details__legend {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.contact-address-details__row {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(140px, 1fr);
  gap: 1rem;
}

.contact-form .button--submit {
  width: 100%;
  margin-top: 0.35rem;
}

/* Four-step follow-up process */
.contact-process {
  padding-block: clamp(5.5rem, 8vw, 8rem);
  background: #f3f5f7;
}

.contact-process__header {
  max-width: 900px;
  margin-inline: auto;
  text-align: center;
}

.contact-process__header p {
  max-width: 760px;
  margin: 1.35rem auto 0;
  color: #4b5565;
  font-size: clamp(1.03rem, 1.35vw, 1.14rem);
  line-height: 1.7;
}

.contact-process__steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(1.4rem, 2.5vw, 2.5rem);
  margin: clamp(3.5rem, 6vw, 5rem) 0 0;
  padding: 0;
  list-style: none;
}

.contact-process__steps::before {
  position: absolute;
  top: 31px;
  right: 9%;
  left: 9%;
  height: 2px;
  background: rgba(7, 92, 148, 0.25);
  content: "";
}

.contact-process__step {
  position: relative;
  z-index: 1;
  min-width: 0;
  text-align: center;
}

.contact-process__number {
  display: grid;
  width: 64px;
  height: 64px;
  margin-inline: auto;
  place-items: center;
  color: #075c94;
  background: #ffffff;
  border: 2px solid #05a7df;
  border-radius: 50%;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.contact-process__step h3 {
  margin: 1.35rem 0 0;
  color: #071126;
  font-size: clamp(1.12rem, 1.55vw, 1.35rem);
  line-height: 1.25;
}

.contact-process__step p {
  margin: 0.8rem 0 0;
  color: #566173;
  font-size: 0.96rem;
  line-height: 1.62;
}

@media (max-width: 1100px) {
  .contact-main__layout {
    gap: 3rem;
  }

  .contact-process__steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 3rem 2.5rem;
  }

  .contact-process__steps::before {
    display: none;
  }
}

@media (max-width: 820px) {
  .contact-main__layout {
    grid-template-columns: 1fr;
  }

  .contact-main__information {
    padding-top: 0;
  }
}

@media (max-width: 700px) {
  .contact-hero {
    min-height: 620px;
  }

  .contact-hero .service-hero__inner {
    align-items: center;
    padding-block: calc(var(--header-height) + 4rem) 4rem;
  }

  .contact-main,
  .contact-process {
    padding-block: 4.75rem;
  }

  .contact-main h2,
  .contact-process h2 {
    font-size: clamp(2.25rem, 10vw, 3rem);
  }

  .contact-form__row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .contact-form__date {
    width: 100%;
  }

  .contact-address-details__row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .contact-process__steps {
    grid-template-columns: 1fr;
    gap: 2.25rem;
    max-width: 620px;
    margin-inline: auto;
  }

  .contact-process__step {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 1.25rem;
    text-align: left;
  }

  .contact-process__number {
    margin: 0;
  }

  .contact-process__step h3 {
    margin-top: 0;
  }
}

@media (max-width: 430px) {
  .contact-hero {
    min-height: 600px;
  }

  .contact-hero h1 {
    font-size: clamp(2.75rem, 13vw, 3.35rem);
  }

  .contact-form {
    padding: 1.4rem;
  }

  .contact-process__step {
    grid-template-columns: 56px minmax(0, 1fr);
    gap: 1rem;
  }

  .contact-process__number {
    width: 56px;
    height: 56px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .contact-phone::before {
    background: #05a7df;
    animation: none;
  }

  .contact-hero .service-hero__content {
    animation: none;
  }

  .contact-address-details {
    transform: none;
    transition: none;
  }

  body.quote-focus-active .contact-form::after {
    opacity: 1;
    box-shadow: 0 0 0 4px rgba(73, 198, 237, 0.18), 0 0 24px rgba(73, 198, 237, 0.62);
    animation: none;
  }
}
