/* ============================================================
   Prizeflow · Prototype access gate dialog
   Shared between homepage + case studies.
   ============================================================ */

.pg-backdrop {
  position: fixed; inset: 0; z-index: 9000;
  background: rgba(8, 10, 24, 0.62);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 220ms cubic-bezier(0.2, 0.7, 0.2, 1);
}
.pg-backdrop.open { display: flex; opacity: 1; }

.pg-dialog {
  width: 100%; max-width: 460px;
  background: #161F40;
  color: #F2FDFF;
  border: 1px solid rgba(196, 185, 219, 0.16);
  border-radius: 22px;
  box-shadow:
    0 40px 80px -16px rgba(0, 0, 0, 0.7),
    0 1px 0 rgba(255, 255, 255, 0.05) inset;
  overflow: hidden;
  font-family: 'Outfit', ui-sans-serif, system-ui, -apple-system, sans-serif;
  transform: translateY(12px) scale(0.98);
  transition: transform 240ms cubic-bezier(0.2, 0.7, 0.2, 1);
  position: relative;
}
.pg-backdrop.open .pg-dialog { transform: translateY(0) scale(1); }

.pg-close {
  position: absolute; top: 14px; right: 14px;
  width: 32px; height: 32px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: none; cursor: pointer;
  color: rgba(255, 255, 255, 0.7);
  display: flex; align-items: center; justify-content: center;
  transition: all 160ms;
}
.pg-close:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }

.pg-head {
  padding: 32px 32px 8px;
}
.pg-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 11px; font-weight: 500; letter-spacing: 0.22em;
  text-transform: uppercase; color: #9AD4D6;
  margin-bottom: 14px;
}
.pg-eyebrow .dot {
  width: 6px; height: 6px; border-radius: 999px; background: #9AD4D6;
  box-shadow: 0 0 10px #9AD4D6;
}
.pg-title {
  font-size: 24px; font-weight: 300; letter-spacing: -0.022em;
  line-height: 1.2; margin: 0 0 8px;
  color: #F2FDFF;
}
.pg-title em {
  font-style: normal !important;
  background: linear-gradient(135deg, #DBCBD8, #9AD4D6);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.pg-sub {
  font-size: 14px; line-height: 1.55; font-weight: 300;
  color: rgba(196, 185, 219, 0.85);
  margin: 0;
}

.pg-form {
  padding: 18px 32px 28px;
  display: flex; flex-direction: column; gap: 12px;
}
.pg-field { display: flex; flex-direction: column; gap: 6px; }
.pg-label {
  font-size: 11px; font-weight: 500; letter-spacing: 0.18em;
  text-transform: uppercase; color: rgba(196, 185, 219, 0.65);
}
.pg-input {
  width: 100%;
  padding: 12px 14px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(196, 185, 219, 0.14);
  border-radius: 12px;
  color: #F2FDFF;
  font-size: 15px; font-weight: 400;
  font-family: inherit;
  transition: all 160ms;
  -webkit-appearance: none;
  appearance: none;
}
.pg-input::placeholder { color: rgba(196, 185, 219, 0.35); }
.pg-input:focus {
  outline: none;
  border-color: rgba(154, 212, 214, 0.5);
  background: rgba(0, 0, 0, 0.38);
  box-shadow: 0 0 0 3px rgba(154, 212, 214, 0.16);
}
.pg-input[aria-invalid="true"] {
  border-color: rgba(198, 74, 91, 0.6);
}
select.pg-input {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'><path d='M1 1l5 5 5-5' stroke='%23C4B9DB' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

.pg-actions {
  margin-top: 8px;
  display: flex; gap: 10px; align-items: center;
}
.pg-submit {
  flex: 1;
  padding: 13px 20px;
  border: none; border-radius: 12px;
  background: linear-gradient(135deg, #806AAA, #564787);
  color: #fff;
  font-family: inherit;
  font-size: 14px; font-weight: 600;
  letter-spacing: -0.005em;
  cursor: pointer;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.16) inset,
    0 12px 28px -6px rgba(86, 71, 135, 0.7),
    0 2px 4px rgba(0, 0, 0, 0.35);
  transition: all 160ms;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.pg-submit:hover { transform: translateY(-1px); }
.pg-submit:active { transform: translateY(0); }
.pg-submit:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.pg-cancel {
  padding: 13px 16px;
  border: none; border-radius: 12px;
  background: transparent;
  color: rgba(196, 185, 219, 0.7);
  font-family: inherit;
  font-size: 13px; font-weight: 500;
  cursor: pointer;
}
.pg-cancel:hover { color: #F2FDFF; }

.pg-fine {
  font-size: 11px; color: rgba(196, 185, 219, 0.55);
  margin: 14px 0 0;
  line-height: 1.5;
}

/* Success state */
.pg-dialog.is-success .pg-head,
.pg-dialog.is-success .pg-form { display: none; }
.pg-success {
  display: none;
  padding: 40px 32px;
  text-align: center;
  flex-direction: column; align-items: center; gap: 16px;
}
.pg-dialog.is-success .pg-success { display: flex; }
.pg-success-check {
  width: 56px; height: 56px; border-radius: 999px;
  background: rgba(154, 212, 214, 0.16);
  color: #9AD4D6;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(154, 212, 214, 0.3);
}
.pg-success h3 {
  font-size: 20px; font-weight: 400; letter-spacing: -0.018em;
  margin: 0; color: #F2FDFF;
}
.pg-success p {
  font-size: 14px; font-weight: 300; color: rgba(196, 185, 219, 0.85);
  margin: 0; line-height: 1.5;
}

/* Mobile */
@media (max-width: 520px) {
  .pg-backdrop { padding: 12px; align-items: flex-end; }
  .pg-dialog {
    max-width: 100%;
    border-radius: 22px 22px 18px 18px;
  }
  .pg-head { padding: 28px 22px 6px; }
  .pg-form { padding: 14px 22px 24px; }
  .pg-title { font-size: 21px; }
  .pg-actions { flex-direction: column-reverse; align-items: stretch; }
  .pg-cancel { width: 100%; }
}
