/* ── Brand Tokens ────────────────────────────────────────────────────────── */
:root {
  --brand-dark:      #0f2347;
  --brand-primary:   #1a3c6e;
  --brand-secondary: #2563eb;
  --brand-accent:    #f59e0b;
  --brand-light:     #eff6ff;
}

/* ── Base ─────────────────────────────────────────────────────────────────── */
body {
  background: #f8fafc;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: #334155;
}

/* ── Navbar ───────────────────────────────────────────────────────────────── */
.site-navbar {
  background: linear-gradient(135deg, var(--brand-dark) 0%, var(--brand-primary) 100%);
  box-shadow: 0 2px 12px rgba(0,0,0,.25);
}
.brand-icon {
  background: rgba(255,255,255,.15);
  border-radius: 10px;
  width: 42px; height: 42px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.15rem; color: #fff;
}
.brand-name {
  font-size: 1.2rem; font-weight: 800; color: #fff; letter-spacing: -.3px;
  display: block; line-height: 1.1;
}
.brand-tagline {
  font-size: .62rem; color: rgba(255,255,255,.55);
  text-transform: uppercase; letter-spacing: .8px;
  display: block;
}

/* ── Hero ─────────────────────────────────────────────────────────────────── */
.hero-section {
  background: linear-gradient(135deg, var(--brand-dark) 0%, var(--brand-secondary) 100%);
  padding: 4.5rem 0 6.5rem;
  position: relative;
  overflow: hidden;
}
.hero-section::before {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-section::after {
  content: '';
  position: absolute; bottom: -1px; left: 0; right: 0;
  height: 70px;
  background: #f8fafc;
  clip-path: ellipse(55% 100% at 50% 100%);
}
.hero-title {
  font-size: 2.4rem; font-weight: 800; color: #fff; line-height: 1.2;
}
.hero-subtitle {
  color: rgba(255,255,255,.78); font-size: 1.05rem; max-width: 520px;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: .4rem;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 50px; padding: .35rem 1rem;
  color: rgba(255,255,255,.85); font-size: .82rem; font-weight: 600;
  letter-spacing: .3px;
}

/* ── Form card ────────────────────────────────────────────────────────────── */
.form-card {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 8px 48px rgba(0,0,0,.1);
  padding: 2.5rem 2.75rem;
  margin-top: -3.5rem;
  position: relative; z-index: 10;
}
.section-divider {
  font-size: .8rem; font-weight: 700; color: var(--brand-secondary);
  text-transform: uppercase; letter-spacing: 1px;
  border-left: 3px solid var(--brand-secondary);
  padding-left: .75rem;
  margin: 1.75rem 0 1rem;
}
.form-label {
  font-weight: 600; font-size: .875rem; color: #475569; margin-bottom: .35rem;
}
.form-control, .form-select {
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  padding: .6rem .9rem;
  font-size: .925rem;
  transition: border-color .15s, box-shadow .15s;
}
.form-control:focus, .form-select:focus {
  border-color: var(--brand-secondary);
  box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}
.form-control.is-invalid, .form-select.is-invalid {
  border-color: #dc3545;
}
textarea.form-control { resize: vertical; min-height: 120px; }

/* ── Char counter ─────────────────────────────────────────────────────────── */
.char-counter { font-size: .78rem; color: #94a3b8; }
.char-counter.near-limit { color: #f59e0b; }
.char-counter.at-limit    { color: #ef4444; }

/* ── Submit button ────────────────────────────────────────────────────────── */
.btn-submit {
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
  border: none; color: #fff;
  padding: .75rem 2.5rem;
  font-size: 1rem; font-weight: 700;
  border-radius: 10px;
  letter-spacing: .2px;
  transition: opacity .2s, transform .1s;
}
.btn-submit:hover  { opacity: .9; color: #fff; }
.btn-submit:active { transform: scale(.98); }
.btn-submit:disabled { opacity: .65; cursor: not-allowed; }

/* ── Alert ────────────────────────────────────────────────────────────────── */
#form-alert {
  display: none;
  border-radius: 10px;
  font-size: .92rem;
  animation: slideDown .25s ease;
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Success card (shown after submit) ────────────────────────────────────── */
#success-card {
  display: none;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 8px 48px rgba(0,0,0,.1);
  padding: 3rem 2.5rem;
  text-align: center;
  position: relative; z-index: 10;
  margin-top: -3.5rem;
  animation: fadeIn .4s ease;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.success-icon-wrap {
  width: 80px; height: 80px;
  background: #ecfdf5; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1.25rem;
  font-size: 2.2rem; color: #10b981;
}
.reference-badge {
  display: inline-block;
  background: var(--brand-light);
  color: var(--brand-primary);
  font-size: 1.15rem; font-weight: 800;
  border: 2px dashed var(--brand-secondary);
  border-radius: 10px;
  padding: .5rem 1.5rem;
  letter-spacing: 1px;
}

/* ── Features strip ───────────────────────────────────────────────────────── */
.features-strip {
  background: linear-gradient(135deg, var(--brand-dark), var(--brand-primary));
  padding: 3rem 0;
}
.feature-icon-box {
  width: 52px; height: 52px; border-radius: 14px;
  background: rgba(255,255,255,.12);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.35rem; color: #fff;
  flex-shrink: 0;
}

/* ── Footer ───────────────────────────────────────────────────────────────── */
.site-footer {
  background: var(--brand-dark);
  color: rgba(255,255,255,.5);
  font-size: .85rem;
  padding: 1.5rem 0;
}
.site-footer a { color: rgba(255,255,255,.65); text-decoration: none; }
.site-footer a:hover { color: #fff; }

/* ── Responsive tweaks ────────────────────────────────────────────────────── */
@media (max-width: 767.98px) {
  .hero-title  { font-size: 1.75rem; }
  .form-card   { padding: 1.5rem 1.25rem; margin-top: -2rem; }
  #success-card { padding: 2rem 1.25rem; margin-top: -2rem; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   Multi-step Wizard
   ═══════════════════════════════════════════════════════════════════════════ */

/* Dots row */
.wz-dots {
  display: flex; gap: 4px; flex-wrap: wrap;
}
.wz-dot {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  background: none; border: none; cursor: pointer;
  flex: 1; min-width: 44px; padding: 4px 2px;
  color: #94a3b8; transition: color .15s;
}
.wz-dot-num {
  width: 30px; height: 30px; border-radius: 50%;
  background: #e2e8f0; color: #64748b;
  display: flex; align-items: center; justify-content: center;
  font-size: .78rem; font-weight: 700;
  transition: background .2s, color .2s;
}
.wz-dot-label { font-size: .65rem; font-weight: 600; text-transform: uppercase; letter-spacing: .3px; }

.wz-dot.active .wz-dot-num { background: var(--brand-secondary); color: #fff; }
.wz-dot.active { color: var(--brand-secondary); }
.wz-dot.done   .wz-dot-num { background: #10b981; color: #fff; }
.wz-dot.done   { color: #10b981; }

/* Progress bar */
.wz-progress { height: 4px; background: #e2e8f0; border-radius: 4px; overflow: hidden; }
.wz-bar      { height: 100%; background: linear-gradient(90deg, var(--brand-primary), var(--brand-secondary)); border-radius: 4px; transition: width .35s ease; }

/* Form steps */
.form-step { display: none; animation: fadeInStep .2s ease; }
.form-step.active { display: block; }
@keyframes fadeInStep { from { opacity:0; transform: translateY(6px); } to { opacity:1; transform: none; } }

/* ── Yes/No question rows ─────────────────────────────────────────────────── */
.yn-item {
  background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 10px;
  padding: .85rem 1rem; margin-bottom: .65rem;
}
.yn-q { font-size: .9rem; color: #334155; line-height: 1.4; }
.yn-opts { display: flex; gap: 1.25rem; }
.yn-opts .form-check { white-space: nowrap; }
.yn-detail-wrap textarea { background: #fff; }

/* ── Assistance checkboxes ────────────────────────────────────────────────── */
.assist-option {
  border: 1.5px solid #e2e8f0; border-radius: 10px;
  padding: .75rem 1rem; cursor: pointer;
  transition: border-color .15s, background .15s;
  display: flex; align-items: center; gap: .6rem;
}
.assist-option:has(input:checked) {
  border-color: var(--brand-secondary);
  background: var(--brand-light);
}
.assist-option .form-check-input { margin: 0; flex-shrink: 0; }
.assist-option .form-check-label { cursor: pointer; font-weight: 500; font-size: .9rem; margin: 0; }

/* ── Document placeholder tiles ──────────────────────────────────────────── */
.doc-placeholder {
  background: #f8fafc; border: 1.5px dashed #cbd5e1; border-radius: 10px;
  padding: .85rem 1rem; display: flex; align-items: center;
  font-size: .875rem; color: #64748b;
}

/* ── Signature pad ────────────────────────────────────────────────────────── */
.sig-pad-wrap {
  position: relative; display: inline-block; width: 100%;
}
#sig-canvas {
  border: 2px dashed #cbd5e1; border-radius: 10px; background: #fafafa;
  cursor: crosshair; display: block; width: 100%; max-width: 700px;
  height: 160px; touch-action: none;
}
.sig-clear-btn {
  position: absolute; top: .5rem; right: .5rem;
  font-size: .75rem; padding: .25rem .6rem;
}

/* ── Declaration box ──────────────────────────────────────────────────────── */
.declaration-box {
  background: var(--brand-light); border: 1px solid #bfdbfe;
  border-radius: 10px; padding: 1.25rem 1.5rem;
  font-size: .92rem; line-height: 1.7; color: #1e3a5f;
}

/* ── Responsive wizard ────────────────────────────────────────────────────── */
@media (max-width: 575.98px) {
  .wz-dot-label { display: none !important; }
  .wz-dot-num   { width: 26px; height: 26px; font-size: .7rem; }
}
