/* Shared modern contact form UI — pages + modal (modal overrides in contact-modal.css) */

:root {
  --contact-ui-panel: #2a0b66;
  --contact-ui-panel-deep: #1f0849;
  --contact-ui-panel-alt: #31086c;
  --contact-ui-text-on-panel: #40236b;
  --contact-ui-input-border: rgba(255, 255, 255, 0.22);
  --contact-ui-focus-ring: rgba(255, 255, 255, 0.35);
  --contact-ui-radius-md: 10px;
  --contact-ui-ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Purple form panels */
.home-contact__form-shell,
.m-home-contact__form-shell,
.m-contact-form-panel,
.contact-form-shell__panel {
  background: linear-gradient(
    165deg,
    #351080 0%,
    var(--contact-ui-panel) 42%,
    var(--contact-ui-panel-deep) 100%
  ) !important;
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.home-contact__form-title,
.m-home-contact__form-title,
.m-contact-form-panel__title,
.contact-form-shell__panel-title {
  font-family: var(--font-inter, "Inter", system-ui, sans-serif);
  font-weight: 600;
  letter-spacing: 0.01em;
}

.home-contact__form-shell .home-contact__field-error,
.m-home-contact__form-shell .m-home-contact__field-error,
.m-contact-form-panel .m-home-contact__field-error,
.contact-form-shell__panel .home-contact__field-error {
  margin: 0.25rem 0 0;
  font-size: 0.75rem;
  line-height: 1.45;
  color: #fecaca !important;
}

.home-contact__form-shell .home-contact__form,
.m-home-contact__form-shell .m-home-contact__form,
.m-contact-form-panel .m-home-contact__form,
.contact-form-shell__panel .home-contact__form {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.home-contact__form-shell .home-contact__row,
.m-home-contact__form-shell .m-home-contact__row,
.m-contact-form-panel .m-home-contact__row,
.contact-form-shell__panel .home-contact__row {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.home-contact__form-shell .home-contact__row--2,
.m-home-contact__form-shell .m-home-contact__row--2,
.m-contact-form-panel .m-home-contact__row--2,
.contact-form-shell__panel .home-contact__row--2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.875rem;
}

.home-contact__form-shell .home-contact__field input,
.home-contact__form-shell .home-contact__field textarea,
.home-contact__form-shell .home-contact__field select,
.m-home-contact__form-shell .m-home-contact__field input,
.m-home-contact__form-shell .m-home-contact__field textarea,
.m-home-contact__form-shell .m-home-contact__field select,
.m-contact-form-panel .m-home-contact__field input,
.m-contact-form-panel .m-home-contact__field textarea,
.m-contact-form-panel .m-home-contact__field select,
.contact-form-shell__panel .home-contact__field input,
.contact-form-shell__panel .home-contact__field textarea,
.contact-form-shell__panel .home-contact__field select {
  width: 100% !important;
  box-sizing: border-box;
  border: 1px solid var(--contact-ui-input-border) !important;
  border-radius: var(--contact-ui-radius-md) !important;
  background: rgba(255, 255, 255, 0.98) !important;
  color: #1a1a1a !important;
  font-family: var(--font-inter, "Inter", system-ui, sans-serif) !important;
  font-size: 0.875rem !important;
  line-height: 1.4 !important;
  padding: 0.75rem 0.875rem !important;
  min-height: 0 !important;
  height: auto !important;
  outline: none;
  transition:
    border-color 0.2s var(--contact-ui-ease),
    box-shadow 0.2s var(--contact-ui-ease),
    background-color 0.2s var(--contact-ui-ease);
}

.home-contact__form-shell .home-contact__field input:hover,
.home-contact__form-shell .home-contact__field textarea:hover,
.home-contact__form-shell .home-contact__field select:hover,
.m-home-contact__form-shell .m-home-contact__field input:hover,
.m-home-contact__form-shell .m-home-contact__field textarea:hover,
.m-home-contact__form-shell .m-home-contact__field select:hover,
.m-contact-form-panel .m-home-contact__field input:hover,
.m-contact-form-panel .m-home-contact__field textarea:hover,
.m-contact-form-panel .m-home-contact__field select:hover,
.contact-form-shell__panel .home-contact__field input:hover,
.contact-form-shell__panel .home-contact__field textarea:hover,
.contact-form-shell__panel .home-contact__field select:hover {
  border-color: rgba(255, 255, 255, 0.45) !important;
}

.home-contact__form-shell .home-contact__field input:focus,
.home-contact__form-shell .home-contact__field textarea:focus,
.home-contact__form-shell .home-contact__field select:focus,
.m-home-contact__form-shell .m-home-contact__field input:focus,
.m-home-contact__form-shell .m-home-contact__field textarea:focus,
.m-home-contact__form-shell .m-home-contact__field select:focus,
.m-contact-form-panel .m-home-contact__field input:focus,
.m-contact-form-panel .m-home-contact__field textarea:focus,
.m-contact-form-panel .m-home-contact__field select:focus,
.contact-form-shell__panel .home-contact__field input:focus,
.contact-form-shell__panel .home-contact__field textarea:focus,
.contact-form-shell__panel .home-contact__field select:focus {
  border-color: #fff !important;
  background: #fff !important;
  box-shadow: 0 0 0 3px var(--contact-ui-focus-ring) !important;
}

.home-contact__form-shell .home-contact__field select,
.m-home-contact__form-shell .m-home-contact__field select,
.m-contact-form-panel .m-home-contact__field select,
.contact-form-shell__panel .home-contact__field select {
  appearance: none;
  cursor: pointer;
  padding-right: 2rem !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%2340236b' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 0.875rem center !important;
}

.home-contact__form-shell .home-contact__field textarea,
.m-home-contact__form-shell .m-home-contact__field textarea,
.m-contact-form-panel .m-home-contact__field textarea,
.contact-form-shell__panel .home-contact__field textarea {
  resize: vertical;
  min-height: 7.5rem !important;
}

.home-contact__form-shell .home-contact__field input::placeholder,
.home-contact__form-shell .home-contact__field textarea::placeholder,
.m-home-contact__form-shell .m-home-contact__field input::placeholder,
.m-home-contact__form-shell .m-home-contact__field textarea::placeholder,
.m-contact-form-panel .m-home-contact__field input::placeholder,
.m-contact-form-panel .m-home-contact__field textarea::placeholder,
.contact-form-shell__panel .home-contact__field input::placeholder,
.contact-form-shell__panel .home-contact__field textarea::placeholder {
  color: rgba(26, 26, 26, 0.45) !important;
}

.home-contact__form-shell .home-contact__submit,
.m-home-contact__form-shell .m-home-contact__submit,
.m-contact-form-panel .m-home-contact__submit,
.contact-form-shell__panel .home-contact__submit {
  align-self: stretch !important;
  margin-top: 0.375rem !important;
  min-width: 0 !important;
  width: 100% !important;
  max-width: none !important;
  min-height: 2.75rem !important;
  height: auto !important;
  padding: 0.6875rem 1.25rem !important;
  border: none !important;
  border-radius: var(--contact-ui-radius-md) !important;
  background: #fff !important;
  color: var(--contact-ui-panel) !important;
  font-family: var(--font-inter, "Inter", system-ui, sans-serif) !important;
  font-size: 0.9375rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.01em;
  cursor: pointer;
  filter: none !important;
  box-shadow:
    0 4px 14px rgba(0, 0, 0, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.85) !important;
  transition:
    transform 0.2s var(--contact-ui-ease),
    box-shadow 0.2s var(--contact-ui-ease),
    background-color 0.2s var(--contact-ui-ease);
}

.home-contact__form-shell .home-contact__submit:hover,
.m-home-contact__form-shell .m-home-contact__submit:hover,
.m-contact-form-panel .m-home-contact__submit:hover,
.contact-form-shell__panel .home-contact__submit:hover {
  transform: translateY(-1px);
  filter: none !important;
  box-shadow:
    0 8px 20px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
  background: #fafafa !important;
}

.home-contact__form-shell .home-contact__submit:active,
.m-home-contact__form-shell .m-home-contact__submit:active,
.m-contact-form-panel .m-home-contact__submit:active,
.contact-form-shell__panel .home-contact__submit:active {
  transform: translateY(0);
}

.home-contact__form-shell .home-contact__submit:focus-visible,
.m-home-contact__form-shell .m-home-contact__submit:focus-visible,
.m-contact-form-panel .m-home-contact__submit:focus-visible,
.contact-form-shell__panel .home-contact__submit:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.home-contact__form-shell .form-protection__turnstile,
.m-home-contact__form-shell .form-protection__turnstile,
.m-contact-form-panel .form-protection__turnstile,
.contact-form-shell__panel .form-protection__turnstile {
  border-radius: var(--contact-ui-radius-md);
  overflow: hidden;
}

@media (max-width: 520px) {
  .home-contact__form-shell .home-contact__row--2,
  .m-home-contact__form-shell .m-home-contact__row--2,
  .m-contact-form-panel .m-home-contact__row--2,
  .contact-form-shell__panel .home-contact__row--2 {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (min-width: 921px) {
  .home-contact__inner > .home-contact__form-shell {
    border-radius: 0 var(--contact-ui-radius-md) var(--contact-ui-radius-md) 0;
  }

  .home-contact__inner > .home-contact__intro {
    border-radius: var(--contact-ui-radius-md) 0 0 var(--contact-ui-radius-md);
  }
}

@media (max-width: 920px) {
  .home-contact__form-shell,
  .m-home-contact__form-shell {
    border-radius: var(--contact-ui-radius-md);
  }
}
