/* BOOK A DEMO dialog (shared by / and /about/) */
html.bd-lock { overflow: hidden; }
/* The dialog itself is the scroller (works at any window height); scroll-padding keeps focused fields and the
   human check clear of the sticky submit row at the bottom. */
.bd { padding: 0; border: 0; background: transparent; color: var(--color-text-primary); max-width: none; max-height: none; width: 100%; height: 100%; margin: 0; overflow: auto; overscroll-behavior: contain; scroll-padding: 1rem 0 6.5rem; }
.bd::backdrop { background: color-mix(in srgb, #0b0b0c 62%, transparent); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.bd-shell { min-height: 100%; display: grid; place-items: center; padding: 1.5rem; }
.bd-card { position: relative; width: min(980px, 100%); display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); background: var(--panel); border: 1px solid var(--line2); border-radius: 18px; box-shadow: var(--shadow); overflow: hidden; overflow: clip; }
.bd[open] .bd-card { animation: bd-in .32s cubic-bezier(.2,.8,.2,1); }
@keyframes bd-in { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }
.bd-x { position: absolute; top: 14px; right: 14px; z-index: 3; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); color: var(--dim); cursor: pointer; }
.bd-x:hover { color: var(--ink); border-color: var(--line2); }
.bd-x svg { width: 16px; height: 16px; stroke: currentColor; stroke-width: 2; fill: none; stroke-linecap: round; }

/* Illustration panel */
.bd-art { position: relative; padding: 2rem 1.8rem; background: var(--bg2); border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 1.2rem; overflow: hidden; }
.bd-art::before { content: ""; position: absolute; inset: 0; background: radial-gradient(70% 50% at 50% 55%, color-mix(in srgb, var(--orange) 13%, transparent), transparent 70%), repeating-linear-gradient(135deg, transparent 0 6px, color-mix(in srgb, var(--fg) 3%, transparent) 6px 7px); pointer-events: none; }
.bd-eyebrow { position: relative; font: 600 11px var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--orange); }
/* Factory preview card */
.fx { position: relative; margin: auto 0; background: var(--panel); border: 1px solid var(--line2); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; }
.fx-bar { display: flex; align-items: center; gap: .55rem; padding: .7rem .9rem; border-bottom: 1px solid var(--line); font: 12px var(--font-mono); color: var(--dim); }
.fx-mark { width: 18px; height: 18px; color: var(--orange); display: grid; }
.fx-mark svg { width: 100%; height: 100%; }
.fx-co { color: var(--ink); font-weight: 400; }
.fx-on { margin-left: auto; display: inline-flex; align-items: center; gap: .35rem; color: var(--green); }
.fx-on i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 22%, transparent); }
.fx-body { padding: .9rem; display: grid; gap: .7rem; }
.fx-k { margin: 0; font: 600 10.5px var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--mute); }
.fx-title { margin: -.4rem 0 0; font-size: 1.08rem; font-weight: 500; color: var(--ink); line-height: 1.3; min-height: 1.4em; overflow-wrap: anywhere; }
.fx-iss { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.fx-iss li { display: grid; grid-template-columns: auto 1fr auto; gap: .6rem; align-items: center; padding: .55rem .65rem; border: 1px solid var(--line); border-radius: 9px; background: var(--color-bg-base, var(--bg)); font-size: .86rem; color: var(--color-text-secondary); transition: border-color .35s, background .35s; }
.fx-t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.fx-tag { font: 600 9.5px var(--font-mono); letter-spacing: .06em; padding: 2px 6px; border-radius: 5px; border: 1px solid currentColor; }
.fx-tag.bug { color: var(--red); } .fx-tag.feat { color: var(--orange); } .fx-tag.chore { color: var(--dim); }
.fx-st { font: 11px var(--font-mono); padding: 2px 8px; border-radius: 999px; border: 1px dashed var(--line2); color: var(--mute); white-space: nowrap; transition: color .3s, border-color .3s, background .3s; }
.fx-iss li[data-s="1"] { border-color: color-mix(in srgb, var(--orange) 45%, var(--line)); }
.fx-iss li[data-s="1"] .fx-st { color: var(--orange); border: 1px solid color-mix(in srgb, var(--orange) 50%, transparent); }
.fx-iss li[data-s="2"] .fx-st { color: var(--cyan); border: 1px solid color-mix(in srgb, var(--cyan) 50%, transparent); }
.fx-iss li[data-s="3"] .fx-st { color: var(--green); border: 1px solid color-mix(in srgb, var(--green) 45%, transparent); background: color-mix(in srgb, var(--green) 10%, transparent); }
.fx-iss li[data-s="3"] .fx-t { color: var(--ink); }
.fx-pipe { list-style: none; margin: 0; padding: .2rem 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; font: 10.5px var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--mute); }
.fx-pipe li { padding-top: 9px; border-top: 3px solid var(--line2); border-radius: 1px; transition: border-color .25s, color .25s; }
.fx-pipe li.on { border-top-color: var(--orange); color: var(--ink); }
.fx-pipe li.on:last-child { border-top-color: var(--green); }
.bd[data-state="success"] .fx-on { color: var(--orange); }

