.problem-form,
.statement--right {
  --problem-motion-duration: 806ms;
  --problem-motion-easing: cubic-bezier(0.76, 0, 0.24, 1);
}

.statement--right .statement__copy {
  transition:
    opacity var(--problem-motion-duration) var(--problem-motion-easing),
    transform var(--problem-motion-duration) var(--problem-motion-easing);
  transform-origin: 78% 45%;
}

.problem-form {
  position: absolute;
  z-index: 4;
  inset: 0;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.problem-form__fields {
  position: absolute;
  top: 25%;
  right: 10%;
  display: grid;
  gap: clamp(1.1rem, 2.2vw, 2rem);
  width: 66%;
}

.problem-form__field {
  display: grid;
  gap: 0.4rem;
  color: var(--ink);
  font-size: clamp(0.82rem, 1.15vw, 1.02rem);
  font-weight: 500;
  line-height: 1.2;
  opacity: 0;
  transform: translateY(0.8rem);
  transition:
    opacity var(--problem-motion-duration) var(--problem-motion-easing),
    transform var(--problem-motion-duration) var(--problem-motion-easing);
}

.problem-form__field:nth-child(2) { transition-delay: 55ms; }

.problem-form__status {
  min-height: 1.25em;
  margin: -0.45rem 0 0;
  color: var(--muted);
  font-size: clamp(0.72rem, 1vw, 0.9rem);
  line-height: 1.25;
}

.problem-form__status[data-state="success"] { color: var(--ink); }
.problem-form__status[data-state="error"] { color: var(--accent); }

.problem-form input,
.problem-form textarea {
  width: 100%;
  padding: 0.25rem 0 0.55rem;
  border: 0;
  border-bottom: 1px solid var(--hairline);
  border-radius: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 400;
  transition: border-color 286ms ease;
}

.problem-form textarea {
  min-height: clamp(4.2rem, 7.5vw, 6.5rem);
  resize: none;
}

.problem-form input:focus,
.problem-form textarea:focus { border-color: var(--accent); }

.problem-form textarea::placeholder { color: var(--muted); opacity: 1; }

.problem-form__cancel,
.problem-form__submit {
  border: 0;
  font-family: inherit;
  cursor: pointer;
}

.problem-form__cancel {
  position: absolute;
  top: -10%;
  right: 0;
  display: grid;
  place-items: center;
  width: 2.85rem;
  aspect-ratio: 1;
  padding: 0;
  border: 1.5px solid var(--accent);
  border-radius: 50%;
  background: var(--paper);
  color: var(--accent);
  opacity: 0;
  transform: rotate(-80deg) scale(0.7);
  transition:
    background 286ms ease,
    color 286ms ease,
    opacity var(--problem-motion-duration) var(--problem-motion-easing),
    transform var(--problem-motion-duration) var(--problem-motion-easing);
}

.problem-form__cancel .material-symbols-rounded {
  font-size: 1.35rem;
  font-variation-settings: "opsz" 20, "wght" 500, "FILL" 0, "GRAD" 0;
}

.problem-form__cancel:hover { background: var(--accent); color: var(--paper); }

.problem-form__submit {
  position: absolute;
  top: 96%;
  right: 9%;
  display: inline-flex;
  gap: 0.65rem;
  align-items: center;
  justify-content: center;
  height: var(--problem-submit-height, auto);
  padding: 1rem 1.8rem 1.08rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--paper);
  font-size: var(--support-font-size);
  font-weight: 600;
  opacity: 0;
  line-height: 1.1;
  transition: box-shadow 286ms ease;
}

.problem-form__submit:not(:disabled):hover { box-shadow: 0 0.7rem 1.6rem rgba(198, 90, 34, 0.2); }
.problem-form__submit:not(:disabled):hover [aria-hidden="true"] { transform: translateX(0.2rem); }
.problem-form__submit [aria-hidden="true"] { transition: transform 286ms ease; }
.problem-form__submit:disabled { cursor: wait; opacity: 0.72; }

.problem-form__cancel:focus-visible,
.problem-form__submit:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

html.js body.is-problem-form-open .statement--right .statement__copy {
  opacity: 0.86;
  transform: translate(5%, -145%) scale(0.36);
}

body.is-problem-form-open .problem-form {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

body.is-problem-form-closing .problem-form {
  visibility: visible;
}

body.is-problem-form-closing .statement--right .statement__copy,
body.is-problem-form-closing .problem-form__field {
  transition-delay: 0ms;
  transition-timing-function:
    var(--problem-motion-easing),
    var(--problem-motion-easing);
}

body.is-problem-form-closing .problem-form__cancel {
  transition-timing-function:
    ease,
    ease,
    var(--problem-motion-easing),
    var(--problem-motion-easing);
}

body.is-problem-form-open .problem-form__field {
  opacity: 1;
  transform: translateY(0);
}

body.is-problem-form-open .problem-form__cancel {
  opacity: 1;
  transform: rotate(0) scale(1);
}

body.is-problem-form-open.is-problem-form-settled .problem-form__submit {
  opacity: 1;
}

body.is-problem-form-open.is-problem-form-settled .problem-form__submit:disabled {
  opacity: 0.72;
}

body.is-problem-form-open .hero-support__cta,
body.is-problem-form-closing .hero-support__cta {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

body.is-problem-form-transitioning .problem-form {
  pointer-events: none;
}

.problem-form__morph {
  position: fixed;
  z-index: 70;
  display: block;
  border-radius: 999px;
  background: var(--accent);
  pointer-events: none;
  will-change: top, left, width;
}

@media (max-width: 960px) {
  .problem-form__fields { right: 10%; width: 76%; }
  .problem-form__cancel { right: -2%; }
  .problem-form__submit { right: 9%; }
}

@media (max-width: 700px) {
  body.is-problem-form-open .hero-stage { margin-bottom: 4.5rem; }

  .problem-form__fields {
    top: 0;
    right: 8%;
    gap: 0.55rem;
    width: 84%;
  }

  .problem-form__field { gap: 0.2rem; font-size: 0.78rem; }
  .problem-form__status { margin-top: -0.15rem; }
  .problem-form textarea { min-height: 3.2rem; }
  .problem-form__cancel { top: -38%; right: 4%; width: 2.55rem; }
  .problem-form__submit { top: calc(100% + 1.8rem); right: 5%; }

  html.js body.is-problem-form-open .statement--right .statement__copy {
    opacity: 0;
    transform: translateY(-180%) scale(0.38);
  }
}

@media (prefers-reduced-motion: reduce) {
  .problem-form__field,
  .problem-form__cancel,
  .problem-form__submit,
  .statement--right .statement__copy { transition: none; }
}
