/* DC Contact Modal — matches deancacioppo.com: near-black, cyan pill accent, Manrope */
.dcm {
  --dcm-ink: #0f0f0f;
  --dcm-panel: #161616;
  --dcm-line: rgba(255, 255, 255, 0.14);
  --dcm-text: #ffffff;
  --dcm-muted: #c9c9c9;
  --dcm-cyan: #00d6d6;
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(12px, 3vw, 32px);
  font-family: Manrope, system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--dcm-text);
}
.dcm[hidden] { display: none; }

.dcm__scrim {
  position: absolute;
  inset: 0;
  background: rgba(4, 4, 4, 0.78);
  opacity: 0;
  transition: opacity 240ms cubic-bezier(0.16, 1, 0.3, 1);
}

.dcm__panel {
  position: relative;
  width: min(560px, 100%);
  max-height: 100%;
  display: flex;
  flex-direction: column;
  padding: clamp(24px, 4vw, 40px);
  background: var(--dcm-panel);
  border: 1px solid var(--dcm-line);
  border-radius: 28px;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.55);
  overflow-y: auto; /* GHL resizes its iframe to the form; let a taller form scroll inside the panel */
  opacity: 0;
  transform: translateY(16px) scale(0.985);
  transition: opacity 280ms cubic-bezier(0.16, 1, 0.3, 1), transform 280ms cubic-bezier(0.16, 1, 0.3, 1);
}
.dcm.is-open .dcm__scrim { opacity: 1; }
.dcm.is-open .dcm__panel { opacity: 1; transform: none; }

.dcm__title {
  margin: 0 56px 8px 0;
  font-size: clamp(30px, 5vw, 42px);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--dcm-text);
  text-wrap: balance;
}
.dcm__title:focus { outline: none; }
.dcm__lede {
  margin: 0 0 24px;
  font-size: 18px;
  line-height: 1.5;
  font-weight: 500;
  color: var(--dcm-muted);
}

.dcm__close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  padding: 0;
  color: var(--dcm-text);
  background: transparent;
  border: 1px solid var(--dcm-line);
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}
.dcm__close:hover { background: var(--dcm-cyan); border-color: var(--dcm-cyan); color: #000; }
.dcm__close:focus-visible,
.dcm__retry:focus-visible { outline: 3px solid var(--dcm-cyan); outline-offset: 3px; }

.dcm__frame {
  position: relative;
  flex: 0 0 auto;
  min-height: 360px;
  overflow: hidden;
  background: #ffffff;
  border-radius: 18px;
}
.dcm__iframe {
  display: block;
  width: 100%;
  height: min(560px, 58vh);
  min-height: 360px;
  border: 0;
  background: #ffffff;
  opacity: 0;
  visibility: hidden; /* not focusable or announced until the form has actually loaded */
  transition: opacity 240ms ease;
}
.dcm.is-ready .dcm__iframe { opacity: 1; visibility: visible; }

/* The status node stays in the layout so screen readers announce its text change; only the fail panel toggles display. */
.dcm__status { display: flex; opacity: 0; pointer-events: none; }
.dcm.is-loading .dcm__status { opacity: 1; }
.dcm__status,
.dcm__failed {
  position: absolute;
  inset: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 0;
  padding: 24px;
  text-align: center;
  font-size: 17px;
  font-weight: 500;
  color: #2a2a2a;
}
.dcm__failed { display: none; }
.dcm.is-failed .dcm__failed { display: flex; }
.dcm__failed p { margin: 0; }
.dcm__retry {
  height: 48px;
  padding: 0 28px;
  font: inherit;
  font-weight: 700;
  color: #000;
  background: var(--dcm-cyan);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
}
.dcm__retry:hover { background: #33e0e0; }

.dcm__sentinel { position: fixed; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; }

html.dcm-lock { overflow: hidden; }

@media (max-width: 600px) {
  .dcm { padding: 0; align-items: stretch; }
  .dcm__panel {
    width: 100%;
    max-height: none;
    border-radius: 0;
    border-width: 0;
    padding: 24px 20px 20px;
    overflow-y: auto;
  }
  .dcm__close { top: 14px; right: 14px; }
  .dcm__iframe { height: calc(100dvh - 210px); min-height: 380px; }
}

@media (prefers-reduced-motion: reduce) {
  .dcm__scrim,
  .dcm__panel,
  .dcm__iframe { transition: none; }
  .dcm__panel { transform: none; }
}
