/* ============================================================
   GET IN TOUCH: the popup (message, optional demo booking)
   ------------------------------------------------------------
   Structure follows the Makar demo popup; colours are Telesto's
   own tokens (style.css): amber on deep navy.
   ============================================================ */
.modal {
  --c-accent: var(--color-primary);
  --c-accent-hover: var(--color-primary-hover);
  --c-wash: rgba(212, 149, 42, 0.12);
  --c-line: rgba(212, 149, 42, 0.45);
  --c-on: var(--color-text-inverse);
  --c-border: rgba(255, 255, 255, 0.1);
  --c-border-strong: rgba(255, 255, 255, 0.18);
  --c-text: var(--color-text);
  --c-soft: #c9c7c2;
  --c-muted: var(--color-text-muted);
  --c-dim: #6b7080;
  --c-bad: #e0544b;
  --c-field: #0b1019;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  width: min(940px, calc(100vw - 32px));
  max-height: min(740px, calc(100svh - 40px));
  padding: 0; margin: auto;
  border: 1px solid var(--c-border); border-radius: 18px;
  background: var(--color-surface); color: var(--c-text);
  box-shadow: 0 40px 120px -20px rgba(0, 0, 0, 0.8);
  overflow: hidden;
  font-family: var(--font-body);
}
.modal[open] { display: grid; grid-template-columns: 290px minmax(0, 1fr); animation: modalIn .28s var(--ease-out); }
.modal::backdrop { background: rgba(4, 7, 12, 0.72); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.modal[open]::backdrop { animation: modalFade .28s ease; }
@keyframes modalIn { from { opacity: 0; transform: translateY(12px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes modalFade { from { opacity: 0; } to { opacity: 1; } }

.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---- left panel ---- */
.modal__head {
  position: relative; padding: 36px 28px; overflow: hidden;
  background:
    radial-gradient(120% 70% at 0% 0%, rgba(212, 149, 42, 0.16), transparent 60%),
    linear-gradient(180deg, var(--color-surface-2), var(--color-bg));
  border-right: 1px solid var(--c-border);
}
/* strata lines behind the copy, as in the logo */
.modal__head::after {
  content: ""; position: absolute; left: -10%; right: -10%; bottom: 0; height: 120px; pointer-events: none;
  background: repeating-linear-gradient(176deg, transparent 0 16px, rgba(212, 149, 42, 0.07) 16px 19px);
  mask-image: linear-gradient(to top, #000, transparent); -webkit-mask-image: linear-gradient(to top, #000, transparent);
}
.modal__intro { position: relative; z-index: 1; }
.modal__eyebrow {
  font-size: 11.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--c-accent);
  display: flex; align-items: center; gap: 10px; margin-bottom: 12px;
}
.modal__eyebrow::before { content: ""; width: 22px; height: 2px; background: var(--c-accent); border-radius: 2px; }
.modal__title { margin: 0; font-family: var(--font-display); font-size: 26px; line-height: 1.15; font-weight: 800; letter-spacing: -.01em; color: var(--c-text); }
.modal__lead { margin: 12px 0 0; font-size: 14px; line-height: 1.6; color: var(--c-muted); }
.modal__facts { list-style: none; margin: 32px 0 0; padding-top: 22px !important; border-top: 1px solid var(--c-border); padding: 0; display: flex; flex-direction: column; gap: 14px; }
.modal__facts b { display: block; font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--c-dim); }
.modal__facts span { display: block; margin-top: 2px; font-size: 14px; color: var(--c-soft); }

.modal__track { list-style: none; margin: 30px 0 0; padding: 0; display: flex; flex-direction: column; }
.modal__track li { position: relative; display: flex; gap: 14px; padding-bottom: 22px; }
.modal__track li:last-child { padding-bottom: 0; }
.modal__track li:not(:last-child)::after { content: ""; position: absolute; left: 13px; top: 30px; bottom: 4px; width: 1px; background: var(--c-border-strong); }
.modal__track i {
  flex: none; width: 27px; height: 27px; display: grid; place-items: center; border-radius: 50%;
  font: 600 12px var(--font-body); font-style: normal; color: var(--c-muted); border: 1px solid var(--c-border-strong);
  transition: background .3s ease, color .3s ease, border-color .3s ease;
}
.modal__track b { display: block; font-family: var(--font-display); font-size: 15px; font-weight: 700; color: var(--c-muted); transition: color .3s ease; }
.modal__track span { display: block; margin-top: 2px; font-size: 12.5px; line-height: 1.4; color: var(--c-dim); }
.modal:has(#demo-form[data-at="1"]) [data-track="1"] i,
.modal:has(#demo-form[data-at="2"]) [data-track="2"] i,
.modal:has(#demo-form[data-at="3"]) [data-track="3"] i { background: var(--c-accent); border-color: var(--c-accent); color: var(--c-on); }
.modal:has(#demo-form[data-at="1"]) [data-track="1"] b,
.modal:has(#demo-form[data-at="2"]) [data-track="2"] b,
.modal:has(#demo-form[data-at="3"]) [data-track="3"] b { color: var(--c-text); }
.modal:has(#demo-form[data-at="2"]) [data-track="1"] i,
.modal:has(#demo-form[data-at="3"]) [data-track="1"] i,
.modal:has(#demo-form[data-at="3"]) [data-track="2"] i { border-color: var(--c-line); color: var(--c-accent); }

/* ---- close ---- */
.modal__close {
  position: absolute; top: 14px; right: 14px; z-index: 5;
  width: 36px; height: 36px; display: grid; place-items: center; cursor: pointer;
  border-radius: 50%; border: 1px solid var(--c-border-strong); background: var(--color-surface); color: var(--c-soft);
  transition: color .15s ease, border-color .15s ease;
}
.modal__close svg { width: 15px; height: 15px; }
.modal__close:hover { color: var(--c-text); border-color: var(--c-line); }
.modal__close:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 2px; }

/* ---- right: the panes ---- */
.modal__body { position: relative; overflow-y: auto; overscroll-behavior: contain; padding: 34px 34px 30px; max-height: min(740px, calc(100svh - 40px)); }
@keyframes stepIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.demo__h { margin: 0; font-family: var(--font-display); font-size: 20px; font-weight: 700; color: var(--c-text); }

/* ---- forms ---- */
.demo__form { display: flex; flex-direction: column; gap: 16px; }
.demo__row { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; }
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; border: 0; margin: 0; padding: 0; }
.field label { font-size: 12.5px; font-weight: 600; letter-spacing: .02em; color: var(--c-soft); }
.field label small { font-weight: 400; color: var(--c-dim); }
.modal input[type="text"], .modal input[type="email"], .modal input[type="tel"], .modal input[type="search"],
.modal select, .modal textarea {
  width: 100%; min-height: 44px; padding: 10px 13px; border-radius: 10px;
  border: 1px solid var(--c-border-strong); background: var(--c-field); color: var(--c-text);
  font: 15px/1.4 var(--font-body); transition: border-color .15s ease, box-shadow .15s ease;
}
.modal select { appearance: none; -webkit-appearance: none; padding-right: 36px; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--c-muted) 50%), linear-gradient(135deg, var(--c-muted) 50%, transparent 50%);
  background-position: calc(100% - 19px) 50%, calc(100% - 14px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.modal select option { background: var(--color-surface); color: var(--c-text); }
.modal textarea { resize: vertical; min-height: 84px; line-height: 1.55; }
.modal ::placeholder { color: var(--c-dim); }
.modal input:hover, .modal select:hover, .modal textarea:hover { border-color: rgba(255, 255, 255, 0.28); }
.modal input:focus, .modal select:focus, .modal textarea:focus { outline: none; border-color: var(--c-accent); box-shadow: 0 0 0 3px var(--c-wash); }
.field[data-bad="true"] input, .field[data-bad="true"] select, .field[data-bad="true"] textarea { border-color: var(--c-bad); }
.field__err { min-height: 0; font-size: 12px; color: var(--c-bad); opacity: 0; transition: opacity .15s ease; }
.field__err:empty { display: none; }
.field[data-bad="true"] .field__err, .demo__consent[data-bad="true"] .field__err { opacity: 1; }

/* phone with country code */
.phone { display: flex; gap: 8px; min-width: 0; }
.phone input[type="tel"] { flex: 1; min-width: 0; }
.phone__cc {
  position: relative; flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px;
  border-radius: 10px; border: 1px solid var(--c-border-strong); background: var(--c-field); color: var(--c-text); font-size: 14px;
}
.phone__cc::after { content: ""; width: 6px; height: 6px; margin-top: -3px; border: solid var(--c-muted); border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); }
.phone__cc select { position: absolute; inset: 0; opacity: 0; cursor: pointer; min-height: 0; padding: 0; }
.phone__cc:focus-within { border-color: var(--c-accent); box-shadow: 0 0 0 3px var(--c-wash); }

.demo__consent { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 10px; font-size: 13.5px; line-height: 1.5; color: var(--c-muted); cursor: pointer; }
.demo__consent input { margin: 3px 0 0; accent-color: var(--c-accent); flex: none; width: 16px; height: 16px; }
.demo__consent > span:not(.field__err) { flex: 1; min-width: 0; }
.demo__consent .field__err { flex-basis: 100%; padding-left: 26px; }
.demo__consent[data-bad="true"] > span:not(.field__err) { color: var(--c-bad); }
.demo__trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.demo__actions { display: flex; align-items: center; justify-content: flex-end; gap: 16px; flex-wrap: wrap; margin-top: 4px; }
.demo__actions .demo__status { margin-right: auto; }
.demo__step[data-step="2"] .demo__actions { justify-content: space-between; }
.demo__status { margin: 0; font-size: 13.5px; color: var(--c-muted); }
.demo__status:empty { display: none; }
.demo__status[data-tone="bad"] { color: var(--c-bad); }

.modal .btn-primary {
  display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 24px; border: 0; cursor: pointer;
  border-radius: var(--radius-md); background: var(--c-accent); color: var(--c-on);
  font: 600 15px var(--font-body); transition: background .2s ease, transform .2s ease, box-shadow .2s ease;
}
.modal .btn-primary:hover { background: var(--c-accent-hover); transform: translateY(-1px); box-shadow: 0 8px 24px rgba(212, 149, 42, 0.22); }
.modal .btn-primary:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 3px; }
.modal .btn-primary[disabled] { opacity: .6; cursor: default; transform: none; box-shadow: none; }
.demo__back {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 0; border: 0; background: none; cursor: pointer;
  font: 500 14px var(--font-body); color: var(--c-muted);
}
.demo__back:hover { color: var(--c-text); }
.demo__back:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 2px; border-radius: 4px; }

/* "I'd also like to schedule a demo": a card-sized tick box */
.want {
  position: relative; display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 14px; cursor: pointer;
  border: 1px solid var(--c-border-strong); background: linear-gradient(180deg, var(--color-surface-2), var(--color-surface));
  transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
}
.want:hover { border-color: var(--c-line); }
.want input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.want__box {
  flex: none; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 7px;
  border: 1.5px solid rgba(255, 255, 255, 0.3); color: transparent; transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.want__box svg { width: 15px; height: 15px; }
.want__text { flex: 1; min-width: 0; }
.want__text b { display: block; font-family: var(--font-display); font-size: 16px; font-weight: 700; color: var(--c-text); }
.want__text span { display: block; margin-top: 2px; font-size: 13px; line-height: 1.5; color: var(--c-muted); }
.want__icon { flex: none; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 11px; background: var(--c-wash); color: var(--c-accent); }
.want__icon svg { width: 20px; height: 20px; }
.want:has(input:checked) { border-color: var(--c-accent); background: linear-gradient(180deg, rgba(212, 149, 42, 0.12), rgba(212, 149, 42, 0.04)); box-shadow: 0 10px 30px -16px rgba(212, 149, 42, 0.5); }
.want:has(input:checked) .want__box { background: var(--c-accent); border-color: var(--c-accent); color: var(--c-on); }
.want:has(input:focus-visible) { outline: 2px solid var(--c-accent); outline-offset: 2px; }
.field label small[hidden] { display: none; }

/* no demo wanted: step 2 is not part of the journey */
#demo-form[data-demo="false"] .demo__progress { display: none; }
.modal:has(#demo-form[data-demo="false"]) [data-track="2"] { opacity: .4; }
.modal:has(#demo-form[data-demo="false"]) [data-track="2"] span::after { content: " (not ticked)"; }

/* demo: steps */
/* right padding keeps the step line clear of the close button */
.demo__top { display: flex; align-items: center; justify-content: flex-start; gap: 12px; flex-wrap: wrap; margin-top: -10px; padding-right: 48px; }
#demo-form[data-at="3"] .demo__top { display: none; }
#demo-form[data-demo="false"] .demo__top { display: none; }
.demo__progress { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--c-dim); }
.demo__progress[hidden] { display: none; }
.demo__progress li { display: inline-flex; align-items: center; gap: 8px; }
.demo__progress li + li::before { content: ""; width: 26px; height: 1px; background: var(--c-border-strong); margin-right: 2px; }
.demo__progress i { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--c-border-strong); font: 600 11px var(--font-body); font-style: normal; }
.demo__progress li[aria-current="step"] { color: var(--c-text); }
.demo__progress li[aria-current="step"] i { border-color: var(--c-accent); background: var(--c-accent); color: var(--c-on); }
.demo__progress li[data-done="true"] i { border-color: var(--c-line); color: var(--c-accent); }
.demo__step { display: flex; flex-direction: column; gap: 16px; animation: stepIn .32s var(--ease-out) both; }
.demo__step[hidden] { display: none; }

/* demo: the time */
.when { gap: 12px; }
.when__zone { margin: 0; font-size: 13px; line-height: 1.5; color: var(--c-muted); }
.when__zone b { color: var(--c-text); font-weight: 600; }
.when__pick { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.cal, .times { border: 1px solid var(--c-border); border-radius: 14px; padding: 14px; background: rgba(255, 255, 255, 0.015); }
.cal__head { display: flex; align-items: center; justify-content: center; gap: 18px; margin-bottom: 10px; }
.cal__month { min-width: 120px; text-align: center; font-family: var(--font-display); font-size: 16px; font-weight: 700; color: var(--c-text); }
.cal__nav { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; border: 0; cursor: pointer; background: var(--c-wash); color: var(--c-text); }
.cal__nav svg { width: 15px; height: 15px; }
.cal__nav:hover:not(:disabled) { background: rgba(212, 149, 42, 0.28); }
.cal__nav:disabled { opacity: .35; cursor: default; background: rgba(255, 255, 255, 0.05); }
.cal__dow, .cal__grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.cal__dow span { text-align: center; padding: 2px 0 6px; font-size: 10.5px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--c-dim); }
.cal__day {
  position: relative; aspect-ratio: 1; padding: 0; margin: 0; display: grid; place-items: center; border-radius: 50%; cursor: pointer;
  border: 1px solid transparent; background: none; color: var(--c-text); font: 600 13px var(--font-body);
  transition: background .15s ease, border-color .15s ease;
}
.cal__day b { font: inherit; color: inherit; line-height: 1; }
.cal__day:not(:disabled)::after { content: ""; position: absolute; left: 50%; bottom: 12%; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--c-accent); }
.cal__day:hover:not(:disabled) { border-color: var(--c-line); background: var(--c-wash); }
.cal__day:disabled { color: var(--c-dim); opacity: .45; cursor: default; font-weight: 400; }
.cal__day[data-today="true"] { border-color: var(--c-border-strong); }
.cal__day[aria-checked="true"] { background: var(--c-accent); border-color: var(--c-accent); color: var(--c-on); }
.cal__day[aria-checked="true"]::after { background: var(--c-on); }
.cal__day:focus-visible, .when__slot:focus-visible, .when__other:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 2px; }
.times { display: flex; flex-direction: column; gap: 10px; }
.times__head b { display: block; font-family: var(--font-display); font-size: 15px; font-weight: 700; color: var(--c-text); }
.times__head span { display: block; margin-top: 1px; font-size: 12px; color: var(--c-muted); }
.when__slots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; max-height: 260px; overflow-y: auto; overscroll-behavior: contain; padding-right: 2px; }
.when__slot {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 0; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--c-border-strong); background: transparent; color: var(--c-soft); font: 500 13px var(--font-body);
  animation: stepIn .25s var(--ease-out) both; animation-delay: calc(var(--i, 0) * 18ms);
}
.when__tick { width: 13px; height: 13px; display: none; }
.when__slot:hover { border-color: var(--c-line); color: var(--c-text); }
.when__slot[aria-checked="true"] { border-color: var(--c-accent); background: var(--c-accent); color: var(--c-on); font-weight: 600; }
.when__slot[aria-checked="true"] .when__tick { display: block; }
.when__chosen { margin: 0; min-height: 1.5em; font-size: 13.5px; line-height: 1.5; color: var(--c-muted); }
.when__chosen b { color: var(--c-text); font-weight: 600; }
.when__chosen span { color: var(--c-dim); }
.when__other { align-self: flex-start; padding: 0; border: 0; background: none; cursor: pointer; font: 500 13.5px var(--font-body); color: var(--c-accent); text-decoration: underline; text-underline-offset: 3px; }
.when[data-few="true"] .when__other { font-weight: 600; }
.when__ask { display: flex; flex-direction: column; gap: 7px; }
.when__ask[hidden] { display: none; }
.when__ask label { font-size: 12.5px; font-weight: 600; color: var(--c-soft); }
.when[data-asking="true"] .when__pick { display: none; }
.when[data-loading="true"] .when__pick { opacity: .45; pointer-events: none; }
.when[data-bad="true"] .field__err, .when .field__err { opacity: 1; }

/* demo: the map */
.geo { display: flex; flex-direction: column; gap: 10px; }
.geo__map {
  position: relative; aspect-ratio: 1000 / 391.7; width: 100%; border: 1px solid var(--c-border); border-radius: 12px;
  background:
    radial-gradient(80% 90% at 50% 40%, rgba(212, 149, 42, 0.06), transparent 70%),
    repeating-linear-gradient(0deg, transparent 0 23px, rgba(255, 255, 255, 0.025) 23px 24px),
    repeating-linear-gradient(90deg, transparent 0 23px, rgba(255, 255, 255, 0.025) 23px 24px),
    var(--color-bg);
}
.geo__wait { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; font-size: 12.5px; color: var(--c-dim); }
.geo[data-ready="true"] .geo__wait { display: none; }
.geo[data-failed="true"] .geo__wait::after { content: " Use the search box below instead."; }
.geo__svg { display: block; width: 100%; height: 100%; border-radius: 12px; touch-action: manipulation; }
.geo__lands path { fill: rgba(232, 230, 225, 0.13); stroke: var(--color-bg); stroke-width: .7; stroke-linejoin: round; cursor: pointer; transition: fill .15s ease; }
.geo__lands path[data-hot="true"] { fill: rgba(212, 149, 42, 0.4); }
.geo__lands path[data-picked="true"] { fill: var(--c-accent); }
.geo__dots circle { fill: rgba(232, 230, 225, 0.3); stroke: var(--color-bg); stroke-width: 1.2; cursor: pointer; }
.geo__dots circle:hover { fill: var(--c-accent); }
.geo__lands path, .geo__dots circle, .geo__arc { vector-effect: non-scaling-stroke; }
.geo__home circle { fill: var(--color-secondary); stroke: var(--color-bg); stroke-width: 1.5; }
.geo__home text { font: 700 19px var(--font-body); fill: var(--c-soft); letter-spacing: .04em; pointer-events: none; paint-order: stroke; stroke: var(--color-bg); stroke-width: 4px; }
.geo__arc { fill: none; stroke: var(--c-accent); stroke-width: 1.6; stroke-dasharray: 4 4; opacity: .85; pointer-events: none; animation: geoDraw .9s var(--ease-out) both; }
@keyframes geoDraw { from { stroke-dashoffset: 400; opacity: 0; } to { stroke-dashoffset: 0; opacity: .85; } }
.geo__pin { pointer-events: none; }
.geo__pin circle:last-child { fill: var(--c-accent); stroke: #fff; stroke-width: 2; }
.geo__ping { fill: none; stroke: var(--c-accent); stroke-width: 2; transform-origin: 0 0; animation: geoPing 1.8s ease-out infinite; }
@keyframes geoPing { from { transform: scale(1); opacity: .9; } to { transform: scale(3.2); opacity: 0; } }
.geo__tip {
  position: absolute; z-index: 5; pointer-events: none; max-width: 240px; display: flex; flex-direction: column; gap: 1px;
  padding: 8px 11px; border-radius: 9px; background: rgba(10, 14, 23, 0.94); border: 1px solid var(--c-border-strong);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .6); font-size: 12px; line-height: 1.4; color: var(--c-soft);
}
.geo__tip[hidden] { display: none; }
.geo__tip b { font-family: var(--font-display); font-size: 13.5px; color: var(--c-text); }
.geo__tip em { font-style: normal; color: var(--c-accent); }
.geo[data-zoomed="true"] .geo__svg { touch-action: none; cursor: grab; }
.geo__svg:active { cursor: grabbing; }
.geo__ctl { position: absolute; bottom: 8px; left: 8px; z-index: 4; display: flex; gap: 6px; }
.geo__ctl button {
  display: inline-flex; align-items: center; justify-content: center; min-width: 32px; height: 32px; padding: 0 8px; border-radius: 9px; cursor: pointer;
  color: var(--c-soft); background: rgba(10, 14, 23, 0.82); border: 1px solid var(--c-border-strong);
}
.geo__ctl button svg { width: 15px; height: 15px; }
.geo__ctl button:hover { color: var(--c-text); border-color: var(--c-line); }
.geo__ctl [data-z="fit"] { display: none; }
.geo[data-zoomed="true"] .geo__ctl [data-z="fit"], .geo__map[data-full="true"] .geo__ctl [data-z="fit"] { display: inline-flex; }
.geo__bar { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; }
.geo__find { display: flex; align-items: center; gap: 8px; }
.modal .geo__find input { width: 200px; min-height: 36px; padding: 6px 12px; font-size: 13.5px; border-radius: 999px; }
.geo__big {
  flex: none; display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 13px; border-radius: 999px; cursor: pointer;
  font: 600 12.5px var(--font-body); color: var(--c-accent); background: var(--c-wash); border: 1px solid var(--c-line);
}
.geo__big svg { width: 14px; height: 14px; }
.geo__big:hover { background: var(--c-accent); color: var(--c-on); }
.geo__full {
  position: absolute; inset: 0; z-index: 20; display: flex; flex-direction: column; gap: 12px;
  padding: 18px 20px max(20px, env(safe-area-inset-bottom)); background: var(--color-bg); animation: stepIn .25s var(--ease-out) both;
}
.geo__full[hidden] { display: none; }
.geo__fullbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.geo__fullbar b { display: block; font-family: var(--font-display); font-size: 20px; font-weight: 700; color: var(--c-text); }
.geo__fullbar span { display: block; margin-top: 2px; font-size: 13px; color: var(--c-muted); }
.geo__close { flex: none; width: 36px; height: 36px; display: grid; place-items: center; cursor: pointer; border-radius: 50%; border: 1px solid var(--c-border-strong); background: transparent; color: var(--c-soft); }
.geo__close svg { width: 15px; height: 15px; }
.geo__fullbody { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; }
.geo__fullbody .geo__map { aspect-ratio: auto; width: 100%; height: 100%; }
.geo__fullbody .geo__svg { touch-action: none; }
.geo__full .geo__home text { font-size: 14px; }

/* done */
.demo__done { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 40px 8px 10px; outline: none; }
.demo__done[hidden] { display: none; }
.demo__tick { width: 60px; height: 60px; display: grid; place-items: center; border-radius: 50%; background: var(--c-wash); color: var(--c-accent); border: 1px solid var(--c-line); }
.demo__tick svg { width: 28px; height: 28px; animation: tickPop .45s cubic-bezier(.34, 1.56, .64, 1) .15s both; }
@keyframes tickPop { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }
.demo__done-title { margin: 6px 0 0; font-family: var(--font-display); font-size: 22px; font-weight: 700; color: var(--c-text); }
.demo__done-when { margin: 0; font-size: 15px; line-height: 1.55; color: var(--c-soft); }
.demo__done-when b { color: var(--c-text); }
.demo__done-when span { color: var(--c-muted); font-size: 13.5px; }
.demo__done-note { margin: 4px 0 12px; max-width: 44ch; font-size: 14px; line-height: 1.6; color: var(--c-muted); }
.demo__done-note b { color: var(--c-soft); font-weight: 500; }
.demo__done-note span { display: block; margin-top: 6px; font-size: 12.5px; color: var(--c-dim); }

/* ---- the CTA section: one button, one line under it ---- */
.cta-note { margin: var(--space-4) auto 0; max-width: none; text-align: center; font-size: var(--text-sm); color: var(--color-text-muted); }

/* the header button: ".header__nav a" (style.css) outranks ".header__cta" and turned its text grey on amber */
.header__nav .header__cta, .header__nav .header__cta:hover { color: var(--color-text-inverse); }

/* ---- small screens: one column, the panel shrinks to a header ---- */
@media (max-width: 820px) {
  .modal { width: calc(100vw - 20px); max-height: calc(100svh - 20px); }
  .modal[open] { display: flex; flex-direction: column; }
  .modal__head { flex: none; padding: 22px 60px 18px 20px; border-right: 0; border-bottom: 1px solid var(--c-border); }
  .modal__head::after, .modal__facts, .modal__track { display: none; }
  .want { padding: 14px; gap: 12px; }
  .want__icon { display: none; }
  .modal__title { font-size: 21px; }
  .modal__lead { margin-top: 6px; font-size: 13.5px; }
  .modal__body { flex: 1; min-height: 0; max-height: none; padding: 22px 20px 24px; }
}
@media (max-width: 700px) {
  .when__pick { grid-template-columns: minmax(0, 1fr); }
  .when__slots { grid-template-columns: repeat(3, minmax(0, 1fr)); max-height: none; overflow: visible; }
}
@media (max-width: 560px) {
  .geo__find, .modal .geo__find input { width: 100%; }
  .modal .geo__find input { flex: 1; min-width: 0; }
  .geo__home text { display: none; }
  .geo__ctl [data-z="in"], .geo__ctl [data-z="out"] { display: none; }
  .geo__big span { display: none; }
  .demo__step .demo__actions { flex-direction: column-reverse; align-items: stretch; }
  .demo__step .demo__actions .btn-primary { justify-content: center; width: 100%; }
  .demo__progress li + li::before { width: 14px; }
}
@media (pointer: coarse) { .geo__dots circle { pointer-events: none; } }
@media (prefers-reduced-motion: reduce) {
  .modal[open], .modal[open]::backdrop, .demo__step, .when__slot, .geo__arc, .geo__ping, .geo__full, .demo__tick svg { animation: none !important; }
}

/* ============================================================
   Step 1 layout: one two-column grid, steady rhythm
   ------------------------------------------------------------
   Every field sits on the same two column edges; Role and Message
   span both. Each field keeps a fixed slot for its error line, so
   nothing jumps when errors appear. Consent and the button share
   a footer row under a divider.
   ============================================================ */
.demo__step[data-step="1"] { gap: 18px; }
.demo__step[data-step="1"] .demo__h { padding-right: 44px; margin-bottom: 2px; }
.fgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 16px; row-gap: 8px; }
.fgrid__wide { grid-column: 1 / -1; }
.fgrid .field { gap: 7px; }
.fgrid .field__err { display: block; min-height: 18px; line-height: 18px; margin-top: -2px; }
.fgrid .field__err:empty { display: block; }
.field label i, .demo__consent i { font-style: normal; color: var(--c-accent); }
.fgrid .phone__cc { padding: 0 10px; min-width: 84px; justify-content: space-between; }
.fgrid textarea { min-height: 110px; }

.form-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap;
  margin-top: 2px; padding-top: 18px; border-top: 1px solid var(--c-border);
}
.form-foot .demo__status { flex-basis: 100%; order: -1; margin: 0; }
.form-foot .demo__consent { flex: 1 1 260px; align-items: center; margin: 0; }
.form-foot .demo__consent input { margin: 0; width: 18px; height: 18px; }
.form-foot .demo__consent .field__err { padding-left: 28px; }
.form-foot .btn-primary { flex: none; min-width: 190px; justify-content: center; }

@media (max-width: 560px) {
  .fgrid { grid-template-columns: minmax(0, 1fr); }
  .demo__step .form-foot { flex-direction: column; align-items: stretch; }
  .form-foot .demo__consent { flex: none; }
  .form-foot .btn-primary { width: 100%; }
}

/* the form column's scrollbar: slim, in the theme's colours, and its track starts below the
   close button so the two never overlap */
.modal__body { scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.18) transparent; }
.modal__body::-webkit-scrollbar { width: 8px; }
.modal__body::-webkit-scrollbar-track { background: transparent; margin: 64px 0 12px; }
.modal__body::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.16); border-radius: 8px; border: 2px solid transparent; background-clip: padding-box; }
.modal__body::-webkit-scrollbar-thumb:hover { background: rgba(212, 149, 42, 0.5); background-clip: padding-box; }
.modal__close { top: 16px; right: 22px; }
@media (max-width: 820px) { .modal__close { top: 14px; right: 14px; } }   /* phones: it sits in the header, not over the form */

/* the Cloudflare bot check: invisible unless it needs the visitor to tick a box */
.ts-box { display: flex; justify-content: flex-end; }
.ts-box:empty { display: none; }
