/* Waitlist pop-up (Figma node 574:4013). Lives outside the scaled .page, so sizes are real CSS px. */
.popup {
  width: calc(100% - 32px); max-width: 480px; max-height: calc(100dvh - 32px);
  padding: 0; border: 0; background: transparent; color: var(--ink); overflow: visible;
}
.popup::backdrop { background: rgba(11, 10, 9, .72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.popup[open] { animation: popup-in .55s var(--ease, cubic-bezier(.16, 1, .3, 1)) both; }
.popup[open]::backdrop { animation: popup-fade .4s ease both; }
.popup.is-closing { animation: popup-out .22s ease-in both; }
.popup.is-closing::backdrop { animation: popup-fade .22s ease-in reverse both; }
@keyframes popup-in   { from { opacity: 0; transform: translateY(18px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes popup-out  { to { opacity: 0; transform: translateY(10px) scale(.98); } }
@keyframes popup-fade { from { opacity: 0; } to { opacity: 1; } }
.popup:focus, .popup__card:focus { outline: none; }

.popup__card {
  max-height: calc(100dvh - 32px); overflow-x: hidden; overflow-y: auto;
  background: #12100f; border: 1px solid rgba(237, 232, 222, .1); border-radius: 24px;
  box-shadow: 0 40px 100px rgba(0, 0, 0, .55);
}

/* Banner */
.popup__banner { position: relative; height: 200px; overflow: hidden; }
.popup__banner > img { position: absolute; top: -21.95%; left: -2.05%; width: 106.43%; height: 143.68%; object-fit: cover; }
.popup__banner::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(18, 16, 15, 0) 12.337%, #12100f 97.25%);
}
.popup__close {
  position: absolute; z-index: 1; top: 16px; right: 16px; width: 40px; height: 40px; padding: 0; cursor: pointer;
  display: flex; align-items: center; justify-content: center; border: 0; border-radius: 999px;
  background: rgba(11, 10, 9, .6); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  transition: background-color .18s ease-out;
}
.popup__close:hover { background: rgba(11, 10, 9, .85); }

/* Body */
.popup__body { display: flex; flex-direction: column; align-items: stretch; gap: 28px; padding: 0 32px 32px; }
.popup__intro { display: flex; flex-direction: column; gap: 10px; }
.popup__title { font-family: var(--f-display); font-size: 32px; line-height: 1.1; letter-spacing: -1.28px; color: var(--ink); }
.popup__desc { font-size: 16px; line-height: 1.5; letter-spacing: -0.32px; color: #9e988c; }

.popup__fields { display: flex; flex-direction: column; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field__label { display: flex; align-items: baseline; gap: 6px; font-weight: 500; font-size: 14px; line-height: 1.5; letter-spacing: -0.28px; color: var(--ink); }
.field__label em { font-style: normal; font-weight: 400; font-size: 13px; letter-spacing: -0.26px; color: #706b63; }
.field__input {
  width: 100%; height: 52px; padding: 0 16px; border-radius: 12px; outline: none;
  background: #181614; border: 1px solid #302e2b;
  font-size: 15px; line-height: 1.5; letter-spacing: -0.3px; color: var(--ink);
  transition: border-color .18s ease-out;
}
.field__input::placeholder, .field__phone input::placeholder { color: #706b63; }
.field__input:focus, .field__phone:focus-within { border-color: rgba(199, 122, 77, .7); }
.field__input[aria-invalid="true"], .field__phone[aria-invalid="true"] { border-color: #d96a4f; }

/* Phone: country code + number in one box */
.field__phone { display: flex; align-items: center; gap: 12px; }
.field__country { position: relative; display: flex; align-items: center; gap: 4px; height: 24px; padding-right: 12px; border-right: 1px solid #302e2b; }
.field__country select {
  appearance: none; -webkit-appearance: none; margin: 0; padding: 0 20px 0 0; border: 0; outline: none; cursor: pointer;
  background: transparent; font-size: 15px; line-height: 1.5; letter-spacing: -0.3px; color: var(--ink);
}
.field__country select option { background: #181614; color: var(--ink); }
.field__country img { position: absolute; right: 12px; pointer-events: none; }
.field__phone input {
  flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; outline: none; background: transparent;
  font-size: 15px; line-height: 1.5; letter-spacing: -0.3px; color: var(--ink);
}

/* WhatsApp opt-in */
.popup__optin { position: relative; display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; line-height: 1.5; letter-spacing: -0.28px; color: #9e988c; }
.popup__optin input { position: absolute; opacity: 0; width: 20px; height: 20px; margin: 0; cursor: pointer; }
.popup__box {
  width: 20px; height: 20px; flex-shrink: 0; border-radius: 5px; display: flex; align-items: center; justify-content: center;
  background: transparent; border: 1px solid #4a4642; transition: background-color .15s ease-out, border-color .15s ease-out;
}
.popup__box img { opacity: 0; transition: opacity .15s ease-out; }
.popup__optin input:checked + .popup__box { background: var(--accent); border-color: var(--accent); }
.popup__optin input:checked + .popup__box img { opacity: 1; }
.popup__optin input:focus-visible + .popup__box { outline: 2px solid rgba(199, 122, 77, .7); outline-offset: 2px; }

.popup__error { margin-top: -14px; font-size: 13px; line-height: 1.5; color: #e0896a; }
.popup__error[hidden] { display: none; }

.popup__actions { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.popup__submit {
  width: 100%; padding: 17px 24px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--accent); color: var(--bg);
  font-weight: 500; font-size: 16px; line-height: 1.5; letter-spacing: -0.32px;
  transition: filter .18s ease-out;
}
.popup__submit:hover { filter: brightness(1.08); }
.popup__submit[disabled] { opacity: .6; cursor: progress; }
.popup__note { font-size: 13px; line-height: 1.5; letter-spacing: -0.26px; color: #706b63; text-align: center; }
.popup__note a { color: inherit; text-decoration: underline; text-underline-position: from-font; }
.popup__note a:hover { color: #9e988c; }

/* Success state */
.popup__done { gap: 24px; padding-bottom: 36px; }
.popup__done[hidden], .popup__form[hidden] { display: none; }
.popup__check { width: 40px; height: 40px; }
.popup__share { display: flex; flex-direction: column; gap: 12px; padding-top: 20px; border-top: 1px solid #302e2b; }
.popup__share-label { font-weight: 500; font-size: 14px; line-height: 1.5; letter-spacing: -0.28px; color: var(--ink); }
.popup__share-link {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 6px 6px 16px;
  background: #181614; border: 1px solid #302e2b; border-radius: 12px;
  font-size: 15px; line-height: 1.5; letter-spacing: -0.3px; color: var(--ink);
}
.popup__share-link span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.popup__share-link button {
  flex-shrink: 0; padding: 10px 16px; border: 0; border-radius: 9px; cursor: pointer;
  background: rgba(237, 232, 222, .1); color: var(--ink);
  font-weight: 500; font-size: 14px; line-height: 1.5; letter-spacing: -0.28px;
  transition: background-color .18s ease-out;
}
.popup__share-link button:hover { background: rgba(237, 232, 222, .16); }
.popup__back {
  width: 100%; padding: 16px 24px; border-radius: 999px; cursor: pointer;
  background: transparent; border: 1px solid rgba(237, 232, 222, .25); color: var(--ink);
  font-weight: 500; font-size: 16px; line-height: 1.5; letter-spacing: -0.32px;
  transition: background-color .18s ease-out;
}
.popup__back:hover { background: rgba(237, 232, 222, .06); }

/* Shorter windows: a slimmer banner keeps the whole form on screen */
@media (max-height: 820px) {
  .popup__banner { height: 120px; }
  .popup__body { gap: 20px; padding-bottom: 26px; }
  .popup__done { padding-bottom: 28px; }
  .popup__fields { gap: 12px; }
  .field { gap: 6px; }
  .field__input { height: 46px; }
  .popup__submit { padding: 15px 24px; }
  .popup__actions { gap: 10px; }
}
@media (max-width: 520px) {
  .popup__body { padding: 0 22px 26px; }
  .popup__title { font-size: 28px; }
  .popup__banner { height: 150px; }
}
@media (prefers-reduced-motion: reduce) {
  .popup[open], .popup[open]::backdrop, .popup.is-closing, .popup.is-closing::backdrop { animation: none; }
}
