/* =============================================================
   V5 Contact — dark form section before footer
   ============================================================= */
.v5-contact {
  position: relative;
  background: #132238;
  color: #FFFFFF;
  padding: 72px 40px;
  overflow: hidden;
  font-family: "DM Sans", system-ui, sans-serif;
}
.v5-contact__accent-bar {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, #00C8C8, #155DCE);
}
.v5-contact__deco {
  position: absolute;
  border: 1px solid rgba(0, 200, 200, 0.12);
  pointer-events: none;
}
.v5-contact__deco--br {
  right: -60px; bottom: -70px;
  width: 280px; height: 280px;
  transform: rotate(15deg);
}
.v5-contact__deco--tr {
  right: 6%; top: 36px;
  width: 64px; height: 64px;
  transform: rotate(30deg);
}
.v5-contact__inner {
  max-width: 680px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}
.v5-contact__head { text-align: center; margin-bottom: 40px; }
.v5-contact__title {
  font-family: "DM Sans", system-ui, sans-serif;
  font-weight: 700;
  font-size: 34px;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: #FFFFFF;
  margin: 0 0 12px;
}
.v5-contact__sub {
  font-weight: 400;
  font-size: 15px;
  line-height: 1.55;
  color: rgba(255,255,255,.55);
  margin: 0;
}
.v5-contact__form { display: block; }
.v5-contact__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 16px;
  margin-bottom: 22px;
}
.v5-contact__field { display: flex; flex-direction: column; gap: 6px; }
.v5-contact__field--full { grid-column: 1 / -1; }
.v5-contact__label {
  font-size: 13px;
  font-weight: 500;
  color: rgba(255,255,255,.78);
  letter-spacing: .005em;
}
.v5-contact__req { color: #00C8C8; }
.v5-contact__input,
.v5-contact__textarea {
  width: 100%;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 6px;
  padding: 11px 14px;
  color: #FFFFFF;
  font-family: inherit;
  font-size: 15px;
  line-height: 1.4;
  transition: border-color .18s, background .18s, box-shadow .18s;
  outline: none;
  box-sizing: border-box;
}
.v5-contact__input::placeholder,
.v5-contact__textarea::placeholder { color: rgba(255,255,255,.30); }
.v5-contact__input:focus,
.v5-contact__textarea:focus {
  border-color: #00C8C8;
  background: rgba(0,200,200,0.06);
  box-shadow: 0 0 0 3px rgba(0,200,200,.10);
}
.v5-contact__textarea { resize: vertical; min-height: 110px; }
.v5-contact__input.is-invalid,
.v5-contact__textarea.is-invalid {
  border-color: #FF6B6B;
  background: rgba(255, 107, 107, 0.06);
}
.v5-contact__err {
  font-size: 11px;
  color: #FF8888;
  letter-spacing: .005em;
}
.v5-contact__foot {
  display: flex; justify-content: space-between; align-items: center;
  gap: 24px; margin-top: 10px; flex-wrap: wrap;
}
.v5-contact__privacy {
  font-size: 12px;
  color: rgba(255,255,255,.35);
  margin: 0;
  max-width: 360px;
  line-height: 1.5;
}
.v5-contact__privacy-link {
  color: #00C8C8;
  text-decoration: none;
  border-bottom: 1px solid rgba(0,200,200,.4);
}
.v5-contact__privacy-link:hover { border-bottom-color: #00C8C8; }
.v5-contact__btn {
  display: inline-flex; align-items: center; gap: 10px;
  background: #00C8C8;
  color: #132238;
  font-family: inherit;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: .005em;
  border: none;
  border-radius: 50px;
  padding: 13px 36px;
  cursor: pointer;
  transition: transform .15s, box-shadow .15s, background .15s, opacity .15s;
  white-space: nowrap;
}
.v5-contact__btn:hover:not(:disabled) {
  background: #4FDCDC;
  transform: translateY(-1px);
  box-shadow: 0 10px 28px rgba(0,200,200,.35);
}
.v5-contact__btn:disabled { opacity: .65; cursor: not-allowed; }
.v5-contact__spinner {
  width: 14px; height: 14px;
  border: 2px solid rgba(19,34,56,.25);
  border-top-color: #132238;
  border-radius: 50%;
  animation: v5-contact-spin .8s linear infinite;
}
@keyframes v5-contact-spin { to { transform: rotate(360deg); } }
.v5-contact__api-error {
  margin: 16px 0 0;
  font-size: 12px;
  color: #FF8888;
  line-height: 1.5;
}
.v5-contact__success { text-align: center; padding: 40px 0; }
.v5-contact__success-icon {
  width: 64px; height: 64px;
  border-radius: 50%;
  border: 1.5px solid #00C8C8;
  background: rgba(0,200,200,.06);
  display: grid; place-items: center;
  margin: 0 auto 22px;
}
.v5-contact__success .v5-contact__title { margin-bottom: 10px; }
@media (max-width: 520px) {
  .v5-contact { padding: 56px 24px; }
  .v5-contact__grid { grid-template-columns: 1fr; }
  .v5-contact__title { font-size: 28px; }
  .v5-contact__foot { flex-direction: column; align-items: stretch; }
  .v5-contact__privacy { max-width: none; text-align: center; }
  .v5-contact__btn { width: 100%; justify-content: center; }
  .v5-contact__deco--br { width: 200px; height: 200px; right: -70px; bottom: -80px; }
  .v5-contact__deco--tr { width: 44px; height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  .v5-contact__spinner { animation: none; }
}


/* =============================================================
   V5 Contact — CTA-only state + modal popup
   ============================================================= */
.v5-contact__inner--cta {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
}
.v5-contact__inner--cta .v5-contact__head { margin-bottom: 0; }
.v5-contact__btn--open { padding: 15px 40px; font-size: 15.5px; }

/* Backdrop */
.v5-contact-modal {
  position: fixed;
  inset: 0;
  background: rgba(8, 18, 32, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: grid;
  place-items: center;
  padding: 24px;
  z-index: 1000;
  animation: v5-modal-bg .25s ease-out;
}
@keyframes v5-modal-bg { from { opacity: 0; } to { opacity: 1; } }

.v5-contact-modal__panel {
  position: relative;
  width: 100%;
  max-width: 680px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  background: #132238;
  color: #FFFFFF;
  border: 1px solid rgba(0, 200, 200, 0.18);
  border-radius: 14px;
  padding: 48px 44px 40px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
  font-family: "DM Sans", system-ui, sans-serif;
  animation: v5-modal-pop .35s cubic-bezier(.2,.9,.25,1.1);
  /* accent top bar via pseudo */
}
.v5-contact-modal__panel::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, #00C8C8, #155DCE);
  border-top-left-radius: 14px;
  border-top-right-radius: 14px;
}
@keyframes v5-modal-pop {
  from { opacity: 0; transform: translateY(12px) scale(.985); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.v5-contact-modal__close {
  position: absolute;
  top: 18px; right: 18px;
  width: 36px; height: 36px;
  display: grid; place-items: center;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 50%;
  color: rgba(255,255,255,.7);
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s, transform .15s;
}
.v5-contact-modal__close:hover {
  background: rgba(0,200,200,.10);
  border-color: rgba(0,200,200,.4);
  color: #00C8C8;
}
.v5-contact-modal__head { text-align: left; margin-bottom: 28px; }
.v5-contact-modal__head .v5-contact__title { font-size: 28px; }
.v5-contact-modal__done { margin-top: 28px; }

/* Inside the modal, force the inner padding/decor to NOT appear */
.v5-contact-modal__panel .v5-contact__deco { display: none; }

/* Responsive modal */
@media (max-width: 520px) {
  .v5-contact-modal { padding: 0; }
  .v5-contact-modal__panel {
    border-radius: 0;
    max-height: 100vh;
    height: 100vh;
    padding: 64px 24px 32px;
  }
  .v5-contact-modal__panel::before { border-radius: 0; }
  .v5-contact-modal__close { top: 14px; right: 14px; }
  .v5-contact-modal__head .v5-contact__title { font-size: 24px; }
}

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