/*
 * .form-card — FAQ "Still have a question?": ice card with waves, heading, text and the site form
 * (template-parts/flexible/faq-library.php, after .faq-library).
 * Figma iQAOfxwhBBZYowlHVCUV8x: D 18:44319 (card 1400 × 850), M 18:51371 (335 × 750).
 * Measurements: docs/phase2/analysis/forms-values.md §2. Form: site-form.css.
 */

/* .form-card — the library above drops its bottom padding (faq-library.css), so phones add nothing on top
   (the group gap is the frame's ≈ 50 px); desktop 100 px; 50 → 100 px below */
.form-card {
  padding-bottom: var(--nv-section-y);

  /* @media (width >= 48em) .form-card */
  @media (width >= 48em) {
    padding-top: var(--nv-section-y);
  }
}

/* .form-card__card — everything centred; vertical padding 40 → 100 px */
.form-card__card {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  align-items: center;
  border-radius: var(--nv-radius-m);
  padding: clamp(2.5rem, 1.167rem + 5.687vw, 6.25rem) 1.25rem;
  overflow: hidden;
  background-color: var(--nv-ice);
  text-align: center;

  /* @media (width >= 48em) .form-card__card */
  @media (width >= 48em) {
    padding-inline: 1.875rem;
  }
}

/* .form-card__texture — waves over the top; the file is the whole 1400 × 882 layer: desktop shows its lower half
   across the card width, phones a 467 px wide copy at −66 / −113 px */
.form-card__texture {
  position: absolute;
  z-index: -1;
  top: -7.0625rem;
  left: -4.125rem;
  width: 29.1875rem;
  pointer-events: none;

  /* @media (width >= 48em) .form-card__texture */
  @media (width >= 48em) {
    top: 0;
    left: 0;
    width: 100%;
    transform: translateY(-50%);
  }
}

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

/* .form-card__title — 40 → 90 px, line box trimmed to cap / baseline */
.form-card__title {
  margin-top: -0.14em;
  margin-bottom: 1.125rem;
  color: var(--nv-navy);
  font-weight: 400;
  font-size: var(--nv-fs-h2);
  line-height: 1;
  letter-spacing: -0.04em;
  overflow-wrap: anywhere;

  /* @media (width >= 48em) .form-card__title — the phone frame tracks −4 %, the desktop one −2 % */
  @media (width >= 48em) {
    margin-bottom: 2.1875rem;
    letter-spacing: -0.02em;
  }

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

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

/* .form-card__text.rich-text — beats the rich text line height; 16 → 20 px, navy 70 %; 100 % line on phones, 120 % from 768 px */
.form-card__text.rich-text {
  max-width: 28.3125rem;
  margin-top: -0.14em;
  margin-bottom: 1.4375rem;
  color: rgba(19, 33, 50, 0.7);
  font-size: clamp(1rem, 0.91rem + 0.38vw, 1.25rem);
  line-height: 1;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;

  /* @media (width >= 48em) .form-card__text */
  @media (width >= 48em) {
    margin-top: -0.24em;
    margin-bottom: 3.25rem;
    line-height: 1.2;
  }
}

/* .form-card__form — 295 → 690 px column */
.form-card__form {
  width: 100%;
  max-width: 43.125rem;
  text-align: left;
}
