/* ============================================================
   DEMO MODAL — D.E. Systems
   ============================================================ */

.demo-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(0, 26, 43, 0.75);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.demo-modal-overlay:not([hidden]) { opacity: 1; }
.demo-modal-overlay[hidden] { display: none; }

/* Box */
.demo-modal-box {
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 32px 80px rgba(0,0,0,0.22);
  width: 100%;
  max-width: 900px;
  max-height: 92vh;
  overflow-y: auto;
  display: grid;
  grid-template-columns: 1fr;
  position: relative;
  transform: translateY(12px);
  transition: transform 0.25s ease;
}
.demo-modal-overlay:not([hidden]) .demo-modal-box { transform: translateY(0); }
@media (min-width: 768px) {
  .demo-modal-box { grid-template-columns: 360px 1fr; max-height: 88vh; overflow: hidden; }
}

/* Close */
.demo-modal-close {
  position: absolute;
  top: 1rem; right: 1rem;
  z-index: 10;
  background: rgba(255,255,255,0.9);
  border: 1px solid #e5e7eb;
  border-radius: 50%;
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  color: #6b7280;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.demo-modal-close:hover { background: #f3f4f6; color: #111827; }

/* Left panel */
.demo-modal-left {
  background: linear-gradient(160deg, #00243a 0%, #003a5c 100%);
  padding: 2.5rem 2rem;
  border-radius: 20px 20px 0 0;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
@media (min-width: 768px) {
  .demo-modal-left { border-radius: 20px 0 0 20px; overflow-y: auto; }
}

.demo-modal-logo-wrap { margin-bottom: 0.25rem; }
.demo-modal-logo { height: 32px; width: auto; filter: brightness(0) invert(1); opacity: 0.9; }
.demo-modal-headline {
  font-family: 'Sora', sans-serif;
  font-size: 1.375rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
  margin: 0;
}
.demo-modal-sub { font-size: 0.875rem; color: rgba(255,255,255,0.65); line-height: 1.7; margin: 0; }

/* Expect list */
.demo-expect-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.625rem; }
.demo-expect-item { display: flex; align-items: center; gap: 0.625rem; font-size: 0.82rem; color: rgba(255,255,255,0.8); }
.demo-expect-icon {
  width: 22px; height: 22px;
  background: rgba(0,132,199,0.3);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: #5bc5f5;
}

/* Direct contact */
.demo-direct-contact { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 1.25rem; margin-top: auto; }
.demo-direct-label { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: rgba(255,255,255,0.4); margin-bottom: 0.625rem; }
.demo-direct-link {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.82rem; color: rgba(255,255,255,0.65);
  text-decoration: none; margin-bottom: 0.375rem;
  transition: color 0.15s;
}
.demo-direct-link:hover { color: #fff; }

/* Right panel */
.demo-modal-right {
  padding: 2.5rem 2rem;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

/* Step indicator */
.demo-steps {
  display: flex; align-items: center; gap: 0; margin-bottom: 2rem;
}
.demo-step {
  display: flex; align-items: center; gap: 6px;
  font-size: 0.78rem; font-weight: 500; color: #9ca3af;
  transition: color 0.2s;
}
.demo-step.active { color: #0084c7; }
.demo-step.complete { color: #22c55e; }
.demo-step-num {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: #e5e7eb;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.72rem; font-weight: 700; color: #6b7280;
  transition: background 0.2s, color 0.2s;
  flex-shrink: 0;
}
.demo-step.active .demo-step-num  { background: #0084c7; color: #fff; }
.demo-step.complete .demo-step-num { background: #22c55e; color: #fff; }
.demo-step-label { display: none; }
@media (min-width: 400px) { .demo-step-label { display: inline; } }
.demo-step-line { flex: 1; height: 1px; background: #e5e7eb; margin: 0 8px; }

/* Fieldsets */
.demo-fieldset { border: none; margin: 0; padding: 0; }
.demo-fieldset-legend {
  font-family: 'Sora', sans-serif;
  font-size: 1.1rem; font-weight: 700;
  color: #111827; margin-bottom: 1.5rem;
  display: block; width: 100%;
}

/* Form fields */
.demo-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 420px) { .demo-row { grid-template-columns: 1fr; } }

.demo-field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 1rem; }
.demo-label  { font-size: 0.8rem; font-weight: 600; color: #374151; }
.demo-req    { color: #ef4444; }

.demo-input {
  width: 100%; padding: 10px 14px;
  border: 1.5px solid #e5e7eb; border-radius: 8px;
  font-size: 0.875rem; font-family: 'Inter', sans-serif;
  color: #111827; background: #fff;
  transition: border-color 0.18s, box-shadow 0.18s;
  outline: none;
}
.demo-input:focus { border-color: #0084c7; box-shadow: 0 0 0 3px rgba(0,132,199,0.12); }
.demo-input.error { border-color: #ef4444; }
.demo-textarea { resize: vertical; min-height: 80px; line-height: 1.6; }

.demo-error { font-size: 0.73rem; color: #ef4444; min-height: 16px; display: block; }

/* Interest cards */
.demo-interest-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.625rem;
  margin-bottom: 0.5rem;
}
.demo-interest-card { cursor: pointer; }
.demo-interest-card input { position: absolute; opacity: 0; pointer-events: none; }
.demo-interest-inner {
  display: flex; flex-direction: column; align-items: center;
  gap: 0.5rem; padding: 0.875rem 0.5rem;
  border: 1.5px solid #e5e7eb; border-radius: 10px;
  font-size: 0.78rem; font-weight: 500; color: #6b7280;
  text-align: center;
  transition: all 0.18s;
  background: #fff;
}
.demo-interest-card input:checked + .demo-interest-inner {
  border-color: #0084c7;
  background: #f0f7fc;
  color: #0084c7;
}
.demo-interest-inner svg { color: #9ca3af; transition: color 0.18s; }
.demo-interest-card input:checked + .demo-interest-inner svg { color: #0084c7; }
.demo-interest-inner:hover { border-color: #0084c7; color: #0084c7; }

/* Consent */
.demo-consent {
  display: flex; align-items: flex-start; gap: 0.625rem;
  font-size: 0.78rem; color: #6b7280; line-height: 1.55;
  cursor: pointer; margin-bottom: 0.375rem;
}
.demo-consent input { width: 15px; height: 15px; margin-top: 2px; flex-shrink: 0; accent-color: #0084c7; }
.demo-consent a { color: #0084c7; text-decoration: underline; }

/* Buttons */
.demo-btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: #0084c7; color: #fff;
  padding: 0.75rem 1.75rem; border-radius: 8px;
  font-family: 'Inter', sans-serif; font-weight: 600; font-size: 0.9rem;
  border: none; cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  text-decoration: none;
}
.demo-btn-primary:hover { background: #006ba3; transform: translateY(-1px); }
.demo-btn-primary:disabled { background: #9ca3af; cursor: not-allowed; transform: none; }

.demo-btn-back {
  display: inline-flex; align-items: center; gap: 6px;
  background: transparent; color: #6b7280;
  padding: 0.75rem 1rem; border-radius: 8px;
  font-family: 'Inter', sans-serif; font-weight: 500; font-size: 0.875rem;
  border: 1.5px solid #e5e7eb; cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.demo-btn-back:hover { border-color: #9ca3af; color: #374151; }

.demo-btn-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; margin-top: 0.5rem;
}
.demo-btn-submit { width: 100%; margin-top: 0.5rem; padding: 0.875rem; font-size: 0.95rem; }

/* Loading state */
.demo-btn-submit.loading { pointer-events: none; opacity: 0.75; }
.demo-btn-submit.loading::after {
  content: '';
  display: inline-block;
  width: 14px; height: 14px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin-left: 8px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Success */
.demo-success {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; text-align: center;
  gap: 1rem; padding: 2rem 1rem; flex: 1;
}
.demo-success[hidden] { display: none; }
.demo-success-icon { color: #22c55e; }
.demo-success-title {
  font-family: 'Sora', sans-serif;
  font-size: 1.5rem; font-weight: 700; color: #111827; margin: 0;
}
.demo-success-body { font-size: 0.9rem; color: #6b7280; line-height: 1.7; max-width: 340px; margin: 0; }
.demo-success-contact { font-size: 0.82rem; color: #9ca3af; margin: 0; }
.demo-success-contact a { color: #0084c7; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .demo-modal-overlay,
  .demo-modal-box,
  .demo-btn-primary { transition: none; }
  .demo-btn-submit.loading::after { animation: none; }
}
