/* Lead form popup — matches the homepage palette and type. */
html.lf-lock { overflow: hidden; }
.lf [hidden] { display: none !important; }

.lf {
  --ink: #25252B; --muted: #5E5E66; --line: #E3E1E3; --paper: #FAFAF8;
  --purple: #8965B0; --lilac: #C9B5DC; --error: #B3261E;
  padding: 0; border: 0; margin: auto; background: transparent; color: var(--ink);
  width: min(100% - 32px, 640px); max-width: none; max-height: calc(100dvh - 48px);
  font-family: 'DM Sans', system-ui, sans-serif; -webkit-font-smoothing: antialiased;
  overflow: visible;
}
.lf::backdrop { background: rgba(37, 37, 43, 0.62); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.lf[open] { animation: lf-in 420ms cubic-bezier(.2, .8, .2, 1) both; }
.lf[open]::backdrop { animation: lf-fade 300ms ease both; }
@keyframes lf-in { from { opacity: 0; transform: translateY(18px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes lf-fade { from { opacity: 0; } to { opacity: 1; } }

.lf-panel {
  position: relative; background: var(--paper); max-height: calc(100dvh - 48px); overflow-y: auto;
  box-shadow: 0 30px 80px rgba(37, 37, 43, 0.35); border-top: 3px solid var(--purple);
  overscroll-behavior: contain;
}
.lf-body { padding: clamp(28px, 4.5vw, 48px); }
.lf-panel:focus { outline: none; }

.lf-close {
  position: absolute; top: 14px; right: 14px; width: 40px; height: 40px; display: grid; place-items: center;
  background: transparent; border: 0; color: var(--muted); cursor: pointer; transition: color 200ms, transform 200ms;
}
.lf-close:hover { color: var(--purple); transform: rotate(90deg); }

.lf-eyebrow { display: block; padding-right: 44px; font-size: 12px; letter-spacing: 0.3em; text-transform: uppercase; font-weight: 500; color: var(--purple); }
.lf-title {
  margin: 14px 0 0; font-family: 'Instrument Serif', Georgia, serif; font-weight: 400;
  font-size: clamp(34px, 4.6vw, 48px); line-height: 1.02; letter-spacing: -0.02em; text-wrap: balance; outline: none;
}
.lf-title em { font-style: italic; color: var(--purple); }
.lf-lede { margin: 14px 0 0; font-size: 16px; line-height: 1.55; color: var(--muted); max-width: 46ch; text-wrap: pretty; }

/* Call / Text / Email: one tap on phones, copyable details on desktop. */
.lf-opts { margin-top: clamp(20px, 2.6vw, 26px); display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 0.8fr) minmax(0, 1.4fr); gap: 10px; }
.lf-opt {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; padding: 16px 16px 14px;
  background: #FFFFFF; border: 1px solid var(--line); color: var(--ink); text-decoration: none;
  transition: border-color 200ms, background 200ms, transform 200ms;
}
.lf-opt svg { color: var(--purple); margin-bottom: 6px; }
.lf-opt:hover, .lf-opt:focus-visible { border-color: var(--purple); background: #F4EFF8; transform: translateY(-2px); outline: none; }
.lf-opt-label { font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; font-weight: 500; }
.lf-opt-value { font-size: 14px; color: var(--muted); max-width: 100%; overflow-wrap: anywhere; }
@media (max-width: 520px) {
  .lf-opts { grid-template-columns: 1fr; gap: 8px; }
  .lf-opt { flex-direction: row; align-items: center; gap: 12px; padding: 12px 14px; }
  .lf-opt svg { margin: 0; flex: none; }
  .lf-opt-label { min-width: 4.2em; }
}
.lf-or { display: flex; align-items: center; gap: 14px; margin-top: clamp(22px, 3vw, 28px); font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }
.lf-or::after { content: ''; flex: 1; height: 1px; background: var(--line); }

.lf-form { margin-top: clamp(16px, 2vw, 22px); display: flex; flex-direction: column; gap: 18px; }
.lf-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 18px; }
.lf-field { display: flex; flex-direction: column; gap: 8px; min-width: 0; border: 0; margin: 0; padding: 0; }
.lf-label, .lf-chips legend { font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; font-weight: 500; color: var(--ink); padding: 0; }
.lf-label i { font-style: normal; color: var(--purple); }

.lf-field input, .lf-field textarea {
  width: 100%; box-sizing: border-box; font: inherit; font-size: 16px; color: var(--ink);
  background: #FFFFFF; border: 1px solid var(--line); border-radius: 0; padding: 13px 14px;
  transition: border-color 200ms, box-shadow 200ms; -webkit-appearance: none; appearance: none;
}
.lf-field textarea { resize: vertical; min-height: 104px; line-height: 1.5; }
.lf-field input::placeholder, .lf-field textarea::placeholder { color: #A3A1A8; }
.lf-field input:focus, .lf-field textarea:focus { outline: none; border-color: var(--purple); box-shadow: 0 0 0 3px rgba(137, 101, 176, 0.18); }
.lf-invalid input, .lf-invalid textarea { border-color: var(--error); }

/* Floating labels: the label sits inside the empty field and moves up on focus or once filled. */
.lf-float { position: relative; gap: 6px; }
.lf-float input, .lf-float textarea { padding: 25px 14px 9px; }
.lf-float .lf-label {
  position: absolute; left: 15px; top: 17px; right: 15px; pointer-events: none;
  font-size: 16px; letter-spacing: 0; text-transform: none; font-weight: 400; color: #8A8890;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: top 180ms cubic-bezier(.2, .8, .2, 1), font-size 180ms, letter-spacing 180ms, color 180ms;
}
.lf-float input::placeholder, .lf-float textarea::placeholder { color: transparent; }
.lf-float input:focus + .lf-label, .lf-float textarea:focus + .lf-label,
.lf-float input:not(:placeholder-shown) + .lf-label, .lf-float textarea:not(:placeholder-shown) + .lf-label,
.lf-float input:-webkit-autofill + .lf-label {
  top: 8px; font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase; font-weight: 500; color: var(--muted);
}
.lf-float input:focus + .lf-label, .lf-float textarea:focus + .lf-label { color: var(--purple); }
.lf-float.lf-invalid .lf-label { color: var(--error); }
.lf-float textarea { min-height: 112px; }
.lf-err { font-size: 13px; color: var(--error); min-height: 0; }
.lf-err:empty { display: none; }

.lf-chips legend { margin-bottom: 10px; }
.lf-chips > div { display: flex; flex-wrap: wrap; gap: 8px; }
.lf-chips label { position: relative; cursor: pointer; }
.lf-chips input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.lf-chips span {
  display: inline-block; font-size: 14px; padding: 9px 16px; border: 1px solid var(--line); background: #FFFFFF;
  border-radius: 999px; transition: border-color 200ms, background 200ms, color 200ms;
}
.lf-chips label:hover span { border-color: var(--purple); }
.lf-chips input:checked + span { background: var(--ink); border-color: var(--ink); color: #FFFFFF; }
.lf-chips input:focus-visible + span { outline: 2px solid var(--purple); outline-offset: 2px; }

.lf-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.lf-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-top: 6px; }
.lf-submit {
  display: inline-flex; align-items: center; gap: 14px; background: var(--ink); color: #FFFFFF; border: 0; border-radius: 0;
  font: inherit; font-size: 16px; font-weight: 500; padding: 18px 30px; cursor: pointer;
  transition: background 200ms, gap 200ms, opacity 200ms;
}
.lf-submit:hover { background: var(--purple); gap: 20px; }
.lf-submit:focus-visible, .lf-close:focus-visible { outline: 2px solid var(--purple); outline-offset: 3px; }
.lf-submit:disabled { opacity: 0.7; cursor: progress; }
.lf-busy svg { animation: lf-nudge 900ms ease-in-out infinite; }
@keyframes lf-nudge { 50% { transform: translateX(5px); } }
.lf-fine { font-size: 13px; color: var(--muted); }

.lf-status { margin: 0; font-size: 14px; line-height: 1.5; }
.lf-status:empty { display: none; }
.lf-status-error { color: var(--error); }
.lf-status a { color: inherit; text-decoration: underline; }

.lf-done { padding: 8px 0 4px; }
.lf-done .lf-submit { margin-top: 28px; }
.lf-check {
  display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%;
  background: rgba(137, 101, 176, 0.12); color: var(--purple);
}

/* Phones: slide up as a bottom sheet. */
@media (max-width: 600px) {
  .lf { width: 100%; margin: auto 0 0; max-height: 92dvh; }
  .lf-panel { max-height: 92dvh; }
  .lf[open] { animation-name: lf-up; }
  .lf-submit { width: 100%; justify-content: center; }
  .lf-eyebrow { font-size: 11px; letter-spacing: 0.2em; }
}
@keyframes lf-up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  .lf[open], .lf[open]::backdrop, .lf-busy svg { animation: none; }
}

/* Keep the floated label readable when a long message scrolls under it. */
.lf-float textarea + .lf-label { background: #FFFFFF; padding-bottom: 4px; }
