.contact-modal[hidden] {
  display: none;
}

html.contact-modal-open,
body.contact-modal-open {
  overflow: hidden;
}

.contact-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 180ms ease,
    visibility 180ms ease;
}

.contact-modal.is-open {
  opacity: 1;
  visibility: visible;
}

.contact-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 16, 28, 0.72);
  backdrop-filter: blur(8px);
}

.contact-modal__panel {
  position: relative;
  z-index: 1;
  width: min(720px, 100%);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  padding: 36px;
  border: 1px solid var(--line, #dfe3ec);
  border-radius: 28px;
  background: var(--surface, #ffffff);
  color: var(--ink, #161b2a);
  box-shadow: 0 32px 90px rgba(12, 16, 28, 0.28);
  transform: translateY(18px);
  transition: transform 180ms ease;
}

.contact-modal.is-open .contact-modal__panel {
  transform: translateY(0);
}

.contact-modal__close {
  position: absolute;
  top: 18px;
  right: 18px;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line, #dfe3ec);
  border-radius: 50%;
  background: var(--surface, #ffffff);
  color: var(--ink, #161b2a);
  cursor: pointer;
}

.contact-modal__close:hover {
  background: var(--bg, #f6f7fb);
}

.contact-modal__close svg {
  width: 20px;
  height: 20px;
}

.contact-modal__head {
  padding-right: 54px;
  margin-bottom: 28px;
}

.contact-modal__eyebrow {
  display: inline-flex;
  margin-bottom: 10px;
  color: var(--accent-strong, #3157d5);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.contact-modal__head h2 {
  margin: 0 0 12px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.05;
}

.contact-modal__head p {
  margin: 0;
  color: var(--muted, #667085);
  line-height: 1.6;
}

.contact-modal__form {
  margin: 0;
}

.contact-modal__form .form-fields {
  display: grid;
  gap: 18px;
}

.contact-modal__form .field {
  margin: 0;
}

.contact-modal__form textarea {
  min-height: 132px;
  resize: vertical;
}

.contact-form-status {
  min-height: 24px;
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
}

.contact-form-status.is-error {
  color: #b42318;
}

.contact-form-status.is-success {
  color: #067647;
}

.contact-modal__form.sent .form-fields {
  display: none;
}

.contact-modal__form .form-done {
  display: none;
}

.contact-modal__form.sent .form-done {
  display: grid;
}

.form-honeypot {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.bf-cookie-settings {
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.bf-cookie-settings:hover {
  text-decoration-thickness: 2px;
}

@media (max-width: 680px) {
  .contact-modal {
    align-items: end;
    padding: 12px;
  }

  .contact-modal__panel {
    width: 100%;
    max-height: calc(100vh - 24px);
    padding: 28px 20px 22px;
    border-radius: 22px;
  }

  .contact-modal__head {
    padding-right: 42px;
  }

  .contact-modal__close {
    top: 14px;
    right: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .contact-modal,
  .contact-modal__panel {
    transition: none;
  }
}