/* ============================================================
   modal.css — Download modal overlay, form, success state
   ============================================================ */

/* ── DOWNLOAD MODAL ──────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(6px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}
.modal {
  background: var(--bg1);
  border: 1px solid var(--border2);
  border-radius: 16px;
  padding: 36px 32px 32px;
  width: 100%;
  max-width: 440px;
  margin: 16px;
  box-shadow: 0 40px 80px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.04) inset;
  transform: translateY(16px);
  transition: transform 0.25s cubic-bezier(0.16,1,0.3,1);
}
.modal-overlay.open .modal {
  transform: translateY(0);
}
.modal-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}
.modal-logo .logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
}
.modal-logo span {
  font-weight: 700;
  font-size: 16px;
  color: var(--t0);
  letter-spacing: -0.02em;
}
.modal h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--t0);
  margin: 0 0 6px;
  letter-spacing: -0.02em;
}
.modal-sub {
  font-size: 13.5px;
  color: var(--t2);
  margin-bottom: 26px;
  line-height: 1.5;
}
.modal-field {
  margin-bottom: 14px;
}
.modal-field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--t1);
  margin-bottom: 6px;
  letter-spacing: 0.02em;
}
.modal-field input {
  width: 100%;
  background: var(--bg0);
  border: 1px solid var(--border2);
  border-radius: 8px;
  padding: 10px 13px;
  font-size: 13.5px;
  color: var(--t0);
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  box-sizing: border-box;
}
.modal-field input:focus {
  border-color: var(--acc);
  box-shadow: 0 0 0 3px var(--acc-soft);
}
.modal-field input::placeholder { color: var(--t3); }
.modal-submit {
  width: 100%;
  margin-top: 8px;
  background: linear-gradient(180deg, #7a86ff 0%, var(--acc) 100%);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 12px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(102,116,255,0.4);
  transition: filter 0.15s, transform 0.15s;
}
.modal-submit:hover { filter: brightness(1.08); transform: translateY(-1px); }
.modal-submit:disabled { opacity: 0.75; cursor: not-allowed; transform: none; filter: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.modal-close {
  position: absolute;
  top: 16px; right: 16px;
  width: 28px; height: 28px;
  border-radius: 7px;
  background: var(--bg2);
  border: 1px solid var(--border);
  color: var(--t2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  transition: background 0.15s, color 0.15s;
}
.modal-close:hover { background: var(--bg3); color: var(--t0); }
.modal { position: relative; }
.modal-success {
  text-align: center;
  padding: 20px 0 10px;
  display: none;
}
.modal-success .success-icon {
  width: 52px; height: 52px;
  background: var(--green-soft);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  color: var(--green);
}
.modal-success h3 { margin-bottom: 8px; }
.modal-success p { color: var(--t2); font-size: 13.5px; margin-bottom: 20px; }
body.light .modal { background: #fff; }
body.light .modal-field input { background: #f9fafc; }
