/* Book a demo: the dialog, plus the buttons that open it. Uses the page's :root tokens. */

.nav-links .nav-links-demo { display: none; }
.cta-buttons { display: flex; flex-wrap: wrap; gap: 12px; justify-content: flex-end; }
.cta .btn-secondary { background: transparent; color: var(--white); border-color: rgba(255, 255, 255, 0.35); }
.cta .btn-secondary:hover { border-color: var(--white); }

@media (max-width: 980px) {
  /* .nav-cta raises it above the page's own .btn rule, which loads after this file. */
  .nav-cta .nav-demo { display: none; }
  .nav-links .nav-links-demo { display: block; }
}

html:has(.demo-dialog[open]) { overflow: hidden; }

.demo-dialog {
  width: min(560px, calc(100% - 32px));
  max-height: calc(100% - 32px);
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--white);
  color: var(--ink);
  box-shadow: var(--shadow-lg);
  font-family: var(--sans);
}
.demo-dialog::backdrop { background: rgba(6, 47, 107, 0.45); }
.demo-dialog[open] { animation: demo-in .2s ease; }
@keyframes demo-in { from { opacity: 0; transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) { .demo-dialog[open] { animation: none; } }

.demo-card { position: relative; padding: 36px 36px 32px; }
.demo-close {
  position: absolute; top: 14px; right: 14px; width: 36px; height: 36px;
  border: 0; border-radius: var(--radius-pill); background: transparent;
  color: var(--slate); font-size: 22px; line-height: 1; cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.demo-close:hover { background: var(--cloud); color: var(--navy); }

.demo-eyebrow {
  display: inline-block; margin: 0 0 14px; padding: 4px 12px;
  border-radius: var(--radius-pill); background: var(--mint-tint);
  color: var(--navy); font-size: 12px; font-weight: 600; letter-spacing: .04em;
}
.demo-title {
  margin: 0 0 8px; font-family: var(--serif); font-weight: 500;
  font-size: 28px; line-height: 1.15; color: var(--navy); text-wrap: balance;
}
.demo-title em { color: var(--teal); }
.demo-title:focus { outline: none; }
.demo-lede { margin: 0 0 24px; color: var(--slate); font-size: 15px; line-height: 1.55; text-wrap: pretty; }

.demo-form { display: grid; gap: 16px; }
.demo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.demo-field { display: grid; gap: 6px; margin: 0; padding: 0; border: 0; min-width: 0; }
.demo-field[hidden] { display: none; }
.demo-field > span, .demo-field > legend { font-size: 13px; font-weight: 500; color: var(--navy); padding: 0; }
.demo-field i { font-style: normal; font-weight: 400; color: var(--slate-2); }
.demo-field input, .demo-field select, .demo-field textarea {
  width: 100%; box-sizing: border-box; min-height: 44px; padding: 10px 14px;
  border: 1px solid var(--border); border-radius: var(--radius-md);
  background: var(--white); color: var(--ink); font: inherit; font-size: 15px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.demo-field textarea { resize: vertical; min-height: 84px; }
.demo-field input:focus, .demo-field select:focus, .demo-field textarea:focus {
  outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(10, 139, 143, 0.15);
}
.demo-choice { grid-template-columns: 1fr 1fr; }
.demo-choice legend { grid-column: 1 / -1; margin-bottom: 6px; }
.demo-choice label {
  display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 14px;
  border: 1px solid var(--border); border-radius: var(--radius-md);
  font-size: 15px; cursor: pointer; transition: border-color .15s ease, background .15s ease;
}
.demo-choice label:has(input:checked) { border-color: var(--teal); background: var(--cloud-2); }
.demo-choice input[type="radio"] {
  flex: none; width: 18px; height: 18px; min-height: 0; margin: 0; padding: 0;
  border: 0; box-shadow: none; accent-color: var(--teal);
}

.demo-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.demo-error { margin: 0; padding: 12px 14px; border-radius: var(--radius-md); background: #FEF3F2; color: #B42318; font-size: 14px; line-height: 1.5; }
.demo-error[hidden] { display: none; }
.demo-error a { color: inherit; font-weight: 600; text-decoration: underline; }
.demo-submit { width: 100%; }
.demo-submit[disabled] { opacity: .7; cursor: progress; transform: none; box-shadow: none; }
.demo-slow { margin: -6px 0 0; text-align: center; color: var(--slate); font-size: 13px; }

.demo-done { text-align: center; padding: 12px 0 4px; }
.demo-done .demo-title { margin-bottom: 10px; }
.demo-done .demo-lede { margin-bottom: 24px; }

@media (max-width: 600px) {
  .demo-card { padding: 28px 20px 24px; }
  .demo-title { font-size: 24px; }
  .demo-grid, .demo-choice { grid-template-columns: 1fr; }
}
