/* Book a demo: the card (demo.js), as a dialog on every page and inline on
   /book-a-demo/. A calm light card inside a soft frame, on a dimmed page.
   Everything is scoped under .dmo-* so the site's dark styles never leak in. */

.dmo-frame {
  --dmo-ink: #0d0e1c;
  --dmo-text: #24263a;
  --dmo-muted: #575a6e;
  --dmo-muted-2: #696c80;
  --dmo-hair: rgba(13, 14, 40, 0.11);
  --dmo-field: #f4f4f7;
  --dmo-field-hover: #eeeef3;
  --dmo-focus: #6a6cff;
  --dmo-accent: #4c4fd7;
  --dmo-danger: #b53a30;
  --dmo-danger-bg: #fbeeec;
  --dmo-ease: cubic-bezier(0.22, 0.61, 0.36, 1);

  display: flex;
  flex-direction: column;
  width: 100%;
  max-height: inherit;
  padding: 12px;
  border-radius: 30px;
  background: #f1f1f4;
  box-shadow: 0 30px 70px -30px rgba(4, 5, 20, 0.55);
  color: var(--dmo-text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 15px;
  line-height: 1.5;
  text-align: left;
  -webkit-font-smoothing: antialiased;
}
.dmo-frame *, .dmo-frame *::before, .dmo-frame *::after { box-sizing: border-box; }

.dmo-card {
  position: relative;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  border-radius: 24px;
  background: #fff;
  padding: 24px 24px 28px;
  scrollbar-width: thin;
}
@media (min-width: 640px) {
  .dmo-frame { padding: 16px; }
  .dmo-card { padding: 32px 32px 36px; }
}

/* ---------- the dialog ---------- */
.dmo-dlg {
  position: fixed;
  inset: 0;
  margin: auto;
  width: min(34rem, calc(100vw - 1.5rem));
  height: fit-content;
  max-width: none;
  max-height: min(92vh, 92svh);
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  overflow: visible;
  display: none;
}
.dmo-dlg[open] { display: flex; flex-direction: column; animation: dmo-in 0.32s var(--dmo-ease, ease) both; }
.dmo-dlg > .dmo-frame { max-height: min(92vh, 92svh); }
.dmo-dlg::backdrop {
  background: rgba(4, 5, 14, 0.6);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  animation: dmo-fade 0.28s ease both;
}
.dmo-dlg.is-closing { animation: dmo-out 0.22s ease both; }
.dmo-dlg.is-closing::backdrop { animation: dmo-fade-out 0.22s ease both; }
html.dmo-lock, html.dmo-lock body { overflow: hidden; }

@keyframes dmo-in { from { opacity: 0; transform: translateY(16px) scale(0.985); } to { opacity: 1; transform: none; } }
@keyframes dmo-out { to { opacity: 0; transform: translateY(10px) scale(0.99); } }
@keyframes dmo-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes dmo-fade-out { to { opacity: 0; } }

/* the close button, top right */
.dmo-x {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--dmo-hair);
  background: #fff;
  color: var(--dmo-ink);
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease, transform 0.18s var(--dmo-ease);
}
.dmo-x:hover { background: var(--dmo-ink); color: #fff; transform: rotate(90deg); }
.dmo-x:active { transform: rotate(90deg) scale(0.92); }

/* ---------- the step ---------- */
.dmo-step { transition: opacity 0.32s ease-out, transform 0.32s var(--dmo-ease); }
.dmo-step.is-entering { opacity: 0; transform: translateY(8px); transition: none; }

.dmo-title {
  margin: 0;
  padding-right: 44px;
  font-family: 'Chakra Petch', 'Inter', sans-serif;
  font-size: clamp(1.15rem, 2.2vw, 1.35rem);   /* owner, 18 Oct 2026: smaller twice */
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.015em;
  color: var(--dmo-ink);
  text-transform: none;
  outline: none;
}
.dmo-inline .dmo-title { padding-right: 0; }
.dmo-title--mark { display: flex; align-items: center; gap: 0.42em; }
/* The Davision O at about cap height, 1.886:1 like the mark itself. */
.dmo-mark { display: inline-flex; flex: none; width: 1.32em; height: 0.7em; color: var(--dmo-ink); }
.dmo-mark svg { width: 100%; height: 100%; display: block; }
.dmo-sub {
  margin: 10px 0 0;
  max-width: 46ch;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--dmo-muted);
}

