.footer-contact-modal {
  position: fixed;
  inset: 0;
  z-index: 100400;
  display: grid;
  place-items: center;
  padding: 20px;
}

.footer-contact-modal.hidden {
  display: none;
}

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

.footer-contact-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 78% 18%, rgba(167, 139, 250, 0.24), transparent 32%),
    radial-gradient(circle at 18% 82%, rgba(20, 184, 166, 0.18), transparent 30%),
    rgba(10, 7, 18, 0.62);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.footer-contact-card {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(260px, 0.86fr) minmax(0, 1.14fr);
  width: min(940px, calc(100vw - 32px));
  max-height: min(88dvh, 760px);
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(249, 246, 255, 0.96));
  color: #241437;
  box-shadow: 0 34px 96px rgba(18, 11, 29, 0.36);
}

.footer-contact-close {
  position: absolute;
  inset-block-start: 16px;
  inset-inline-start: 16px;
  z-index: 3;
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.11);
  color: #fff;
  cursor: pointer;
  transition: transform 0.16s ease, background 0.16s ease;
}

.footer-contact-close:hover {
  transform: scale(1.04);
  background: rgba(255, 255, 255, 0.22);
}

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

.footer-contact-hero {
  position: relative;
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 12px;
  min-height: 100%;
  padding: 78px 34px 42px;
  overflow: hidden;
  background:
    linear-gradient(150deg, rgba(46, 14, 91, 0.98) 0%, rgba(83, 31, 126, 0.96) 52%, rgba(22, 11, 42, 0.98) 100%);
  color: #fff;
  text-align: start;
}

.footer-contact-hero::after {
  content: "";
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  pointer-events: none;
}

.footer-contact-hero::before {
  content: "";
  position: absolute;
  inset-inline-start: 24px;
  inset-block-start: 24px;
  width: 86px;
  height: 2px;
  background: linear-gradient(90deg, rgba(230, 197, 92, 0), rgba(230, 197, 92, 0.84));
}

.footer-contact-crest {
  position: relative;
  z-index: 1;
  display: inline-grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border: 1px solid rgba(230, 197, 92, 0.46);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.10);
  color: #e6c55c;
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.22);
}

.footer-contact-crest svg {
  width: 27px;
  height: 27px;
}

.footer-contact-eyebrow {
  position: relative;
  z-index: 1;
  width: max-content;
  max-width: 100%;
  padding: 8px 12px;
  border: 1px solid rgba(230, 197, 92, 0.28);
  border-radius: 8px;
  background: rgba(230, 197, 92, 0.10);
  color: #f6e7a8;
  font-size: 12px;
  font-weight: 900;
}

.footer-contact-hero h2 {
  position: relative;
  z-index: 1;
  margin: 0;
  color: #fff;
  font-size: 40px;
  line-height: 1.18;
  font-weight: 950;
  letter-spacing: 0;
}

.footer-contact-hero p {
  position: relative;
  z-index: 1;
  margin: 0;
  max-width: 320px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 14px;
  line-height: 1.9;
  font-weight: 750;
}

.footer-contact-form {
  display: grid;
  gap: 18px;
  padding: 34px;
}

