/* ===========================================================
   modal.css — compact luxury lead-capture pop-up
   =========================================================== */
.rp-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(6, 11, 17, 0.82);
  backdrop-filter: blur(9px);
}
.rp-modal.open {
  display: flex;
  animation: modalFade 0.3s ease;
}
@keyframes modalFade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.rp-modal__panel {
  position: relative;
  border-top: 3px solid var(--gold, #b6924f);
  animation: modalRise 0.38s cubic-bezier(0.22, 0.8, 0.32, 1);
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.12fr);
  width: min(740px, 100%);
  max-height: min(560px, calc(100vh - 36px));
  min-height: min(520px, calc(100vh - 36px));
  overflow: hidden;
  padding: 0;
  border: 1px solid rgba(212, 177, 106, 0.72);
  border-radius: 9px;
  background: #081521;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.68),
  inset 0 0 0 3px rgba(212, 177, 106, 0.10);
}

.rp-modal__visual {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: #1b211f;
}

.rp-modal__visual img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: saturate(.82) brightness(.86);
}
.rp-modal__visual picture {
  display: block;
  width: 100%;
  height: 100%;
}

.rp-modal__content {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: 28px 34px 20px;
  background: radial-gradient(ellipse at 50% 0, rgba(212, 177, 106, .055), transparent 42%), #081521;
}
@keyframes modalRise {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.rp-modal__logo {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto 10px;
}

.rp-modal__logo img {
  width: 54px;
  height: auto;
  display: block;
}

.rp-modal__close {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(182, 146, 79, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition:
    color 0.2s,
    border-color 0.2s;
  z-index: 2;
  top: 15px;
  right: 15px;
  width: 32px;
  height: 32px;
  border-color: rgba(212, 177, 106, .7);
  color: var(--ink);
  font-size: 18px;
}
.rp-modal__close:hover {
  background: var(--gold);
  color: var(--accent-950);
  border-color: var(--gold);
}

.rp-modal__header {
  border-bottom: 1px solid rgba(182, 146, 79, 0.22);
  padding-bottom: 12px;
  margin-bottom: 13px;
  text-align: center;
  border: 0;
  padding: 0;
  margin: 0 0 16px;
}
.rp-modal__eyebrow {
  display: block;
  text-transform: uppercase;
  color: var(--gold);
  font-size: 11px;
  letter-spacing: .25em;
  margin-bottom: 14px;
}
.rp-modal__title {
  color: var(--gold-soft);
  font-family: var(--serif, Georgia, serif);
  font-weight: 400;
  font-size: clamp(30px, 3.6vw, 36px);
  letter-spacing: .12em;
  line-height: 1;
  margin: 0 0 9px;
}
.rp-modal__sub {
  line-height: 1.45;
  max-width: 340px;
  margin: 0 auto;
  color: rgba(244, 246, 248, .78);
  font-size: 13px;
  line-height: 1.45;
}

.rp-modal__form {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}

.rp-modal__form .lf-field {
  min-width: 0;
  margin: 0;
}

.rp-modal__form .lf-field:nth-of-type(n + 3),
.rp-modal__form .lf-error,
.rp-modal__form .btn-gold,
.rp-modal__form .lf-fine {
  grid-column: 1;
}
.rp-modal__form .lf-label {
  text-transform: uppercase;
  color: rgba(244, 246, 248, .86);
  font-size: 10px;
  letter-spacing: .15em;
  margin-bottom: 6px;
}
.lf-optional {
  font-size: 8px;
  letter-spacing: 0.06em;
  color: rgba(247, 240, 236, 0.28);
  text-transform: none;
}
.rp-modal__form input[type="text"],
.rp-modal__form input[type="email"],
.rp-modal__form input[type="tel"],
.rp-modal__form textarea {
  width: 100%;
  padding: 8px 10px;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
  resize: none;
  min-height: 38px;
  padding: 7px 10px;
  color: var(--ink);
  background: rgba(255,255,255,.025);
  border: 1px solid rgba(255,255,255,.08);
  border-bottom: 1px solid rgba(212, 177, 106, .5);
  border-radius: 2px;
  font-size: 13px;
}
.rp-modal__form input[type="text"]::placeholder,
.rp-modal__form input[type="email"]::placeholder,
.rp-modal__form input[type="tel"]::placeholder,
.rp-modal__form textarea::placeholder {
  color: rgba(244, 246, 248, .42);
}
.rp-modal__form input[type="text"]:focus,
.rp-modal__form input[type="email"]:focus,
.rp-modal__form input[type="tel"]:focus,
.rp-modal__form textarea:focus {
  border-color: var(--gold, #b6924f);
  background: rgba(255,255,255,.055);
}

.rp-modal__form .phone-field {
  display: flex;
  align-items: center;
  border-radius: 2px;;
  transition: border-color 0.2s, background 0.2s;
  min-height: 38px;
  border: 0;
  border-bottom: 1px solid rgba(212, 177, 106, .5);
  border-radius: 0;
  background: rgba(255,255,255,.025);
}

.rp-modal__form .phone-field input[type="tel"] {
  border: 0;
  background: transparent;
}
.rp-modal__form .phone-field:focus-within {
  border-color: var(--gold, #b6924f);
  background: rgba(255,255,255,.055);
}
.rp-modal__form .phone-field input[type="tel"] {
  border: none;
  background: transparent;
  padding: 7px 8px;
}
.rp-modal__form .cc-trigger {
  background: none;
  border: none;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  white-space: nowrap;
  min-height: 37px;
  padding: 0 10px;
  border-right: 1px solid rgba(255,255,255,.12);
  color: var(--ink);
}
.rp-modal__form .cc-trigger .cc-flag {
  display: flex;
  align-items: center;
}
.rp-modal__form .cc-trigger .cc-flag .cc-flag-img {
  width: 22px;
  height: 15px;
  object-fit: cover;
  border-radius: 2px;
  display: block;
}

.rp-modal__form .btn-gold {
  width: 100%;
  justify-content: center;
  padding-top: 9px;
  padding-bottom: 9px;
  min-height: 44px;
  margin-top: 2px;
  border-radius: 3px;
  color: #17202a;
  font-size: 12px;
  letter-spacing: .14em;
}
.rp-modal__form .lf-error {
  min-height: 0;
}
.rp-modal__form .lf-fine {
  text-align: center;
  margin-top: 10px;
  line-height: 1.45;
  margin: 1px 0 0;
  color: rgba(244, 246, 248, .5);
  font-size: 10px;
}

.rp-modal__form .cc-dropdown {
  top: auto;
  bottom: calc(100% + 6px);
  z-index: 50;
  max-height: min(264px, calc(100dvh - 180px));
  background: var(--paper);
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 20px 50px rgba(0,0,0,.45);
}
.rp-modal__form .cc-dropdown::-webkit-scrollbar {
  width: 6px;
}
.rp-modal__form .cc-dropdown::-webkit-scrollbar-track {
  background: rgba(255,255,255,.04);
}
.rp-modal__form .cc-dropdown::-webkit-scrollbar-thumb {
  background: rgba(212,177,106,.62);
  border-radius: 8px;
}
.rp-modal__form .cc-dropdown .cc-search-wrap {
  background: var(--paper);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.rp-modal__form .cc-dropdown .cc-search {
  background: transparent;
  border: 1px solid rgba(255,255,255,.08);
  color:var(--ink);
}
.rp-modal__form .cc-dropdown .cc-search::placeholder {
  color: rgba(255,255,255,.55);
}
.rp-modal__form .cc-dropdown .cc-opt {
  background: transparent;
  color: var(--ink);
  border-bottom: 1px solid rgba(255,255,255,.05);
  outline: none;
  box-shadow: none;
}
.rp-modal__form .cc-dropdown .cc-opt:hover {
  background: rgba(212, 177, 106, 0.10);
  color: var(--ink);
}
.rp-modal__form .cc-dropdown .cc-opt .cc-dial {
  color: rgba(255,255,255,.60);
}
.rp-modal__form .cc-divider {
  background: rgba(255,255,255,.08);
}

@media (max-width: 480px) {
  .rp-modal {
    padding: 12px;
    align-items: flex-end; 
  }
  .rp-modal__panel {
    width: 100%;
    max-height: calc(100vh - 12px);
    padding: 17px 18px 14px;
    border-radius: 6px 6px 0 0; 
  }
  .rp-modal__logo { margin-bottom: 7px; }
  .rp-modal__logo img { width: 64px; }
  .rp-modal__header {
    padding-bottom: 12px;
    margin-bottom: 12px;
  }
  .rp-modal__form .lf-field {
    margin: 0;
  }
  .rp-modal__form .btn-gold {
    margin-top: 1px;
  }
}

@media (max-width: 350px) {
  .rp-modal__form {
    grid-template-columns: 1fr;
  }
  .rp-modal__form .lf-field {
    grid-column: 1;
  }
}

@media (max-width: 640px) {
  .rp-modal {
    align-items: flex-start !important;
    justify-content: center !important;
    padding: 12px !important;
  }
  .rp-modal__panel {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: 190px minmax(0, auto);
    min-height: 0;
    overflow-y: auto;
    margin-top: 0 !important;
    position: relative;
    top: 40 !important;
    transform: none !important;
    width: min(440px, 100%);
    max-height: calc(100vh - 24px);
  }
  .rp-modal__visual {
    min-height: 190px;
    height: 190px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #081521;
  }
  .rp-modal__visual img {
    object-fit: cover;
    object-position: center;
  }
  .rp-modal__content {
    padding-top: 10px;
    padding-bottom: 11px;
    padding: 16px 22px 17px;
  }
  .rp-modal__logo {
    margin-bottom: 3px;
  }
  .rp-modal__logo img {
    width: 38px;
  }
  .rp-modal__header {
    margin-bottom: 6px;
  }
  .rp-modal__title {
    font-size: 23px;
    margin-bottom: 4px;
  }
  .rp-modal__eyebrow {
    margin-bottom: 5px;
  }
  .rp-modal__sub {
    font-size: 10px;
    line-height: 1.3;
  }
  .rp-modal__form {
    gap: 4px;
  }
  .rp-modal__form .lf-label {
    margin-bottom: 2px;
  }
  .rp-modal__form input[type="text"],
  .rp-modal__form input[type="email"],
  .rp-modal__form input[type="tel"] {
    min-height: 32px;
    padding-top: 4px;
    padding-bottom: 4px;
  }
  .rp-modal__form .phone-field,
  .rp-modal__form .cc-trigger {
    min-height: 32px;
  }
  .rp-modal__form .btn-gold {
    min-height: 38px;
  }
  .rp-modal__close {
    top: 9px;
    right: 9px;
    width: 29px;
    height: 29px;
  }
}

@media (max-width: 360px) {
  .rp-modal__content {
    padding: 14px 17px;
  }
  .rp-modal__visual {
    min-height: 96px;
  }
  .rp-modal {
    align-items: flex-start !important;
    justify-content: center !important;
    padding: 10px !important;
  }
  .rp-modal__panel {
    margin-top: 0 !important;
    top: 40px !important;
    transform: none !important;
    grid-template-rows: 96px minmax(0, auto);
    width: 100%;
    max-height: calc(100vh - 20px);
  }
}

@media (max-height: 620px) and (min-width: 641px) {
  .rp-modal__panel {
    min-height: 0;
  }
  .rp-modal__content {
    padding-top: 18px;
    padding-bottom: 14px;
  }
  .rp-modal__logo {
    margin-bottom: 5px;
  }
  .rp-modal__logo img {
    width: 42px;
  }
  .rp-modal__header {
    margin-bottom: 9px;
  }
  .rp-modal__title {
    font-size: 29px;
  }
  .rp-modal__eyebrow {
    margin-bottom: 8px;
  }
  .rp-modal__form {
    gap: 7px;
  }
}