/* ---------- step 1: the form ---------- */
.dmo-fields { display: grid; gap: 14px; margin-top: 24px; }
.dmo-sr {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.dmo-field { position: relative; }
.dmo-in {
  display: block;
  width: 100%;
  margin: 0;
  border: 0;
  border-radius: 14px;
  background: var(--dmo-field);
  box-shadow: inset 0 0 0 1px var(--dmo-hair);
  padding: 13px 16px;
  font: inherit;
  font-size: 16px; /* 16px keeps phones from zooming in on focus */
  line-height: 1.4;
  color: var(--dmo-ink);
  transition: box-shadow 0.18s ease, background-color 0.18s ease;
  -webkit-appearance: none;
  appearance: none;
}
@media (min-width: 640px) { .dmo-in { font-size: 0.9375rem; } }
.dmo-in::placeholder { color: var(--dmo-muted-2); opacity: 1; }
.dmo-in:hover { background: var(--dmo-field-hover); }
.dmo-in:focus { outline: none; background: #fff; box-shadow: inset 0 0 0 2px var(--dmo-focus); }
.dmo-in[aria-invalid="true"] { background: var(--dmo-danger-bg); box-shadow: inset 0 0 0 1.5px var(--dmo-danger); }
.dmo-in[aria-invalid="true"]:focus { box-shadow: inset 0 0 0 2px var(--dmo-danger); background: #fff; }
.dmo-trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

/* a row that opens on a grid track, so no height is measured and nothing jumps */
.dmo-reveal {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition: grid-template-rows 0.34s var(--dmo-ease), opacity 0.22s ease-out;
}
.dmo-reveal > * { overflow: hidden; min-height: 0; }
.dmo-reveal[data-shown] { grid-template-rows: 1fr; opacity: 1; }
.dmo-phone { margin-top: -14px; } /* the closed row takes no gap */
.dmo-pt { padding-top: 14px; }
.dmo-err { margin: 0; padding-top: 5px; font-size: 0.8125rem; line-height: 1.35; color: var(--dmo-danger); }

/* how should we reach you: three options, one sliding pill */
.dmo-ch { margin: 4px 0 0; padding: 0; border: 0; min-width: 0; }
.dmo-ch legend { padding: 0; margin: 0 0 8px; font-size: 0.8125rem; font-weight: 600; color: var(--dmo-ink); }
.dmo-seg {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 4px;
  border-radius: 999px;
  background: var(--dmo-field);
  box-shadow: inset 0 0 0 1px var(--dmo-hair);
}
.dmo-seg-pill {
  position: absolute;
  top: 4px; bottom: 4px;
  left: calc(4px + var(--i, 0) * ((100% - 8px) / 3));
  width: calc((100% - 8px) / 3);
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 1px 4px rgba(13, 14, 40, 0.16);
  transition: left 0.3s var(--dmo-ease);
}
.dmo-seg-opt { position: relative; z-index: 1; display: block; cursor: pointer; }
.dmo-seg-opt input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.dmo-seg-opt span {
  display: block;
  padding: 9px 4px;
  border-radius: 999px;
  text-align: center;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--dmo-muted-2);
  transition: color 0.2s ease;
}
.dmo-seg-opt:hover span { color: var(--dmo-text); }
.dmo-seg-opt input:checked + span { color: var(--dmo-ink); }
.dmo-seg-opt input:focus-visible + span { outline: 2px solid var(--dmo-focus); outline-offset: 1px; }

/* the Privacy Policy tick */
.dmo-check { position: relative; display: flex; align-items: flex-start; gap: 10px; margin-top: 4px; cursor: pointer; }
.dmo-check input { position: absolute; left: 0; top: 2px; width: 18px; height: 18px; margin: 0; opacity: 0; cursor: pointer; }
.dmo-box {
  flex: none;
  width: 18px; height: 18px;
  margin-top: 1px;
  border-radius: 5px;
  background: #fff;
  box-shadow: inset 0 0 0 1.5px rgba(13, 14, 40, 0.32);
  transition: background-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s var(--dmo-ease);
}
.dmo-check:hover .dmo-box { box-shadow: inset 0 0 0 1.5px var(--dmo-ink); }
.dmo-check input:active + .dmo-box { transform: scale(0.9); }
.dmo-check input:checked + .dmo-box {
  background: var(--dmo-ink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 13px no-repeat;
  box-shadow: none;
}
.dmo-check input:focus-visible + .dmo-box { outline: 2px solid var(--dmo-focus); outline-offset: 2px; }
.dmo-check input[aria-invalid="true"] + .dmo-box { box-shadow: inset 0 0 0 1.5px var(--dmo-danger); background-color: var(--dmo-danger-bg); }
.dmo-check-txt { font-size: 0.8125rem; line-height: 1.45; color: var(--dmo-muted); }
.dmo-check-txt a { color: var(--dmo-text); text-decoration: underline; text-underline-offset: 2px; border-radius: 3px; }
.dmo-check-txt a:hover { color: var(--dmo-ink); }
.dmo-check-txt a:focus-visible { outline: 2px solid var(--dmo-focus); outline-offset: 2px; }

.dmo-alert {
  margin: 14px 0 0;
  padding: 9px 12px;
  border-radius: 12px;
  background: var(--dmo-danger-bg);
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--dmo-danger);
}
.dmo-alert[hidden] { display: none; }
.dmo-alert a { color: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; border-radius: 3px; }
.dmo-alert a:hover { color: var(--dmo-ink); }
.dmo-alert a:focus-visible { outline: 2px solid var(--dmo-focus); outline-offset: 2px; }

/* ---------- buttons ---------- */
.dmo-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  margin-top: 22px;
  padding: 0 24px;
  border: 0;
  border-radius: 999px;
  background: var(--dmo-ink);
  color: #fff;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0;
  text-decoration: none;
  text-transform: none;
  cursor: pointer;
  transition: transform 0.2s var(--dmo-ease), box-shadow 0.2s ease, background-color 0.2s ease, opacity 0.2s ease;
}
.dmo-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 22px -10px rgba(13, 14, 40, 0.55), 0 0 0 4px rgba(106, 108, 255, 0.12); }
.dmo-btn:active { transform: translateY(0) scale(0.97); box-shadow: none; }
.dmo-btn:focus-visible { outline: 2px solid var(--dmo-focus); outline-offset: 3px; }
.dmo-btn:disabled { opacity: 0.38; cursor: not-allowed; transform: none; box-shadow: none; }
.dmo-btn[aria-busy="true"] { opacity: 0.7; cursor: progress; }
.dmo-btn[aria-busy="true"]::after {
  content: '';
  width: 14px; height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  animation: dmo-spin 0.8s linear infinite;
}
.dmo-btn[aria-busy="true"] .dmo-arrow { display: none; }
.dmo-arrow { transition: transform 0.2s var(--dmo-ease); }
.dmo-btn:hover .dmo-arrow { transform: translateX(3px); }
.dmo-btn--ghost { background: #fff; color: var(--dmo-ink); box-shadow: inset 0 0 0 1px var(--dmo-hair); }
.dmo-btn--ghost:hover { background: #f6f6f9; box-shadow: inset 0 0 0 1px rgba(13, 14, 40, 0.22), 0 10px 22px -14px rgba(13, 14, 40, 0.4); }

.dmo-link {
  margin: 0;
  padding: 6px 8px;
  border: 0;
  border-radius: 999px;
  background: none;
  font: inherit;
  font-size: 0.8125rem;
  color: var(--dmo-muted);
  cursor: pointer;
  text-underline-offset: 4px;
  transition: color 0.18s ease;
}
.dmo-link:hover { color: var(--dmo-ink); text-decoration: underline; }
.dmo-link:active { transform: scale(0.97); }
.dmo-link:focus-visible { outline: 2px solid var(--dmo-focus); outline-offset: 2px; }

/* ---------- step 2: the calendar ---------- */
.dmo-loading { display: flex; align-items: center; gap: 10px; margin: 28px 0 8px; font-size: 0.875rem; color: var(--dmo-muted); }
.dmo-spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--dmo-hair); border-top-color: var(--dmo-accent); animation: dmo-spin 0.8s linear infinite; }
@keyframes dmo-spin { to { transform: rotate(360deg); } }