.footer-contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.footer-contact-field {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.footer-contact-field-wide {
  grid-column: 1 / -1;
}

.footer-contact-field span,
.footer-contact-methods legend {
  color: #5f4d73;
  font-size: 13px;
  font-weight: 900;
}

.footer-contact-field input,
.footer-contact-field textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(103, 58, 183, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(250, 247, 253, 0.96));
  color: #241437;
  font-family: inherit;
  font-size: 14px;
  font-weight: 750;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.footer-contact-field input {
  height: 48px;
  padding: 0 14px;
}

.footer-contact-field textarea {
  min-height: 132px;
  resize: vertical;
  padding: 13px 14px;
  line-height: 1.75;
}

.footer-contact-field input:focus,
.footer-contact-field textarea:focus {
  border-color: rgba(103, 58, 183, 0.52);
  box-shadow: 0 0 0 4px rgba(103, 58, 183, 0.10);
}

.footer-contact-methods {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  border: 0;
}

.footer-contact-methods legend {
  grid-column: 1 / -1;
  padding: 0;
}

.footer-contact-method {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 74px;
  padding: 13px;
  border: 1px solid rgba(103, 58, 183, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.74);
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.footer-contact-method:hover,
.footer-contact-method:has(input:checked) {
  transform: translateY(-1px);
  border-color: rgba(103, 58, 183, 0.36);
  box-shadow: 0 14px 28px rgba(55, 34, 88, 0.12);
}

.footer-contact-method input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.footer-contact-method-icon {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: linear-gradient(135deg, #25d366, #128c7e);
  color: #fff;
  font-size: 14px;
  font-weight: 950;
}

.footer-contact-method-icon-mail {
  background: linear-gradient(135deg, #6e3fa0, #4a1f7b);
}

.footer-contact-method strong,
.footer-contact-method small {
  display: block;
}

.footer-contact-method strong {
  color: #241437;
  font-size: 14px;
  font-weight: 950;
}

.footer-contact-method small {
  margin-top: 3px;
  color: #74677f;
  font-size: 11.5px;
  font-weight: 750;
  line-height: 1.45;
}

.footer-contact-method.is-disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.footer-contact-error {
  min-height: 20px;
  margin: 0;
  color: #b42318;
  font-size: 13px;
  font-weight: 850;
}

.footer-contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.footer-contact-submit,
.footer-contact-secondary {
  min-height: 48px;
  border-radius: 8px;
  padding: 0 18px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 950;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.footer-contact-submit {
  border: 0;
  background: linear-gradient(135deg, #6e3fa0, #4a1f7b);
  color: #fff;
  box-shadow: 0 16px 30px rgba(74, 31, 123, 0.24);
}

.footer-contact-secondary {
  border: 1px solid rgba(103, 58, 183, 0.18);
  background: rgba(255, 255, 255, 0.74);
  color: #5b2e87;
}

.footer-contact-submit:hover,
.footer-contact-secondary:hover {
  transform: translateY(-1px);
}

.footer-contact-submit:disabled,
.footer-contact-submit[aria-disabled="true"] {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

html[data-theme="dark"] .footer-contact-card {
  border-color: rgba(255, 255, 255, 0.12);
  background: linear-gradient(135deg, rgba(31, 23, 44, 0.98), rgba(17, 24, 39, 0.98));
  color: #f8f4ff;
}

html[data-theme="dark"] .footer-contact-field span,
html[data-theme="dark"] .footer-contact-methods legend,
html[data-theme="dark"] .footer-contact-method strong {
  color: #f8f4ff;
}

html[data-theme="dark"] .footer-contact-field input,
html[data-theme="dark"] .footer-contact-field textarea,
html[data-theme="dark"] .footer-contact-method,
html[data-theme="dark"] .footer-contact-secondary {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(15, 23, 42, 0.62);
  color: #f8f4ff;
}

html[data-theme="dark"] .footer-contact-method small {
  color: rgba(248, 244, 255, 0.68);
}

@media (max-width: 820px) {
  .footer-contact-card {
    grid-template-columns: 1fr;
  }

  .footer-contact-hero {
    min-height: 210px;
    padding: 76px 24px 26px;
  }

  .footer-contact-hero h2 {
    font-size: 32px;
  }

  .footer-contact-form {
    padding: 24px;
  }
}

@media (max-width: 560px) {
  .footer-contact-modal {
    padding: 10px;
    align-items: end;
  }

  .footer-contact-card {
    width: 100%;
    max-height: calc(100dvh - 20px);
    border-radius: 8px;
  }

  .footer-contact-grid,
  .footer-contact-methods {
    grid-template-columns: 1fr;
  }

  .footer-contact-actions {
    display: grid;
  }

  .footer-contact-submit,
  .footer-contact-secondary {
    width: 100%;
  }
}
