/*
 * .contact-form — Contact page block: info panel with waves on the left, the site form on the right,
 * trust line under both (template-parts/flexible/contact-form.php).
 * Figma iQAOfxwhBBZYowlHVCUV8x: D 18:43273 (1398 × 781), M 18:50675 (375 × 1242).
 * Measurements: docs/phase2/analysis/forms-values.md §1. Form: site-form.css.
 *
 * Phones: the card runs edge to edge (the frame has the frame line at the screen edges).
 */

/* .contact-form — 50 → 100 px above and below the card */
.contact-form {
  padding-block: var(--nv-section-y);
}

/* .contact-form__card — two columns of 649 px and a trust row; one column on phones */
.contact-form__card {
  display: grid;
  gap: 2.5rem 1.25rem;
  margin-inline: -1.25rem;
  border: 1px solid rgba(26, 121, 191, 0.1);
  border-radius: var(--nv-radius-m);
  /* phones: the frame draws the 1 px line inside the 375 px card, so the content stays 335 px wide */
  padding: calc(1.25rem - 1px);

  /* @media (width >= 48em) .contact-form__card — back inside the gutters, 40 px around */
  @media (width >= 48em) {
    margin-inline: 0;
    padding: 2.5rem;
  }

  /* @media (width >= 64.0625em) .contact-form__card — two columns; 75 px to the trust line (the phone number needs the width) */
  @media (width >= 64.0625em) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 4.75rem;
    padding-bottom: 4.5rem;
  }
}

/* .contact-form__panel — ice box: eyebrow, heading, text on top, the phone at the bottom;
   phones: 170 px between the text and the phone (the frame's 541 px panel with its texts),
   no fixed height, so empty fields shrink the box; from 768 px the phone sits at the bottom of the row */
.contact-form__panel {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10.625rem;
  border-radius: var(--nv-radius-s);
  padding: 2.5rem 1.25rem;
  overflow: hidden;
  background-color: var(--nv-ice);

  /* @media (width >= 48em) .contact-form__panel */
  @media (width >= 48em) {
    gap: 2.5rem;
    padding: 1.875rem;
  }
}

/* .contact-form__texture — waves behind the text: phone 294 px wide at 21 / 37 px, desktop the whole width 18 px down
   (the files are the visible parts, already rotated as in the frames) */
.contact-form__texture {
  position: absolute;
  z-index: -1;
  top: 2.3125rem;
  left: 6.27%;
  width: 87.76%;
  pointer-events: none;

  /* @media (width >= 48em) .contact-form__texture */
  @media (width >= 48em) {
    top: 1.125rem;
    left: 0;
    width: 100%;
  }
}

/* .contact-form__texture-image */
.contact-form__texture-image {
  display: block;
  width: 100%;
  height: auto;
}

/* .contact-form__intro — eyebrow, heading, text: 20 → 48 px apart (cap to cap), 11 → 26 px to the text */
.contact-form__intro {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

/* .contact-form__eyebrow — green label with a rhomb, 10 px around the cap height */
.contact-form__eyebrow {
  display: inline-flex;
  max-width: 100%;
  align-items: flex-start;
  gap: 0.3125rem;
  padding: calc(0.625rem - 0.14em) 0.625rem;
  color: var(--nv-green);
  font-weight: 500;
  font-size: clamp(1rem, 0.91rem + 0.38vw, 1.25rem);
  line-height: 1;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  overflow-wrap: anywhere;

  /* @media (width >= 64.0625em) .contact-form__eyebrow */
  @media (width >= 64.0625em) {
    letter-spacing: 0.1em;
  }

  /* .contact-form__eyebrow::before — rhomb */
  &::before {
    content: "";
    flex-shrink: 0;
    width: 0.53rem;
    height: 0.53rem;
    margin-top: calc(0.5lh - 0.265rem);
    background: url("../../img/icons/rhomb.svg") center / contain no-repeat;
  }
}

/* .contact-form__title — 40 → 60 px, line box trimmed to cap / baseline */
.contact-form__title {
  margin-top: 0.9375rem;
  margin-bottom: calc(1.5625rem - 0.14em);
  color: var(--nv-navy);
  font-weight: 400;
  font-size: clamp(2.5rem, 1.9rem + 1.9vw, 3.75rem);
  line-height: 1;
  letter-spacing: -0.04em;
  overflow-wrap: anywhere;
  /* phone frame: "Tell us / what you’re / working on" — no word left alone on the last line */
  text-wrap: balance;

  /* @media (width >= 48em) .contact-form__title — the phone frame tracks −4 %, the desktop one −2 %;
     the desktop frame wraps by width */
  @media (width >= 48em) {
    margin-top: 2.5625rem;
    margin-bottom: calc(2.9375rem - 0.14em);
    letter-spacing: -0.02em;
    text-wrap: wrap;
  }

  /* any tag from the editor keeps the heading look */
  & > * {
    margin: 0;
    font: inherit;
    letter-spacing: inherit;
  }

  & strong {
    color: var(--nv-green);
    font-weight: inherit;
  }
}

/* .contact-form__text.rich-text — beats the rich text line height; 16 → 20 px at 120 %, navy 70 %; line box trimmed to cap / baseline */
.contact-form__text.rich-text {
  max-width: 28.3125rem;
  margin-block: -0.24em;
  color: rgba(19, 33, 50, 0.7);
  font-size: clamp(1rem, 0.91rem + 0.38vw, 1.25rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;

  /* any tag from the editor keeps the text look */
  & > * {
    margin: 0;
    font: inherit;
    letter-spacing: inherit;
  }
}

/* .contact-form__call — "Prefer to talk?" over the phone, 20 px apart */
.contact-form__call {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.25rem;
}

/* .contact-form__call-label — 20 → 23 px, navy 70 % */
.contact-form__call-label {
  margin-block: -0.14em;
  color: rgba(19, 33, 50, 0.7);
  font-size: clamp(1.25rem, 1.15rem + 0.43vw, 1.4375rem);
  line-height: 1;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}

/* .contact-form__phone — 40 → 50 px, medium */
.contact-form__phone {
  margin-block: -0.14em;
  color: var(--nv-navy);
  font-weight: 500;
  font-size: clamp(2.5rem, 2.17rem + 1.4vw, 3.125rem);
  line-height: 1;
  overflow-wrap: anywhere;
}

/* .contact-form__form — right column, 649 px */
.contact-form__form {
  min-width: 0;
}

/* .contact-form__note — trust line across both columns (look: site-form.css); 10 px less than the grid gap on phones (30 px under the button) */
.contact-form__note {
  grid-column: 1 / -1;
  margin-top: -0.625rem;
  /* phone frame: 35 px from the last line's ink to the card edge */
  padding-bottom: 0.9375rem;

  /* @media (width >= 64.0625em) .contact-form__note */
  @media (width >= 64.0625em) {
    margin-top: 0;
    padding-bottom: 0;
  }
}