.dmo-cal { margin-top: 22px; }
.dmo-cal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.dmo-month { font-size: 0.9375rem; font-weight: 600; color: var(--dmo-ink); }
.dmo-cal-nav { display: flex; gap: 6px; }
.dmo-round {
  display: grid;
  place-items: center;
  width: 32px; height: 32px;
  padding: 0;
  border: 1px solid var(--dmo-hair);
  border-radius: 50%;
  background: #fff;
  color: var(--dmo-ink);
  cursor: pointer;
  transition: background-color 0.18s ease, transform 0.18s var(--dmo-ease);
}
.dmo-round:hover:not(:disabled) { background: #f2f2f6; }
.dmo-round:active:not(:disabled) { transform: scale(0.9); }
.dmo-round:disabled { opacity: 0.35; cursor: default; }
.dmo-round:focus-visible { outline: 2px solid var(--dmo-focus); outline-offset: 2px; }

.dmo-week, .dmo-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.dmo-week { margin-top: 14px; }
.dmo-week span { padding-bottom: 4px; text-align: center; font-size: 0.6875rem; font-weight: 600; color: var(--dmo-muted-2); }
.dmo-day {
  display: grid;
  place-items: center;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: none;
  font: inherit;
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
  color: rgba(13, 14, 40, 0.3);
}
.dmo-day.is-pad { visibility: hidden; }
.dmo-day.is-open { font-weight: 700; color: var(--dmo-ink); cursor: pointer; transition: background-color 0.15s ease, transform 0.15s var(--dmo-ease); }
.dmo-day.is-open:hover { background: #f0f0f5; }
.dmo-day.is-open:active { transform: scale(0.92); }
.dmo-day.is-on, .dmo-day.is-on:hover { background: var(--dmo-ink); color: #fff; }
.dmo-day:focus-visible { outline: 2px solid var(--dmo-focus); outline-offset: 1px; }

.dmo-times { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--dmo-hair); }
.dmo-slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
@media (min-width: 440px) { .dmo-slots { grid-template-columns: repeat(4, 1fr); } }
.dmo-slot {
  min-width: 0;
  padding: 10px 2px;
  border: 0;
  border-radius: 12px;
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--dmo-hair);
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: var(--dmo-ink);
  cursor: pointer;
  transition: background-color 0.15s ease, box-shadow 0.15s ease, color 0.15s ease, transform 0.15s var(--dmo-ease);
}
.dmo-slot:hover { background: #f4f4f8; box-shadow: inset 0 0 0 1px rgba(13, 14, 40, 0.24); }
.dmo-slot:active { transform: scale(0.95); }
.dmo-slot.is-on, .dmo-slot.is-on:hover { background: var(--dmo-accent); color: #fff; box-shadow: inset 0 0 0 1px var(--dmo-accent); }
.dmo-slot:focus-visible { outline: 2px solid var(--dmo-focus); outline-offset: 2px; }
.dmo-tz { margin: 12px 0 0; font-size: 0.75rem; color: var(--dmo-muted-2); }

.dmo-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 20px; }
.dmo-actions .dmo-btn { margin-top: 0; }
.dmo-actions--end { margin-top: 24px; }

/* ---------- step 3: done ---------- */
.dmo-ok { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 16px; border-radius: 50%; background: #ececff; color: var(--dmo-accent); }
.dmo-summary {
  display: grid;
  gap: 0;
  margin: 20px 0 0;
  padding: 4px 16px;
  border-radius: 16px;
  background: var(--dmo-field);
  box-shadow: inset 0 0 0 1px var(--dmo-hair);
}
.dmo-summary > div { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 11px 0; border-top: 1px solid var(--dmo-hair); }
.dmo-summary > div:first-child { border-top: 0; }
.dmo-summary dt { margin: 0; font-size: 0.8125rem; color: var(--dmo-muted); }
.dmo-summary dd { margin: 0; font-size: 0.875rem; font-weight: 600; color: var(--dmo-ink); text-align: right; }

/* ---------- inline, on /book-a-demo/ ---------- */
.dmo-inline { width: min(34rem, 100%); margin: 0 auto; }
.dmo-inline .dmo-card { overflow: visible; }

@media (prefers-reduced-motion: reduce) {
  .dmo-dlg[open], .dmo-dlg::backdrop, .dmo-dlg.is-closing, .dmo-dlg.is-closing::backdrop { animation: none; }
  .dmo-step, .dmo-reveal, .dmo-seg-pill, .dmo-btn, .dmo-x, .dmo-day, .dmo-slot, .dmo-round, .dmo-arrow, .dmo-box { transition: none; }
  .dmo-btn:hover, .dmo-x:hover { transform: none; }
}