/* Form panel */
.bd-main { --bd-px: 2.2rem; padding: 2.2rem var(--bd-px) 0; display: flex; flex-direction: column; gap: 1.2rem; min-width: 0; }
.bd-main h2 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); margin: 0; padding-right: 2.5rem; }
.bd-main .lede { font-size: 1rem; margin: .45rem 0 0; }
.bd-form { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem 1rem; }
.bd-f { display: grid; gap: .35rem; min-width: 0; }
.bd-f.full { grid-column: 1 / -1; }
.bd-f label { font: 600 11px var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--dim); }
.bd-f label i { font-style: normal; color: var(--orange); }
.bd-f label small { font: inherit; text-transform: none; letter-spacing: 0; color: var(--mute); font-weight: 400; }
.bd-f input, .bd-f select, .bd-f textarea { width: 100%; font: 15px var(--font-sans); color: var(--color-text-primary); background: var(--color-bg-base, var(--bg)); border: 1px solid var(--line2); border-radius: 10px; padding: .7rem .8rem; transition: border-color .15s, box-shadow .15s; }
.bd-f textarea { resize: vertical; min-height: 92px; }
.bd-f select { cursor: pointer; appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--dim) 50%), linear-gradient(135deg, var(--dim) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 2rem; }
/* Browsers with customizable <select> (Chrome 135+) draw the option list in the page: same type as the form,
   kept inside the window (flips above the field or scrolls when space is short). Others keep the native list. */
@supports (appearance: base-select) {
  .bd-f select, .bd-f select::picker(select) { appearance: base-select; }
  .bd-f select::picker-icon { display: none; }
  .bd-f select::picker(select) { margin: 6px 0; padding: 4px; border: 1px solid var(--line2); border-radius: 12px; background: var(--panel); color: var(--color-text-primary); box-shadow: var(--shadow); max-block-size: min(24rem, calc(100dvh - 2rem)); overscroll-behavior: contain; }
  .bd-f option { font: 14.5px/1.35 var(--font-sans); padding: .5rem .7rem; border-radius: 8px; color: var(--color-text-secondary); gap: .5rem; }
  .bd-f option::checkmark { color: var(--orange); }
  .bd-f option:hover, .bd-f option:focus-visible { background: color-mix(in srgb, var(--orange) 12%, transparent); color: var(--color-text-primary); outline: none; }
  .bd-f option:checked { color: var(--color-text-primary); }
  .bd-f select:required option[value=""] { display: none; }
}
.bd-f input:focus-visible, .bd-f select:focus-visible, .bd-f textarea:focus-visible { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px color-mix(in srgb, var(--orange) 25%, transparent); }
.bd-f input[aria-invalid="true"], .bd-f select[aria-invalid="true"] { border-color: var(--red); }
/* Mobile number: editable country code (pre-filled from location) joined to the number field. */
.bd-tel { display: grid; grid-template-columns: minmax(0, 12.5rem) minmax(0, 1fr); gap: .5rem; }
.bd-ccw { position: relative; display: block; min-width: 0; }
.bd-f .bd-ccw select { color: transparent; white-space: nowrap; overflow: hidden; }
.bd-f .bd-ccw option { color: var(--color-text-primary); background: var(--panel); }
@media (forced-colors: active) { .bd-ccv { display: none; } .bd-f .bd-ccw select { color: CanvasText; } }
.bd-ccv { position: absolute; left: .8rem; right: 2rem; top: 50%; transform: translateY(-50%); pointer-events: none; font: 15px var(--font-sans); color: var(--color-text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 520px) { .bd-tel { grid-template-columns: minmax(0, 9.5rem) minmax(0, 1fr); } }
.bd-err { font-size: .82rem; color: var(--red); min-height: 0; }
.bd-hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.bd-ts { grid-column: 1 / -1; min-height: 0; }
/* Submit row: sticks to the bottom of the window whenever the form is taller than it, so the button is always in reach. */
.bd-row { grid-column: 1 / -1; display: flex; align-items: center; gap: .5rem 1rem; flex-wrap: wrap; position: sticky; bottom: 0; z-index: 2; margin: 0 calc(-1 * var(--bd-px)); padding: .9rem var(--bd-px) 1.6rem; background: var(--panel); border-top: 1px solid var(--line); }
.bd-row .btn { border: 0; cursor: pointer; display: inline-flex; align-items: center; gap: .6rem; }
.bd-row .btn[disabled] { opacity: .75; cursor: progress; }
.bd-spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; display: none; animation: bd-sp .7s linear infinite; }
@keyframes bd-sp { to { transform: rotate(360deg); } }
.bd[data-state="submitting"] .bd-spin { display: inline-block; }
.bd-note { font-size: .82rem; color: var(--mute); }
.bd-alert { grid-column: 1 / -1; display: none; padding: .8rem 1rem; border-radius: 10px; border: 1px solid color-mix(in srgb, var(--red) 45%, transparent); background: color-mix(in srgb, var(--red) 8%, transparent); color: var(--color-text-primary); font-size: .92rem; }
.bd-alert a { color: inherit; }
.bd[data-state="error"] .bd-alert { display: block; }
.bd-done { display: none; flex-direction: column; align-items: center; text-align: center; gap: .9rem; padding: 3.2rem 2.4rem 2.6rem; }
.bd-done p { margin: 0; color: var(--color-text-secondary); font-size: 1.05rem; max-width: 38ch; line-height: 1.55; }
.bd-done p b { color: var(--ink); font-weight: 600; overflow-wrap: anywhere; }
.bd-main .bd-done-h { padding-right: 0; margin: .2rem 0 0; font-size: clamp(1.6rem, 2.6vw, 2rem); }
.bd-done-h:focus { outline: none; }
.bd-done .btn { margin-top: .6rem; }
.bd-ok { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; color: var(--green); background: color-mix(in srgb, var(--green) 12%, transparent); box-shadow: 0 0 0 8px color-mix(in srgb, var(--green) 6%, transparent); }
.bd-ok svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 24; stroke-dashoffset: 24; }
.bd[data-state="success"] .bd-ok svg { animation: bd-tick .45s .15s ease-out forwards; }
@keyframes bd-tick { to { stroke-dashoffset: 0; } }
.bd[data-state="success"] .bd-done { display: flex; }
/* Success is its own small card: no preview panel, no form heading. */
.bd[data-state="success"] .bd-art, .bd[data-state="success"] .bd-form, .bd[data-state="success"] .bd-intro { display: none; }
.bd[data-state="success"] .bd-card { grid-template-columns: 1fr; width: min(520px, 100%); }
.bd[data-state="success"] .bd-main { padding: 0; }
.bd-btn2 { background: transparent; color: var(--ink); border: 1px solid var(--line2) !important; }

