/* Ryan's House LLC — Email Capture Modal
   Center overlay triggered at 40% scroll depth. Brand: navy + gold + cream. */

.rh-ec-overlay {
  position: fixed; inset: 0; z-index: 2147483640;
  display: flex; align-items: center; justify-content: center; padding: 1rem;
  background: rgba(10, 20, 35, 0.62); backdrop-filter: blur(6px);
  opacity: 0; visibility: hidden; transition: opacity .28s ease, visibility .28s ease;
}
.rh-ec-overlay.is-visible { opacity: 1; visibility: visible; }

.rh-ec-modal {
  position: relative;
  width: min(460px, 100%);
  background: #faf6ee;
  color: #12274f;
  border-radius: 20px;
  border: 1px solid #e7ded0;
  box-shadow: 0 30px 80px rgba(10, 26, 58, 0.42);
  padding: 34px 30px 30px;
  text-align: center;
  transform: translateY(14px) scale(.985);
  transition: transform .28s ease;
  font-family: "Open Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}
.rh-ec-overlay.is-visible .rh-ec-modal { transform: translateY(0) scale(1); }

.rh-ec-close {
  position: absolute; top: 12px; right: 12px;
  width: 38px; height: 38px; border: 0; border-radius: 50%;
  background: rgba(18, 39, 79, 0.08); color: #12274f;
  font-size: 1.4rem; line-height: 1; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .15s ease;
}
.rh-ec-close:hover { background: rgba(18, 39, 79, 0.16); }

.rh-ec-emblem { display: inline-flex; margin-bottom: 8px; }
.rh-ec-emblem svg { width: 46px; height: 44px; }

.rh-ec-eyebrow {
  margin: 0 0 6px; color: #7e580f; font-size: 0.72rem; font-weight: 800;
  letter-spacing: 0.12em; text-transform: uppercase;
}
.rh-ec-heading {
  margin: 0 0 8px; font-family: Lora, Georgia, serif;
  font-size: 1.5rem; font-weight: 600; line-height: 1.2; color: #12274f;
}
.rh-ec-subtext { margin: 0 auto 18px; max-width: 360px; color: #4a5568; font-size: 0.95rem; line-height: 1.55; }

.rh-ec-form { display: block; }
.rh-ec-input {
  width: 100%; box-sizing: border-box;
  border: 1px solid #cbb78c; border-radius: 12px;
  padding: 13px 15px; font: inherit; font-size: 1rem; color: #12274f; background: #fff;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.rh-ec-input:focus { outline: none; border-color: #c8902f; box-shadow: 0 0 0 3px rgba(217, 162, 63, 0.25); }
.rh-ec-error { margin: 8px 0 0; min-height: 1.1em; color: #b3261e; font-size: 0.82rem; font-weight: 600; text-align: left; }

.rh-ec-submit {
  width: 100%; margin-top: 12px;
  border: 0; border-radius: 999px;
  background: #c8902f; color: #0a1a3a;
  padding: 13px 18px; font: inherit; font-size: 1rem; font-weight: 700; cursor: pointer;
  transition: background .15s ease, box-shadow .15s ease, transform .15s ease;
}
.rh-ec-submit:hover { background: #d9a23f; box-shadow: 0 8px 22px rgba(200, 144, 47, 0.4); transform: translateY(-1px); }
.rh-ec-submit:disabled { opacity: .7; cursor: default; transform: none; }

.rh-ec-dismiss {
  display: inline-block; margin-top: 12px;
  border: 0; background: transparent; color: #6b7280;
  font: inherit; font-size: 0.85rem; text-decoration: underline; cursor: pointer;
}
.rh-ec-dismiss:hover { color: #12274f; }

.rh-ec-fineprint { margin: 14px 0 0; color: #8a99ad; font-size: 0.72rem; line-height: 1.5; }
.rh-ec-fineprint a { color: #7e580f; }

.rh-ec-success { padding: 8px 0; }
.rh-ec-success-heading { margin: 0 0 6px; font-family: Lora, Georgia, serif; font-size: 1.3rem; font-weight: 600; color: #12274f; }
.rh-ec-success-text { margin: 0; color: #4a5568; font-size: 0.95rem; line-height: 1.55; }

@media (max-width: 480px) {
  .rh-ec-modal { padding: 30px 20px 24px; }
  .rh-ec-heading { font-size: 1.32rem; }
}
