/* ─── Newsletter: band (#subscribe) and card (split hero) ───────────────────
   Shared form look for the demo form; a real CF7 form gets its field
   styling from contact-form-7.css inside the same card.
   ────────────────────────────────────────────────────────────────────────── */

.ha-sub {
  position: relative;
  z-index: 1;
  padding: 40px 0 120px;
}

.ha-sub__card {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  padding: 28px 20px;
  border-radius: 32px;
  overflow: hidden;
  background: linear-gradient(140deg, var(--tint-green), var(--tint-lav) 55%, var(--tint-peach));
  box-shadow: var(--shadow);

  > * {
    position: relative;
    z-index: 1;
  }

  @media (min-width: 640px) {
    padding: 44px;
    border-radius: var(--r-xl);
  }

  @media (min-width: 992px) {
    grid-template-columns: 1.1fr 1fr;
    gap: 44px;
    padding: 56px;
  }
}

.ha-sub__blob {
  position: absolute;
  z-index: 0;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.7;
  animation: ha-drift 16s ease-in-out infinite alternate;

  &.b1 {
    width: 300px;
    height: 300px;
    right: -60px;
    top: -80px;
    background: var(--tint-lav-2);
  }

  &.b2 {
    width: 260px;
    height: 260px;
    left: -60px;
    bottom: -100px;
    background: var(--tint-green-2);
    animation-delay: -8s;
  }
}

@keyframes ha-drift {
  to {
    transform: translate(4vw, 3vw) scale(1.12);
  }
}

.ha-sub__copy {
  h2 {
    margin-bottom: 16px;
    font-size: clamp(38px, 5vw, 68px);
    font-style: italic;
    font-weight: 300;
  }

  p {
    max-width: 460px;
    font-size: 17px;
    color: var(--muted);
  }
}

.ha-sub__ticks {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;

  li {
    padding: 7px 16px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--surface-color) 75%, transparent);
    font: 400 12px var(--f-m);
  }
}

/* Form card */
.ha-nl__form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 22px;
  border-radius: var(--r);
  background: color-mix(in srgb, var(--surface-color) 80%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);

  @media (min-width: 640px) {
    padding: 28px;
    border-radius: 30px;
  }

  fieldset {
    border: 0;
    padding: 0;
    margin: 0;
    min-width: 0;
  }

  legend,
  label[for] {
    display: block;
    padding: 0;
    margin-bottom: 8px;
    font: 400 11px var(--f-m);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
  }

  input[type="email"] {
    width: 100%;
    height: 52px;
    padding: 0 20px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--surface-color);
    color: var(--ink);
    font: 400 15px var(--f-b);

    &:focus {
      outline: 0;
      box-shadow: var(--ring);
    }

    &[aria-invalid="true"] {
      border-color: var(--negative-color);
    }
  }

  .ha-btn {
    align-self: stretch;
  }

  &.is-error .ha-nl__msg {
    color: var(--negative-color);
  }
}

.ha-nl__opts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ha-nl__opt {
  position: relative;

  input {
    position: absolute;
    inset: 0;
    opacity: 0;
  }

  span {
    display: inline-block;
    padding: 7px 14px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--surface-color);
    font-size: 13px;
    transition: background var(--hover-duration), color var(--hover-duration);
  }

  input:checked + span {
    background: var(--deep);
    border-color: var(--deep);
    color: var(--white);
  }

  input:focus-visible + span {
    outline: 2px solid var(--deep);
    outline-offset: 2px;
  }
}

.ha-nl__cons {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: var(--muted);

  input {
    margin-top: 4px;
    accent-color: var(--deep);
  }

  a {
    text-decoration: underline;
  }
}

.ha-nl__msg {
  min-height: 20px;
  font-size: 14px;
  color: var(--deep);
}

/* Card variant (inside the split hero) */
.ha-nl--card {
  position: relative;
  padding: 26px;
  border-radius: var(--r-lg);
  background: linear-gradient(140deg, color-mix(in srgb, var(--tint-green) 85%, transparent), color-mix(in srgb, var(--tint-lav) 80%, transparent) 60%, color-mix(in srgb, var(--tint-peach) 80%, transparent));
  border: 1px solid var(--glass-edge);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);

  .ha-nl__form {
    padding: 20px;
  }
}

.ha-nl__card-title {
  margin-bottom: 18px;
  font-size: clamp(30px, 3.4vw, 44px);
  font-style: italic;
  font-weight: 300;
}

/* ─── The real Contact Form 7 form inside the same card ──────────────────────
   Same look as the demo: topic pills, pill email field, consent line, full
   width submit. Field/submit base styles come from contact-form-7.css. */
.ha-nl__form--cf7 {
  .wpcf7-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }

  .wpcf7-checkbox {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .wpcf7-list-item {
    margin: 0;
  }

  .wpcf7-checkbox label {
    position: relative;
    display: block;
    cursor: pointer;

    input {
      position: absolute;
      inset: 0;
      opacity: 0;
    }

    .wpcf7-list-item-label {
      display: inline-block;
      padding: 7px 14px;
      border-radius: 999px;
      border: 1px solid var(--line);
      background: var(--surface-color);
      font-size: 13px;
      transition: background var(--hover-duration), color var(--hover-duration);
    }

    input:checked + .wpcf7-list-item-label {
      background: var(--deep);
      border-color: var(--deep);
      color: var(--white);
    }

    input:focus-visible + .wpcf7-list-item-label {
      outline: 2px solid var(--deep);
      outline-offset: 2px;
    }
  }

  .wpcf7-acceptance label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    color: var(--muted);
    cursor: pointer;

    input {
      margin-top: 4px;
      accent-color: var(--deep);
    }

    a {
      text-decoration: underline;
    }
  }

  /* Inside the card the response sits in the flow, not as a floating box. */
  .wpcf7-response-output {
    position: static;
    margin: 0;
  }

  .wpcf7-not-valid-tip {
    position: static;
    margin-top: 6px;
  }
}