@media (max-width: 820px) {
  .bd-shell { padding: .75rem; align-items: start; }
  .bd-card { grid-template-columns: 1fr; }
  .bd-art { border-right: 0; border-bottom: 1px solid var(--line); padding: 1.2rem 1.2rem .8rem; gap: .4rem; }
  .fx-pipe, .fx-iss li:nth-child(3), .fx-k { display: none; }
  .fx-title { margin: 0; font-size: .98rem; }
  .fx-body { padding: .7rem; gap: .5rem; }
  .bd-main { --bd-px: 1.2rem; padding: 1.4rem var(--bd-px) 0; }
  .bd-form { grid-template-columns: 1fr; }
  .bd-row { padding-bottom: 1.1rem; }
  .bd { scroll-padding-bottom: 8rem; } /* the note wraps under the button: taller sticky row */
}
/* Short windows (laptop browser not full screen, landscape phones): tighter spacing so the whole form fits more often. */
@media (min-width: 821px) and (max-height: 820px) {
  .bd-shell { padding: 1rem; }
  .bd-main { padding-top: 1.6rem; gap: .9rem; }
  .bd-main h2 { font-size: 1.7rem; }
  .bd-main .lede { margin-top: .3rem; }
  .bd-form { gap: .7rem 1rem; }
  .bd-f input, .bd-f select, .bd-f textarea { padding: .6rem .8rem; }
  .bd-f textarea { min-height: 68px; }
  .bd-row { padding-top: .8rem; padding-bottom: 1.2rem; }
  .bd-art { padding: 1.6rem 1.5rem; }
}
/* Very short windows (landscape phones, tiny browser windows): the factory preview gives way to the form. */
@media (min-width: 821px) and (max-height: 560px) {
  .bd-shell { padding: .5rem; }
  .bd-art { display: none; }
  .bd-card { grid-template-columns: 1fr; width: min(680px, 100%); }
  .bd-main { padding-top: 1.2rem; }
  .bd-row { padding-top: .6rem; padding-bottom: .8rem; }
}
/* Short phones: the factory preview gives way to the form. */
@media (max-width: 820px) and (max-height: 720px) {
  .bd-art { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .bd[open] .bd-card, .bd-spin, .bd[data-state="success"] .bd-ok svg { animation: none !important; }
  .bd-ok svg { stroke-dashoffset: 0; }
  .fx-iss li, .fx-st, .fx-pipe li { transition: none !important; }
}

