/**
 * Next Gen System — Premium Start-a-Project modal
 */
.ai-pm {
  position: fixed;
  inset: 0;
  z-index: 100050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.ai-pm.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.ai-pm[hidden] {
  display: none !important;
}

.ai-pm.is-open[hidden] {
  display: flex !important;
}

.ai-pm__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 5, 8, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.ai-pm__dialog {
  position: relative;
  z-index: 2;
  width: min(1040px, 100%);
  max-height: min(900px, calc(100vh - 40px));
  overflow: hidden;
  border-radius: 18px;
  background: #101218;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(15, 204, 167, 0.08);
  transform: translateY(18px) scale(0.98);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.ai-pm.is-open .ai-pm__dialog {
  transform: translateY(0) scale(1);
}

.ai-pm__close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 5;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  background: rgba(10, 12, 16, 0.55);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.ai-pm__close:hover {
  background: rgba(15, 204, 167, 0.2);
  border-color: rgba(15, 204, 167, 0.55);
  transform: rotate(90deg);
}

.ai-pm__grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  min-height: 560px;
  max-height: min(900px, calc(100vh - 40px));
}

.ai-pm__visual {
  position: relative;
  overflow: hidden;
  background: #0a0b0f;
}

.ai-pm__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  transition: transform 0.8s ease;
}

.ai-pm.is-open .ai-pm__img {
  transform: scale(1);
}

.ai-pm__visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(8, 10, 14, 0.15) 0%, rgba(8, 10, 14, 0.82) 100%),
    linear-gradient(90deg, transparent 40%, rgba(16, 18, 24, 0.35) 100%);
  pointer-events: none;
}

.ai-pm__visual-copy {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 36px 32px 40px;
}

.ai-pm__eyebrow {
  margin: 0 0 10px;
  font-family: "Sora", sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #0fcca7;
}

.ai-pm__visual-title {
  margin: 0 0 12px;
  font-family: "Sora", sans-serif;
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: #fff;
  max-width: 14ch;
}

.ai-pm__visual-text {
  margin: 0;
  max-width: 32ch;
  font-size: 0.95rem;
  line-height: 1.55;
  color: rgba(220, 224, 232, 0.82);
}

.ai-pm__form-wrap {
  padding: 40px 36px 32px;
  overflow-y: auto;
  background:
    radial-gradient(ellipse 80% 50% at 100% 0%, rgba(15, 204, 167, 0.08), transparent 55%),
    #101218;
}

.ai-pm__kicker {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #0fcca7;
}

.ai-pm__title {
  margin: 0 0 8px;
  font-family: "Sora", sans-serif;
  font-size: clamp(1.45rem, 2vw, 1.85rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #f5f6f8;
}

.ai-pm__lead {
  margin: 0 0 26px;
  font-size: 0.95rem;
  line-height: 1.5;
  color: #9aa3b2;
}

.ai-pm__field {
  margin-bottom: 16px;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.ai-pm__label {
  display: block;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: #c5ccd8;
  line-height: 1.2;
  min-height: 1.2em;
}

.ai-pm__form .form-control {
  width: 100%;
  height: 48px;
  min-height: 48px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  color: #f3f4f8;
  font-size: 0.95rem;
  line-height: 1.3;
  box-shadow: none;
  box-sizing: border-box;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.ai-pm__form textarea.form-control {
  height: auto;
  min-height: 108px;
  padding: 12px 14px;
  resize: vertical;
  line-height: 1.5;
}

.ai-pm__form .form-control::placeholder {
  color: #6f7785;
}

.ai-pm__form .form-control:focus {
  outline: none;
  border-color: rgba(15, 204, 167, 0.65);
  background: rgba(15, 204, 167, 0.05);
  box-shadow: 0 0 0 3px rgba(15, 204, 167, 0.12);
}

.ai-pm__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  align-items: start;
}

.ai-pm__row > .ai-pm__field {
  margin-bottom: 16px;
}

/* Unified phone shell — same height as email input */
.ai-pm__phone-shell {
  display: flex;
  align-items: stretch;
  width: 100%;
  height: 48px;
  min-height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  overflow: hidden;
  box-sizing: border-box;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.ai-pm__phone-shell:focus-within {
  border-color: rgba(15, 204, 167, 0.65);
  background: rgba(15, 204, 167, 0.05);
  box-shadow: 0 0 0 3px rgba(15, 204, 167, 0.12);
}

.ai-pm__dial {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 64px;
  width: 64px;
  margin: 0;
  padding: 0 8px;
  border: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.04);
  color: #0fcca7;
  font-weight: 600;
  font-size: 0.92rem;
  line-height: 1;
  white-space: nowrap;
  box-sizing: border-box;
}

.ai-pm__phone-shell .form-control {
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
  height: 100%;
  min-height: 0;
  margin: 0;
  padding: 0 14px;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.ai-pm__phone-shell .form-control:focus {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
.ai-pm__submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 52px;
  margin-top: 8px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, #0fcca7 0%, #0bb894 100%);
  color: #06120f;
  font-family: "Sora", sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: transform 0.2s ease, filter 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 10px 28px rgba(15, 204, 167, 0.28);
}

.ai-pm__submit:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.ai-pm__note {
  margin: 14px 0 0;
  text-align: center;
  font-size: 12px;
  color: #7d8694;
}

.ai-pm__note a {
  color: #0fcca7;
  text-decoration: none;
}

.ai-pm__note a:hover {
  text-decoration: underline;
}

body.ai-pm-open {
  overflow: hidden !important;
}

@media (max-width: 899px) {
  .ai-pm {
    padding: 12px;
    align-items: flex-end;
  }

  .ai-pm__dialog {
    width: 100%;
    max-height: calc(100vh - 24px);
    border-radius: 16px 16px 12px 12px;
  }

  .ai-pm__grid {
    grid-template-columns: 1fr;
    min-height: 0;
    max-height: calc(100vh - 24px);
    overflow-y: auto;
  }

  .ai-pm__visual {
    min-height: 200px;
    max-height: 230px;
  }

  .ai-pm__visual-copy {
    padding: 20px 22px 22px;
  }

  .ai-pm__visual-title {
    max-width: none;
    font-size: 1.35rem;
  }

  .ai-pm__visual-text {
    display: none;
  }

  .ai-pm__form-wrap {
    padding: 24px 20px 22px;
  }

  .ai-pm__row {
    grid-template-columns: 1fr;
  }

  .ai-pm__close {
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.45);
  }
}

@media (max-width: 479px) {
  .ai-pm__visual {
    min-height: 160px;
    max-height: 180px;
  }
}
