/* ========== DEMO REQUEST MODAL ==========
   Two panes: what the visitor gets (dark, brand-coloured) next to the form.
   Collapses to a single column below 860px, where the value panel moves above
   the form so the first thing on screen is still the reason to fill it in.
   ========================================= */

.modal.demo {
  max-width: 940px;
  padding: 0;
  overflow: hidden;
  max-height: calc(100vh - 40px);
}
/* The close button sits over the light form pane, not the dark panel, so it
   keeps the normal dark-on-light treatment. */
.modal.demo .modal-close { z-index: 2; }

.demo-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  min-height: 0;
  max-height: calc(100vh - 40px);
}

/* ===== value panel ===== */
.demo-aside {
  background: linear-gradient(160deg, #0A0A14 0%, #131A33 55%, #0F2350 100%);
  color: #fff;
  padding: 38px 30px 30px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  position: relative;
  overflow: hidden;
}
.demo-aside::after {
  content: '';
  position: absolute;
  right: -70px; bottom: -90px;
  width: 240px; height: 240px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(30,94,255,.5), transparent 68%);
  pointer-events: none;
}
.demo-aside-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  color: var(--accent);
}
.demo-aside h4 {
  font-size: 21px;
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: -.015em;
}

.demo-benefits {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin: 0;
  padding: 0;
  position: relative;
  z-index: 1;
}
.demo-benefits li { display: flex; gap: 12px; align-items: flex-start; }
.demo-benefits li > div { display: flex; flex-direction: column; gap: 3px; }
.demo-benefits b { font-size: 13.5px; font-weight: 600; }
.demo-benefits span { font-size: 12.5px; line-height: 1.5; color: rgba(255,255,255,.62); }
.demo-benefit-ic {
  width: 30px; height: 30px;
  flex: none;
  border-radius: 9px;
  background: rgba(255,255,255,.1);
  display: grid; place-items: center;
  color: var(--accent);
}

.demo-aside-foot {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,.12);
  display: flex;
  flex-direction: column;
  gap: 7px;
  position: relative;
  z-index: 1;
}
.demo-aside-foot > span {
  font-size: 11px;
  color: rgba(255,255,255,.45);
  letter-spacing: .02em;
}
.demo-aside-foot a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: rgba(255,255,255,.9);
  transition: color .2s var(--ease);
}
.demo-aside-foot a:hover { color: var(--accent); }

/* ===== form pane ===== */
.demo-form {
  padding: 38px 36px 30px;
  overflow-y: auto;
  min-height: 0;
}
.demo-form h3 { margin-bottom: 6px; }
.demo-form .sub { color: var(--ink-3); font-size: 14px; margin-bottom: 22px; }
.demo-form .field { margin-bottom: 16px; }

.demo-form input.has-err,
.demo-form select.has-err,
.demo-form .demo-phone:has(input.has-err) {
  border-color: #E04040;
}
.demo-err {
  font-size: 11.5px;
  color: #C72A2A;
  margin-top: 2px;
}

/* phone with a fixed country prefix */
.demo-phone {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.demo-phone:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(30,94,255,.1);
}
.demo-phone > span {
  display: grid;
  place-items: center;
  padding: 0 11px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-3);
  background: var(--bg-alt);
  border-right: 1px solid var(--line);
}
.demo-phone input {
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  flex: 1;
  min-width: 0;
}

/* module picker */
.demo-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.demo-chip {
  padding: 7px 13px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: #fff;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink-2);
  transition: all .18s var(--ease);
}
.demo-chip:hover { border-color: var(--ink-3); }
.demo-chip.on {
  background: var(--brand-soft);
  border-color: var(--brand);
  color: var(--brand-ink);
  font-weight: 600;
}

/* consent */
.demo-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(10,10,20,.015);
  font-size: 12px;
  line-height: 1.5;
  color: var(--ink-3);
  cursor: pointer;
  transition: border-color .2s var(--ease);
}
.demo-consent:hover { border-color: var(--line-2); }
.demo-consent.has-err { border-color: #E04040; background: rgba(224,64,64,.04); }
.demo-consent input {
  width: 16px; height: 16px;
  flex: none;
  margin-top: 1px;
  accent-color: var(--brand);
  cursor: pointer;
}

/* send failure */
.demo-failed {
  margin-top: 14px;
  padding: 13px 15px;
  border-radius: 10px;
  background: #FDF1F1;
  border: 1px solid #F3C9C9;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.demo-failed b { font-size: 13px; color: #A32020; }
.demo-failed span { font-size: 12px; color: #7A3030; line-height: 1.5; }
.demo-failed button {
  align-self: flex-start;
  margin-top: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: #A32020;
  text-decoration: underline;
}

.demo-form .modal-footer { margin-top: 20px; }

/* ===== success ===== */
.demo-done { text-align: center; padding: 8px 0 4px; }
.demo-done-ic {
  width: 56px; height: 56px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--ink);
  display: grid; place-items: center;
  margin: 0 auto 18px;
}
.demo-done .sub { color: var(--ink-3); font-size: 14px; margin-top: 8px; }
.demo-steps {
  list-style: none;
  margin: 24px 0 18px;
  padding: 20px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-alt);
  display: flex;
  flex-direction: column;
  gap: 13px;
  text-align: left;
}
.demo-steps li {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.45;
}
.demo-step-n {
  width: 21px; height: 21px;
  flex: none;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: grid; place-items: center;
}
.demo-done-alt { font-size: 12.5px; color: var(--ink-3); margin-bottom: 20px; }
.demo-done-alt a { color: var(--brand); font-weight: 600; }

/* ===== responsive ===== */
@media (max-width: 860px) {
  .demo-grid { grid-template-columns: 1fr; }
  .demo-aside { padding: 30px 26px 26px; gap: 18px; }
  .demo-aside h4 { font-size: 19px; }
  /* On a phone the three benefit lines push the form too far down; the
     headline and the direct-contact links carry the message on their own. */
  .demo-benefits { display: none; }
  .demo-aside-foot { margin-top: 4px; }
  .demo-form { padding: 28px 24px 24px; }
}
@media (max-width: 560px) {
  .demo-form .field .row { grid-template-columns: 1fr; }
}
