/* The site's one "Book a demo" form: a modal holding the Zoho CRM Web-to-Lead form, shared by every
   page (assets/demo-form.js inserts it). Moved verbatim from the homepage, 2026-10-22. Each value
   prefers the page's own token and falls back to the homepage's, because the News pages define a
   smaller token set. */
.demo-modal {
  --dm-scrim: rgba(8, 9, 11, 0.62); --dm-panel: #16191d; --dm-panel-2: #1e2329;
  --dm-border-strong: rgba(255, 255, 255, 0.20); --dm-accent-deep: #4aa2d3; --dm-ring: rgba(74, 162, 211, 0.11);
  --dm-btn-bg: #8ed7ff; --dm-btn-text: #0c1216; --dm-btn-hover: #b5e5ff;
}
:root[data-theme="light"] .demo-modal {
  --dm-scrim: rgba(250, 249, 247, 0.6); --dm-panel: #ffffff; --dm-panel-2: #efece5;
  --dm-border-strong: rgba(15, 23, 32, 0.26); --dm-accent-deep: #3260aa; --dm-ring: rgba(74, 162, 211, 0.24);
  --dm-btn-bg: #16202a; --dm-btn-text: #faf9f7; --dm-btn-hover: #24313d;
}
.demo-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--hero-scrim, var(--dm-scrim));
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s var(--ease-out, cubic-bezier(0.22, 1, 0.36, 1)), visibility 0.25s var(--ease-out, cubic-bezier(0.22, 1, 0.36, 1));
}
.demo-modal.is-open { opacity: 1; visibility: visible; }
.demo-modal[hidden] { display: none; }

.demo-modal__panel {
  position: relative;
  width: 100%;
  max-width: 520px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  background: var(--bg-panel, var(--dm-panel));
  border: 1px solid var(--border-strong, var(--dm-border-strong));
  border-radius: var(--radius-xl, 6px);
  box-shadow: var(--shadow-term);
  padding: 34px 34px 30px;
  transform: translateY(14px) scale(0.985);
  transition: transform 0.3s var(--ease-out, cubic-bezier(0.22, 1, 0.36, 1));
  text-align: left;
}
.demo-modal.is-open .demo-modal__panel { transform: none; }

.demo-modal__eyebrow {
  font-family: var(--font-mono, ui-monospace, "SF Mono", Consolas, monospace);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent, #8ed7ff);
  margin: 0 0 8px;
}
.demo-modal__eyebrow::before {
  content: "— ";
  color: var(--accent, #8ed7ff);
}
.demo-modal__title {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--text);
  margin: 0 0 6px;
}
.demo-modal__intro {
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--muted);
  margin: 0 0 20px;
}

.demo-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-md, 3px);
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s var(--ease-out, cubic-bezier(0.22, 1, 0.36, 1));
}
.demo-modal__close:hover {
  border-color: var(--border-strong, var(--dm-border-strong));
  color: var(--text);
  transform: translateY(-1px);
}

.demo-modal__loading {
  color: var(--faint);
  font-family: var(--font-mono, ui-monospace, "SF Mono", Consolas, monospace);
  font-size: 13px;
  padding: 20px 0;
}

/* Native demo form: our design; posts to Zoho on submit. */
.demo-modal__form { margin-top: 4px; }
.demo-modal .demo-field { margin-bottom: 14px; }
.demo-modal .demo-field label {
  display: block;
  font-family: var(--font-mono, ui-monospace, "SF Mono", Consolas, monospace);
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--muted);
  margin-bottom: 6px;
}
.demo-modal .demo-req { color: var(--accent, #8ed7ff); }
.demo-modal .demo-field input,
.demo-modal .demo-field textarea {
  width: 100%;
  box-sizing: border-box;
  background: var(--bg-panel-2, var(--dm-panel-2));
  border: 1px solid var(--border);
  border-radius: var(--radius-md, 3px);
  color: var(--text);
  font-family: var(--font-sans, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif);
  font-size: 15px;
  padding: 10px 12px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.demo-modal .demo-field textarea { resize: vertical; min-height: 72px; }
.demo-modal .demo-field input:focus,
.demo-modal .demo-field textarea:focus {
  outline: none;
  border-color: var(--accent-deep, var(--dm-accent-deep));
  box-shadow: 0 0 0 2px var(--aurora-b, var(--dm-ring));
}
.demo-modal .demo-field input.is-invalid,
.demo-modal .demo-field textarea.is-invalid { border-color: var(--win-red, #e2695f); }
.demo-form__error {
  color: var(--win-red, #e2695f);
  font-size: 13.5px;
  margin: 0 0 12px;
}
/* the submit button carries the homepage's .btn .btn-solid look itself, so it renders the same on
   pages that don't define those classes */
.demo-modal .demo-form__submit {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; margin-top: 4px;
  font-family: var(--font-sans, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif);
  font-size: 15px; font-weight: 600; letter-spacing: -0.005em;
  padding: 12px 26px; border-radius: var(--radius-md, 3px); border: 1px solid transparent; cursor: pointer;
  background: var(--btn-solid-bg, var(--dm-btn-bg)); color: var(--btn-solid-text, var(--dm-btn-text));
  transition: background-color 0.2s ease, transform 0.25s var(--ease-out, cubic-bezier(0.22, 1, 0.36, 1)), box-shadow 0.25s var(--ease-out, cubic-bezier(0.22, 1, 0.36, 1));
}
.demo-modal .demo-form__submit:hover {
  background: var(--btn-solid-hover, var(--dm-btn-hover));
  transform: translateY(-2px);
  box-shadow: 0 8px 24px -8px var(--aurora-b, var(--dm-ring)), 0 2px 8px rgba(0, 0, 0, 0.18);
}
.demo-modal .demo-form__submit:disabled { opacity: 0.7; cursor: default; transform: none; }
.demo-form__thanks { padding: 8px 0 4px; }

@media (prefers-reduced-motion: reduce) {
  .demo-modal, .demo-modal__panel { transition-duration: 0.01ms; }
}
